aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-12-15 21:34:17 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-12-15 21:34:17 +0000
commitd81ea5145f64ee3f0fd0764858a318b57e3b4897 (patch)
treeada2d5034cf62bc307dedc1b50ac06623f1cae0b /target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c
parent735ae5e71fd10da371d8587f49c1246ad1f8f2f4 (diff)
downloadmaster-187ad058-d81ea5145f64ee3f0fd0764858a318b57e3b4897.tar.gz
master-187ad058-d81ea5145f64ee3f0fd0764858a318b57e3b4897.tar.bz2
master-187ad058-d81ea5145f64ee3f0fd0764858a318b57e3b4897.zip
ar71xx: move TL-WA801ND v2 setup code
The TL-WA801ND v2 board has only one LAN port which makes it more similar to the TL-WR[78]50RE devices. Move the board setup code into the mach-tl-wax50re.c file. Based-on: http://patchwork.openwrt.org/patch/4506/ Signed-off-by: Martijn Zilverschoon <thefriedzombie@gmail.com> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39072 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c40
1 files changed, 39 insertions, 1 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 c3387b0055..8d2074f4b8 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
@@ -1,7 +1,8 @@
/*
- * TP-LINK TL-WA750RE V1 / TP-LINK TL-WA850RE V1 board support
+ * TP-LINK TL-WA750RE v1/TL-WA801ND v2/TL-WA850RE v1 board support
*
* Copyright (C) 2013 Martijn Zilverschoon <thefriedzombie@gmail.com>
+ * Copyright (C) 2013 Jiri Pirko <jiri@resnulli.us>
*
* 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
@@ -31,6 +32,9 @@
#define TL_WAX50RE_GPIO_LED_SIGNAL4 3
#define TL_WAX50RE_GPIO_LED_SIGNAL5 4
+#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
@@ -137,6 +141,26 @@ static struct gpio_keys_button tl_wax50re_gpio_keys[] __initdata = {
},
};
+static struct gpio_led tl_wa801nd_v2_leds_gpio[] __initdata = {
+ {
+ .name = "tp-link:green:lan",
+ .gpio = TL_WA801ND_V2_GPIO_LED_LAN,
+ .active_low = 1,
+ }, {
+ .name = "tp-link:green:wlan",
+ .gpio = TL_WAX50RE_GPIO_LED_WLAN,
+ .active_low = 1,
+ }, {
+ .name = "tp-link:green:qss",
+ .gpio = TL_WAX50RE_GPIO_LED_RE,
+ .active_low = 1,
+ }, {
+ .name = "tp-link:green:system",
+ .gpio = TL_WA801ND_V2_GPIO_LED_SYSTEM,
+ .active_low = 1,
+ },
+};
+
static void __init tl_ap123_setup(void)
{
u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
@@ -172,6 +196,20 @@ static void __init tl_wa750re_setup(void)
MIPS_MACHINE(ATH79_MACH_TL_WA750RE, "TL-WA750RE", "TP-LINK TL-WA750RE",
tl_wa750re_setup);
+static void __init tl_wa801nd_v2_setup(void)
+{
+ tl_ap123_setup();
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa801nd_v2_leds_gpio),
+ tl_wa801nd_v2_leds_gpio);
+
+ ath79_register_gpio_keys_polled(-1, TL_WAX50RE_KEYS_POLL_INTERVAL,
+ ARRAY_SIZE(tl_wax50re_gpio_keys),
+ tl_wax50re_gpio_keys);
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_WA801ND_V2, "TL-WA801ND-v2", "TP-LINK TL-WA801ND v2",
+ tl_wa801nd_v2_setup);
+
static void __init tl_wa850re_setup(void)
{
tl_ap123_setup();