[PATCH 1/3] ixp4xx: Add back support for Netgear WG302 v1
Linus Walleij
linus.walleij at linaro.org
Sun Dec 22 16:32:03 PST 2024
The WG302 v1 has 32MB of RAM so it can easily run OpenWrt,
however it lacks much flash: only 8 MB.
By just using the flash for rootfs and booting a kernel over
TFTP it works just fine.
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
.../linux/ixp4xx/base-files/etc/board.d/02_network | 3 +-
target/linux/ixp4xx/image/Makefile | 14 ++++++++
.../0007-ARM-dts-ixp4xx-Fix-up-PCI-on-WG302.patch | 40 ++++++++++++++++++++++
3 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/target/linux/ixp4xx/base-files/etc/board.d/02_network b/target/linux/ixp4xx/base-files/etc/board.d/02_network
index 6a361d4f533e6a9cf13f6e250605a04e6829dfbe..c321e3fb27b4181061543d051ef50ca2dc38a0b5 100644
--- a/target/linux/ixp4xx/base-files/etc/board.d/02_network
+++ b/target/linux/ixp4xx/base-files/etc/board.d/02_network
@@ -11,7 +11,8 @@ gateworks,gw2358)
;;
dlink,dsm-g600-a|\
iom,nas-100d|\
-linksys,nslu2)
+linksys,nslu2|\
+netgear,wg302v1)
ucidef_set_interface_lan "eth0" "dhcp"
;;
usr,usr8200)
diff --git a/target/linux/ixp4xx/image/Makefile b/target/linux/ixp4xx/image/Makefile
index ace533e50f0605ab7a7b3c1a3b28d749686c1ec2..2c3f542279c3fd19f9c5f53f668d3ab0b6242aca 100644
--- a/target/linux/ixp4xx/image/Makefile
+++ b/target/linux/ixp4xx/image/Makefile
@@ -124,6 +124,20 @@ define Device/linksys_nslu2
endef
TARGET_DEVICES += linksys_nslu2
+define Device/netgear_wg302v1
+ DEVICE_VENDOR := Netgear
+ DEVICE_MODEL := WG302 v1
+ DEVICE_PACKAGES := ixp4xx-microcode-ethernet kmod-phy-amd kmod-ath5k wpad-basic-mbedtls
+ # Only 32 MB of RAM and small flash so not building by default
+ DEFAULT := n
+ DEVICE_DTS := intel-ixp42x-netgear-wg302v1
+ KERNEL := kernel-bin | append-dtb
+ IMAGES := kernel.bin rootfs.bin
+ IMAGE/kernel.bin := append-kernel
+ IMAGE/rootfs.bin := append-rootfs | pad-rootfs | pad-to 128k
+endef
+TARGET_DEVICES += netgear_wg302v1
+
define Device/usrobotics_usr8200
DEVICE_VENDOR := USRobotics
DEVICE_MODEL := USR8200
diff --git a/target/linux/ixp4xx/patches-6.6/0007-ARM-dts-ixp4xx-Fix-up-PCI-on-WG302.patch b/target/linux/ixp4xx/patches-6.6/0007-ARM-dts-ixp4xx-Fix-up-PCI-on-WG302.patch
new file mode 100644
index 0000000000000000000000000000000000000000..ca0df180715a1f14f91752f92baec2bd40013159
--- /dev/null
+++ b/target/linux/ixp4xx/patches-6.6/0007-ARM-dts-ixp4xx-Fix-up-PCI-on-WG302.patch
@@ -0,0 +1,40 @@
+From ed23e07bf7a1896b6eaa85b773bb43b1fad66d4b Mon Sep 17 00:00:00 2001
+From: Linus Walleij <linus.walleij at linaro.org>
+Date: Sat, 21 Dec 2024 00:07:11 +0100
+Subject: [PATCH] ARM: dts: ixp4xx: Fix up PCI on WG302
+
+Looking at the board file for WG302 v2 was not a good idea
+because the GPIO IRQ for slot 2 differs, and v1 uses GPIO
+10 instead of GPIO 9. Fix it up.
+
+Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
+---
+ .../dts/intel/ixp/intel-ixp42x-netgear-wg302v1.dts | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-netgear-wg302v1.dts
++++ b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-netgear-wg302v1.dts
+@@ -57,7 +57,7 @@
+ status = "okay";
+
+ /*
+- * Taken from WG302 v2 PCI boardfile (wg302v2-pci.c)
++ * Taken from WG302 v1 PCI boardfile (wg302v1-pci.c)
+ * We have slots (IDSEL) 1 and 2 with one assigned IRQ
+ * each handling all IRQs.
+ */
+@@ -70,10 +70,10 @@
+ <0x0800 0 0 3 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 1 is irq 8 */
+ <0x0800 0 0 4 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 1 is irq 8 */
+ /* IDSEL 2 */
+- <0x1000 0 0 1 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 2 is irq 9 */
+- <0x1000 0 0 2 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 2 is irq 9 */
+- <0x1000 0 0 3 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 2 is irq 9 */
+- <0x1000 0 0 4 &gpio0 9 IRQ_TYPE_LEVEL_LOW>; /* INT D on slot 2 is irq 9 */
++ <0x1000 0 0 1 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 2 is irq 10 */
++ <0x1000 0 0 2 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 2 is irq 10 */
++ <0x1000 0 0 3 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 2 is irq 10 */
++ <0x1000 0 0 4 &gpio0 10 IRQ_TYPE_LEVEL_LOW>; /* INT D on slot 2 is irq 10 */
+ };
+
+ ethernet at c8009000 {
--
2.47.1
More information about the openwrt-devel
mailing list