Skip to content

Commit

Permalink
ath79: add support for TP-Link TL-WR940N v6
Browse files Browse the repository at this point in the history
The TL-WR940N v6 is similar to v3/v4, it just has different
LEDs and MAC address assignment.

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
   wr940nv6_tp_recovery.bin
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.

Signed-off-by: Manuel Kock <github.web@manu.li>
  • Loading branch information
Dark4MD committed Feb 10, 2020
1 parent 39a49c2 commit af1efce
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
27 changes: 27 additions & 0 deletions target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts
@@ -0,0 +1,27 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;

#include "tp9343_tplink_tl-wr94x.dtsi"

/ {
compatible = "tplink,tl-wr940n-v6", "qca,tp9343";
model = "TP-Link TL-WR940N v6";

leds {
compatible = "gpio-leds";

wan_blue {
label = "tp-link:blue:wan";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};

diag_orange {
label = "tp-link:orange:diag";
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
};
};
};

&eth1 {
mtd-mac-address = <&uboot 0x1fc00>;
};
14 changes: 14 additions & 0 deletions target/linux/ath79/image/tiny-tp-link.mk
Expand Up @@ -264,6 +264,20 @@ define Device/tplink_tl-wr940n-v4
endef
TARGET_DEVICES += tplink_tl-wr940n-v4

define Device/tplink_tl-wr940n-v6
$(Device/tplink-4mlzma)
SOC := tp9343
DEVICE_MODEL := TL-WR940N
DEVICE_VARIANT := v6
TPLINK_HWID := 0x09400006
SUPPORTED_DEVICES += tl-wr940n-v6
IMAGES += factory-us.bin factory-eu.bin factory-br.bin
IMAGE/factory-us.bin := tplink-v1-image factory -C US
IMAGE/factory-eu.bin := tplink-v1-image factory -C EU
IMAGE/factory-br.bin := tplink-v1-image factory -C BR
endef
TARGET_DEVICES += tplink_tl-wr940n-v6

define Device/tplink_tl-wr941-v2
$(Device/tplink-4m)
SOC := ar9132
Expand Down
3 changes: 3 additions & 0 deletions target/linux/ath79/tiny/base-files/etc/board.d/01_leds
Expand Up @@ -95,6 +95,9 @@ tplink,tl-wr941nd-v6)
ucidef_set_led_switch "lan3" "LAN3" "tp-link:blue:lan3" "switch0" "0x04"
ucidef_set_led_switch "lan4" "LAN4" "tp-link:blue:lan4" "switch0" "0x02"
;;
tplink,tl-wr940n-v6)
ucidef_set_led_netdev "wan" "WAN" "tp-link:blue:wan" "eth1"
;;
esac

board_config_flush
Expand Down
1 change: 1 addition & 0 deletions target/linux/ath79/tiny/base-files/etc/board.d/02_network
Expand Up @@ -47,6 +47,7 @@ ath79_setup_interfaces()
tplink,tl-wr841-v12|\
tplink,tl-wr940n-v3|\
tplink,tl-wr940n-v4|\
tplink,tl-wr940n-v6|\
tplink,tl-wr941nd-v6)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
Expand Down

0 comments on commit af1efce

Please sign in to comment.