]> git.dujemihanovic.xyz Git - linux.git/commitdiff
LoongArch: Update dts for Loongson-2K2000 to support GMAC/GNET
authorHuacai Chen <chenhuacai@loongson.cn>
Wed, 10 Apr 2024 13:08:51 +0000 (21:08 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Wed, 10 Apr 2024 13:08:51 +0000 (21:08 +0800)
Current dts file for Loongson-2K2000's GMAC/GNET is incomplete, both irq
and phy descriptions are missing. Add them to make GMAC/GNET work.

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/boot/dts/loongson-2k2000-ref.dts
arch/loongarch/boot/dts/loongson-2k2000.dtsi

index dca91caf895e3cd9e428e75b91da9392bfb49d82..74b99bd234cc38df9a087915280e86ddb5bd56d4 100644 (file)
 
 &gmac0 {
        status = "okay";
+
+       phy-mode = "gmii";
+       phy-handle = <&phy0>;
+       mdio {
+               compatible = "snps,dwmac-mdio";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               phy0: ethernet-phy@0 {
+                       reg = <2>;
+               };
+       };
 };
 
 &gmac1 {
        status = "okay";
+
+       phy-mode = "gmii";
+       phy-handle = <&phy1>;
+       mdio {
+               compatible = "snps,dwmac-mdio";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               phy1: ethernet-phy@1 {
+                       reg = <2>;
+               };
+       };
 };
 
 &gmac2 {
        status = "okay";
+
+       phy-mode = "rgmii";
+       phy-handle = <&phy2>;
+       mdio {
+               compatible = "snps,dwmac-mdio";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               phy2: ethernet-phy@2 {
+                       reg = <0>;
+               };
+       };
 };
index 481c6c869a8b27d74fc16d32c3e25b8316dc8d3d..9eab2d02cbe8bff12a26ce11dd7ac1543b7c1f82 100644 (file)
 
                        gmac0: ethernet@3,0 {
                                reg = <0x1800 0x0 0x0 0x0 0x0>;
-                               interrupts = <12 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupts = <12 IRQ_TYPE_LEVEL_HIGH>,
+                                            <13 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupt-names = "macirq", "eth_lpi";
                                interrupt-parent = <&pic>;
                                status = "disabled";
                        };
 
                        gmac1: ethernet@3,1 {
                                reg = <0x1900 0x0 0x0 0x0 0x0>;
-                               interrupts = <14 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupts = <14 IRQ_TYPE_LEVEL_HIGH>,
+                                            <15 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupt-names = "macirq", "eth_lpi";
                                interrupt-parent = <&pic>;
                                status = "disabled";
                        };
 
                        gmac2: ethernet@3,2 {
                                reg = <0x1a00 0x0 0x0 0x0 0x0>;
-                               interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupts = <17 IRQ_TYPE_LEVEL_HIGH>,
+                                            <18 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupt-names = "macirq", "eth_lpi";
                                interrupt-parent = <&pic>;
                                status = "disabled";
                        };