kernel: update 3.18 to 3.18.16
[15.05/openwrt.git] / target / linux / brcm47xx / patches-3.18 / 032-07-MIPS-BCM47XX-Support-Luxul-XWR-1750-board.patch
1 From 981de3c2f27af27fa4c5c952d122b35ee573ab7a Mon Sep 17 00:00:00 2001
2 From: Dan Haab <dhaab@luxul.com>
3 Date: Wed, 22 Apr 2015 13:58:33 -0600
4 Subject: [PATCH] MIPS: BCM47XX: Support Luxul XWR-1750 board
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Signed-off-by: Dan Haab <dhaab@luxul.com>
10 Acked-by: Rafał Miłecki <zajec5@gmail.com>
11 Cc: linux-mips@linux-mips.org
12 Cc: Hauke Mehrtens <hauke@hauke-m.de>
13 Cc: Dan Haab <dhaab@luxul.com>
14 Patchwork: https://patchwork.linux-mips.org/patch/9831/
15 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 ---
17  arch/mips/bcm47xx/board.c                          |  1 +
18  arch/mips/bcm47xx/buttons.c                        | 11 +++++++++++
19  arch/mips/bcm47xx/leds.c                           | 14 ++++++++++++++
20  arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h |  2 ++
21  4 files changed, 28 insertions(+)
22
23 --- a/arch/mips/bcm47xx/board.c
24 +++ b/arch/mips/bcm47xx/board.c
25 @@ -149,6 +149,7 @@ struct bcm47xx_board_type_list2 bcm47xx_
26  /* board_id */
27  static const
28  struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
29 +       {{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"},
30         {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
31         {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
32         {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
33 --- a/arch/mips/bcm47xx/buttons.c
34 +++ b/arch/mips/bcm47xx/buttons.c
35 @@ -299,6 +299,13 @@ bcm47xx_buttons_linksys_wrtsl54gs[] __in
36         BCM47XX_GPIO_KEY(6, KEY_RESTART),
37  };
38  
39 +/* Luxul */
40 +
41 +static const struct gpio_keys_button
42 +bcm47xx_buttons_luxul_xwr_1750_v1[] = {
43 +       BCM47XX_GPIO_KEY(14, BTN_TASK),
44 +};
45 +
46  /* Microsoft */
47  
48  static const struct gpio_keys_button
49 @@ -555,6 +562,10 @@ int __init bcm47xx_buttons_register(void
50                 err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs);
51                 break;
52  
53 +       case BCM47XX_BOARD_LUXUL_XWR_1750_V1:
54 +               err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xwr_1750_v1);
55 +               break;
56 +
57         case BCM47XX_BOARD_MICROSOFT_MN700:
58                 err = bcm47xx_copy_bdata(bcm47xx_buttons_microsoft_nm700);
59                 break;
60 --- a/arch/mips/bcm47xx/leds.c
61 +++ b/arch/mips/bcm47xx/leds.c
62 @@ -370,6 +370,16 @@ bcm47xx_leds_linksys_wrtsl54gs[] __initc
63         BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
64  };
65  
66 +/* Luxul */
67 +
68 +static const struct gpio_led
69 +bcm47xx_leds_luxul_xwr_1750_v1[] __initconst = {
70 +       BCM47XX_GPIO_LED(5, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
71 +       BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
72 +       BCM47XX_GPIO_LED_TRIGGER(13, "green", "status", 0, "timer"),
73 +       BCM47XX_GPIO_LED(15, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
74 +};
75 +
76  /* Microsoft */
77  
78  static const struct gpio_led
79 @@ -623,6 +633,10 @@ void __init bcm47xx_leds_register(void)
80                 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs);
81                 break;
82  
83 +       case BCM47XX_BOARD_LUXUL_XWR_1750_V1:
84 +               bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_1750_v1);
85 +               break;
86 +
87         case BCM47XX_BOARD_MICROSOFT_MN700:
88                 bcm47xx_set_pdata(bcm47xx_leds_microsoft_nm700);
89                 break;
90 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
91 +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
92 @@ -80,6 +80,8 @@ enum bcm47xx_board {
93         BCM47XX_BOARD_LINKSYS_WRT610NV2,
94         BCM47XX_BOARD_LINKSYS_WRTSL54GS,
95  
96 +       BCM47XX_BOARD_LUXUL_XWR_1750_V1,
97 +
98         BCM47XX_BOARD_MICROSOFT_MN700,
99  
100         BCM47XX_BOARD_MOTOROLA_WE800G,