Bläddra i källkod

ipq40xx: convert GL.iNet GL-S1300 to DSA

Convert the router to DSA.

Co-Developed-by: Matt Beaumont <[email protected]>
Tested-by: Matt Beaumont <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/12478
Signed-off-by: Nick Hainke <[email protected]>
Nick Hainke 1 år sedan
förälder
incheckning
70586f574d

+ 1 - 0
target/linux/ipq40xx/base-files/etc/board.d/02_network

@@ -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"
 		;;

+ 39 - 0
target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts

@@ -197,6 +197,14 @@
 					precal_art_5000: precal@5000 {
 						reg = <0x5000 0x2f20>;
 					};
+
+					macaddr_art_0: macaddr@0 {
+						reg = <0x0 0x6>;
+					};
+
+					macaddr_art_6: macaddr@6 {
+						reg = <0x6 0x6>;
+					};
 				};
 			};
 
@@ -348,6 +356,37 @@
 	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";

+ 1 - 2
target/linux/ipq40xx/image/generic.mk

@@ -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