aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/nand
diff options
context:
space:
mode:
authorChris Blake <chrisrblake93@gmail.com>2022-06-12 14:47:43 -0500
committerChristian Lamparter <chunkeey@gmail.com>2022-06-19 12:31:02 +0200
commit949e8ba521ed7b7fd5b02e34e6706b02c17d0ae3 (patch)
tree19d6292a9c92589133962901d24319a5fee59d0e /target/linux/ath79/nand
parent77a14795dfd5488d62ec5f5cf04b7bd7a8c278ee (diff)
downloadupstream-949e8ba521ed7b7fd5b02e34e6706b02c17d0ae3.tar.gz
upstream-949e8ba521ed7b7fd5b02e34e6706b02c17d0ae3.tar.bz2
upstream-949e8ba521ed7b7fd5b02e34e6706b02c17d0ae3.zip
ath79: add support for Netgear PGZNG1
This adds support for the Netgear PGZNG1, also known as the ADT Pulse Gateway. Hardware: CPU: Atheros AR9344 Memory: 256MB Storage: 256MB NAND Hynix H27U2G8F2CTR-BC USB: 1x USB 2.0 Ethernet: 2x 100Mb/s WiFi: Atheros AR9340 2.4GHz 2T2R Leds: 8 LEDs Button: 1x Reset Button UART: Header marked JPE1. Pinout is VCC, TX, RX, GND. The marked pin, closest to the JPE1 marking, is VCC. Note VCC isn't required to be connected for UART to work. Enable Stock Firmware Shell Access: 1. Interrupt u-boot and run the following commands setenv console_mode 1 saveenv reset This will enable a UART shell in the firmware. You can then login using the root password of `icontrol`. If that doesn't work, the device is running a firmware based on OpenWRT where you can drop into failsafe to mount the FS and then modify /etc/passwd. Installation Instructions: 1. Interupt u-boot and run the following commands setenv active_image 0 setenv stock_bootcmd nboot 0x81000000 0 \${kernel_offset} setenv openwrt_bootcmd nboot 0x82000000 0 \${kernel_offset} setenv bootcmd run openwrt_bootcmd saveenv 2. boot initramfs image via TFTP u-boot tftpboot 0x82000000 openwrt-ath79-nand-netgear_pgzng1-initramfs-kernel.bin; bootm 0x82000000 3. Once booted, use LuCI sysupgrade to flash openwrt-ath79-nand-netgear_pgzng1-squashfs-sysupgrade.bin MAC Table: WAN (eth0): xx:xa - caldata 0x0 LAN (eth1): xx:xb - caldata 0x6 WLAN (phy0): xx:xc - burned into ath9k caldata Not Working: Z-Wave RS422 Signed-off-by: Chris Blake <chrisrblake93@gmail.com> (added more hw-info, fixed file permissions) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/linux/ath79/nand')
-rw-r--r--target/linux/ath79/nand/base-files/etc/board.d/01_leds8
-rw-r--r--target/linux/ath79/nand/base-files/etc/board.d/02_network3
-rw-r--r--target/linux/ath79/nand/base-files/etc/init.d/boot-leds17
3 files changed, 28 insertions, 0 deletions
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 e493298457..41c4fa2527 100644
--- a/target/linux/ath79/nand/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
@@ -18,6 +18,14 @@ glinet,gl-xe300)
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x10"
;;
+netgear,pgzng1)
+ ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"
+ ucidef_set_led_switch "wan" "WAN" "green:wan-1" "switch0" "0x02" "0xf" "link tx rx"
+ ucidef_set_led_switch "wan-green" "wan link" "green:wan-0" "switch0" "0x02" "0xf" "link"
+ ucidef_set_led_switch "wan-amber" "wan act" "amber:wan" "switch0" "0x02" "0xf" "tx rx"
+ ucidef_set_led_netdev "lan-green" "lan link" "green:lan" "eth1" "link"
+ ucidef_set_led_netdev "lan-amber" "lan act" "amber:lan" "eth1" "tx rx"
+ ;;
netgear,r6100)
ucidef_set_led_netdev "wan-green" "WAN (green)" "green:wan" "eth1"
;;
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 bda4eeb917..01f26fb39d 100644
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -30,6 +30,9 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "4:lan"
;;
+ netgear,pgzng1)
+ ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ;;
netgear,r6100)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
diff --git a/target/linux/ath79/nand/base-files/etc/init.d/boot-leds b/target/linux/ath79/nand/base-files/etc/init.d/boot-leds
new file mode 100644
index 0000000000..f2a1cc13b8
--- /dev/null
+++ b/target/linux/ath79/nand/base-files/etc/init.d/boot-leds
@@ -0,0 +1,17 @@
+#!/bin/sh /etc/rc.common
+# SPDX-License-Identifier: GPL-2.0-only
+
+START=11
+
+# To support LEDs on boards that have drivers loaded after rootfs, let's
+# re-run diag.sh AFTER kmodloader has finished, but before boot is complete.
+# This is useful for userspace LED drivers, LEDs that rely on i2c, etc.
+
+boot() {
+ case $(board_name) in
+ netgear,pgzng1)
+ . /etc/diag.sh
+ set_led_state preinit_regular
+ ;;
+ esac
+}