From: Hauke Mehrtens Date: Tue, 4 Feb 2014 23:25:17 +0000 (+0000) Subject: brcm47xx: move OpenWrt arch patches a bit further X-Git-Tag: reboot~8023 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=db73f1433b7f64f6005c2b91e89fe611ed9435d2;p=oweals%2Fopenwrt.git brcm47xx: move OpenWrt arch patches a bit further This allows picking more upstreamed stuff Signed-off-by: Rafał Miłecki SVN-Revision: 39467 --- diff --git a/target/linux/brcm47xx/patches-3.10/127-MIPS-BCM47XX-add-button-and-led-configuration-for-so.patch b/target/linux/brcm47xx/patches-3.10/127-MIPS-BCM47XX-add-button-and-led-configuration-for-so.patch deleted file mode 100644 index 845d071192..0000000000 --- a/target/linux/brcm47xx/patches-3.10/127-MIPS-BCM47XX-add-button-and-led-configuration-for-so.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 9894af92816e729162812f2554c9d97578138834 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Fri, 10 Jan 2014 23:55:28 +0100 -Subject: [PATCH 1/2] MIPS: BCM47XX: add button and led configuration for some - Linksys devices - -This adds led and button GPIO configuration for Linksys wrt54g3gv2, -wrt54gsv1 and wrtsl54gs. This is based on OpenWrt broadcom-diag code. - -Signed-off-by: Hauke Mehrtens ---- - arch/mips/bcm47xx/buttons.c | 27 +++++++++++++++++++++++++++ - arch/mips/bcm47xx/leds.c | 33 +++++++++++++++++++++++++++++++++ - 2 files changed, 60 insertions(+) - ---- a/arch/mips/bcm47xx/buttons.c -+++ b/arch/mips/bcm47xx/buttons.c -@@ -259,6 +259,18 @@ bcm47xx_buttons_linksys_wrt310nv1[] __in - }; - - static const struct gpio_keys_button -+bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = { -+ BCM47XX_GPIO_KEY(5, KEY_WIMAX), -+ BCM47XX_GPIO_KEY(6, KEY_RESTART), -+}; -+ -+static const struct gpio_keys_button -+bcm47xx_buttons_linksys_wrt54gsv1[] __initconst = { -+ BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON), -+ BCM47XX_GPIO_KEY(6, KEY_RESTART), -+}; -+ -+static const struct gpio_keys_button - bcm47xx_buttons_linksys_wrt610nv1[] __initconst = { - BCM47XX_GPIO_KEY(6, KEY_RESTART), - BCM47XX_GPIO_KEY(8, KEY_WPS_BUTTON), -@@ -270,6 +282,12 @@ bcm47xx_buttons_linksys_wrt610nv2[] __in - BCM47XX_GPIO_KEY(6, KEY_RESTART), - }; - -+static const struct gpio_keys_button -+bcm47xx_buttons_linksys_wrtsl54gs[] __initconst = { -+ BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON), -+ BCM47XX_GPIO_KEY(6, KEY_RESTART), -+}; -+ - /* Motorola */ - - static const struct gpio_keys_button -@@ -479,12 +497,21 @@ int __init bcm47xx_buttons_register(void - case BCM47XX_BOARD_LINKSYS_WRT310NV1: - err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1); - break; -+ case BCM47XX_BOARD_LINKSYS_WRT54GSV1: -+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54gsv1); -+ break; -+ case BCM47XX_BOARD_LINKSYS_WRT54G3GV2: -+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2); -+ break; - case BCM47XX_BOARD_LINKSYS_WRT610NV1: - err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt610nv1); - break; - case BCM47XX_BOARD_LINKSYS_WRT610NV2: - err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt610nv2); - break; -+ case BCM47XX_BOARD_LINKSYS_WRTSL54GS: -+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs); -+ break; - - case BCM47XX_BOARD_MOTOROLA_WE800G: - err = bcm47xx_copy_bdata(bcm47xx_buttons_motorola_we800g); ---- a/arch/mips/bcm47xx/leds.c -+++ b/arch/mips/bcm47xx/leds.c -@@ -292,6 +292,21 @@ bcm47xx_leds_linksys_wrt310nv1[] __initc - }; - - static const struct gpio_led -+bcm47xx_leds_linksys_wrt54gsv1[] __initconst = { -+ BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF), -+ BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), -+ BCM47XX_GPIO_LED(5, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), -+ BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), -+}; -+ -+static const struct gpio_led -+bcm47xx_leds_linksys_wrt54g3gv2[] __initconst = { -+ BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), -+ BCM47XX_GPIO_LED(2, "green", "3g", 0, LEDS_GPIO_DEFSTATE_OFF), -+ BCM47XX_GPIO_LED(3, "blue", "3g", 0, LEDS_GPIO_DEFSTATE_OFF), -+}; -+ -+static const struct gpio_led - bcm47xx_leds_linksys_wrt610nv1[] __initconst = { - BCM47XX_GPIO_LED(0, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), - BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_OFF), -@@ -308,6 +323,15 @@ bcm47xx_leds_linksys_wrt610nv2[] __initc - BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), - }; - -+static const struct gpio_led -+bcm47xx_leds_linksys_wrtsl54gs[] __initconst = { -+ BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), -+ BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), -+ BCM47XX_GPIO_LED(2, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), -+ BCM47XX_GPIO_LED(3, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), -+ BCM47XX_GPIO_LED(7, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF), -+}; -+ - /* Motorola */ - - static const struct gpio_led -@@ -502,12 +526,21 @@ void __init bcm47xx_leds_register(void) - case BCM47XX_BOARD_LINKSYS_WRT310NV1: - bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1); - break; -+ case BCM47XX_BOARD_LINKSYS_WRT54GSV1: -+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54gsv1); -+ break; -+ case BCM47XX_BOARD_LINKSYS_WRT54G3GV2: -+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2); -+ break; - case BCM47XX_BOARD_LINKSYS_WRT610NV1: - bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv1); - break; - case BCM47XX_BOARD_LINKSYS_WRT610NV2: - bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv2); - break; -+ case BCM47XX_BOARD_LINKSYS_WRTSL54GS: -+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs); -+ break; - - case BCM47XX_BOARD_MOTOROLA_WE800G: - bcm47xx_set_pdata(bcm47xx_leds_motorola_we800g); diff --git a/target/linux/brcm47xx/patches-3.10/128-MIPS-BCM47XX-add-detection-and-GPIO-config-for-Sieme.patch b/target/linux/brcm47xx/patches-3.10/128-MIPS-BCM47XX-add-detection-and-GPIO-config-for-Sieme.patch deleted file mode 100644 index 2c2cfdad77..0000000000 --- a/target/linux/brcm47xx/patches-3.10/128-MIPS-BCM47XX-add-detection-and-GPIO-config-for-Sieme.patch +++ /dev/null @@ -1,89 +0,0 @@ -From c546fa49901252cbc1e4046d7188858b2f9e130f Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Fri, 10 Jan 2014 23:55:43 +0100 -Subject: [PATCH 2/2] MIPS: BCM47XX: add detection and GPIO config for Siemens - SE505v2 - -This adds board detection for the Siemens SE505v2 and the led gpio -configuration. This board does not have any buttons. -This is based on OpenWrt broadcom-diag and Manuel Munz's nvram dump. - -Signed-off-by: Hauke Mehrtens ---- - arch/mips/bcm47xx/board.c | 17 +++++++++++++++++ - arch/mips/bcm47xx/leds.c | 12 ++++++++++++ - arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 2 ++ - 3 files changed, 31 insertions(+) - ---- a/arch/mips/bcm47xx/board.c -+++ b/arch/mips/bcm47xx/board.c -@@ -179,6 +179,13 @@ struct bcm47xx_board_type_list3 bcm47xx_ - { {0}, NULL}, - }; - -+/* boardtype, boardrev */ -+static const -+struct bcm47xx_board_type_list2 bcm47xx_board_list_board_type_rev[] __initconst = { -+ {{BCM47XX_BOARD_SIEMENS_SE505V2, "Siemens SE505 V2"}, "0x0101", "0x10"}, -+ { {0}, NULL}, -+}; -+ - static const - struct bcm47xx_board_type bcm47xx_board_unknown[] __initconst = { - {BCM47XX_BOARD_UNKNOWN, "Unknown Board"}, -@@ -272,6 +279,16 @@ static __init const struct bcm47xx_board - return &e3->board; - } - } -+ -+ if (bcm47xx_nvram_getenv("boardtype", buf1, sizeof(buf1)) >= 0 && -+ bcm47xx_nvram_getenv("boardrev", buf2, sizeof(buf2)) >= 0 && -+ bcm47xx_nvram_getenv("boardnum", buf3, sizeof(buf3)) == -ENOENT) { -+ for (e2 = bcm47xx_board_list_board_type_rev; e2->value1; e2++) { -+ if (!strcmp(buf1, e2->value1) && -+ !strcmp(buf2, e2->value2)) -+ return &e2->board; -+ } -+ } - return bcm47xx_board_unknown; - } - ---- a/arch/mips/bcm47xx/leds.c -+++ b/arch/mips/bcm47xx/leds.c -@@ -383,6 +383,14 @@ bcm47xx_leds_netgear_wnr834bv2[] __initc - BCM47XX_GPIO_LED(7, "unk", "connected", 0, LEDS_GPIO_DEFSTATE_OFF), - }; - -+/* Siemens */ -+static const struct gpio_led -+bcm47xx_leds_siemens_se505v2[] __initconst = { -+ BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF), -+ BCM47XX_GPIO_LED(3, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), -+ BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), -+}; -+ - /* SimpleTech */ - - static const struct gpio_led -@@ -562,6 +570,10 @@ void __init bcm47xx_leds_register(void) - bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2); - break; - -+ case BCM47XX_BOARD_SIEMENS_SE505V2: -+ bcm47xx_set_pdata(bcm47xx_leds_siemens_se505v2); -+ break; -+ - case BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE: - bcm47xx_set_pdata(bcm47xx_leds_simpletech_simpleshare); - break; ---- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h -+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h -@@ -94,6 +94,8 @@ enum bcm47xx_board { - - BCM47XX_BOARD_PHICOMM_M1, - -+ BCM47XX_BOARD_SIEMENS_SE505V2, -+ - BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE, - - BCM47XX_BOARD_ZTE_H218N, diff --git a/target/linux/brcm47xx/patches-3.10/129-MIPS-BCM47XX-add-Belkin-F7Dxxxx-board-detection.patch b/target/linux/brcm47xx/patches-3.10/129-MIPS-BCM47XX-add-Belkin-F7Dxxxx-board-detection.patch deleted file mode 100644 index ff6c388fb1..0000000000 --- a/target/linux/brcm47xx/patches-3.10/129-MIPS-BCM47XX-add-Belkin-F7Dxxxx-board-detection.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 44927df87162ae9beb6e7b934b0e75818b88e350 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Thu, 2 Jan 2014 19:10:05 +0100 -Subject: [PATCH] MIPS: BCM47XX: add Belkin F7Dxxxx board detection - -From: Cody P Schafer - -Add a few Belkin F7Dxxxx entries, with F7D4401 sourced from online -documentation and the "F7D7302" being observed. F7D3301, F7D3302, and -F7D4302 are reasonable guesses which are unlikely to cause -mis-detection. - -Signed-off-by: Cody P Schafer -Signed-off-by: Hauke Mehrtens ---- - arch/mips/bcm47xx/board.c | 4 ++++ - arch/mips/bcm47xx/buttons.c | 4 ++++ - arch/mips/bcm47xx/leds.c | 4 ++++ - arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 4 ++++ - 4 files changed, 16 insertions(+) - ---- a/arch/mips/bcm47xx/board.c -+++ b/arch/mips/bcm47xx/board.c -@@ -71,7 +71,11 @@ struct bcm47xx_board_type_list1 bcm47xx_ - {{BCM47XX_BOARD_ASUS_WL500W, "Asus WL500W"}, "WL500gW-"}, - {{BCM47XX_BOARD_ASUS_WL520GC, "Asus WL520GC"}, "WL520GC-"}, - {{BCM47XX_BOARD_ASUS_WL520GU, "Asus WL520GU"}, "WL520GU-"}, -+ {{BCM47XX_BOARD_BELKIN_F7D3301, "Belkin F7D3301"}, "F7D3301"}, -+ {{BCM47XX_BOARD_BELKIN_F7D3302, "Belkin F7D3302"}, "F7D3302"}, - {{BCM47XX_BOARD_BELKIN_F7D4301, "Belkin F7D4301"}, "F7D4301"}, -+ {{BCM47XX_BOARD_BELKIN_F7D4302, "Belkin F7D4302"}, "F7D4302"}, -+ {{BCM47XX_BOARD_BELKIN_F7D4401, "Belkin F7D4401"}, "F7D4401"}, - { {0}, NULL}, - }; - ---- a/arch/mips/bcm47xx/buttons.c -+++ b/arch/mips/bcm47xx/buttons.c -@@ -420,7 +420,11 @@ int __init bcm47xx_buttons_register(void - err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_wlhdd); - break; - -+ case BCM47XX_BOARD_BELKIN_F7D3301: -+ case BCM47XX_BOARD_BELKIN_F7D3302: - case BCM47XX_BOARD_BELKIN_F7D4301: -+ case BCM47XX_BOARD_BELKIN_F7D4302: -+ case BCM47XX_BOARD_BELKIN_F7D4401: - err = bcm47xx_copy_bdata(bcm47xx_buttons_belkin_f7d4301); - break; - ---- a/arch/mips/bcm47xx/leds.c -+++ b/arch/mips/bcm47xx/leds.c -@@ -457,7 +457,11 @@ void __init bcm47xx_leds_register(void) - bcm47xx_set_pdata(bcm47xx_leds_asus_wlhdd); - break; - -+ case BCM47XX_BOARD_BELKIN_F7D3301: -+ case BCM47XX_BOARD_BELKIN_F7D3302: - case BCM47XX_BOARD_BELKIN_F7D4301: -+ case BCM47XX_BOARD_BELKIN_F7D4302: -+ case BCM47XX_BOARD_BELKIN_F7D4401: - bcm47xx_set_pdata(bcm47xx_leds_belkin_f7d4301); - break; - ---- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h -+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h -@@ -27,7 +27,11 @@ enum bcm47xx_board { - BCM47XX_BOARD_ASUS_WL700GE, - BCM47XX_BOARD_ASUS_WLHDD, - -+ BCM47XX_BOARD_BELKIN_F7D3301, -+ BCM47XX_BOARD_BELKIN_F7D3302, - BCM47XX_BOARD_BELKIN_F7D4301, -+ BCM47XX_BOARD_BELKIN_F7D4302, -+ BCM47XX_BOARD_BELKIN_F7D4401, - - BCM47XX_BOARD_BUFFALO_WBR2_G54, - BCM47XX_BOARD_BUFFALO_WHR2_A54G54, diff --git a/target/linux/brcm47xx/patches-3.10/140-MIPS-BCM47XX-add-button-and-led-configuration-for-so.patch b/target/linux/brcm47xx/patches-3.10/140-MIPS-BCM47XX-add-button-and-led-configuration-for-so.patch new file mode 100644 index 0000000000..845d071192 --- /dev/null +++ b/target/linux/brcm47xx/patches-3.10/140-MIPS-BCM47XX-add-button-and-led-configuration-for-so.patch @@ -0,0 +1,133 @@ +From 9894af92816e729162812f2554c9d97578138834 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Fri, 10 Jan 2014 23:55:28 +0100 +Subject: [PATCH 1/2] MIPS: BCM47XX: add button and led configuration for some + Linksys devices + +This adds led and button GPIO configuration for Linksys wrt54g3gv2, +wrt54gsv1 and wrtsl54gs. This is based on OpenWrt broadcom-diag code. + +Signed-off-by: Hauke Mehrtens +--- + arch/mips/bcm47xx/buttons.c | 27 +++++++++++++++++++++++++++ + arch/mips/bcm47xx/leds.c | 33 +++++++++++++++++++++++++++++++++ + 2 files changed, 60 insertions(+) + +--- a/arch/mips/bcm47xx/buttons.c ++++ b/arch/mips/bcm47xx/buttons.c +@@ -259,6 +259,18 @@ bcm47xx_buttons_linksys_wrt310nv1[] __in + }; + + static const struct gpio_keys_button ++bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = { ++ BCM47XX_GPIO_KEY(5, KEY_WIMAX), ++ BCM47XX_GPIO_KEY(6, KEY_RESTART), ++}; ++ ++static const struct gpio_keys_button ++bcm47xx_buttons_linksys_wrt54gsv1[] __initconst = { ++ BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON), ++ BCM47XX_GPIO_KEY(6, KEY_RESTART), ++}; ++ ++static const struct gpio_keys_button + bcm47xx_buttons_linksys_wrt610nv1[] __initconst = { + BCM47XX_GPIO_KEY(6, KEY_RESTART), + BCM47XX_GPIO_KEY(8, KEY_WPS_BUTTON), +@@ -270,6 +282,12 @@ bcm47xx_buttons_linksys_wrt610nv2[] __in + BCM47XX_GPIO_KEY(6, KEY_RESTART), + }; + ++static const struct gpio_keys_button ++bcm47xx_buttons_linksys_wrtsl54gs[] __initconst = { ++ BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON), ++ BCM47XX_GPIO_KEY(6, KEY_RESTART), ++}; ++ + /* Motorola */ + + static const struct gpio_keys_button +@@ -479,12 +497,21 @@ int __init bcm47xx_buttons_register(void + case BCM47XX_BOARD_LINKSYS_WRT310NV1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1); + break; ++ case BCM47XX_BOARD_LINKSYS_WRT54GSV1: ++ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54gsv1); ++ break; ++ case BCM47XX_BOARD_LINKSYS_WRT54G3GV2: ++ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2); ++ break; + case BCM47XX_BOARD_LINKSYS_WRT610NV1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt610nv1); + break; + case BCM47XX_BOARD_LINKSYS_WRT610NV2: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt610nv2); + break; ++ case BCM47XX_BOARD_LINKSYS_WRTSL54GS: ++ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs); ++ break; + + case BCM47XX_BOARD_MOTOROLA_WE800G: + err = bcm47xx_copy_bdata(bcm47xx_buttons_motorola_we800g); +--- a/arch/mips/bcm47xx/leds.c ++++ b/arch/mips/bcm47xx/leds.c +@@ -292,6 +292,21 @@ bcm47xx_leds_linksys_wrt310nv1[] __initc + }; + + static const struct gpio_led ++bcm47xx_leds_linksys_wrt54gsv1[] __initconst = { ++ BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF), ++ BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), ++ BCM47XX_GPIO_LED(5, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), ++ BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), ++}; ++ ++static const struct gpio_led ++bcm47xx_leds_linksys_wrt54g3gv2[] __initconst = { ++ BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), ++ BCM47XX_GPIO_LED(2, "green", "3g", 0, LEDS_GPIO_DEFSTATE_OFF), ++ BCM47XX_GPIO_LED(3, "blue", "3g", 0, LEDS_GPIO_DEFSTATE_OFF), ++}; ++ ++static const struct gpio_led + bcm47xx_leds_linksys_wrt610nv1[] __initconst = { + BCM47XX_GPIO_LED(0, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), + BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_OFF), +@@ -308,6 +323,15 @@ bcm47xx_leds_linksys_wrt610nv2[] __initc + BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), + }; + ++static const struct gpio_led ++bcm47xx_leds_linksys_wrtsl54gs[] __initconst = { ++ BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), ++ BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), ++ BCM47XX_GPIO_LED(2, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), ++ BCM47XX_GPIO_LED(3, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), ++ BCM47XX_GPIO_LED(7, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF), ++}; ++ + /* Motorola */ + + static const struct gpio_led +@@ -502,12 +526,21 @@ void __init bcm47xx_leds_register(void) + case BCM47XX_BOARD_LINKSYS_WRT310NV1: + bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1); + break; ++ case BCM47XX_BOARD_LINKSYS_WRT54GSV1: ++ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54gsv1); ++ break; ++ case BCM47XX_BOARD_LINKSYS_WRT54G3GV2: ++ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2); ++ break; + case BCM47XX_BOARD_LINKSYS_WRT610NV1: + bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv1); + break; + case BCM47XX_BOARD_LINKSYS_WRT610NV2: + bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv2); + break; ++ case BCM47XX_BOARD_LINKSYS_WRTSL54GS: ++ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs); ++ break; + + case BCM47XX_BOARD_MOTOROLA_WE800G: + bcm47xx_set_pdata(bcm47xx_leds_motorola_we800g); diff --git a/target/linux/brcm47xx/patches-3.10/141-MIPS-BCM47XX-add-detection-and-GPIO-config-for-Sieme.patch b/target/linux/brcm47xx/patches-3.10/141-MIPS-BCM47XX-add-detection-and-GPIO-config-for-Sieme.patch new file mode 100644 index 0000000000..2c2cfdad77 --- /dev/null +++ b/target/linux/brcm47xx/patches-3.10/141-MIPS-BCM47XX-add-detection-and-GPIO-config-for-Sieme.patch @@ -0,0 +1,89 @@ +From c546fa49901252cbc1e4046d7188858b2f9e130f Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Fri, 10 Jan 2014 23:55:43 +0100 +Subject: [PATCH 2/2] MIPS: BCM47XX: add detection and GPIO config for Siemens + SE505v2 + +This adds board detection for the Siemens SE505v2 and the led gpio +configuration. This board does not have any buttons. +This is based on OpenWrt broadcom-diag and Manuel Munz's nvram dump. + +Signed-off-by: Hauke Mehrtens +--- + arch/mips/bcm47xx/board.c | 17 +++++++++++++++++ + arch/mips/bcm47xx/leds.c | 12 ++++++++++++ + arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 2 ++ + 3 files changed, 31 insertions(+) + +--- a/arch/mips/bcm47xx/board.c ++++ b/arch/mips/bcm47xx/board.c +@@ -179,6 +179,13 @@ struct bcm47xx_board_type_list3 bcm47xx_ + { {0}, NULL}, + }; + ++/* boardtype, boardrev */ ++static const ++struct bcm47xx_board_type_list2 bcm47xx_board_list_board_type_rev[] __initconst = { ++ {{BCM47XX_BOARD_SIEMENS_SE505V2, "Siemens SE505 V2"}, "0x0101", "0x10"}, ++ { {0}, NULL}, ++}; ++ + static const + struct bcm47xx_board_type bcm47xx_board_unknown[] __initconst = { + {BCM47XX_BOARD_UNKNOWN, "Unknown Board"}, +@@ -272,6 +279,16 @@ static __init const struct bcm47xx_board + return &e3->board; + } + } ++ ++ if (bcm47xx_nvram_getenv("boardtype", buf1, sizeof(buf1)) >= 0 && ++ bcm47xx_nvram_getenv("boardrev", buf2, sizeof(buf2)) >= 0 && ++ bcm47xx_nvram_getenv("boardnum", buf3, sizeof(buf3)) == -ENOENT) { ++ for (e2 = bcm47xx_board_list_board_type_rev; e2->value1; e2++) { ++ if (!strcmp(buf1, e2->value1) && ++ !strcmp(buf2, e2->value2)) ++ return &e2->board; ++ } ++ } + return bcm47xx_board_unknown; + } + +--- a/arch/mips/bcm47xx/leds.c ++++ b/arch/mips/bcm47xx/leds.c +@@ -383,6 +383,14 @@ bcm47xx_leds_netgear_wnr834bv2[] __initc + BCM47XX_GPIO_LED(7, "unk", "connected", 0, LEDS_GPIO_DEFSTATE_OFF), + }; + ++/* Siemens */ ++static const struct gpio_led ++bcm47xx_leds_siemens_se505v2[] __initconst = { ++ BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF), ++ BCM47XX_GPIO_LED(3, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), ++ BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), ++}; ++ + /* SimpleTech */ + + static const struct gpio_led +@@ -562,6 +570,10 @@ void __init bcm47xx_leds_register(void) + bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2); + break; + ++ case BCM47XX_BOARD_SIEMENS_SE505V2: ++ bcm47xx_set_pdata(bcm47xx_leds_siemens_se505v2); ++ break; ++ + case BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE: + bcm47xx_set_pdata(bcm47xx_leds_simpletech_simpleshare); + break; +--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h ++++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h +@@ -94,6 +94,8 @@ enum bcm47xx_board { + + BCM47XX_BOARD_PHICOMM_M1, + ++ BCM47XX_BOARD_SIEMENS_SE505V2, ++ + BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE, + + BCM47XX_BOARD_ZTE_H218N, diff --git a/target/linux/brcm47xx/patches-3.10/142-MIPS-BCM47XX-add-Belkin-F7Dxxxx-board-detection.patch b/target/linux/brcm47xx/patches-3.10/142-MIPS-BCM47XX-add-Belkin-F7Dxxxx-board-detection.patch new file mode 100644 index 0000000000..ff6c388fb1 --- /dev/null +++ b/target/linux/brcm47xx/patches-3.10/142-MIPS-BCM47XX-add-Belkin-F7Dxxxx-board-detection.patch @@ -0,0 +1,77 @@ +From 44927df87162ae9beb6e7b934b0e75818b88e350 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Thu, 2 Jan 2014 19:10:05 +0100 +Subject: [PATCH] MIPS: BCM47XX: add Belkin F7Dxxxx board detection + +From: Cody P Schafer + +Add a few Belkin F7Dxxxx entries, with F7D4401 sourced from online +documentation and the "F7D7302" being observed. F7D3301, F7D3302, and +F7D4302 are reasonable guesses which are unlikely to cause +mis-detection. + +Signed-off-by: Cody P Schafer +Signed-off-by: Hauke Mehrtens +--- + arch/mips/bcm47xx/board.c | 4 ++++ + arch/mips/bcm47xx/buttons.c | 4 ++++ + arch/mips/bcm47xx/leds.c | 4 ++++ + arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 4 ++++ + 4 files changed, 16 insertions(+) + +--- a/arch/mips/bcm47xx/board.c ++++ b/arch/mips/bcm47xx/board.c +@@ -71,7 +71,11 @@ struct bcm47xx_board_type_list1 bcm47xx_ + {{BCM47XX_BOARD_ASUS_WL500W, "Asus WL500W"}, "WL500gW-"}, + {{BCM47XX_BOARD_ASUS_WL520GC, "Asus WL520GC"}, "WL520GC-"}, + {{BCM47XX_BOARD_ASUS_WL520GU, "Asus WL520GU"}, "WL520GU-"}, ++ {{BCM47XX_BOARD_BELKIN_F7D3301, "Belkin F7D3301"}, "F7D3301"}, ++ {{BCM47XX_BOARD_BELKIN_F7D3302, "Belkin F7D3302"}, "F7D3302"}, + {{BCM47XX_BOARD_BELKIN_F7D4301, "Belkin F7D4301"}, "F7D4301"}, ++ {{BCM47XX_BOARD_BELKIN_F7D4302, "Belkin F7D4302"}, "F7D4302"}, ++ {{BCM47XX_BOARD_BELKIN_F7D4401, "Belkin F7D4401"}, "F7D4401"}, + { {0}, NULL}, + }; + +--- a/arch/mips/bcm47xx/buttons.c ++++ b/arch/mips/bcm47xx/buttons.c +@@ -420,7 +420,11 @@ int __init bcm47xx_buttons_register(void + err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_wlhdd); + break; + ++ case BCM47XX_BOARD_BELKIN_F7D3301: ++ case BCM47XX_BOARD_BELKIN_F7D3302: + case BCM47XX_BOARD_BELKIN_F7D4301: ++ case BCM47XX_BOARD_BELKIN_F7D4302: ++ case BCM47XX_BOARD_BELKIN_F7D4401: + err = bcm47xx_copy_bdata(bcm47xx_buttons_belkin_f7d4301); + break; + +--- a/arch/mips/bcm47xx/leds.c ++++ b/arch/mips/bcm47xx/leds.c +@@ -457,7 +457,11 @@ void __init bcm47xx_leds_register(void) + bcm47xx_set_pdata(bcm47xx_leds_asus_wlhdd); + break; + ++ case BCM47XX_BOARD_BELKIN_F7D3301: ++ case BCM47XX_BOARD_BELKIN_F7D3302: + case BCM47XX_BOARD_BELKIN_F7D4301: ++ case BCM47XX_BOARD_BELKIN_F7D4302: ++ case BCM47XX_BOARD_BELKIN_F7D4401: + bcm47xx_set_pdata(bcm47xx_leds_belkin_f7d4301); + break; + +--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h ++++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h +@@ -27,7 +27,11 @@ enum bcm47xx_board { + BCM47XX_BOARD_ASUS_WL700GE, + BCM47XX_BOARD_ASUS_WLHDD, + ++ BCM47XX_BOARD_BELKIN_F7D3301, ++ BCM47XX_BOARD_BELKIN_F7D3302, + BCM47XX_BOARD_BELKIN_F7D4301, ++ BCM47XX_BOARD_BELKIN_F7D4302, ++ BCM47XX_BOARD_BELKIN_F7D4401, + + BCM47XX_BOARD_BUFFALO_WBR2_G54, + BCM47XX_BOARD_BUFFALO_WHR2_A54G54,