#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
#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)
},
};
+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 = {
{
},
};
+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",
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();
$(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))
--- /dev/null
+--- a/arch/mips/ath79/machtypes.h 2014-07-13 10:00:11.952353943 +0200
++++ b/arch/mips/ath79/machtypes.h 2014-07-13 10:00:25.312354497 +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_WA830RE_V2, /* TP-LINK TL-WA830RE v2 */
+ ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */