ipq40xx: fix ZTE MF289F port mapping
authorLech Perczak <lech.perczak@gmail.com>
Sat, 15 Oct 2022 15:59:38 +0000 (17:59 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 5 Nov 2022 21:49:43 +0000 (22:49 +0100)
With initial support, the mapping of LAN1/WAN and LAN2 ports was
swapped. Fix it to match labels on the device, keeping the "WAN"
personality of the first port - in line with current state of DSA setup
in master for this device.

Tested-by: Marcin Gajda <mgajda@o2.pl>
Tested-by: Christian Heuff <christian@heuff.at>
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
target/linux/ipq40xx/base-files/etc/board.d/02_network
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts

index deb9ec64f6a78722f845d1180fac5f73b8687c0c..a38d35a10dcf30e19e2e29a1a3ea1a6f4539afdb 100644 (file)
@@ -153,7 +153,7 @@ ipq40xx_setup_interfaces()
        zte,mf289f)
                ucidef_set_interfaces_lan_wan "eth0" "eth1"
                ucidef_add_switch "switch0" \
-                       "0u@eth0" "0u@eth1" "2:lan:1" "5:lan:2"
+                               "0u@eth0" "5:lan:2" "0u@eth1" "2:wan"
                ;;
        *)
                echo "Unsupported hardware. Network interfaces not initialized"
index 41cd46710c6d37ac8f9c5dec4b6ef8bc79eb8bdc..3f16b56a55c28ed2130d0f7fe8e612ddf955dee0 100644 (file)
 
                ess-switch@c000000 {
                        status = "okay";
+                       switch_lan_bmp = <0x20>;
+                       switch_wan_bmp = <0x4>;
                };
 
                edma@c080000 {
 &gmac0 {
        nvmem-cell-names = "mac-address";
        nvmem-cells = <&macaddr_mac_0>;
+       vlan_tag = <1 0x20>;
 };
 
 &gmac1 {
        nvmem-cell-names = "mac-address";
        nvmem-cells = <&macaddr_mac_0>;
        mac-address-increment = <1>;
+       vlan_tag = <2 0x4>;
 };