ath79: add support for the Netgear WNDRMAC v2
authorRenaud Lepage <root@cybikbase.com>
Sun, 10 May 2020 23:05:20 +0000 (16:05 -0700)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 10 Jun 2020 23:44:13 +0000 (01:44 +0200)
The Netgear WNDRMAC v2 is a hardware variant of the Netgear WNDR3800

Specifications
==============
* SoC: Atheros AR7161
* RAM: 128mb
* Flash on board: 16mb
* WiFi: Atheros AR9220 (a/n), Atheros AR9223 (b/g/n)
* Ethernet: RealTek RTL8366SR (1xWAN, 4xLAN, Gigabit)
* Serial console: Yes, 115200 / 8N1 (JTAG)
* USB: 1x2.0
* Power: 12 VDC, 2.5 A
* Full specs on [openwrt.org](https://openwrt.org/toh/hwdata/netgear/netgear_wndrmac_v2)

Flash Instructions
==================
It is possible to use the OEM Upgrade page to install the `factory`
variant of the firmware.

After the initial upgrade, you will need to telnet into the router
(default IP 192.168.1.1) to install anything. You may install LuCI
this way. At this point, you will have a web interface to configure
OpenWRT on the WNDRMAC v2.

Please use the `sysupgrade` variant for subsequent flashes.

Recovery Instructions
=====================
A TFTP-based recovery flash is possible if the need arises. Please refer
to the WNDR3800 page on openwrt.org for details.

https://openwrt.org/toh/netgear/wndr3800#recovery_flash_in_failsafe_mode

Signed-off-by: Renaud Lepage <root@cybikbase.com>
[do not add device to uboot-envtools, update DTSI name]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ath79/dts/ar7161_netgear_wndrmac-v2.dts [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/board.d/02_network
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
target/linux/ath79/image/generic.mk

diff --git a/target/linux/ath79/dts/ar7161_netgear_wndrmac-v2.dts b/target/linux/ath79/dts/ar7161_netgear_wndrmac-v2.dts
new file mode 100644 (file)
index 0000000..872eecc
--- /dev/null
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7161_netgear_wndr.dtsi"
+
+/ {
+       compatible = "netgear,wndrmac-v2", "qca,ar7161";
+       model = "Netgear WNDRMAC v2";
+};
+
+&partitions {
+       partition@0 {
+               label = "u-boot";
+               reg = <0x000000 0x050000>;
+               read-only;
+       };
+
+       partition@50000 {
+               label = "u-boot-env";
+               reg = <0x050000 0x020000>;
+               read-only;
+       };
+
+       partition@70000 {
+               label = "firmware";
+               reg = <0x070000 0xf80000>;
+               compatible = "netgear,uimage";
+       };
+
+       art: partition@ff0000 {
+               label = "art";
+               reg = <0xff0000 0x010000>;
+               read-only;
+       };
+};
index 1672f093a759329dbefcab0b13b850664f6f381f..d7adf7e1843ba1112cc09ca05a972a4cdfc682a5 100755 (executable)
@@ -204,7 +204,8 @@ ath79_setup_interfaces()
        netgear,wndr3700|\
        netgear,wndr3700-v2|\
        netgear,wndr3800|\
-       netgear,wndr3800ch)
+       netgear,wndr3800ch|\
+       netgear,wndrmac-v2)
                ucidef_set_interface_wan "eth1"
                ucidef_add_switch "switch0" \
                        "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth0"
@@ -430,7 +431,8 @@ ath79_setup_macs()
                ;;
        netgear,wndr3700|\
        netgear,wndr3700-v2|\
-       netgear,wndr3800)
+       netgear,wndr3800|\
+       netgear,wndrmac-v2)
                lan_mac=$(macaddr_setbit_la "$(mtd_get_mac_binary art 0x0)")
                ;;
        phicomm,k2t)
index e0fa5ff35472750d65e465b313e5e427e0f99fe8..c5fc02519eb2740330d7d04afd2defcb77502685 100644 (file)
@@ -127,7 +127,8 @@ case "$FIRMWARE" in
        netgear,wndr3700|\
        netgear,wndr3700-v2|\
        netgear,wndr3800|\
-       netgear,wndr3800ch)
+       netgear,wndr3800ch|\
+       netgear,wndrmac-v2)
                caldata_extract "art" 0x1000 0xeb8
                ;;
        dlink,dir-825-b1)
@@ -145,7 +146,8 @@ case "$FIRMWARE" in
        netgear,wndr3700|\
        netgear,wndr3700-v2|\
        netgear,wndr3800|\
-       netgear,wndr3800ch)
+       netgear,wndr3800ch|\
+       netgear,wndrmac-v2)
                caldata_extract "art" 0x5000 0xeb8
                ;;
        dlink,dir-825-b1)
index 45dfc6bdaded858504b0e4bbbedf4e349f058a1b..c66f0beae13582f815db8d19aad2421a124d2111 100644 (file)
@@ -932,6 +932,18 @@ define Device/netgear_wndr3800ch
 endef
 TARGET_DEVICES += netgear_wndr3800ch
 
+define Device/netgear_wndrmac-v2
+  $(Device/netgear_wndr3x00)
+  DEVICE_MODEL := WNDRMAC
+  DEVICE_VARIANT := v2
+  NETGEAR_KERNEL_MAGIC := 0x33373031
+  NETGEAR_BOARD_ID := WNDRMACv2
+  NETGEAR_HW_ID := 29763654+16+128
+  IMAGE_SIZE := 15872k
+  SUPPORTED_DEVICES += wndr3700
+endef
+TARGET_DEVICES += netgear_wndrmac-v2
+
 define Device/netgear_wnr2200_common
   SOC := ar7241
   DEVICE_MODEL := WNR2200