diff options
author | John Crispin <john@openwrt.org> | 2015-02-04 06:10:20 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2015-02-04 06:10:20 +0000 |
commit | cde2225c7c0674fa1b334645cce8ada797cc6a24 (patch) | |
tree | 0e8d29130d2cc04dbbd173f3766868099fd06e3b /target/linux/ar71xx/files | |
parent | a63e94426de3c2768a9fcb6947702781394de7e1 (diff) | |
download | upstream-cde2225c7c0674fa1b334645cce8ada797cc6a24.tar.gz upstream-cde2225c7c0674fa1b334645cce8ada797cc6a24.tar.bz2 upstream-cde2225c7c0674fa1b334645cce8ada797cc6a24.zip |
ar71xx: add support for the TP-LINK TL-WR941ND v5
This device is very similar to the TL-WR841N v8, only two LED GPIOs are
different.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
SVN-Revision: 44255
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c index 0099b15b3a..73cfdd9cc6 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c @@ -38,6 +38,15 @@ #define TL_MR3420V2_GPIO_LED_3G 11 #define TL_MR3420V2_GPIO_USB_POWER 4 +#define TL_WR941NDV5_GPIO_LED_WLAN 13 +#define TL_WR941NDV5_GPIO_LED_QSS 15 +#define TL_WR941NDV5_GPIO_LED_WAN 18 +#define TL_WR941NDV5_GPIO_LED_LAN1 19 +#define TL_WR941NDV5_GPIO_LED_LAN2 20 +#define TL_WR941NDV5_GPIO_LED_LAN3 2 +#define TL_WR941NDV5_GPIO_LED_LAN4 3 +#define TL_WR941NDV5_GPIO_LED_SYSTEM 14 + #define TL_WR841NV8_KEYS_POLL_INTERVAL 20 /* msecs */ #define TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR841NV8_KEYS_POLL_INTERVAL) @@ -127,6 +136,42 @@ static struct gpio_keys_button tl_mr3420v2_gpio_keys[] __initdata = { } }; +static struct gpio_led tl_wr941nd_v5_leds_gpio[] __initdata = { + { + .name = "tp-link:green:lan1", + .gpio = TL_WR941NDV5_GPIO_LED_LAN1, + .active_low = 1, + }, { + .name = "tp-link:green:lan2", + .gpio = TL_WR941NDV5_GPIO_LED_LAN2, + .active_low = 1, + }, { + .name = "tp-link:green:lan3", + .gpio = TL_WR941NDV5_GPIO_LED_LAN3, + .active_low = 1, + }, { + .name = "tp-link:green:lan4", + .gpio = TL_WR941NDV5_GPIO_LED_LAN4, + .active_low = 1, + }, { + .name = "tp-link:green:qss", + .gpio = TL_WR941NDV5_GPIO_LED_QSS, + .active_low = 1, + }, { + .name = "tp-link:green:system", + .gpio = TL_WR941NDV5_GPIO_LED_SYSTEM, + .active_low = 1, + }, { + .name = "tp-link:green:wan", + .gpio = TL_WR941NDV5_GPIO_LED_WAN, + .active_low = 1, + }, { + .name = "tp-link:green:wlan", + .gpio = TL_WR941NDV5_GPIO_LED_WLAN, + .active_low = 1, + }, +}; + static void __init tl_ap123_setup(void) { u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); @@ -223,3 +268,19 @@ static void __init tl_mr3420v2_setup(void) MIPS_MACHINE(ATH79_MACH_TL_MR3420_V2, "TL-MR3420-v2", "TP-LINK TL-MR3420 v2", tl_mr3420v2_setup); + + +static void __init tl_wr941nd_v5_setup(void) +{ + tl_ap123_setup(); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr941nd_v5_leds_gpio), + tl_wr941nd_v5_leds_gpio); + + ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL, + ARRAY_SIZE(tl_wr841n_v8_gpio_keys), + tl_wr841n_v8_gpio_keys); +} + +MIPS_MACHINE(ATH79_MACH_TL_WR941ND_V5, "TL-WR941ND-v5", "TP-LINK TL-WR941N/ND v5", + tl_wr941nd_v5_setup); |