[OpenWrt-Devel] [PATCH V2] ar71xx: add support for TP-LINK TL-WA860RE v1

2014-07-13 Thread Cezary Jackiewicz
New router/repeater from TP-LINK

- CPU: Atheros AR9341-DL3A (AP123)
- Flash: 4MB
- Ram: 32MB

Similar to TL-WA850RE

Signed-off-by: Cezary Jackiewicz cezary.jackiew...@gmail.com
---

Index: target/linux/ar71xx/base-files/etc/diag.sh
===
--- target/linux/ar71xx/base-files/etc/diag.sh  (revision 41592)
+++ target/linux/ar71xx/base-files/etc/diag.sh  (working copy)
@@ -167,6 +167,9 @@
tl-wa850re)
status_led=tp-link:blue:re
;;
+   tl-wa860re)
+   status_led=tp-link:green:power
+   ;;
tl-mr3220 | \
tl-mr3220-v2 | \
tl-mr3420 | \
Index: target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
===
--- target/linux/ar71xx/base-files/etc/uci-defaults/01_leds (revision 41592)
+++ target/linux/ar71xx/base-files/etc/uci-defaults/01_leds (working copy)
@@ -234,6 +234,11 @@
ucidef_set_led_rssi rssihigh RSSIHIGH tp-link:blue:signal5 
wlan0 80 100 -79 13
;;
 
+tl-wa860re)
+   ucidef_set_led_netdev lan LAN tp-link:green:lan eth0
+   ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt
+   ;;
+
 tl-wa901nd)
ucidef_set_led_netdev lan LAN tp-link:green:lan eth0
;;
Index: target/linux/ar71xx/base-files/etc/uci-defaults/02_network
===
--- target/linux/ar71xx/base-files/etc/uci-defaults/02_network  (revision 41592)
+++ target/linux/ar71xx/base-files/etc/uci-defaults/02_network  (working copy)
@@ -269,6 +269,7 @@
 tl-mr3040-v2 |\
 tl-wa750re |\
 tl-wa850re |\
+tl-wa860re |\
 tl-wa801nd-v2 |\
 tl-wa901nd |\
 tl-wa901nd-v2 |\
Index: target/linux/ar71xx/base-files/lib/ar71xx.sh
===
--- target/linux/ar71xx/base-files/lib/ar71xx.sh(revision 41592)
+++ target/linux/ar71xx/base-files/lib/ar71xx.sh(working copy)
@@ -145,6 +145,9 @@
085000*)
model=TP-Link TL-WA850RE
;;
+   086000*)
+   model=TP-Link TL-WA860RE
+   ;;
090100*)
model=TP-Link TL-WA901N/ND
;;
@@ -541,6 +544,9 @@
*TL-WA850RE)
name=tl-wa850re
;;
+   *TL-WA860RE)
+   name=tl-wa860re
+   ;;
*TL-WA801ND v2)
name=tl-wa801nd-v2
;;
Index: target/linux/ar71xx/base-files/lib/upgrade/platform.sh
===
--- target/linux/ar71xx/base-files/lib/upgrade/platform.sh  (revision 41592)
+++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh  (working copy)
@@ -240,6 +240,7 @@
tl-wa7510n | \
tl-wa750re | \
tl-wa850re | \
+   tl-wa860re | \
tl-wa801nd-v2 | \
tl-wa901nd | \
tl-wa901nd-v2 | \
Index: target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c
===
--- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c (revision 41592)
+++ target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c (working copy)
@@ -33,6 +33,12 @@
 #define TL_WAX50RE_GPIO_LED_SIGNAL43
 #define TL_WAX50RE_GPIO_LED_SIGNAL54
 
+#define TL_WA860RE_GPIO_LED_WLAN_ORANGE0
+#define TL_WA860RE_GPIO_LED_WLAN_GREEN 2
+#define TL_WA860RE_GPIO_LED_POWER_ORANGE   12
+#define TL_WA860RE_GPIO_LED_POWER_GREEN14
+#define TL_WA860RE_GPIO_LED_LAN20
+
 #define TL_WA801ND_V2_GPIO_LED_LAN 18
 #define TL_WA801ND_V2_GPIO_LED_SYSTEM  14
 
