ramips: add wan2 support for MQmaker WiTi
authorArınç ÜNAL <arinc.unal@arinc9.com>
Sat, 17 Jun 2023 18:59:26 +0000 (21:59 +0300)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 12 Jul 2023 18:36:32 +0000 (20:36 +0200)
The PHY of the wan2 port on MQmaker WiTi is wired to the second MAC of the
SoC. Rename the wan interface to wan1 and define it under the switch node,
effectively disabling the PHY muxing of the MT7530 switch's phy4.

Define the PHY of the wan2 port and adjust the gmac1 node accordingly. Now
that the PHY muxing feature is not being used anymore, the wan2 port can be
used to achieve 2 Gbps total bandwidth to the CPU.

Tested-by: Demetris Ierokipides <ierokipides.dem@gmail.com>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
target/linux/ramips/dts/mt7621_mqmaker_witi.dts
target/linux/ramips/mt7621/base-files/etc/board.d/02_network

index 16cebbad74c0ea05ef512f28b05c84b817dbb08b..d785d741b1c4712d962125f7996a4e41328c6807 100644 (file)
 
 &gmac1 {
        status = "okay";
-       label = "wan";
-       phy-handle = <&ethphy4>;
+       label = "wan2";
+       phy-mode = "rgmii-rxid";
+       phy-handle = <&ethphy5>;
 
        nvmem-cells = <&macaddr_factory_e000>;
        nvmem-cell-names = "mac-address";
 };
 
 &mdio {
-       ethphy4: ethernet-phy@4 {
-               reg = <4>;
+       ethphy5: ethernet-phy@5 {
+               reg = <5>;
        };
 };
 
                        status = "okay";
                        label = "lan4";
                };
+
+               port@4 {
+                       status = "okay";
+                       label = "wan1";
+
+                       nvmem-cells = <&macaddr_factory_e000>;
+                       nvmem-cell-names = "mac-address";
+                       mac-address-increment = <1>;
+               };
        };
 };
 
index 38655ef746d3d72af69743a423c6688b261c3b4a..8039c9ede109dd586b0a82778cd61ae9ec007668 100644 (file)
@@ -110,6 +110,9 @@ ramips_setup_interfaces()
        mikrotik,routerboard-760igs)
                ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan sfp"
                ;;
+       mqmaker,witi)
+               ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan1 wan2"
+               ;;
        tozed,zlt-s12-pro)
                ucidef_set_interface_lan "lan1 lan2 lan3 wan"
                ucidef_set_interface "wwan" device "/dev/ttyUSB0" protocol "ncm"