ath79: add support for ZyXEL NWA1100-NH
authorSebastian Schaper <openwrt@sebastianschaper.net>
Sat, 6 Aug 2022 22:59:06 +0000 (00:59 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 20 Aug 2022 22:09:53 +0000 (00:09 +0200)
Specifications:
 * AR9342, 16 MiB Flash, 64 MiB RAM, 802.11n 2T2R, 2.4 GHz
 * 1x Gigabit Ethernet (AR8035), 802.3af PoE

Installation:
* OEM Web UI is at 192.168.1.2
  login as `admin` with password `1234`
* Flash factory-AASI.bin

The string `AASI` needs to be present within the file name of the uploaded
image to be accepted by the OEM Web-based updater, the factory image is
named accordingly to save the user from the hassle of manual renaming.

TFTP Recovery:
* Open the case, connect to TTL UART port (this is the official method
  described by Zyxel, the reset button is useless during power-on)
* Extract factory image (.tar.bz2), serve `vmlinux_mi124_f1e.lzma.uImage`
  and `mi124_f1e-jffs2` via tftp at 192.168.1.10
* Interrupt uboot countdown, execute commands
  `run lk`
  `run lf`
  to flash the kernel / filesystem accordingly

MAC addresses as verified by OEM firmware:
use   address   source
LAN   *:cc      mib0 0x30 ('eth0mac'), art 0x1002 (label)
2g    *:cd      mib0 0x4b ('wifi0mac')

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
target/linux/ath79/dts/ar9342_zyxel_nwa1100-nh.dts [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/board.d/01_leds
target/linux/ath79/generic/base-files/etc/board.d/02_network
target/linux/ath79/image/generic.mk

diff --git a/target/linux/ath79/dts/ar9342_zyxel_nwa1100-nh.dts b/target/linux/ath79/dts/ar9342_zyxel_nwa1100-nh.dts
new file mode 100644 (file)
index 0000000..fd43805
--- /dev/null
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "ar9342_zyxel_nwa11xx.dtsi"
+
+/ {
+       compatible = "zyxel,nwa1100-nh", "qca,ar9342";
+       model = "Zyxel NWA1100-NH";
+
+       aliases {
+               label-mac-device = &eth0;
+               led-boot = &led_status_green;
+               led-failsafe = &led_status_red;
+               led-running = &led_status_green;
+               led-upgrade = &led_status_red;
+       };
+       leds {
+               compatible = "gpio-leds";
+
+               led_status_green: status_green {
+                       label = "green:status";
+                       gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+
+               led_status_red: status_red {
+                       label = "red:status";
+                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+               };
+
+               led_wlan_green: wlan_green {
+                       label = "green:wlan";
+                       gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "phy0tpt";
+               };
+
+               led_lan_green: lan_green {
+                       label = "green:lan";
+                       gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+               };
+
+               led_lan_amber: lan_amber {
+                       label = "amber:lan";
+                       gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
index b3a8b2fbb620220a43ba8907f6cfbb01ce750a84..188262018ca4962c005e18cca3e29af9557f6a35 100644 (file)
@@ -484,6 +484,9 @@ zbtlink,zbt-wd323)
        ucidef_set_led_switch "lan1" "LAN1" "orange:lan1" "switch0" "0x10"
        ucidef_set_led_switch "lan2" "LAN2" "orange:lan2" "switch0" "0x08"
        ;;
+zyxel,nwa1100-nh)
+       ucidef_set_led_netdev "lan_data" "LAN_DATA" "amber:lan" "eth0" "tx rx"
+       ucidef_set_led_netdev "lan_link" "LAN_LINK" "green:lan" "eth0" "link"
 esac
 
 board_config_flush
index 9656c009a1e5f8cd68e9e6c611763d3429409716..c576dacee50eda6bebb2d2099f7f40c9dff03746 100644 (file)
@@ -110,6 +110,7 @@ ath79_setup_interfaces()
        ubnt,unifi|\
        wd,mynet-wifi-rangeextender|\
        winchannel,wb2000|\
+       zyxel,nwa1100-nh|\
        zyxel,nwa1121-ni|\
        zyxel,nwa1123-ac|\
        zyxel,nwa1123-ni)
index 612b79f8d65881bcc32aabe061cc433a839241cf..575004ea15ae2119686d92fc534f5471bef5db11 100644 (file)
@@ -2708,6 +2708,14 @@ define Device/zyxel_nwa11xx
        vmlinux_mi124_f1e mi124_f1e-jffs2 | append-md5sum-bin
 endef
 
+define Device/zyxel_nwa1100-nh
+  $(Device/zyxel_nwa11xx)
+  DEVICE_MODEL := NWA1100
+  DEVICE_VARIANT := NH
+  ZYXEL_MODEL_STRING := AASI
+endef
+TARGET_DEVICES += zyxel_nwa1100-nh
+
 define Device/zyxel_nwa1121-ni
   $(Device/zyxel_nwa11xx)
   DEVICE_MODEL := NWA1121