diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2019-07-24 16:49:08 +0200 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-05-20 20:11:33 +0200 |
commit | 24cfd961d9aca454c80e3e1f0e2a10303dfbb654 (patch) | |
tree | e180591185cc61e3fc8ace4832007e1789c456f1 /target/linux/ath79/dts | |
parent | 7de43d66ffd834adb9ae7b3b67604e693f5c959b (diff) | |
download | upstream-24cfd961d9aca454c80e3e1f0e2a10303dfbb654.tar.gz upstream-24cfd961d9aca454c80e3e1f0e2a10303dfbb654.tar.bz2 upstream-24cfd961d9aca454c80e3e1f0e2a10303dfbb654.zip |
ath79: add support for TP9343-based TP-Link TL-WR94x devices
This adds support for several TP-Link devices based on TP9343
("a QCA9561 without PCIe and USB"):
- TL-WR940N v3
- TL-WR940N v4
- TL-WR941ND v6
The devices are only different concerning LEDs and MAC address
assignment.
All TL-WR940 are with non-detachable antennas (N), all
TL-WR941 devices are with detachable antennas (ND).
Specification:
- 750 MHz CPU
- 32 MB of RAM
- 4 MB of FLASH
- 2.4 GHz WiFi
- 4x 10/100 Mbps Ethernet
Flash instruction (WebUI):
Download *-factory.bin image and upload it via the firmwary upgrade
function of the stock firmware WebUI.
Flash instruction (TFTP):
1. Set PC to fixed ip address 192.168.0.66
2. Download *-factory.bin image and rename it to * (see below)
3. Start a tftp server with the image file in its root directory
4. Turn off the router
5. Press and hold Reset button
6. Turn on router with the reset button pressed and wait ~15 seconds
7. Release the reset button and after a short time
the firmware should be transferred from the tftp server
8. Wait ~30 second to complete recovery.
* TFTP image names:
940 v3: wr941ndv6_tp_recovery.bin
940 v4: wr940nv4_tp_recovery.bin
941 v6: wr941ndv6_tp_recovery.bin
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(backported picked from commit c02b9818a51ab189be11218e626e9cad2c21ec94)
Diffstat (limited to 'target/linux/ath79/dts')
5 files changed, 247 insertions, 0 deletions
diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dts new file mode 100644 index 0000000000..171cc60969 --- /dev/null +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dts @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "tp9343_tplink_tl-wr940n-v3.dtsi" + +/ { + compatible = "tplink,tl-wr940n-v3", "qca,tp9343"; + model = "TP-Link TL-WR940N v3"; +}; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi new file mode 100644 index 0000000000..f5543e4f89 --- /dev/null +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "tp9343_tplink_tl-wr94x.dtsi" + +/ { + aliases { + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + }; + + leds { + compatible = "gpio-leds"; + + led_system: system { + label = "tp-link:blue:system"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + qss { + label = "tp-link:blue:qss"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + + wlan { + label = "tp-link:blue:wlan"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + wan_blue { + label = "tp-link:blue:wan"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + wan_red { + label = "tp-link:red:wan"; + gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; + }; + + lan1 { + label = "tp-link:blue:lan1"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + }; + + lan2 { + label = "tp-link:blue:lan2"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + }; + + lan3 { + label = "tp-link:blue:lan3"; + gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + }; + + lan4 { + label = "tp-link:blue:lan4"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ð1 { + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <(-1)>; +}; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts new file mode 100644 index 0000000000..54e3555306 --- /dev/null +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "tp9343_tplink_tl-wr94x.dtsi" + +/ { + compatible = "tplink,tl-wr940n-v4", "qca,tp9343"; + model = "TP-Link TL-WR940N v4"; + + aliases { + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + }; + + leds { + compatible = "gpio-leds"; + + led_system: system { + label = "tp-link:blue:system"; + gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + qss { + label = "tp-link:blue:qss"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + + wlan { + label = "tp-link:blue:wlan"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + wan_blue { + label = "tp-link:blue:wan"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + wan_red { + label = "tp-link:red:wan"; + gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; + }; + + lan1 { + label = "tp-link:blue:lan1"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + }; + + lan2 { + label = "tp-link:blue:lan2"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + }; + + lan3 { + label = "tp-link:blue:lan3"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + }; + + lan4 { + label = "tp-link:blue:lan4"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ð1 { + mtd-mac-address = <&uboot 0x1fc00>; +}; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr941nd-v6.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr941nd-v6.dts new file mode 100644 index 0000000000..121267f604 --- /dev/null +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr941nd-v6.dts @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "tp9343_tplink_tl-wr940n-v3.dtsi" + +/ { + compatible = "tplink,tl-wr941nd-v6", "qca,tp9343"; + model = "TP-Link TL-WR941ND v6"; +}; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr94x.dtsi b/target/linux/ath79/dts/tp9343_tplink_tl-wr94x.dtsi new file mode 100644 index 0000000000..a31508e84b --- /dev/null +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr94x.dtsi @@ -0,0 +1,89 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> + +#include "qca956x.dtsi" + +/ { + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + keys { + compatible = "gpio-keys"; + + wifi_button { + label = "WiFi button"; + linux,code = <KEY_RFKILL>; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + }; + + reset_button { + label = "Reset button"; + linux,code = <KEY_RESTART>; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + uboot: partition@0 { + label = "u-boot"; + reg = <0x000000 0x020000>; + read-only; + }; + + partition@20000 { + compatible = "tplink,firmware"; + label = "firmware"; + reg = <0x020000 0x3d0000>; + }; + + art: partition@3f0000 { + label = "art"; + reg = <0x3f0000 0x010000>; + read-only; + }; + }; + }; +}; + +&uart { + status = "okay"; +}; + +ð0 { + status = "okay"; + + phy-mode = "mii"; + phy-handle = <&swphy4>; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <1>; +}; + +ð1 { + status = "okay"; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&uboot 0x1fc00>; +}; |