From patchwork Mon Dec 18 21:44:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 180660 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1552358dyi; Mon, 18 Dec 2023 13:47:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IFuTKg/q7RIUbqu4EW7WOXs1lNKt/zMD4LRXfGCRPwuZSk5XUo1nl+ek2secxgpW9xJd8KV X-Received: by 2002:a05:6512:3743:b0:50c:be5:ffc with SMTP id a3-20020a056512374300b0050c0be50ffcmr8053137lfs.113.1702936065329; Mon, 18 Dec 2023 13:47:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702936065; cv=none; d=google.com; s=arc-20160816; b=POcx8hQ0u1FaUP7E/R0bw+6fcviK4dnqfNgdwt37kjqzLHM2UPXx32o42RmbodTVi3 xXPiFbZ5UTAK976mphj7046ShZXMv/XyxYOcpPfMQDwMQCMCyVkYEYui6EBJNIHy+EBU WG2sTTTisXfGPe+cxrXpmRK8TcHMyrZER2RVA8TWWKIWzFYqTJzJhSHtdjH4uBTE9rXO K75yz+U84iK3hr9TT4rmQVJDoDcZEMBYY+fqyzGBRF9o80G/0UIIEbaguUjElewd8uEI 5rgxBkycUwjiEpnSB+IkeZ3t7F5Vb1Wd3UUCYYOCgIdap3HEvU6bsyGok19ORNCEoNm+ DOMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ao8g5u/I0Tpll1iRVzsBd0C6My70Cl4hknViEQ6emOw=; fh=MOJyzNMsFAJQqEQehvdnrwT/huG78rLnZqS8spAjFqo=; b=pGWCyO379bKekqet0OCEKOSIlWZuK4XdzxBiyV/TkOZx7fncIbDhNSnfc4xkja0Tpt gXHJe2sUR+JuAfXyA4ty2WwmxI37gIiINDmU8s7XN8FdQu6TURc3t8rl7l7/R0pmH8f8 nOFsXSVIKMUy80/o4DXC4WWWLrx2hSqLzzWUDb371/g21o/lsnVGYMH5lFvH1HjYPfcl B6mdZ/TQAOrc2kCnKh0W9fwy76NmtLsGmhPD9d4UITjDQwRfTJGKXxIc02dBPNrgde8H l+oimC0fOBmwRrAcKmKeiF4LNXaMJK38POnit7sVkKbdsvPxnQkH3bpS3/Ubl4gTRj+r 5dnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=iKP7mOpN; spf=pass (google.com: domain of linux-kernel+bounces-4419-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4419-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qh25-20020a170906ecb900b00a235fc5744esi853665ejb.481.2023.12.18.13.47.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 13:47:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4419-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=iKP7mOpN; spf=pass (google.com: domain of linux-kernel+bounces-4419-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4419-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D3AAD1F260CA for ; Mon, 18 Dec 2023 21:47:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC59C7C641; Mon, 18 Dec 2023 21:45:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="iKP7mOpN" X-Original-To: linux-kernel@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1E4E768FF; Mon, 18 Dec 2023 21:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702935899; bh=SJhrES2WZXMt1XZYIJ5pjNI/hRHLW0ufwMjJJWnIkpY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iKP7mOpNdfoZLsrB/YV6tWG9GnqkThGRMrIAasyMprdmD7IrGyI5aL4Sp/vlcwGWI XOKcUb+84AroG9XH1p+Dy8risKvVWquBbWlg0F92ejFGd2Oq4b+MExzvSVlcWf3Qiq +QdwGbAqUznEUIa2lrQW0B2u2RsySf8kSUl/HQyTYDRkjLiV4cEIi0CXex22OFea8d 1gd4S/3Ypu+h06QPOKQ0Qw7LLns+L3oAQI0G6DX3mYEZOHdBoI1xpSRgaYxzotiIZw D5unpsiCDyL487s7UDZb2wfWOXSsTPwQHt/PefW/ZJCCU0VixbCE1VZjokMdfHJ9Yw HjBTyHk3XvKvg== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id C3BF037814AA; Mon, 18 Dec 2023 21:44:58 +0000 (UTC) From: Cristian Ciocaltea To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Samin Guo , Paul Walmsley , Palmer Dabbelt , Albert Ou , Hal Feng , Michael Turquette , Stephen Boyd , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Richard Cochran , Giuseppe Cavallaro Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, Emil Renner Berthing Subject: [PATCH v4 5/9] riscv: dts: starfive: jh7100-common: Setup pinmux and enable gmac Date: Mon, 18 Dec 2023 23:44:45 +0200 Message-ID: <20231218214451.2345691-6-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231218214451.2345691-1-cristian.ciocaltea@collabora.com> References: <20231218214451.2345691-1-cristian.ciocaltea@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785657887736796291 X-GMAIL-MSGID: 1785657887736796291 Add pinmux configuration for DWMAC found on the JH7100 based boards and enable the related DT node, providing a basic PHY configuration. Co-developed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Cristian Ciocaltea --- .../boot/dts/starfive/jh7100-common.dtsi | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7100-common.dtsi b/arch/riscv/boot/dts/starfive/jh7100-common.dtsi index 42fb61c36068..bcba08e5bdf2 100644 --- a/arch/riscv/boot/dts/starfive/jh7100-common.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7100-common.dtsi @@ -72,7 +72,91 @@ wifi_pwrseq: wifi-pwrseq { }; }; +&gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_pins>; + phy-mode = "rgmii-id"; + status = "okay"; + + mdio: mdio { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + }; +}; + &gpio { + gmac_pins: gmac-0 { + gtxclk-pins { + pins = ; + bias-pull-up; + drive-strength = <35>; + input-enable; + input-schmitt-enable; + slew-rate = <0>; + }; + miitxclk-pins { + pins = ; + bias-pull-up; + drive-strength = <14>; + input-enable; + input-schmitt-disable; + slew-rate = <0>; + }; + tx-pins { + pins = , + , + , + , + , + , + , + , + ; + bias-pull-up; + drive-strength = <35>; + input-disable; + input-schmitt-disable; + slew-rate = <0>; + }; + rxclk-pins { + pins = ; + bias-pull-up; + drive-strength = <14>; + input-enable; + input-schmitt-disable; + slew-rate = <6>; + }; + rxer-pins { + pins = ; + bias-pull-up; + drive-strength = <14>; + input-enable; + input-schmitt-disable; + slew-rate = <0>; + }; + rx-pins { + pins = , + , + , + , + , + , + , + , + , + , + , + , + ; + bias-pull-up; + drive-strength = <14>; + input-enable; + input-schmitt-enable; + slew-rate = <0>; + }; + }; + i2c0_pins: i2c0-0 { i2c-pins { pinmux =