ar71xx: fix ethernet LEDs on the TL-WDR3500
authorGabor Juhos <juhosg@openwrt.org>
Mon, 25 Mar 2013 06:40:03 +0000 (06:40 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Mon, 25 Mar 2013 06:40:03 +0000 (06:40 +0000)
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 36122

target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c

index 5020ba4a39400938da8ad075ee67fd876fc1b97e..452c20b777ff7af98571a7e967dcea01bdde65ee 100644 (file)
 #define WDR3500_GPIO_LED_WLAN2G                13
 #define WDR3500_GPIO_LED_SYSTEM                14
 #define WDR3500_GPIO_LED_QSS           15
+#define WDR3500_GPIO_LED_WAN           18
+#define WDR3500_GPIO_LED_LAN1          19
+#define WDR3500_GPIO_LED_LAN2          20
+#define WDR3500_GPIO_LED_LAN3          21
+#define WDR3500_GPIO_LED_LAN4          22
 
 #define WDR3500_GPIO_BTN_WPS           16
 #define WDR3500_GPIO_BTN_RFKILL                17
@@ -146,6 +151,17 @@ static void __init wdr3500_setup(void)
                         GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
                         "USB power");
        ath79_register_usb();
+
+       ath79_gpio_output_select(WDR3500_GPIO_LED_LAN1,
+                                AR934X_GPIO_OUT_LED_LINK3);
+       ath79_gpio_output_select(WDR3500_GPIO_LED_LAN2,
+                                AR934X_GPIO_OUT_LED_LINK2);
+       ath79_gpio_output_select(WDR3500_GPIO_LED_LAN3,
+                                AR934X_GPIO_OUT_LED_LINK1);
+       ath79_gpio_output_select(WDR3500_GPIO_LED_LAN4,
+                                AR934X_GPIO_OUT_LED_LINK0);
+       ath79_gpio_output_select(WDR3500_GPIO_LED_WAN,
+                                AR934X_GPIO_OUT_LED_LINK4);
 }
 
 MIPS_MACHINE(ATH79_MACH_TL_WDR3500, "TL-WDR3500",