diff mbox series

[OpenWrt-Devel,v3] ath79/nand: add support for Netgear WNDR4300SW

Message ID 20200523085003.4426-1-foss@volatilesystems.org
State Accepted
Delegated to: Adrian Schmutzler
Headers show
Series [OpenWrt-Devel,v3] ath79/nand: add support for Netgear WNDR4300SW | expand

Commit Message

Stijn Segers May 23, 2020, 8:50 a.m. UTC
This patch adds support for the WNDR4300SW, marketed by California ISP
SureWest (hence the 'SW' suffix). Hardware wise, it's identical to the
WNDR4300 v1.

Specifications:
* SoC: Atheros AR9344
* RAM: 128 MB
* Flash: 128 MB NAND flash
* WiFi: Atheros AR9580 (5 GHz) and AR9344 (2,4 GHz)
* Ethernet: 5x 1000Base-T
* LED: Power, WAN, LAN, WiFi, USB, WPS
* UART: on board, to the right of the RF shield at the top of the board

Installation:

* Flashing through the OEM web interface:
  + Connect your computer to the router with an ethernet cable and browse
    to http://192.168.1.1/
  + Log in with the default credentials are admin:password
  + Browse to Advanced > Administration > Firmware Upgrade in the Netgear
    interface
  + Upload the Openwrt firmware: openwrt-ath79-nand-netgear_wndr4300sw-squashfs-factory.img
  + Proceed with the firmware installation and give the device a few 
    minutes to finish and reboot.

* Flashing through TFTP:
  + Configure your wired client with a static IP in the 192.168.1.x range,
    e.g. 192.168.1.10 and netmask 255.255.255.0.
  + Power off the router.
  + Press and hold the RESET button (the factory reset button on the bottom
    of the device, with the red circle around it) and turn the router on
    while keeping the button pressed.
  + The power LED will start flashing orange. You can release the button
    once it switches to flashing green.
  + Transfer the image over TFTP:
    $ tftp 192.168.1.1 -m binary -c put openwrt-ath79-nand-netgear_wndr4300sw-squashfs-factory.img

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
---
 target/linux/ath79/dts/ar9344_netgear_wndr4300sw.dts   |  9 +++++++++
 target/linux/ath79/image/nand.mk                       | 10 ++++++++++
 target/linux/ath79/nand/base-files/etc/board.d/01_leds |  1 +
 .../linux/ath79/nand/base-files/etc/board.d/02_network |  2 ++
 .../base-files/etc/hotplug.d/firmware/10-ath9k-eeprom  |  2 ++
 5 files changed, 24 insertions(+)
 create mode 100644 target/linux/ath79/dts/ar9344_netgear_wndr4300sw.dts

Comments

Adrian Schmutzler May 24, 2020, 12:48 p.m. UTC | #1
Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
> On Behalf Of Stijn Segers
> Sent: Samstag, 23. Mai 2020 10:50
> To: openwrt-devel@lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH v3] ath79/nand: add support for Netgear
> WNDR4300SW
> 
> This patch adds support for the WNDR4300SW, marketed by California ISP
> SureWest (hence the 'SW' suffix). Hardware wise, it's identical to the
> WNDR4300 v1.

I've merged your patch.

Note that the patch doesn't add an entry for uboot-envtools, maybe you can provide a separate patch for that if you care, should be something simple like https://github.com/openwrt/openwrt/commit/a09408fa576c6482c21f683662cb2d5a49e14ecf

Best

Adrian

