ipq40xx: convert GL-AP1300 to DSA
authorNick Hainke <vincent@systemli.org>
Sat, 16 Jul 2022 08:33:24 +0000 (10:33 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Mon, 24 Apr 2023 16:32:26 +0000 (18:32 +0200)
Convert GL-AP1300 to DSA and enable it.

While working on it rename the GL-AP1300 leds from green to white.

Tested-by: Rob White <rob@blue-wave.net>
Tested-by: Robert Sommer <frauhottelmann@gmail.com>
Signed-off-by: Nick Hainke <vincent@systemli.org>
target/linux/ipq40xx/base-files/etc/board.d/01_leds
target/linux/ipq40xx/base-files/etc/board.d/02_network
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-gl-ap1300.dts
target/linux/ipq40xx/image/generic.mk

index 3ba130cc90962d001fcd0a17640de90460ec1d52..1ba5d2b1a77eb5780afe8f3429fc08f382c283e2 100644 (file)
@@ -53,7 +53,7 @@ engenius,ens620ext)
        ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "eth1"
        ;;
 glinet,gl-ap1300)
-       ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
+       ucidef_set_led_netdev "wan" "WAN" "white:wan" "wan"
        ;;
 glinet,gl-b1300 |\
 mikrotik,lhgg-60ad)
index 7c9c2f0827829f146f6fa25f6d7a757808c0a357..2e0e8d33cd625530c1f6c32f155cf49477f0a66f 100644 (file)
@@ -32,6 +32,7 @@ ipq40xx_setup_interfaces()
        asus,map-ac2200|\
        cilab,meshpoint-one|\
        edgecore,ecw5211|\
+       glinet,gl-ap1300|\
        glinet,gl-b2200|\
        google,wifi|\
        linksys,whw03v2|\
index 41ed66e5950074c0e12fb9e0fcccf3a14ecb2e24..6f5d4d8a5784f3aab5da92fd2b166f9f7f96889e 100644 (file)
@@ -14,7 +14,6 @@
                led-failsafe = &led_power;
                led-running = &led_power;
                led-upgrade = &led_power;
-               label-mac-device = &gmac0;
        };
 
        memory {
                compatible = "gpio-leds";
 
                led_power: power {
-                       label = "green:power";
+                       label = "white:power";
                        gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
 
                wan {
-                       label = "green:wan";
+                       label = "white:wan";
                        gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
                };
        };
                                #address-cells = <1>;
                                #size-cells = <1>;
 
+                               macaddr_art_0: mac-address@0 {
+                                       reg = <0x0 0x6>;
+                               };
+
+                               macaddr_art_6: mac-address@6 {
+                                       reg = <0x6 0x6>;
+                               };
+
                                precal_art_1000: precal@1000 {
                                        reg = <0x1000 0x2f20>;
                                };
        status = "okay";
 };
 
+&gmac {
+       status = "okay";
+};
+
+&switch {
+       status = "okay";
+};
+
+&swport4 {
+       status = "okay";
+       label = "lan";
+
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&swport5 {
+       status = "okay";
+       label = "wan";
+
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
+};
+
 &wifi0 {
        status = "okay";
        nvmem-cell-names = "pre-calibration";
index 2f0ca927f01aa20d9b75217416331b83c3a58677..8fa4f4175a23b413c2b295779134ebbfe1a3ed37 100644 (file)
@@ -590,8 +590,7 @@ define Device/glinet_gl-ap1300
        KERNEL_INSTALL := 1
        DEVICE_PACKAGES := ipq-wifi-glinet_gl-ap1300 kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
 endef
-# Missing DSA Setup
-#TARGET_DEVICES += glinet_gl-ap1300
+TARGET_DEVICES += glinet_gl-ap1300
 
 define Device/glinet_gl-b1300
        $(call Device/FitzImage)