[openwrt/openwrt] ipq40xx: convert devolo Magic 2 WiFi next to DSA

LEDE Commits lede-commits at lists.infradead.org
Sun Sep 3 14:13:11 PDT 2023


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/838bb0c03f2c9953fa677779112e6f441fe740b9

commit 838bb0c03f2c9953fa677779112e6f441fe740b9
Author: Thomas Bong <thomas.bong at devolo.de>
AuthorDate: Thu Aug 31 07:39:24 2023 +0200

    ipq40xx: convert devolo Magic 2 WiFi next to DSA
    
    Renamed the interfaces to match the other devices.
    Name the interface connected to the builtin G.hn chip 'ghn'.
    This might toggle at runtime while the G.hn chip is in the
    bootloader.
    
    Reviewed-by: Robert Marko <robimarko at gmail.com>
    Signed-off-by: Thomas Bong <thomas.bong at devolo.de>
---
 .../ipq40xx/base-files/etc/board.d/02_network      |  3 +++
 .../boot/dts/qcom-ipq4018-magic-2-wifi-next.dts    | 23 ++++++++++++++++++++++
 target/linux/ipq40xx/image/generic.mk              |  2 +-
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index 77dc892d07..951e0ad044 100644
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -69,6 +69,9 @@ ipq40xx_setup_interfaces()
 	compex,wpj428)
 		ucidef_set_interface_lan "lan1 lan2"
 		;;
+	devolo,magic-2-wifi-next)
+		ucidef_set_interface_lan "lan1 lan2 ghn"
+		;;
 	linksys,whw01)
 		ucidef_set_interface_lan "eth1 eth2"
 		;;
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-magic-2-wifi-next.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-magic-2-wifi-next.dts
index 29d51aa9e1..1fbc02d62b 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-magic-2-wifi-next.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-magic-2-wifi-next.dts
@@ -231,3 +231,26 @@
 		};
 	};
 };
+
+&gmac {
+	status = "okay";
+};
+
+&switch {
+	status = "okay";
+};
+
+&swport5 {
+	status = "okay";
+	label = "lan1";
+};
+
+&swport3 {
+	status = "okay";
+	label = "lan2";
+};
+
+&swport4 {
+	status = "okay";
+	label = "ghn";
+};
diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index 56aad5062e..58836471f0 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -388,7 +388,7 @@ define Device/devolo_magic-2-wifi-next
 	DEFAULT := n
 endef
 # Missing DSA Setup
-#TARGET_DEVICES += devolo_magic-2-wifi-next
+TARGET_DEVICES += devolo_magic-2-wifi-next
 
 define Device/dlink_dap-2610
 	$(call Device/FitImageLzma)




More information about the lede-commits mailing list