aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorPiotr Dymacz <pepe2k@gmail.com>2017-07-05 10:44:02 +0200
committerPiotr Dymacz <pepe2k@gmail.com>2017-07-09 23:44:20 +0200
commitbefc763ed142f1a415374a8d463c1fb6b4b43abf (patch)
treeabfb7d9f694463f8d35f101d1d1ea6d954971c5d /target/linux/ar71xx
parent42c8bbb69b8563896422180b379a4642419e5dfc (diff)
downloadupstream-befc763ed142f1a415374a8d463c1fb6b4b43abf.tar.gz
upstream-befc763ed142f1a415374a8d463c1fb6b4b43abf.tar.bz2
upstream-befc763ed142f1a415374a8d463c1fb6b4b43abf.zip
ar71xx: support LED in TP-Link TL-WR902AC RJ45 socket
TP-Link TL-WR902AC has another one, tiny LED inside RJ45 socket which is attached to GPIO15. Add support for it, use it as a "lan" LED and rename old one to "internet". Also, fix uci option name for "lan" LED in system configuration ("wan" -> "lan"). Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Diffstat (limited to 'target/linux/ar71xx')
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/01_leds2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr902ac-v1.c9
2 files changed, 8 insertions, 3 deletions
diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 103002d54a..e5afd50e7d 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -751,7 +751,7 @@ tl-wr802n-v2)
ucidef_set_led_wlan "wlan" "WLAN" "$board:green:system" "phy0tpt"
;;
tl-wr902ac-v1)
- ucidef_set_led_netdev "wan" "WAN" "$board:green:lan" "eth0"
+ ucidef_set_led_netdev "lan" "LAN" "$board:green:lan" "eth0"
ucidef_set_led_usbdev "usb" "USB" "$board:green:usb" "1-1"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:green:wlan2g" "phy1tpt"
;;
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr902ac-v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr902ac-v1.c
index 5d7582232c..8d2cea828a 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr902ac-v1.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr902ac-v1.c
@@ -25,7 +25,8 @@
#include "machtypes.h"
-#define TL_WR902AC_V1_GPIO_LED_LAN 12
+#define TL_WR902AC_V1_GPIO_LED_INTERNET 12
+#define TL_WR902AC_V1_GPIO_LED_LAN 15
#define TL_WR902AC_V1_GPIO_LED_POWER 13
#define TL_WR902AC_V1_GPIO_LED_USB 4
#define TL_WR902AC_V1_GPIO_LED_WLAN2G 11
@@ -44,9 +45,13 @@
static struct gpio_led tl_wr902ac_v1_leds_gpio[] __initdata = {
{
+ .name = "tl-wr902ac-v1:green:internet",
+ .gpio = TL_WR902AC_V1_GPIO_LED_INTERNET,
+ .active_low = 1,
+ }, {
.name = "tl-wr902ac-v1:green:lan",
.gpio = TL_WR902AC_V1_GPIO_LED_LAN,
- .active_low = 1,
+ .active_low = 0,
}, {
.name = "tl-wr902ac-v1:green:power",
.gpio = TL_WR902AC_V1_GPIO_LED_POWER,