ipq40xx: add e2600ac c1 to dsa
author张 鹏 <sd20@qxwlan.com>
Wed, 22 Feb 2023 12:46:28 +0000 (20:46 +0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Mon, 29 May 2023 10:23:44 +0000 (12:23 +0200)
Convert E2600ac c1 to DSA and enable it.

Signed-off-by: 张 鹏 <sd20@qxwlan.com>
[ rename port to more generic name ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
target/linux/ipq40xx/base-files/etc/board.d/02_network
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts
target/linux/ipq40xx/image/generic.mk

index 28648c0db99e53321ca9b25f3cce2f10e458bbf3..0d9be90ddb0d0ff3e27d03e04cb7f32aed0c5532 100644 (file)
@@ -97,6 +97,9 @@ ipq40xx_setup_interfaces()
        plasmacloud,pa2200)
                ucidef_set_interfaces_lan_wan "ethernet1" "ethernet2"
                ;;
+       qxwlan,e2600ac-c1)
+               ucidef_set_interfaces_lan_wan "sw-eth1" "sw-eth2"
+               ;;
        zte,mf286d)
                ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" "wan"
                ;;
index f9205c28fa4f9d9f1e5ea03af72b26ff8b1342e7..70e05c7eef3ab9ef0e96153c13aab196b9367b55 100644 (file)
                                precal_art_5000: precal@5000 {
                                        reg = <0x5000 0x2f20>;
                                };
+
+                               macaddr_gmac0: macaddr@0 {
+                                       reg = <0x0 0x6>;
+                               };
+
+                               macaddr_gmac1: macaddr@6 {
+                                       reg = <0x6 0x6>;
+                               };
                        };
                        partition@180000 {
                                compatible = "denx,fit";
        nvmem-cells = <&precal_art_5000>;
        qcom,ath10k-calibration-variant = "Qxwlan-E2600AC-C1";
 };
+
+&gmac {
+       status = "okay";
+};
+
+&switch {
+       status = "okay";
+};
+
+&swport4 {
+       status = "okay";
+       label = "sw-eth1";
+
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_gmac0>;
+};
+
+&swport5 {
+       status = "okay";
+
+       label = "sw-eth2";
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_gmac1>;
+};
index 59bdd04296294e025771ede0bcdeeabee3a7fff4..6cde091b2b51dfeaaa784fa41261eef6df0fec63 100644 (file)
@@ -1033,8 +1033,7 @@ define Device/qxwlan_e2600ac-c1
        IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
        DEFAULT := n
 endef
-# Missing DSA Setup
-#TARGET_DEVICES += qxwlan_e2600ac-c1
+TARGET_DEVICES += qxwlan_e2600ac-c1
 
 define Device/qxwlan_e2600ac-c2
        $(call Device/FitImage)