]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: dts: nuvoton: Add Ethernet nodes
authorJoey Lu <a0987203069@gmail.com>
Mon, 23 Mar 2026 10:17:55 +0000 (18:17 +0800)
committerAndrew Jeffery <andrew@codeconstruct.com.au>
Mon, 18 May 2026 13:48:01 +0000 (23:18 +0930)
Add GMAC nodes for our MA35D1 development boards:
two RGMII interfaces for SOM board, and one RGMII
and one RMII interface for IoT board.

Signed-off-by: Joey Lu <a0987203069@gmail.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
arch/arm64/boot/dts/nuvoton/ma35d1-iot-512m.dts
arch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi

index 9482bec1aa5736360a54c9f943bdb2a4641c9fa8..78534d613486a78a21c2ae539d0941fc5950a99c 100644 (file)
@@ -18,6 +18,8 @@
                serial12 = &uart12;
                serial13 = &uart13;
                serial14 = &uart14;
+               ethernet0 = &gmac0;
+               ethernet1 = &gmac1;
        };
 
        chosen {
        pinctrl-0 = <&pinctrl_uart14>;
        status = "okay";
 };
+
+&gmac0 {
+       status = "okay";
+       phy-handle = <&eth_phy0>;
+};
+
+&mdio0 {
+       eth_phy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
+&gmac1 {
+       status = "okay";
+       phy-mode = "rmii";
+       phy-handle = <&eth_phy1>;
+};
+
+&mdio1 {
+       eth_phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
index f6f20a17e501877ebc33f1da7d116bfd2e24fb20..a029b660e8dc3c2bccb11ca989b88822754ee90d 100644 (file)
@@ -18,6 +18,8 @@
                serial12 = &uart12;
                serial14 = &uart14;
                serial16 = &uart16;
+               ethernet0 = &gmac0;
+               ethernet1 = &gmac1;
        };
 
        chosen {
        pinctrl-0 = <&pinctrl_uart16>;
        status = "okay";
 };
+
+&gmac0 {
+       status = "okay";
+       phy-handle = <&eth_phy0>;
+};
+
+&mdio0 {
+       eth_phy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
+&gmac1 {
+       status = "okay";
+       phy-handle = <&eth_phy1>;
+};
+
+&mdio1 {
+       eth_phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
index e51b98f5bdce4c6594c48375aaf04a54b0582bac..7228ad4735b5ca00f24050c050890354b4292a71 100644 (file)
                        clocks = <&clk UART16_GATE>;
                        status = "disabled";
                };
+
+               gmac0: ethernet@40120000 {
+                       compatible = "nuvoton,ma35d1-dwmac", "snps,dwmac-3.70a";
+                       reg = <0x0 0x40120000 0x0 0x10000>;
+                       interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "macirq";
+                       clocks = <&clk EMAC0_GATE>, <&clk EPLL_DIV8>;
+                       clock-names = "stmmaceth", "ptp_ref";
+
+                       nuvoton,sys = <&sys 0>;
+                       resets = <&sys MA35D1_RESET_GMAC0>;
+                       reset-names = "stmmaceth";
+                       snps,multicast-filter-bins = <0>;
+                       snps,perfect-filter-entries = <8>;
+                       rx-fifo-depth = <4096>;
+                       tx-fifo-depth = <2048>;
+
+                       phy-mode = "rgmii-id";
+                       status = "disabled";
+
+                       mdio0: mdio {
+                               compatible = "snps,dwmac-mdio";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                       };
+               };
+
+               gmac1: ethernet@40130000 {
+                       compatible = "nuvoton,ma35d1-dwmac", "snps,dwmac-3.70a";
+                       reg = <0x0 0x40130000 0x0 0x10000>;
+                       interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "macirq";
+                       clocks = <&clk EMAC1_GATE>, <&clk EPLL_DIV8>;
+                       clock-names = "stmmaceth", "ptp_ref";
+
+                       nuvoton,sys = <&sys 1>;
+                       resets = <&sys MA35D1_RESET_GMAC1>;
+                       reset-names = "stmmaceth";
+                       snps,multicast-filter-bins = <0>;
+                       snps,perfect-filter-entries = <8>;
+                       rx-fifo-depth = <4096>;
+                       tx-fifo-depth = <2048>;
+
+                       phy-mode = "rgmii-id";
+                       status = "disabled";
+
+                       mdio1: mdio {
+                               compatible = "snps,dwmac-mdio";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                       };
+               };
        };
 };