aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-07-13 10:03:41 +0000
committerJohn Crispin <john@openwrt.org>2014-07-13 10:03:41 +0000
commit9e26031a8897eac44c16445f83729ba972fd95a7 (patch)
tree1b2c39efb8e0a7d40586e2597f2f2f10104e5dc6 /target/linux/ar71xx/files
parent1475263d5c53e6723fb757214e4cac10abd60913 (diff)
downloadupstream-9e26031a8897eac44c16445f83729ba972fd95a7.tar.gz
upstream-9e26031a8897eac44c16445f83729ba972fd95a7.tar.bz2
upstream-9e26031a8897eac44c16445f83729ba972fd95a7.zip
ar71xx: add support for TP-LINK TL-WA860RE v1
New router/repeater from TP-LINK - CPU: Atheros AR9341-DL3A (AP123) - Flash: 4MB - Ram: 32MB Similar to TL-WA850RE. Changes: rename file after r41596 Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz@gmail.com> SVN-Revision: 41598
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c73
1 files changed, 73 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c
index cdb1f5a4d4..965b1cd3b8 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c
@@ -33,12 +33,22 @@
#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)
@@ -123,6 +133,30 @@ static struct gpio_led tl_wa850re_leds_gpio[] __initdata = {
},
};
+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 = {
{
@@ -142,6 +176,31 @@ 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",
@@ -225,6 +284,20 @@ static void __init tl_wa850re_setup(void)
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();