Skip to content

Commit

Permalink
ath79: add support for NEC Aterm WG600HP
Browse files Browse the repository at this point in the history
NEC Aterm WG600HP is a 2.4/5 GHz band 11n (Wi-Fi 4) router, based on
AR9344.

Specification:

- SoC             : Atheros AR9344
- RAM             : DDR2 128 MiB (2x Hynix H5PS5162GFR-S6C)
- Flash           : SPI-NOR 8 MiB (Macronix MX25L6406EMI-12G)
- WLAN            : 2.4/5 GHz 2T2R
  - 2.4 GHz       : Atheros AR9344 (SoC)
  - 5 GHz         : Atheros AR9382
- Ethernet        : 5x 10/100/1000 Mbps
  - switch        : Atheros AR8327
- LEDs/Keys (GPIO): 10x/4x
  - note          : all LEDs are controlled by ath9k chip (AR9382)
- UART            : through-hole on PCB
  - assignment    : 3.3V, GND, NC, TX, RX from tri-angle marking
  - settings      : 9600n8
- USB             : 1x USB 2.0 Type-A
  - hub (internal): NEC uPD720114
- Power           : 12 VDC, 1.5 A (Max. 16 W)
- Stock OS        : NetBSD based

Flash instruction using initramfs-factory.bin image:

1. Boot WG600HP with router mode normally
2. Access to the WebUI ("http://aterm.me/" or "http://192.168.0.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 a uboot.bin image

   mtd write <uboot.bin image> bootloader

7. Perform sysupgrade with a sysupgrade.bin image

   sysupgrade <sysupgrade image>

8. Wait ~120 seconds to complete flashing

Flash instruction using initramfs-necboot.bin image:

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

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

 6. Boot initramfs image by "boot" command
 7. On the initramfs image, back up 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 a uboot.bin image
10. Perform sysupgrade with a sysupgrade.bin image
11. Wait ~120 seconds to complete flashing

Notes:

- All LEDs are connected to the GPIO controller on the ath9k chip
  (AR9382) and controlled by it. Those LEDs are probed after probing of
  ath9k chip, so they cannot be handled as status LEDs of OpenWrt while
  booting.

- A reset pin of the internal USB hub is connected to the GPIO
  controller of the ath9k chip, like LEDs above. That hub will be
  detected after probing of the ath9k chip.

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

MAC Addresses:

LAN    : A4:12:42:xx:xx:A0 (config,  0x6 (hex))
WAN    : A4:12:42:xx:xx:A1 (config,  0xc (hex))
2.4 GHz: A4:12:42:xx:xx:A2 (config,  0x0 (hex) / art, 0x1002 (hex))
5 GHz  : A4:12:42:xx:xx:A3 (config, 0x12 (hex) / art, 0x5002 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
  • Loading branch information
musashino205 committed May 14, 2024
1 parent 3ffb134 commit c37abf1
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 1 deletion.
16 changes: 16 additions & 0 deletions target/linux/ath79/dts/ar9344_nec_wg600hp.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

#include "ar9344_nec_aterm.dtsi"

/ {
compatible = "nec,wg600hp", "qca,ar9344";
model = "NEC Aterm WG600HP";
};

&partitions {
partition@40000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x040000 0x7c0000>;
};
};
3 changes: 2 additions & 1 deletion target/linux/ath79/image/lzma-loader/src/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ static inline void ap5030dn_init(void)
static inline void ap5030dn_init(void) { }
#endif

#if defined(CONFIG_BOARD_NEC_WR8750N) || \
#if defined(CONFIG_BOARD_NEC_WG600HP) || \
defined(CONFIG_BOARD_NEC_WR8750N) || \
defined(CONFIG_BOARD_NEC_WR9500N)

#define AR934X_PLL_SWITCH_CLK_CTRL_REG 0x24
Expand Down
10 changes: 10 additions & 0 deletions target/linux/ath79/image/tiny.mk
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@ define Device/engenius_enh202-v1
endef
TARGET_DEVICES += engenius_enh202-v1

define Device/nec_wg600hp
$(Device/nec-netbsd-aterm)
DEVICE_MODEL := Aterm WG600HP
SOC := ar9344
BLOCKSIZE := 4k
IMAGE_SIZE := 7936k
NEC_FW_TYPE := H044
endef
TARGET_DEVICES += nec_wg600hp

define Device/nec_wr8750n
$(Device/nec-netbsd-aterm)
SOC := ar9344
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ath79/tiny/base-files/etc/board.d/02_network
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth1" "4:lan:1"
;;
nec,wg600hp|\
nec,wr8750n|\
nec,wr9500n|\
tplink,tl-wr941n-v7-cn)
Expand Down Expand Up @@ -154,6 +155,7 @@ ath79_setup_macs()
ubnt,picostation-m)
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
;;
nec,wg600hp|\
nec,wr8750n|\
nec,wr9500n)
wan_mac=$(mtd_get_mac_binary config 0xc)
Expand Down
1 change: 1 addition & 0 deletions target/linux/ath79/tiny/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ platform_check_image() {
local board=$(board_name)

case "$board" in
nec,wg600hp|\
nec,wr8750n|\
nec,wr9500n)
local uboot_mtd=$(find_mtd_part "bootloader")
Expand Down

0 comments on commit c37abf1

Please sign in to comment.