Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mips: dts: ralink: mt7621: add port@5 as CPU port

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>

authored by

Arınç ÜNAL and committed by
Thomas Bogendoerfer
bae83341 09e61efd

+31 -13
+5 -11
arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
··· 91 91 status = "okay"; 92 92 }; 93 93 94 - &gmac1 { 95 - status = "okay"; 96 - phy-handle = <&ethphy4>; 97 - }; 98 - 99 - &mdio { 100 - ethphy4: ethernet-phy@4 { 101 - reg = <4>; 102 - }; 103 - }; 104 - 105 94 &switch0 { 106 95 ports { 107 96 port@0 { 108 97 status = "okay"; 109 98 label = "ethblack"; 99 + }; 100 + 101 + port@4 { 102 + status = "okay"; 103 + label = "ethblue"; 110 104 }; 111 105 }; 112 106 };
+8 -1
arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
··· 112 112 }; 113 113 114 114 &gmac1 { 115 - status = "okay"; 116 115 phy-mode = "rgmii-rxid"; 117 116 phy-handle = <&ethphy5>; 117 + 118 + fixed-link { 119 + status = "disabled"; 120 + }; 118 121 }; 119 122 120 123 &mdio { ··· 136 133 port@4 { 137 134 status = "okay"; 138 135 label = "ethblue"; 136 + }; 137 + 138 + port@5 { 139 + status = "disabled"; 139 140 }; 140 141 }; 141 142 };
+18 -1
arch/mips/boot/dts/ralink/mt7621.dtsi
··· 332 332 gmac1: mac@1 { 333 333 compatible = "mediatek,eth-mac"; 334 334 reg = <1>; 335 - status = "disabled"; 336 335 phy-mode = "rgmii"; 336 + 337 + fixed-link { 338 + speed = <1000>; 339 + full-duplex; 340 + pause; 341 + }; 337 342 }; 338 343 339 344 mdio: mdio-bus { ··· 387 382 status = "disabled"; 388 383 reg = <4>; 389 384 label = "swp4"; 385 + }; 386 + 387 + port@5 { 388 + reg = <5>; 389 + ethernet = <&gmac1>; 390 + phy-mode = "rgmii"; 391 + 392 + fixed-link { 393 + speed = <1000>; 394 + full-duplex; 395 + pause; 396 + }; 390 397 }; 391 398 392 399 port@6 {