From: Inochi Amaoto <inochiama@gmail.com>
To: "Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Chen Wang" <unicorn_wang@outlook.com>,
"Inochi Amaoto" <inochiama@gmail.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Alexandre Ghiti" <alex@ghiti.fr>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Richard Cochran" <richardcochran@gmail.com>,
"Guo Ren" <guoren@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
"Romain Gantois" <romain.gantois@bootlin.com>,
"Joe Hattori" <joe@pf.is.s.u-tokyo.ac.jp>,
"Lothar Rubusch" <l.rubusch@gmail.com>,
"Bartosz Golaszewski" <bartosz.golaszewski@linaro.org>,
"Giuseppe Cavallaro" <peppe.cavallaro@st.com>,
"Jose Abreu" <joabreu@synopsys.com>
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, sophgo@lists.linux.dev,
linux-riscv@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org, Yixun Lan <dlan@gentoo.org>,
Longbin Li <looong.bin@gmail.com>, Han Gao <rabenda.cn@gmail.com>
Subject: [PATCH net-next 4/4] riscv: dts: sophgo: add ethernet GMAC device for sg2042
Date: Tue, 6 May 2025 17:32:54 +0800 [thread overview]
Message-ID: <20250506093256.1107770-5-inochiama@gmail.com> (raw)
In-Reply-To: <20250506093256.1107770-1-inochiama@gmail.com>
Add ethernet GMAC device node for the sg2042.
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Tested-by: Han Gao <rabenda.cn@gmail.com>
---
arch/riscv/boot/dts/sophgo/sg2042.dtsi | 62 ++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/arch/riscv/boot/dts/sophgo/sg2042.dtsi b/arch/riscv/boot/dts/sophgo/sg2042.dtsi
index f61de4788475..886c13cef6ba 100644
--- a/arch/riscv/boot/dts/sophgo/sg2042.dtsi
+++ b/arch/riscv/boot/dts/sophgo/sg2042.dtsi
@@ -543,6 +543,68 @@ uart0: serial@7040000000 {
status = "disabled";
};
+ gmac0: ethernet@7040026000 {
+ compatible = "sophgo,sg2042-dwmac", "snps,dwmac-5.00a";
+ reg = <0x70 0x40026000 0x0 0x4000>;
+ clocks = <&clkgen GATE_CLK_AXI_ETH0>,
+ <&clkgen GATE_CLK_PTP_REF_I_ETH0>,
+ <&clkgen GATE_CLK_TX_ETH0>;
+ clock-names = "stmmaceth", "ptp_ref", "tx";
+ dma-noncoherent;
+ interrupt-parent = <&intc>;
+ interrupts = <132 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+ resets = <&rstgen RST_ETH0>;
+ reset-names = "stmmaceth";
+ snps,multicast-filter-bins = <0>;
+ snps,perfect-filter-entries = <1>;
+ snps,aal;
+ snps,tso;
+ snps,txpbl = <32>;
+ snps,rxpbl = <32>;
+ snps,mtl-rx-config = <&gmac0_mtl_rx_setup>;
+ snps,mtl-tx-config = <&gmac0_mtl_tx_setup>;
+ snps,axi-config = <&gmac0_stmmac_axi_setup>;
+ status = "disabled";
+
+ mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ gmac0_mtl_rx_setup: rx-queues-config {
+ snps,rx-queues-to-use = <8>;
+ snps,rx-sched-wsp;
+ queue0 {};
+ queue1 {};
+ queue2 {};
+ queue3 {};
+ queue4 {};
+ queue5 {};
+ queue6 {};
+ queue7 {};
+ };
+
+ gmac0_mtl_tx_setup: tx-queues-config {
+ snps,tx-queues-to-use = <8>;
+ queue0 {};
+ queue1 {};
+ queue2 {};
+ queue3 {};
+ queue4 {};
+ queue5 {};
+ queue6 {};
+ queue7 {};
+ };
+
+ gmac0_stmmac_axi_setup: stmmac-axi-config {
+ snps,blen = <16 8 4 0 0 0 0>;
+ snps,wr_osr_lmt = <1>;
+ snps,rd_osr_lmt = <2>;
+ };
+ };
+
emmc: mmc@704002a000 {
compatible = "sophgo,sg2042-dwcmshc";
reg = <0x70 0x4002a000 0x0 0x1000>;
--
2.49.0
next prev parent reply other threads:[~2025-05-06 11:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 9:32 [PATCH net-next 0/4] riscv: sophgo: Add ethernet support for SG2042 Inochi Amaoto
2025-05-06 9:32 ` [PATCH net-next 1/4] dt-bindings: net: sophgo,sg2044-dwmac: Add support for Sophgo SG2042 dwmac Inochi Amaoto
2025-05-06 16:09 ` Conor Dooley
2025-05-06 9:32 ` [PATCH net-next 2/4] net: stmmac: dwmac-sophgo: Add support for Sophgo SG2042 SoC Inochi Amaoto
2025-05-06 9:32 ` [PATCH net-next 3/4] net: stmmac: platform: Add snps,dwmac-5.00a IP compatible string Inochi Amaoto
2025-05-06 9:32 ` Inochi Amaoto [this message]
2025-05-07 1:47 ` [PATCH net-next 4/4] riscv: dts: sophgo: add ethernet GMAC device for sg2042 Chen Wang
2025-05-06 12:03 ` [PATCH net-next 0/4] riscv: sophgo: Add ethernet support for SG2042 Andrew Lunn
2025-05-06 22:24 ` Inochi Amaoto
2025-05-07 0:10 ` Andrew Lunn
2025-05-07 12:01 ` Inochi Amaoto
2025-05-07 12:37 ` Andrew Lunn
2025-05-07 12:45 ` Inochi Amaoto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250506093256.1107770-5-inochiama@gmail.com \
--to=inochiama@gmail.com \
--cc=alex@ghiti.fr \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=aou@eecs.berkeley.edu \
--cc=bartosz.golaszewski@linaro.org \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dlan@gentoo.org \
--cc=edumazet@google.com \
--cc=guoren@kernel.org \
--cc=joabreu@synopsys.com \
--cc=joe@pf.is.s.u-tokyo.ac.jp \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=l.rubusch@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=looong.bin@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=peppe.cavallaro@st.com \
--cc=rabenda.cn@gmail.com \
--cc=richardcochran@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh@kernel.org \
--cc=romain.gantois@bootlin.com \
--cc=sophgo@lists.linux.dev \
--cc=tglx@linutronix.de \
--cc=u.kleine-koenig@baylibre.com \
--cc=unicorn_wang@outlook.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox