ath79: add support for NEC Aterm WF1200HP2
authorINAGAKI Hiroshi <[email protected]>
Tue, 7 Oct 2025 14:53:32 +0000 (23:53 +0900)
committerHauke Mehrtens <[email protected]>
Sun, 30 Nov 2025 23:17:48 +0000 (00:17 +0100)
NEC Aterm WF1200HP2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) router with FE
ports, based on AR9344.

Specification:

- SoC              : Atheros AR9344
- RAM              : DDR2 128 MiB (2x ESMT M14D5121632A-2.5BG2A)
- Flash            : SPI-NOR 8 MiB (Macronix MX25L6406EM2I-12G)
- WLAN             : 2.4/5 GHz 2T2R
  - 2.4 GHz        : Atheros AR9344 (SoC)
  - 5 GHz          : Qualcomm Atheros QCA9882
- Ethernet         : 4x 10/100 Mbps
  - switch         : Atheros AR9344 (SoC)
- LEDs/Keys (GPIO) : 12x/4x
  - note           : all LEDs are controlled by ath10k chip (QCA9882)
- UART             : through-hole on PCB (J1)
  - assignment     : 3.3V, GND, NC, TX, RX from tri-angle marking
  - settings       : 9600n8 (U-Boot: 115200n8)
- Power            : 12 VDC, 0.7 A (Max. 8 W)
- Stock OS         : NetBSD based

Flash instruction using initramfs-factory.bin image (StockFW WebUI):

1. Boot WF1200HP2 with router mode
2. Access to the WebUI ("http://aterm.me/" or "http://192.168.10.1/") on
   the device and open firmware update page ("ファームウェア更新")
3. Select the OpenWrt initramfs-factory.bin image and click update
   ("更新") button
4. After updating, the device will be rebooted and booted with OpenWrt
   initramfs image
5. On the initramfs image, upload (or download) uboot.bin and
   sysupgrade.bin image to the device
6. Replace the bootloader with uboot.bin image

   mtd write <uboot.bin image> bootloader

7. Perform sysupgrade with sysupgrade.bin image

   sysupgrade <sysuppgrade image>

8. Wait ~120 seconds to complete flashing and rebooting

Flash instruction using initramfs-factory.bin image (bootloader CLI):

 1. Connect and open serial console
 2. Power on WF1200HP2 and interrupt bootloader by ESC key
 3. Login to the bootloader CLI with the password "chiron"
 4. Start TFTP server by "tftpd" command
 5. Upload initramfs-factory.bin via tftp from your computer

    example (Windows): tftp -i 192.168.0.1 PUT initramfs-factory.bin

 6. Boot initramfs image by "boot" command
 7. On the initramfs image, backup the stock bootloader and firmware if
    needed
 8. Upload (or download) uboot.bin and sysupgrade.bin image to the
    device
 9. Replace the bootloader with uboot.bin image (see above)
10. Perform sysupgrade with sysupgrade.bin image (see above)
11. Wait ~120 seconds to complete flashing and rebooting

Notes:

- The stock bootloader requires the unknown filesystem on firmware area
  in the flash chip. Booting OpenWrt from that filesystem cannot be
  handled, so the bootloader needs to be replaced to mainline U-Boot
  before OpenWrt installation.

Known issues:

- All LEDs on the front side are connected to the GPIO controller on the
  ath10k chip (QCA9882) and controlled by it. The current ath10k driver
  supports only one LED as "ath10k-phyN", but using as a GPIO controller
  is not supported yet. As a result, all 12x LEDs on the front side
  cannot be controlled by users.

MAC Addresses:

LAN    : C0:25:A2:xx:xx:44 (config,  0x6 (hex))
WAN    : C0:25:A2:xx:xx:45 (config,  0xc (hex))
2.4 GHz: C0:25:A2:xx:xx:46 (config,  0x0 (hex))
5 GHz  : C0:25:A2:xx:xx:47 (config, 0x12 (hex))

