aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-12-31 15:02:46 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-12-31 15:02:46 +0000
commit859e59397b74e2a639b31e3b90a8c3531a9a4e32 (patch)
tree9682249b37405d75e49a02df8bf84c58f2bdd81e /target/linux/ar71xx/files
parent118232a5911211c6f2857b179a6a1229c4a32532 (diff)
downloadupstream-859e59397b74e2a639b31e3b90a8c3531a9a4e32.tar.gz
upstream-859e59397b74e2a639b31e3b90a8c3531a9a4e32.tar.bz2
upstream-859e59397b74e2a639b31e3b90a8c3531a9a4e32.zip
ar71xx: define LAN/WAN LEDs for the TL-WR741N/ND boards
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29631 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c36
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c37
2 files changed, 68 insertions, 5 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c
index 47fbf85e75..8af72320cb 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c
@@ -24,6 +24,12 @@
#define TL_WR741NDV4_GPIO_LED_WLAN 0
#define TL_WR741NDV4_GPIO_LED_QSS 1
+#define TL_WR741NDV4_GPIO_LED_WAN 13
+#define TL_WR741NDV4_GPIO_LED_LAN1 14
+#define TL_WR741NDV4_GPIO_LED_LAN2 15
+#define TL_WR741NDV4_GPIO_LED_LAN3 16
+#define TL_WR741NDV4_GPIO_LED_LAN4 17
+
#define TL_WR741NDV4_GPIO_LED_SYSTEM 27
#define TL_WR741NDV4_KEYS_POLL_INTERVAL 20 /* msecs */
@@ -40,14 +46,34 @@ static struct flash_platform_data tl_wr741ndv4_flash_data = {
static struct gpio_led tl_wr741ndv4_leds_gpio[] __initdata = {
{
- .name = "tp-link:green:system",
- .gpio = TL_WR741NDV4_GPIO_LED_SYSTEM,
+ .name = "tp-link:green:lan1",
+ .gpio = TL_WR741NDV4_GPIO_LED_LAN1,
+ .active_low = 0,
+ }, {
+ .name = "tp-link:green:lan2",
+ .gpio = TL_WR741NDV4_GPIO_LED_LAN2,
+ .active_low = 0,
+ }, {
+ .name = "tp-link:green:lan3",
+ .gpio = TL_WR741NDV4_GPIO_LED_LAN3,
+ .active_low = 0,
+ }, {
+ .name = "tp-link:green:lan4",
+ .gpio = TL_WR741NDV4_GPIO_LED_LAN4,
.active_low = 1,
}, {
.name = "tp-link:green:qss",
.gpio = TL_WR741NDV4_GPIO_LED_QSS,
.active_low = 0,
}, {
+ .name = "tp-link:green:system",
+ .gpio = TL_WR741NDV4_GPIO_LED_SYSTEM,
+ .active_low = 1,
+ }, {
+ .name = "tp-link:green:wan",
+ .gpio = TL_WR741NDV4_GPIO_LED_WAN,
+ .active_low = 0,
+ }, {
.name = "tp-link:green:wlan",
.gpio = TL_WR741NDV4_GPIO_LED_WLAN,
.active_low = 0,
@@ -93,6 +119,12 @@ static void __init tl_wr741ndv4_setup(void)
tl_wr741ndv4_gmac_setup();
+ ar71xx_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
+ AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
+ AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
+ AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
+ AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
+
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(tl_wr741ndv4_leds_gpio),
tl_wr741ndv4_leds_gpio);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c
index b29c7aa9d4..f877e98822 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c
@@ -19,6 +19,11 @@
#define TL_WR741ND_GPIO_LED_QSS 0
#define TL_WR741ND_GPIO_LED_SYSTEM 1
+#define TL_WR741ND_GPIO_LED_LAN1 13
+#define TL_WR741ND_GPIO_LED_LAN2 14
+#define TL_WR741ND_GPIO_LED_LAN3 15
+#define TL_WR741ND_GPIO_LED_LAN4 16
+#define TL_WR741ND_GPIO_LED_WAN 17
#define TL_WR741ND_GPIO_BTN_RESET 11
#define TL_WR741ND_GPIO_BTN_QSS 12
@@ -37,14 +42,34 @@ static struct flash_platform_data tl_wr741nd_flash_data = {
static struct gpio_led tl_wr741nd_leds_gpio[] __initdata = {
{
- .name = "tp-link:green:system",
- .gpio = TL_WR741ND_GPIO_LED_SYSTEM,
+ .name = "tp-link:green:lan1",
+ .gpio = TL_WR741ND_GPIO_LED_LAN1,
+ .active_low = 1,
+ }, {
+ .name = "tp-link:green:lan2",
+ .gpio = TL_WR741ND_GPIO_LED_LAN2,
+ .active_low = 1,
+ }, {
+ .name = "tp-link:green:lan3",
+ .gpio = TL_WR741ND_GPIO_LED_LAN3,
+ .active_low = 1,
+ }, {
+ .name = "tp-link:green:lan4",
+ .gpio = TL_WR741ND_GPIO_LED_LAN4,
.active_low = 1,
}, {
.name = "tp-link:green:qss",
.gpio = TL_WR741ND_GPIO_LED_QSS,
.active_low = 1,
- }
+ }, {
+ .name = "tp-link:green:system",
+ .gpio = TL_WR741ND_GPIO_LED_SYSTEM,
+ .active_low = 1,
+ }, {
+ .name = "tp-link:green:wan",
+ .gpio = TL_WR741ND_GPIO_LED_WAN,
+ .active_low = 1,
+ },
};
static struct gpio_keys_button tl_wr741nd_gpio_keys[] __initdata = {
@@ -72,6 +97,12 @@ static void __init tl_wr741nd_setup(void)
ar71xx_add_device_m25p80(&tl_wr741nd_flash_data);
+ ar71xx_gpio_function_disable(AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
+ AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
+ AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
+ AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
+ AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
+
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(tl_wr741nd_leds_gpio),
tl_wr741nd_leds_gpio);