> 
> Specifications:
> * SoC: Atheros AR9344
> * RAM: 128 MB
> * Flash: 128 MB NAND flash
> * WiFi: Atheros AR9580 (5 GHz) and AR9344 (2,4 GHz)
> * Ethernet: 5x 1000Base-T
> * LED: Power, WAN, LAN, WiFi, USB, WPS
> * UART: on board, to the right of the RF shield at the top of the board
> 
> Installation:
> 
> * Flashing through the OEM web interface:
>   + Connect your computer to the router with an ethernet cable and browse
>     to http://192.168.1.1/
>   + Log in with the default credentials are admin:password
>   + Browse to Advanced > Administration > Firmware Upgrade in the Netgear
>     interface
>   + Upload the Openwrt firmware: openwrt-ath79-nand-
> netgear_wndr4300sw-squashfs-factory.img
>   + Proceed with the firmware installation and give the device a few
>     minutes to finish and reboot.
> 
> * Flashing through TFTP:
>   + Configure your wired client with a static IP in the 192.168.1.x range,
>     e.g. 192.168.1.10 and netmask 255.255.255.0.
>   + Power off the router.
>   + Press and hold the RESET button (the factory reset button on the bottom
>     of the device, with the red circle around it) and turn the router on
>     while keeping the button pressed.
>   + The power LED will start flashing orange. You can release the button
>     once it switches to flashing green.
>   + Transfer the image over TFTP:
>     $ tftp 192.168.1.1 -m binary -c put openwrt-ath79-nand-
> netgear_wndr4300sw-squashfs-factory.img
> 
> Signed-off-by: Stijn Segers <foss@volatilesystems.org>
> ---
>  target/linux/ath79/dts/ar9344_netgear_wndr4300sw.dts   |  9 +++++++++
>  target/linux/ath79/image/nand.mk                       | 10 ++++++++++
>  target/linux/ath79/nand/base-files/etc/board.d/01_leds |  1 +
> .../linux/ath79/nand/base-files/etc/board.d/02_network |  2 ++  .../base-
> files/etc/hotplug.d/firmware/10-ath9k-eeprom  |  2 ++
>  5 files changed, 24 insertions(+)
>  create mode 100644
> target/linux/ath79/dts/ar9344_netgear_wndr4300sw.dts
> 
> diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr4300sw.dts
> b/target/linux/ath79/dts/ar9344_netgear_wndr4300sw.dts
> new file mode 100644
> index 0000000000..fb90eee550
> --- /dev/null
> +++ b/target/linux/ath79/dts/ar9344_netgear_wndr4300sw.dts
> @@ -0,0 +1,9 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/;
> +
> +#include "ar9344_netgear_wndr.dtsi"
> +
> +/ {
> +	compatible = "netgear,wndr4300sw", "qca,ar9344";
> +	model = "Netgear WNDR4300SW";
> +};
> diff --git a/target/linux/ath79/image/nand.mk
> b/target/linux/ath79/image/nand.mk
> index 3ccd19914f..dc06b65371 100644
> --- a/target/linux/ath79/image/nand.mk
> +++ b/target/linux/ath79/image/nand.mk
> @@ -172,6 +172,16 @@ define Device/netgear_wndr4300  endef
> TARGET_DEVICES += netgear_wndr4300
> 
> +define Device/netgear_wndr4300sw
> +  SOC := ar9344
> +  DEVICE_MODEL := WNDR4300SW
> +  NETGEAR_KERNEL_MAGIC := 0x33373033
> +  NETGEAR_BOARD_ID := WNDR4300SW
> +  NETGEAR_HW_ID := 29763948+0+128+128+2x2+3x3
> +  $(Device/netgear_ath79_nand)
> +endef
> +TARGET_DEVICES += netgear_wndr4300sw
> +
>  define Device/netgear_wndr4300-v2
>    SOC := qca9563
>    DEVICE_MODEL := WNDR4300
> diff --git a/target/linux/ath79/nand/base-files/etc/board.d/01_leds
> b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
> index d9989ec538..4f601849fc 100755
> --- a/target/linux/ath79/nand/base-files/etc/board.d/01_leds
> +++ b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
> @@ -14,6 +14,7 @@ glinet,gl-ar300m-nor)
>  	;;
>  netgear,wndr3700-v4|\
>  netgear,wndr4300|\
> +netgear,wndr4300sw|\
>  netgear,wndr4300-v2|\
>  netgear,wndr4500-v3)
>  	ucidef_set_led_switch "wan-amber" "WAN (amber)"
> "netgear:amber:wan" "switch0" "0x20"
> diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network
> b/target/linux/ath79/nand/base-files/etc/board.d/02_network
> index b2191eed92..84cdfd99bb 100755
> --- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
> +++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
> @@ -22,6 +22,7 @@ ath79_setup_interfaces()
>  		;;
>  	netgear,wndr3700-v4|\
>  	netgear,wndr4300|\
> +	netgear,wndr4300sw|\
>  	netgear,wndr4300-v2|\
>  	netgear,wndr4500-v3)
>  		ucidef_add_switch "switch0" \
> @@ -44,6 +45,7 @@ ath79_setup_macs()
>  	case "$board" in
>  	netgear,wndr3700-v4|\
>  	netgear,wndr4300|\
> +	netgear,wndr4300sw|\
>  	netgear,wndr4300-v2|\
>  	netgear,wndr4500-v3)
>  		wan_mac=$(mtd_get_mac_binary caldata 0x6) diff --git
> a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-
> eeprom b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-
> ath9k-eeprom
> index f5fae46dfb..355be93ead 100644
> --- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-
> eeprom
> +++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k
> +++ -eeprom
> @@ -11,6 +11,7 @@ case "$FIRMWARE" in
>  	case $board in
>  	netgear,wndr3700-v4|\
>  	netgear,wndr4300|\
> +	netgear,wndr4300sw|\
>  	netgear,wndr4300-v2|\
>  	netgear,wndr4500-v3)
>  		caldata_extract "caldata" 0x1000 0x440 @@ -24,6 +25,7 @@
> case "$FIRMWARE" in
>  	case $board in
>  	netgear,wndr3700-v4|\
>  	netgear,wndr4300|\
> +	netgear,wndr4300sw|\
>  	netgear,wndr4300-v2|\
>  	netgear,wndr4500-v3)
>  		caldata_extract "caldata" 0x5000 0x440
> --
> 2.20.1
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
diff mbox series