Signed-off-by: INAGAKI Hiroshi <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20611
Signed-off-by: Hauke Mehrtens <[email protected]>
target/linux/ath79/dts/ar9344_nec_wf1200hp2.dts [new file with mode: 0644]
target/linux/ath79/image/lzma-loader/src/board.c
target/linux/ath79/image/tiny.mk
target/linux/ath79/tiny/base-files/etc/board.d/02_network
target/linux/ath79/tiny/base-files/lib/upgrade/platform.sh

diff --git a/target/linux/ath79/dts/ar9344_nec_wf1200hp2.dts b/target/linux/ath79/dts/ar9344_nec_wf1200hp2.dts
new file mode 100644 (file)
index 0000000..45c7e0b
--- /dev/null
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "ar9344_nec_wf1200.dtsi"
+
+/ {
+       compatible = "nec,wf1200hp2", "qca,ar9344";
+       model = "NEC Aterm WF1200HP2";
+};
index 5fbb4bb821a29ee0f3de2d58c1455da7063ff696..ffe33cb90d8d71f222cc8f7401dce62569effbdb 100644 (file)
@@ -220,6 +220,7 @@ static inline void huawei_ap_init(void) {}
 #endif
 
 #if defined(CONFIG_BOARD_NEC_WF1200HP) || \
+    defined(CONFIG_BOARD_NEC_WF1200HP2) || \
     defined(CONFIG_BOARD_NEC_WG1400HP) || \
     defined(CONFIG_BOARD_NEC_WG1800HP) || \
     defined(CONFIG_BOARD_NEC_WG1800HP2) || \
@@ -264,6 +265,7 @@ static inline void nec_aterm_reset_common(void)
 #endif
 
 #if defined(CONFIG_BOARD_NEC_WF1200HP) || \
+    defined(CONFIG_BOARD_NEC_WF1200HP2) || \
     defined(CONFIG_BOARD_NEC_WG600HP) || \
     defined(CONFIG_BOARD_NEC_WR8750N) || \
     defined(CONFIG_BOARD_NEC_WR9500N)
index d8e127d20ba9e597d99f44a6f06501557d7b4e18..951c9aa48d34991834bbe691e5d9268f086ebcea 100644 (file)
@@ -134,6 +134,19 @@ define Device/nec_wf1200hp
 endef
 TARGET_DEVICES += nec_wf1200hp
 
+define Device/nec_wf1200hp2
+  DEVICE_MODEL := Aterm WF1200HP2
+  SOC := ar9344
+  BLOCKSIZE := 4k
+  IMAGE_SIZE := 7936k
+  NEC_FW_TYPE := H053
+  $(Device/nec-netbsd-aterm)
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct \
+       -uboot-envtools
+  UBOOT_PATH := $$(STAGING_DIR_IMAGE)/$$(SOC)_nec_aterm_fe-u-boot.bin
+endef
+TARGET_DEVICES += nec_wf1200hp2
+
 define Device/nec_wg600hp
   DEVICE_MODEL := Aterm WG600HP
   SOC := ar9344
index 991d39daeefb136200386ce2f9b9f1cd0c05afe2..608b6b7f8674b58f21ad328e9512eedf77d8a954 100644 (file)
@@ -72,7 +72,8 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth1" "4:lan:1"
                ;;
-       nec,wf1200hp)
+       nec,wf1200hp|\
+       nec,wf1200hp2)
                ucidef_set_interface_wan "eth1"
                ucidef_add_switch "switch0" \
                        "0@eth0" "2:lan:3" "3:lan:2" "4:lan:1"
index 5829c84c05a73ed1ebc0d8bb6a18bcd4972c72e2..5d60ecaec94ba9e68652a35d4ad4a19b3681d945 100644 (file)
@@ -13,6 +13,7 @@ platform_check_image() {
 
        case "$board" in
        nec,wf1200hp|\
+       nec,wf1200hp2|\
        nec,wg600hp|\
        nec,wr8750n|\
        nec,wr9500n)