From a287e6f91b105fd1d2ff4cc0d00744a30531922c Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 3 Jul 2014 21:41:33 +0000 Subject: [PATCH] brcm47xx: add LEDs for Asus RT-N15U and update RT-N66U MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41501 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...7XX-Devices-database-update-for-3.17.patch | 39 ++++++++++++++++++- ...7XX-Devices-database-update-for-3.17.patch | 39 ++++++++++++++++++- 2 files changed, 76 insertions(+), 2 deletions(-) diff --git a/target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch b/target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch index 861285624f..7ccab8eceb 100644 --- a/target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch +++ b/target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch @@ -1,6 +1,33 @@ --- a/arch/mips/bcm47xx/leds.c +++ b/arch/mips/bcm47xx/leds.c -@@ -216,8 +216,8 @@ bcm47xx_leds_linksys_e1000v1[] __initcon +@@ -35,6 +35,15 @@ bcm47xx_leds_asus_rtn12[] __initconst = + }; + + static const struct gpio_led ++bcm47xx_leds_asus_rtn15u[] __initconst = { ++ /* TODO: Add "wlan" LED */ ++ BCM47XX_GPIO_LED(3, "blue", "wan", 1, LEDS_GPIO_DEFSTATE_OFF), ++ BCM47XX_GPIO_LED(4, "blue", "lan", 1, LEDS_GPIO_DEFSTATE_OFF), ++ BCM47XX_GPIO_LED(6, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON), ++ BCM47XX_GPIO_LED(9, "blue", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), ++}; ++ ++static const struct gpio_led + bcm47xx_leds_asus_rtn16[] __initconst = { + BCM47XX_GPIO_LED(1, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON), + BCM47XX_GPIO_LED(7, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), +@@ -42,8 +51,8 @@ bcm47xx_leds_asus_rtn16[] __initconst = + + static const struct gpio_led + bcm47xx_leds_asus_rtn66u[] __initconst = { +- BCM47XX_GPIO_LED(12, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), +- BCM47XX_GPIO_LED(15, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), ++ BCM47XX_GPIO_LED(12, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON), ++ BCM47XX_GPIO_LED(15, "blue", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), + }; + + static const struct gpio_led +@@ -216,8 +225,8 @@ bcm47xx_leds_linksys_e1000v1[] __initcon static const struct gpio_led bcm47xx_leds_linksys_e1000v21[] __initconst = { @@ -11,3 +38,13 @@ BCM47XX_GPIO_LED(7, "amber", "wps", 0, LEDS_GPIO_DEFSTATE_OFF), BCM47XX_GPIO_LED(8, "blue", "wps", 0, LEDS_GPIO_DEFSTATE_OFF), }; +@@ -425,6 +434,9 @@ void __init bcm47xx_leds_register(void) + case BCM47XX_BOARD_ASUS_RTN12: + bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12); + break; ++ case BCM47XX_BOARD_ASUS_RTN15U: ++ bcm47xx_set_pdata(bcm47xx_leds_asus_rtn15u); ++ break; + case BCM47XX_BOARD_ASUS_RTN16: + bcm47xx_set_pdata(bcm47xx_leds_asus_rtn16); + break; diff --git a/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch b/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch index 861285624f..7ccab8eceb 100644 --- a/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch +++ b/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch @@ -1,6 +1,33 @@ --- a/arch/mips/bcm47xx/leds.c +++ b/arch/mips/bcm47xx/leds.c -@@ -216,8 +216,8 @@ bcm47xx_leds_linksys_e1000v1[] __initcon +@@ -35,6 +35,15 @@ bcm47xx_leds_asus_rtn12[] __initconst = + }; + + static const struct gpio_led ++bcm47xx_leds_asus_rtn15u[] __initconst = { ++ /* TODO: Add "wlan" LED */ ++ BCM47XX_GPIO_LED(3, "blue", "wan", 1, LEDS_GPIO_DEFSTATE_OFF), ++ BCM47XX_GPIO_LED(4, "blue", "lan", 1, LEDS_GPIO_DEFSTATE_OFF), ++ BCM47XX_GPIO_LED(6, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON), ++ BCM47XX_GPIO_LED(9, "blue", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), ++}; ++ ++static const struct gpio_led + bcm47xx_leds_asus_rtn16[] __initconst = { + BCM47XX_GPIO_LED(1, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON), + BCM47XX_GPIO_LED(7, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), +@@ -42,8 +51,8 @@ bcm47xx_leds_asus_rtn16[] __initconst = + + static const struct gpio_led + bcm47xx_leds_asus_rtn66u[] __initconst = { +- BCM47XX_GPIO_LED(12, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), +- BCM47XX_GPIO_LED(15, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), ++ BCM47XX_GPIO_LED(12, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON), ++ BCM47XX_GPIO_LED(15, "blue", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), + }; + + static const struct gpio_led +@@ -216,8 +225,8 @@ bcm47xx_leds_linksys_e1000v1[] __initcon static const struct gpio_led bcm47xx_leds_linksys_e1000v21[] __initconst = { @@ -11,3 +38,13 @@ BCM47XX_GPIO_LED(7, "amber", "wps", 0, LEDS_GPIO_DEFSTATE_OFF), BCM47XX_GPIO_LED(8, "blue", "wps", 0, LEDS_GPIO_DEFSTATE_OFF), }; +@@ -425,6 +434,9 @@ void __init bcm47xx_leds_register(void) + case BCM47XX_BOARD_ASUS_RTN12: + bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12); + break; ++ case BCM47XX_BOARD_ASUS_RTN15U: ++ bcm47xx_set_pdata(bcm47xx_leds_asus_rtn15u); ++ break; + case BCM47XX_BOARD_ASUS_RTN16: + bcm47xx_set_pdata(bcm47xx_leds_asus_rtn16); + break;