[OpenWrt-Devel] [PATCH v4] add support for TL-WA701ND v2

2015-01-20 Thread Luigi Tarenga
Signed-off-by: Luigi Tarenga luigi.tare...@gmail.com
---
version 4. this version is against trunk. version 3 was
against BB (sorry I forgot to work on correct branch).

I retested flashing from BB using mtd and from the stock firmware. 

thanks for your help and patience
Luigi
---
 target/linux/ar71xx/base-files/etc/diag.sh |   1 +
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   5 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-3.14|   1 +
 .../files/arch/mips/ath79/mach-tl-wa701nd-v2.c | 116 +
 target/linux/ar71xx/image/Makefile |   4 +-
 .../737-MIPS-ath79-add-TL-WA701NDv2-support.patch  |  45 
 tools/firmware-utils/src/mktplinkfw.c  |   6 ++
 10 files changed, 182 insertions(+), 1 deletion(-)
 create mode 100644 
target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
 create mode 100644 
target/linux/ar71xx/patches-3.14/737-MIPS-ath79-add-TL-WA701NDv2-support.patch

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 06b96a3..7cb3b6f 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -210,6 +210,7 @@ get_status_led() {
tl-mr3220-v2 | \
tl-mr3420 | \
tl-mr3420-v2 | \
+   tl-wa701nd-v2 | \
tl-wa801nd-v2 | \
tl-wa901nd | \
tl-wa901nd-v2 | \
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 296ea57..bfd9495 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -310,6 +310,11 @@ tl-wa850re)
ucidef_set_led_rssi rssihigh RSSIHIGH tp-link:blue:signal5 
wlan0 80 100 -79 13
;;
 
+tl-wa701nd-v2)
+   ucidef_set_led_netdev lan LAN tp-link:green:lan eth0
+   ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt
+   ;;
+
 tl-wa860re)
ucidef_set_led_netdev lan LAN tp-link:green:lan eth0
ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index b4b6cb3..5f1704f 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -324,6 +324,7 @@ tl-mr13u |\
 tl-mr3020 |\
 tl-mr3040 |\
 tl-mr3040-v2 |\
+tl-wa701nd-v2 |\
 tl-wa750re |\
 tl-wa850re |\
 tl-wa830re-v2 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 387de72..63f90b5 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -636,6 +636,9 @@ ar71xx_board_detect() {
*TL-MR3420 v2)
name=tl-mr3420-v2
;;
+   *TL-WA701ND v2)
+   name=tl-wa701nd-v2
+   ;;
*TL-WA750RE)
name=tl-wa750re
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 6dabf4e..d373699 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -309,6 +309,7 @@ platform_check_image() {
tl-mr3220-v2 | \
tl-mr3420 | \
tl-mr3420-v2 | \
+   tl-wa701nd-v2 | \
tl-wa7510n | \
tl-wa750re | \
tl-wa850re | \
diff --git a/target/linux/ar71xx/config-3.14 b/target/linux/ar71xx/config-3.14
index b6fa4ab..82b2d13 100644
--- a/target/linux/ar71xx/config-3.14
+++ b/target/linux/ar71xx/config-3.14
@@ -96,6 +96,7 @@ CONFIG_ATH79_MACH_TL_MR11U=y
 CONFIG_ATH79_MACH_TL_MR13U=y
 CONFIG_ATH79_MACH_TL_MR3020=y
 CONFIG_ATH79_MACH_TL_MR3X20=y
+CONFIG_ATH79_MACH_TL_WA701ND_V2=y
 CONFIG_ATH79_MACH_TL_WA830RE_V2=y
 CONFIG_ATH79_MACH_TL_WA901ND=y
 CONFIG_ATH79_MACH_TL_WA901ND_V2=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
new file mode 100644
index 000..aab92b3
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
@@ -0,0 +1,116 @@
+/*
+ *  TP-LINK TL-WA701ND v2 board support
+ *
+ *  Copyright (C) 2015 Luigi Tarenga luigi.tare...@gmail.com
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include linux/gpio.h
+
+#include asm/mach-ath79/ath79.h
+
+#include dev-eth.h
+#include dev-gpio-buttons.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-usb.h
+#include dev-wmac.h

Re: [OpenWrt-Devel] [PATCH v4] add support for TL-WA701ND v2

2015-01-20 Thread John Crispin
I pushed the patch to BB and trunk and added the missing ar71xx:
prefix to the subject.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel