diff options
author | John Crispin <blogic@openwrt.org> | 2014-07-13 10:03:41 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-07-13 10:03:41 +0000 |
commit | 7bdf5bf8b66d27c511c27ab42988819188d6adb8 (patch) | |
tree | 882251c2a4ff312dd7130f62f17019e5af4fa265 /target/linux/ar71xx/files/arch/mips | |
parent | 4cb2ca86abed9e265560f97b15b8b6f49db89a18 (diff) | |
download | upstream-7bdf5bf8b66d27c511c27ab42988819188d6adb8.tar.gz upstream-7bdf5bf8b66d27c511c27ab42988819188d6adb8.tar.bz2 upstream-7bdf5bf8b66d27c511c27ab42988819188d6adb8.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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41598 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c | 73 |
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(); |