@@ -39,6 +45,10 @@
 #define TL_WAX50RE_GPIO_BTN_RESET  17
 #define TL_WAX50RE_GPIO_BTN_WPS16
 
+#define TL_WA860RE_GPIO_BTN_RESET  17
+#define TL_WA860RE_GPIO_BTN_WPS16
+#define TL_WA860RE_GPIO_BTN_ONOFF  11
+
 #define TL_WAX50RE_KEYS_POLL_INTERVAL  20  /* msecs */
 #define TL_WAX50RE_KEYS_DEBOUNCE_INTERVAL (3 * TL_WAX50RE_KEYS_POLL_INTERVAL)
 
@@ -123,7 +133,31 @@
},
 };
 
+static struct gpio_led tl_wa860re_leds_gpio[] __initdata = {
+   {
+   .name   = tp-link:green:lan,
+   .gpio   = TL_WA860RE_GPIO_LED_LAN,
+   .active_low = 1,
+   }, {
+   .name   = tp-link:green:power,
+   .gpio   = TL_WA860RE_GPIO_LED_POWER_GREEN,
+   .active_low = 1,
+   }, {
+   .name   = tp-link:orange:power,
+   .gpio   = TL_WA860RE_GPIO_LED_POWER_ORANGE,
+   .active_low = 1,
+   }, {
+   .name   = tp-link:green:wlan,
+   .gpio   = TL_WA860RE_GPIO_LED_WLAN_GREEN,
+   .active_low = 1,
+   }, {
+   .name   = tp-link:orange:wlan,
+   .gpio 

Re: [OpenWrt-Devel] [PATCH V2] ar71xx: add support for TP-LINK TL-WA860RE v1

2014-07-13 Thread John Crispin
hi,

 
 Index: target/linux/ar71xx/base-files/etc/diag.sh 
 ===

 
--- target/linux/ar71xx/base-files/etc/diag.sh  (revision 41592)
 +++ target/linux/ar71xx/base-files/etc/diag.sh(working copy)

this is also wrong. should be

 --- a/target/linux/ar71xx/base-files/etc/diag.sh  (revision 41592) 
 +++ b/target/linux/ar71xx/base-files/etc/diag.sh  (working copy)

you should use git to generate the patches so i can apply them with git am

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH V2] ar71xx: add support for TP-LINK TL-WA860RE v1

2014-07-13 Thread Jonas Gorski
On Sun, Jul 13, 2014 at 9:12 AM, John Crispin j...@phrozen.org wrote:
 hi,


 Index: target/linux/ar71xx/base-files/etc/diag.sh
 ===


 --- target/linux/ar71xx/base-files/etc/diag.sh  (revision 41592)
 +++ target/linux/ar71xx/base-files/etc/diag.sh(working copy)

 this is also wrong. should be

 --- a/target/linux/ar71xx/base-files/etc/diag.sh  (revision 41592)
 +++ b/target/linux/ar71xx/base-files/etc/diag.sh  (working copy)

 you should use git to generate the patches so i can apply them with git am

git am understands the -p argument, so you should be able to apply
this patch with git am -p0.


Jonas
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH V2] ar71xx: add support for TP-LINK TL-WA860RE v1

2014-07-13 Thread John Crispin


On 13/07/2014 12:39, Jonas Gorski wrote:
 On Sun, Jul 13, 2014 at 9:12 AM, John Crispin j...@phrozen.org
 wrote:
 hi,
 
 
 Index: target/linux/ar71xx/base-files/etc/diag.sh 
 ===



 
--- target/linux/ar71xx/base-files/etc/diag.sh  (revision 41592)
 +++ target/linux/ar71xx/base-files/etc/diag.sh(working
 copy)
 
 this is also wrong. should be
 
 --- a/target/linux/ar71xx/base-files/etc/diag.sh  (revision
 41592) +++ b/target/linux/ar71xx/base-files/etc/diag.sh
 (working copy)
 
 you should use git to generate the patches so i can apply them
 with git am
 
 git am understands the -p argument, so you should be able to
 apply this patch with git am -p0.
 
 

learned something new today :) seems obvious now that i think about it ...

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel