ipq40xx: convert GL.iNet GL-S1300 to DSA
authorNick Hainke <vincent@systemli.org>
Sun, 29 Dec 2024 21:55:04 +0000 (22:55 +0100)
committerNick Hainke <vincent@systemli.org>
Thu, 20 Feb 2025 19:02:27 +0000 (20:02 +0100)
Convert the router to DSA.

Co-Developed-by: Matt Beaumont <github@beaum.xyz>
Tested-by: Matt Beaumont <github@beaum.xyz>
Link: https://github.com/openwrt/openwrt/pull/12478
Signed-off-by: Nick Hainke <vincent@systemli.org>
target/linux/ipq40xx/base-files/etc/board.d/02_network
target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
target/linux/ipq40xx/image/generic.mk

index 549e1ac0c96a3ee9f43ff30756959eafa3dd8c9c..57dca0e1a2a93af667bc9d41b78b3975801a1729 100644 (file)
@@ -84,6 +84,7 @@ ipq40xx_setup_interfaces()
                ;;
        glinet,gl-a1300|\
        glinet,gl-b1300|\
+       glinet,gl-s1300|\
        mobipromo,cm520-79f)
                ucidef_set_interfaces_lan_wan "lan1 lan2" "wan"
                ;;
index e6d74da864de1e6a765c1b2ce5e372eec27205d0..6d7a0aa2cd8b0021052770d218c2ab2a46d7bedd 100644 (file)
                                        precal_art_5000: precal@5000 {
                                                reg = <0x5000 0x2f20>;
                                        };
+
+                                       macaddr_art_0: macaddr@0 {
+                                               reg = <0x0 0x6>;
+                                       };
+
+                                       macaddr_art_6: macaddr@6 {
+                                               reg = <0x6 0x6>;
+                                       };
                                };
                        };
 
        status = "okay";
 };
 
+&gmac {
+       status = "okay";
+
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&switch {
+       status = "okay";
+};
+
+&swport3 {
+       status = "okay";
+
+       label = "lan2";
+};
+
+&swport4 {
+       status = "okay";
+
+       label = "lan1";
+};
+
+&swport5 {
+       status = "okay";
+
+       label = "wan";
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
+};
+
 &wifi0 {
        status = "okay";
        nvmem-cell-names = "pre-calibration";
index 21841f4bf1776cdda87258594b9a0a2f34c64fd8..2071059444e2b6a6d31307350e0c4857b87f3e59 100644 (file)
@@ -642,8 +642,7 @@ define Device/glinet_gl-s1300
        IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
        DEVICE_PACKAGES := kmod-fs-ext4 kmod-mmc kmod-spi-dev
 endef
-# Missing DSA Setup
-#TARGET_DEVICES += glinet_gl-s1300
+TARGET_DEVICES += glinet_gl-s1300
 
 define Device/kernel-size-6350-8300
        DEVICE_COMPAT_VERSION := 2.0