ipq40xx: ZTE MF289F: convert to DSA
authorDirk Buchwalder <buchwalder@posteo.de>
Thu, 6 Oct 2022 16:25:12 +0000 (18:25 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 9 Oct 2022 20:39:48 +0000 (22:39 +0200)
Convert ZTE MF289F device to DSA, re-order network ports to match the
labels on the case and re-enable the device.

Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
Reviewed-by: Robert Marko <robimarko@gmail.com>
Reviewed-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
target/linux/ipq40xx/image/generic.mk

index 163dcdcbc6811890e3b5e5076e0e5a24d619f9f0..583b5c8fbd22603946fcfd3bde230aaede88088f 100644 (file)
@@ -33,7 +33,8 @@ ipq40xx_setup_interfaces()
        glinet,gl-b2200|\
        luma,wrtq-329acn|\
        mikrotik,cap-ac|\
-       netgear,wac510)
+       netgear,wac510|\
+       zte,mf289f)
                ucidef_set_interfaces_lan_wan "lan" "wan"
                ;;
        aruba,ap-303|\
@@ -59,11 +60,6 @@ ipq40xx_setup_interfaces()
        zte,mf286d)
                ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" "wan"
                ;;
-       zte,mf289f)
-               ucidef_set_interfaces_lan_wan "eth0" "eth1"
-               ucidef_add_switch "switch0" \
-                       "0u@eth0" "0u@eth1" "2:lan:1" "5:lan:2"
-               ;;
        *)
                echo "Unsupported hardware. Network interfaces not initialized"
                ;;
index 2dac307990f8f1d35c5a0985c1410448387a0f21..ccb70dce87950166fd6259cf0a3524002953e313 100644 (file)
        };
 
        soc {
-               ess-psgmii@98000 {
-                       status = "okay";
-               };
-
                tcsr@1949000 {
                        compatible = "qcom,tcsr";
                        reg = <0x1949000 0x100>;
                        reg = <0x1957000 0x100>;
                        qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
                };
-
-               ess-switch@c000000 {
-                       status = "okay";
-               };
-
-               edma@c080000 {
-                       status = "okay";
-               };
        };
 };
 
        status = "okay";
 };
 
-&gmac0 {
+&gmac {
+       status = "okay";
        nvmem-cell-names = "mac-address";
        nvmem-cells = <&macaddr_mac_0>;
 };
 
-&gmac1 {
+&switch {
+       status = "okay";
+};
+
+&swport2 {
+       status = "okay";
+
+       label = "wan";
+
        nvmem-cell-names = "mac-address";
        nvmem-cells = <&macaddr_mac_0>;
        mac-address-increment = <1>;
 };
 
+&swport5 {
+       status = "okay";
+
+       label = "lan";
+};
 
 &qpic_bam {
        status = "okay";
index 3c1cf67448826643d003ab348a9158f2ecebfc52..82c7464b871c7787b0f03341f3dd30c67fda4cc2 100644 (file)
@@ -1119,8 +1119,7 @@ define Device/zte_mf289f
        DEVICE_MODEL := MF289F
        DEVICE_PACKAGES += ipq-wifi-zte_mf289f ath10k-firmware-qca9984-ct
 endef
-# Missing DSA Setup
-#TARGET_DEVICES += zte_mf289f
+TARGET_DEVICES += zte_mf289f
 
 define Device/zyxel_nbg6617
        $(call Device/FitImageLzma)