[OpenWrt-Devel] [PATCH V2] ar71xx: add support for TP-LINK TL-WA860RE v1
Cezary Jackiewicz
cezary.jackiewicz at gmail.com
Sun Jul 13 02:49:46 EDT 2014
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.jackiewicz at 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_SIGNAL4 3
#define TL_WAX50RE_GPIO_LED_SIGNAL5 4
+#define TL_WA860RE_GPIO_LED_WLAN_ORANGE 0
+#define TL_WA860RE_GPIO_LED_WLAN_GREEN 2
+#define TL_WA860RE_GPIO_LED_POWER_ORANGE 12
+#define TL_WA860RE_GPIO_LED_POWER_GREEN 14
+#define TL_WA860RE_GPIO_LED_LAN 20
+
#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_WPS 16
+#define TL_WA860RE_GPIO_BTN_RESET 17
+#define TL_WA860RE_GPIO_BTN_WPS 16
+#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 = TL_WA860RE_GPIO_LED_WLAN_ORANGE,
+ .active_low = 1,
+ },
+};
+
static struct gpio_keys_button tl_wax50re_gpio_keys[] __initdata = {
{
.desc = "Reset button",
@@ -142,6 +176,31 @@
},
};
+static struct gpio_keys_button tl_wa860re_gpio_keys[] __initdata = {
+ {
+ .desc = "Reset button",
+ .type = EV_KEY,
+ .code = KEY_RESTART,
+ .debounce_interval = TL_WAX50RE_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = TL_WA860RE_GPIO_BTN_RESET,
+ .active_low = 1,
+ }, {
+ .desc = "WPS",
+ .type = EV_KEY,
+ .code = KEY_WPS_BUTTON,
+ .debounce_interval = TL_WAX50RE_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = TL_WA860RE_GPIO_BTN_WPS,
+ .active_low = 1,
+ }, {
+ .desc = "ONOFF",
+ .type = EV_KEY,
+ .code = BTN_1,
+ .debounce_interval = TL_WAX50RE_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = TL_WA860RE_GPIO_BTN_ONOFF,
+ .active_low = 1,
+ },
+};
+
static struct gpio_led tl_wa801nd_v2_leds_gpio[] __initdata = {
{
.name = "tp-link:green:lan",
@@ -225,6 +284,20 @@
MIPS_MACHINE(ATH79_MACH_TL_WA850RE, "TL-WA850RE", "TP-LINK TL-WA850RE",
tl_wa850re_setup);
+static void __init tl_wa860re_setup(void)
+{
+ tl_ap123_setup();
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa860re_leds_gpio),
+ tl_wa860re_leds_gpio);
+
+ ath79_register_gpio_keys_polled(-1, TL_WAX50RE_KEYS_POLL_INTERVAL,
+ ARRAY_SIZE(tl_wa860re_gpio_keys),
+ tl_wa860re_gpio_keys);
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_WA860RE, "TL-WA860RE", "TP-LINK TL-WA860RE",
+ tl_wa860re_setup);
+
static void __init tl_wa901nd_v3_setup(void)
{
tl_ap123_setup();
Index: target/linux/ar71xx/generic/profiles/tp-link.mk
===================================================================
--- target/linux/ar71xx/generic/profiles/tp-link.mk (revision 41592)
+++ target/linux/ar71xx/generic/profiles/tp-link.mk (working copy)
@@ -202,6 +202,17 @@
$(eval $(call Profile,TLWA850))
+define Profile/TLWA860
+ NAME:=TP-LINK TL-WA860RE
+ PACKAGES:=
+endef
+
+define Profile/TLWA860/Description
+ Package set optimized for the TP-LINK TL-WA860RE.
+endef
+$(eval $(call Profile,TLWA860))
+
+
define Profile/TLWA901
NAME:=TP-LINK TL-WA901N/ND
PACKAGES:=
Index: target/linux/ar71xx/image/Makefile
===================================================================
--- target/linux/ar71xx/image/Makefile (revision 41592)
+++ target/linux/ar71xx/image/Makefile (working copy)
@@ -1153,6 +1153,7 @@
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR842V2,tl-wr842n-v2,TL-WR842N-v2,ttyS0,115200,0x8420002,1,8Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA801NV2,tl-wa801nd-v2,TL-WA801ND-v2,ttyS0,115200,0x08010002,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA850,tl-wa850re-v1,TL-WA850RE,ttyS0,115200,0x08500001,1,4Mlzma))
+$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA860,tl-wa860re-v1,TL-WA860RE,ttyS0,115200,0x08600001,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA901NV3,tl-wa901nd-v3,TL-WA901ND-v3,ttyS0,115200,0x09010003,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR941NV6,tl-wr941nd-v6,TL-WDR3500,ttyS0,115200,0x09410006,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1041,tl-wr1041n-v2,TL-WR1041N-v2,ttyS0,115200,0x10410002,1,4Mlzma))
Index: target/linux/ar71xx/patches-3.10/714-MIPS-ath79-add-TL-WA860RE-support.patch
===================================================================
--- target/linux/ar71xx/patches-3.10/714-MIPS-ath79-add-TL-WA860RE-support.patch (revision 0)
+++ target/linux/ar71xx/patches-3.10/714-MIPS-ath79-add-TL-WA860RE-support.patch (working copy)
@@ -0,0 +1,10 @@
+--- a/arch/mips/ath79/machtypes.h 2014-07-13 08:40:06.484154720 +0200
++++ b/arch/mips/ath79/machtypes.h 2014-07-13 08:40:36.236155953 +0200
+@@ -113,6 +113,7 @@
+ ATH79_MACH_TL_WA750RE, /* TP-LINK TL-WA750RE */
+ ATH79_MACH_TL_WA7510N_V1, /* TP-LINK TL-WA7510N v1*/
+ ATH79_MACH_TL_WA850RE, /* TP-LINK TL-WA850RE */
++ ATH79_MACH_TL_WA860RE, /* TP-LINK TL-WA860RE */
+ ATH79_MACH_TL_WA801ND_V2, /* TP-LINK TL-WA801ND v2 */
+ ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */
+ ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */
--
Pozdrawiam,
Cezary Jackiewicz
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list