ath79: add support for Netgear WNDR4500 v3
authorMichal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Sun, 22 Dec 2019 20:55:54 +0000 (21:55 +0100)
committerJohn Crispin <john@phrozen.org>
Wed, 15 Jan 2020 19:56:05 +0000 (20:56 +0100)
This patch introduces support for Netgear WNDR4500v3. Router
is very similar to WNDR4300v2 and is based on the same PCB.

Information gathered from various Internet sources (including
https://patchwork.ozlabs.org/patch/809227/) shows following
differences to WNDR4300v2:

 * two USB 2.0 ports with separate LEDs
 * USB LEDs soldered to secondary pads
 * WPS and RFKILL buttons soldered to secondary pads
 * described as N900 device with 3x3:3 MIMO for 2.4GHz radio
 * power supply requirement is DC 12V 2.5A
 * vendor HW ID suffix differs in one digit
 * bigger chassis

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
package/boot/uboot-envtools/files/ath79
target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts [new file with mode: 0644]
target/linux/ath79/image/nand.mk
target/linux/ath79/nand/base-files/etc/board.d/01_leds
target/linux/ath79/nand/base-files/etc/board.d/02_network
target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom

index 85a0342a605e2a32b310ff75a3128c168c8ceffd..aafced98dbeb5b7bcd14f5376c4a7f85ca8596fe 100644 (file)
@@ -27,6 +27,7 @@ librerouter,librerouter-v1|\
 netgear,ex6400|\
 netgear,ex7300|\
 netgear,wndr4300-v2|\
+netgear,wndr4500-v3|\
 netgear,wnr1000-v2|\
 netgear,wnr2000-v3|\
 netgear,wnr2200-8m|\
diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts b/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts
new file mode 100644 (file)
index 0000000..95e30ea
--- /dev/null
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+
+#include "qca9563_netgear_wndr.dtsi"
+
+/ {
+       compatible = "netgear,wndr4500-v3", "qca,qca9563";
+       model = "Netgear WNDR4500 v3";
+};
+
+&leds {
+       usb1_green {
+               label = "netgear:green:usb1";
+               gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+               trigger-sources = <&hub_port0>;
+               linux,default-trigger = "usbport";
+       };
+
+       usb2_green {
+               label = "netgear:green:usb2";
+               gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+               trigger-sources = <&hub_port1>;
+               linux,default-trigger = "usbport";
+       };
+};
+
+&usb_phy1 {
+       status = "okay";
+};
+
+&usb1 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+       status = "okay";
+
+       hub_port1: port@1 {
+               reg = <1>;
+               #trigger-source-cells = <0>;
+       };
+};
index d5213523e425ed159c98c2cccba5ebe3d69b2405..f6929cd88e7e38a12a76d5b5cf4ba8cd2b6c417f 100644 (file)
@@ -165,6 +165,17 @@ define Device/netgear_wndr4300-v2
 endef
 TARGET_DEVICES += netgear_wndr4300-v2
 
+define Device/netgear_wndr4500-v3
+  SOC := qca9563
+  DEVICE_MODEL := WNDR4500
+  DEVICE_VARIANT := v3
+  NETGEAR_KERNEL_MAGIC := 0x27051956
+  NETGEAR_BOARD_ID := WNDR4500series
+  NETGEAR_HW_ID := 29764821+2+128+128+3x3+3x3+5508012173
+  $(Device/netgear_ath79_nand)
+endef
+TARGET_DEVICES += netgear_wndr4500-v3
+
 define Device/zyxel_nbg6716
   SOC := qca9558
   DEVICE_VENDOR := ZyXEL
index 0376b7cfc662373827e144462b172dda61c869c9..d9989ec5382271b4cc547c897be1681809cc2a12 100755 (executable)
@@ -14,7 +14,8 @@ glinet,gl-ar300m-nor)
        ;;
 netgear,wndr3700-v4|\
 netgear,wndr4300|\
-netgear,wndr4300-v2)
+netgear,wndr4300-v2|\
+netgear,wndr4500-v3)
        ucidef_set_led_switch "wan-amber" "WAN (amber)" "netgear:amber:wan" "switch0" "0x20"
        ;;
 esac
index 135a06d44bf4428d80c38b4e536e43583b6b1e41..bd02a4b38364ff1d9155a836cb144919809c7800 100755 (executable)
@@ -18,7 +18,8 @@ ath79_setup_interfaces()
                ;;
        netgear,wndr3700-v4|\
        netgear,wndr4300|\
-       netgear,wndr4300-v2)
+       netgear,wndr4300-v2|\
+       netgear,wndr4500-v3)
                ucidef_add_switch "switch0" \
                        "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
                ;;
@@ -39,7 +40,8 @@ ath79_setup_macs()
        case "$board" in
        netgear,wndr3700-v4|\
        netgear,wndr4300|\
-       netgear,wndr4300-v2)
+       netgear,wndr4300-v2|\
+       netgear,wndr4500-v3)
                wan_mac=$(mtd_get_mac_binary caldata 0x6)
                ;;
        zyxel,nbg6716)
index 7ee291d1096512e404debbe1e5e58e696bd59d87..d2f8bae1caa0304ab3ef3d3b23d3b9788adfb6ff 100644 (file)
@@ -11,7 +11,8 @@ case "$FIRMWARE" in
        case $board in
        netgear,wndr3700-v4|\
        netgear,wndr4300|\
-       netgear,wndr4300-v2)
+       netgear,wndr4300-v2|\
+       netgear,wndr4500-v3)
                caldata_extract "caldata" 0x1000 0x440
                ;;
        zyxel,nbg6716)
@@ -27,7 +28,8 @@ case "$FIRMWARE" in
        case $board in
        netgear,wndr3700-v4|\
        netgear,wndr4300|\
-       netgear,wndr4300-v2)
+       netgear,wndr4300-v2|\
+       netgear,wndr4500-v3)
                caldata_extract "caldata" 0x5000 0x440
                ;;
        *)