[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241028011312.274938-1-inochiama@gmail.com>
Date: Mon, 28 Oct 2024 09:13:12 +0800
From: Inochi Amaoto <inochiama@...il.com>
To: Chen Wang <unicorn_wang@...look.com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Inochi Amaoto <inochiama@...look.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Richard Cochran <richardcochran@...il.com>,
Jisheng Zhang <jszhang@...nel.org>,
Thomas Bonnefille <thomas.bonnefille@...tlin.com>
Cc: Liu Gui <kenneth.liu@...hgo.com>,
Yixun Lan <dlan@...too.org>,
Longbin Li <looong.bin@...il.com>,
Inochi Amaoto <inochiama@...il.com>,
devicetree@...r.kernel.org,
linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: [PATCH] riscv: dts: sophgo: Add ethernet configuration for cv18xx
Add DT configuration for ethernet controller for cv18xx SoC.
Signed-off-by: Inochi Amaoto <inochiama@...il.com>
---
.../boot/dts/sophgo/cv1812h-huashan-pi.dts | 4 ++
arch/riscv/boot/dts/sophgo/cv18xx.dtsi | 49 +++++++++++++++++++
2 files changed, 53 insertions(+)
diff --git a/arch/riscv/boot/dts/sophgo/cv1812h-huashan-pi.dts b/arch/riscv/boot/dts/sophgo/cv1812h-huashan-pi.dts
index 26b57e15adc1..a0acae675a82 100644
--- a/arch/riscv/boot/dts/sophgo/cv1812h-huashan-pi.dts
+++ b/arch/riscv/boot/dts/sophgo/cv1812h-huashan-pi.dts
@@ -55,6 +55,10 @@ &emmc {
non-removable;
};
+&gmac0 {
+ status = "okay";
+};
+
&sdhci0 {
status = "okay";
bus-width = <4>;
diff --git a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi
index c18822ec849f..50933e5b4c75 100644
--- a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi
+++ b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi
@@ -210,6 +210,55 @@ i2c4: i2c@...0000 {
status = "disabled";
};
+ gmac0: ethernet@...0000 {
+ compatible = "snps,dwmac-3.70a";
+ reg = <0x04070000 0x10000>;
+ clocks = <&clk CLK_AXI4_ETH0>, <&clk CLK_ETH0_500M>;
+ clock-names = "stmmaceth", "ptp_ref";
+ interrupts = <31 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+ phy-handle = <&phy0>;
+ phy-mode = "rmii";
+ rx-fifo-depth = <8192>;
+ tx-fifo-depth = <8192>;
+ snps,multicast-filter-bins = <0>;
+ snps,perfect-filter-entries = <1>;
+ snps,aal;
+ snps,txpbl = <8>;
+ snps,rxpbl = <8>;
+ 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>;
+
+ phy0: phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0>;
+ };
+ };
+
+ gmac0_mtl_rx_setup: rx-queues-config {
+ snps,rx-queues-to-use = <1>;
+ queue0 {};
+ };
+
+ gmac0_mtl_tx_setup: tx-queues-config {
+ snps,tx-queues-to-use = <1>;
+ queue0 {};
+ };
+
+ gmac0_stmmac_axi_setup: stmmac-axi-config {
+ snps,blen = <16 8 4 0 0 0 0>;
+ snps,rd_osr_lmt = <2>;
+ snps,wr_osr_lmt = <1>;
+ };
+ };
+
uart0: serial@...0000 {
compatible = "snps,dw-apb-uart";
reg = <0x04140000 0x100>;
--
2.47.0
Powered by blists - more mailing lists