]> git.itanic.dy.fi Git - linux-stable/commitdiff
mips: dts: ralink: mt7621: add port@5 as CPU port
authorArınç ÜNAL <arinc.unal@arinc9.com>
Sat, 11 Feb 2023 10:49:15 +0000 (13:49 +0300)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Fri, 17 Feb 2023 10:58:37 +0000 (11:58 +0100)
On MT7621AT, MT7621DAT, and MT7621ST SoCs, port 5 of the MT7530 switch is
connected to the second MAC of the SoC as a CPU port. Add the port and set
up the second MAC on the bindings. Revert PHY muxing on GB-PC1.

There's an external PHY connected to the second MAC of the SoC on GB-PC2,
therefore, disable port@5 for this device.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
arch/mips/boot/dts/ralink/mt7621.dtsi

index 4314aee97e187d61466763f7b4f19774f4a95f73..129b6710b699dfb8cb9eadcc14c8b887632dad55 100644 (file)
@@ -91,22 +91,16 @@ &pcie {
        status = "okay";
 };
 
-&gmac1 {
-       status = "okay";
-       phy-handle = <&ethphy4>;
-};
-
-&mdio {
-       ethphy4: ethernet-phy@4 {
-               reg = <4>;
-       };
-};
-
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "ethblack";
                };
+
+               port@4 {
+                       status = "okay";
+                       label = "ethblue";
+               };
        };
 };
index 3ebbf933f644b78a16dc13c444d383ce7942ab96..f810cd10f4f4fc391eea7fcca5abec602d21ced7 100644 (file)
@@ -112,9 +112,12 @@ &pcie {
 };
 
 &gmac1 {
-       status = "okay";
        phy-mode = "rgmii-rxid";
        phy-handle = <&ethphy5>;
+
+       fixed-link {
+               status = "disabled";
+       };
 };
 
 &mdio {
@@ -134,5 +137,9 @@ port@4 {
                        status = "okay";
                        label = "ethblue";
                };
+
+               port@5 {
+                       status = "disabled";
+               };
        };
 };
index aec85c779359753716cbea360854830c9e02bace..290d47fbcfbb79bdadf44077a3cd37d2283076f2 100644 (file)
@@ -332,8 +332,13 @@ fixed-link {
                gmac1: mac@1 {
                        compatible = "mediatek,eth-mac";
                        reg = <1>;
-                       status = "disabled";
                        phy-mode = "rgmii";
+
+                       fixed-link {
+                               speed = <1000>;
+                               full-duplex;
+                               pause;
+                       };
                };
 
                mdio: mdio-bus {
@@ -384,6 +389,18 @@ port@4 {
                                                label = "swp4";
                                        };
 
+                                       port@5 {
+                                               reg = <5>;
+                                               ethernet = <&gmac1>;
+                                               phy-mode = "rgmii";
+
+                                               fixed-link {
+                                                       speed = <1000>;
+                                                       full-duplex;
+                                                       pause;
+                                               };
+                                       };
+
                                        port@6 {
                                                reg = <6>;
                                                ethernet = <&gmac0>;