]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
riscv: dts: sophgo: Add ethernet device for cv18xx
authorInochi Amaoto <inochiama@gmail.com>
Thu, 3 Jul 2025 02:15:56 +0000 (10:15 +0800)
committerInochi Amaoto <inochiama@gmail.com>
Wed, 23 Jul 2025 01:55:15 +0000 (09:55 +0800)
Add ethernet controller device node for cv18xx SoC.

Link: https://lore.kernel.org/r/20250703021600.125550-2-inochiama@gmail.com
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <wangchen20@iscas.ac.cn>
arch/riscv/boot/dts/sophgo/cv180x.dtsi

index 9a25b8c6c2f3e859c2918483280171c577c8e146..9e4559538cbcf6f2a69289c6b74d6e592ee30b76 100644 (file)
                        status = "disabled";
                };
 
+               gmac0: ethernet@4070000 {
+                       compatible = "sophgo,cv1800b-dwmac", "snps,dwmac-3.70a";
+                       reg = <0x04070000 0x10000>;
+                       clocks = <&clk CLK_AXI4_ETH0>, <&clk CLK_ETH0_500M>;
+                       clock-names = "stmmaceth", "ptp_ref";
+                       interrupts = <SOC_PERIPHERAL_IRQ(15) IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "macirq";
+                       resets = <&rst RST_ETH0>;
+                       reset-names = "stmmaceth";
+                       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";
+
+                       gmac0_mdio: mdio {
+                               compatible = "snps,dwmac-mdio";
+                               #address-cells = <1>;
+                               #size-cells = <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@4140000 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x04140000 0x100>;