aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79
diff options
context:
space:
mode:
authorMichal Cieslakiewicz <michal.cieslakiewicz@wp.pl>2019-12-22 21:55:54 +0100
committerJohn Crispin <john@phrozen.org>2020-01-15 20:56:05 +0100
commita736f394323689dbbfbe548f93e6aa620016a64a (patch)
tree8f479c61421465bf7201d8e4e096dfbb5cf91e70 /target/linux/ath79
parent37a36a588a015c5f9e57c80c75670cf993955f24 (diff)
downloadupstream-a736f394323689dbbfbe548f93e6aa620016a64a.tar.gz
upstream-a736f394323689dbbfbe548f93e6aa620016a64a.tar.bz2
upstream-a736f394323689dbbfbe548f93e6aa620016a64a.zip
ath79: add support for Netgear WNDR4500 v3
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>
Diffstat (limited to 'target/linux/ath79')
-rw-r--r--target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts41
-rw-r--r--target/linux/ath79/image/nand.mk11
-rwxr-xr-xtarget/linux/ath79/nand/base-files/etc/board.d/01_leds3
-rwxr-xr-xtarget/linux/ath79/nand/base-files/etc/board.d/02_network6
-rw-r--r--target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom6
5 files changed, 62 insertions, 5 deletions
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
index 0000000000..95e30ea84b
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts
@@ -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>;
+ };
+};
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index d5213523e4..f6929cd88e 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -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
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 0376b7cfc6..d9989ec538 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
@@ -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
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 135a06d44b..bd02a4b383 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -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)
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 7ee291d109..d2f8bae1ca 100644
--- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -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
;;
*)