diff options
Diffstat (limited to 'target')
10 files changed, 79 insertions, 40 deletions
diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi b/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi index 90978fb99f..f2909061da 100644 --- a/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi +++ b/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi @@ -40,7 +40,7 @@ }; }; - leds { + leds: leds { compatible = "gpio-leds"; pinctrl-names = "default"; @@ -57,16 +57,6 @@ default-state = "keep"; }; - wan_green { - label = "netgear:green:wan"; - gpios = <&gpio 1 GPIO_ACTIVE_LOW>; - }; - - wan_amber { - label = "netgear:amber:wan"; - gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - }; - wlan2g_green { label = "netgear:green:wlan2g"; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; @@ -88,13 +78,6 @@ label = "netgear:amber:wps"; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; - - usb_green { - label = "netgear:green:usb"; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - trigger-sources = <&hub_port>; - linux,default-trigger = "usbport"; - }; }; ubi-concat { @@ -272,28 +255,6 @@ qca,no-eeprom; #gpio-cells = <2>; gpio-controller; - - usb_power { - gpio-hog; - line-name = "netgear:power:usb"; - gpios = <0 GPIO_ACTIVE_HIGH>; - output-high; - }; - }; -}; - -&usb_phy { - status = "okay"; -}; - -&usb { - status = "okay"; - #address-cells = <1>; - #size-cells = <0>; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; }; }; diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr3700-v4.dts b/target/linux/ath79/dts/ar9344_netgear_wndr3700-v4.dts index 8a38aeab59..a7756f1d44 100644 --- a/target/linux/ath79/dts/ar9344_netgear_wndr3700-v4.dts +++ b/target/linux/ath79/dts/ar9344_netgear_wndr3700-v4.dts @@ -2,6 +2,8 @@ /dts-v1/; #include "ar9344_netgear_wndr.dtsi" +#include "ar9344_netgear_wndr_wan.dtsi" +#include "ar9344_netgear_wndr_usb.dtsi" / { compatible = "netgear,wndr3700-v4", "qca,ar9344"; diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr4300.dts b/target/linux/ath79/dts/ar9344_netgear_wndr4300.dts index 9b57bb88a6..235181d8d4 100644 --- a/target/linux/ath79/dts/ar9344_netgear_wndr4300.dts +++ b/target/linux/ath79/dts/ar9344_netgear_wndr4300.dts @@ -2,6 +2,8 @@ /dts-v1/; #include "ar9344_netgear_wndr.dtsi" +#include "ar9344_netgear_wndr_wan.dtsi" +#include "ar9344_netgear_wndr_usb.dtsi" / { compatible = "netgear,wndr4300", "qca,ar9344"; diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr4300sw.dts b/target/linux/ath79/dts/ar9344_netgear_wndr4300sw.dts index fb90eee550..7643b3c140 100644 --- a/target/linux/ath79/dts/ar9344_netgear_wndr4300sw.dts +++ b/target/linux/ath79/dts/ar9344_netgear_wndr4300sw.dts @@ -2,6 +2,8 @@ /dts-v1/; #include "ar9344_netgear_wndr.dtsi" +#include "ar9344_netgear_wndr_wan.dtsi" +#include "ar9344_netgear_wndr_usb.dtsi" / { compatible = "netgear,wndr4300sw", "qca,ar9344"; diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr4300tn.dts b/target/linux/ath79/dts/ar9344_netgear_wndr4300tn.dts new file mode 100644 index 0000000000..bed85a3877 --- /dev/null +++ b/target/linux/ath79/dts/ar9344_netgear_wndr4300tn.dts @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar9344_netgear_wndr.dtsi" + +/ { + compatible = "netgear,wndr4300tn", "qca,ar9344"; + model = "Netgear WNDR4300TN"; +}; diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr_usb.dtsi b/target/linux/ath79/dts/ar9344_netgear_wndr_usb.dtsi new file mode 100644 index 0000000000..e3780632e9 --- /dev/null +++ b/target/linux/ath79/dts/ar9344_netgear_wndr_usb.dtsi @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +&leds { + usb_green { + label = "netgear:green:usb"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + trigger-sources = <&hub_port>; + linux,default-trigger = "usbport"; + }; +}; + +&ath9k { + usb_power { + gpio-hog; + line-name = "netgear:power:usb"; + gpios = <0 GPIO_ACTIVE_HIGH>; + output-high; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&usb { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr_wan.dtsi b/target/linux/ath79/dts/ar9344_netgear_wndr_wan.dtsi new file mode 100644 index 0000000000..91c2971f8c --- /dev/null +++ b/target/linux/ath79/dts/ar9344_netgear_wndr_wan.dtsi @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +&leds { + wan_green { + label = "netgear:green:wan"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + + wan_amber { + label = "netgear:amber:wan"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; +}; diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index 2efe85d17f..c7f96eb6d4 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -206,6 +206,16 @@ define Device/netgear_wndr4300sw endef TARGET_DEVICES += netgear_wndr4300sw +define Device/netgear_wndr4300tn + SOC := ar9344 + DEVICE_MODEL := WNDR4300TN + NETGEAR_KERNEL_MAGIC := 0x33373033 + NETGEAR_BOARD_ID := WNDR4300TN + NETGEAR_HW_ID := 29763948+0+128+128+2x2+3x3 + $(Device/netgear_ath79_nand) +endef +TARGET_DEVICES += netgear_wndr4300tn + define Device/netgear_wndr4300-v2 SOC := qca9563 DEVICE_MODEL := WNDR4300 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 daba0e9679..910df517aa 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 @@ -29,6 +29,10 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" ;; + netgear,wndr4300tn) + ucidef_add_switch "switch0" \ + "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" + ;; zyxel,nbg6716) ucidef_add_switch "switch0" \ "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth1" 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 60defa5f8b..cac955905a 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 @@ -15,6 +15,7 @@ case "$FIRMWARE" in netgear,wndr3700-v4|\ netgear,wndr4300|\ netgear,wndr4300sw|\ + netgear,wndr4300tn|\ netgear,wndr4300-v2|\ netgear,wndr4500-v3) caldata_extract "caldata" 0x1000 0x440 @@ -29,6 +30,7 @@ case "$FIRMWARE" in netgear,wndr3700-v4|\ netgear,wndr4300|\ netgear,wndr4300sw|\ + netgear,wndr4300tn|\ netgear,wndr4300-v2|\ netgear,wndr4500-v3) caldata_extract "caldata" 0x5000 0x440 |