Patch

diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr4300sw.dts b/target/linux/ath79/dts/ar9344_netgear_wndr4300sw.dts
new file mode 100644
index 0000000000..fb90eee550
--- /dev/null
+++ b/target/linux/ath79/dts/ar9344_netgear_wndr4300sw.dts
@@ -0,0 +1,9 @@ 
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar9344_netgear_wndr.dtsi"
+
+/ {
+	compatible = "netgear,wndr4300sw", "qca,ar9344";
+	model = "Netgear WNDR4300SW";
+};
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index 3ccd19914f..dc06b65371 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -172,6 +172,16 @@  define Device/netgear_wndr4300
 endef
 TARGET_DEVICES += netgear_wndr4300
 
+define Device/netgear_wndr4300sw
+  SOC := ar9344
+  DEVICE_MODEL := WNDR4300SW
+  NETGEAR_KERNEL_MAGIC := 0x33373033
+  NETGEAR_BOARD_ID := WNDR4300SW
+  NETGEAR_HW_ID := 29763948+0+128+128+2x2+3x3
+  $(Device/netgear_ath79_nand)
+endef
+TARGET_DEVICES += netgear_wndr4300sw
+
 define Device/netgear_wndr4300-v2
   SOC := qca9563
   DEVICE_MODEL := WNDR4300
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/01_leds b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
index d9989ec538..4f601849fc 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
@@ -14,6 +14,7 @@  glinet,gl-ar300m-nor)
 	;;
 netgear,wndr3700-v4|\
 netgear,wndr4300|\
+netgear,wndr4300sw|\
 netgear,wndr4300-v2|\
 netgear,wndr4500-v3)
 	ucidef_set_led_switch "wan-amber" "WAN (amber)" "netgear:amber:wan" "switch0" "0x20"
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network
index b2191eed92..84cdfd99bb 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -22,6 +22,7 @@  ath79_setup_interfaces()
 		;;
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
+	netgear,wndr4300sw|\
 	netgear,wndr4300-v2|\
 	netgear,wndr4500-v3)
 		ucidef_add_switch "switch0" \
@@ -44,6 +45,7 @@  ath79_setup_macs()
 	case "$board" in
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
+	netgear,wndr4300sw|\
 	netgear,wndr4300-v2|\
 	netgear,wndr4500-v3)
 		wan_mac=$(mtd_get_mac_binary caldata 0x6)
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index f5fae46dfb..355be93ead 100644
--- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -11,6 +11,7 @@  case "$FIRMWARE" in
 	case $board in
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
+	netgear,wndr4300sw|\
 	netgear,wndr4300-v2|\
 	netgear,wndr4500-v3)
 		caldata_extract "caldata" 0x1000 0x440
@@ -24,6 +25,7 @@  case "$FIRMWARE" in
 	case $board in
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
+	netgear,wndr4300sw|\
 	netgear,wndr4300-v2|\
 	netgear,wndr4500-v3)
 		caldata_extract "caldata" 0x5000 0x440