brcm47xx: add patches for kernel 4.0
[openwrt/svn-archive/archive.git] / target / linux / brcm47xx / patches-4.0 / 030-11-MIPS-BCM47xx-Devices-database-update-for-4.1-or-4.2.patch
1 From 160f14312b0b7d35759535b1f60be79247b263c4 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3 Date: Wed, 1 Apr 2015 18:18:02 +0200
4 Subject: [PATCH] MIPS: BCM47xx: Devices database update for 4.1 (or 4.2?)
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
10 Cc: linux-mips@linux-mips.org
11 Cc: Hauke Mehrtens <hauke@hauke-m.de>
12 Patchwork: https://patchwork.linux-mips.org/patch/9656/
13 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 ---
15 arch/mips/bcm47xx/board.c | 4 ++++
16 arch/mips/bcm47xx/buttons.c | 18 ++++++++++++++++++
17 arch/mips/bcm47xx/leds.c | 10 ++++++++++
18 arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 4 ++++
19 4 files changed, 36 insertions(+)
20
21 diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c
22 index f936dcc..41b9736 100644
23 --- a/arch/mips/bcm47xx/board.c
24 +++ b/arch/mips/bcm47xx/board.c
25 @@ -151,9 +151,11 @@ static const
26 struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
27 {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
28 {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
29 + {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
30 {{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"},
31 {{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"},
32 {{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"},
33 + {{BCM47XX_BOARD_NETGEAR_WNDR3400_V3, "Netgear WNDR3400 V3"}, "U12H208T00_NETGEAR"},
34 {{BCM47XX_BOARD_NETGEAR_WNDR3400VCNA, "Netgear WNDR3400 Vcna"}, "U12H155T01_NETGEAR"},
35 {{BCM47XX_BOARD_NETGEAR_WNDR3700V3, "Netgear WNDR3700 V3"}, "U12H194T00_NETGEAR"},
36 {{BCM47XX_BOARD_NETGEAR_WNDR4000, "Netgear WNDR4000"}, "U12H181T00_NETGEAR"},
37 @@ -196,6 +198,8 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_board_type_rev[] __initconst
38 static const
39 struct bcm47xx_board_type_list2 bcm47xx_board_list_key_value[] __initconst = {
40 {{BCM47XX_BOARD_ASUS_WL700GE, "Asus WL700"}, "model_no", "WL700"},
41 + {{BCM47XX_BOARD_LINKSYS_WRT300N_V1, "Linksys WRT300N V1"}, "router_name", "WRT300N"},
42 + {{BCM47XX_BOARD_LINKSYS_WRT600N_V11, "Linksys WRT600N V1.1"}, "Model_Name", "WRT600N"},
43 {{BCM47XX_BOARD_LINKSYS_WRTSL54GS, "Linksys WRTSL54GS"}, "machine_name", "WRTSL54GS"},
44 { {0}, NULL},
45 };
46 diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c
47 index 913182b..276276a 100644
48 --- a/arch/mips/bcm47xx/buttons.c
49 +++ b/arch/mips/bcm47xx/buttons.c
50 @@ -252,6 +252,12 @@ bcm47xx_buttons_linksys_wrt160nv3[] __initconst = {
51 };
52
53 static const struct gpio_keys_button
54 +bcm47xx_buttons_linksys_wrt300n_v1[] __initconst = {
55 + BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
56 + BCM47XX_GPIO_KEY(6, KEY_RESTART),
57 +};
58 +
59 +static const struct gpio_keys_button
60 bcm47xx_buttons_linksys_wrt300nv11[] __initconst = {
61 BCM47XX_GPIO_KEY(4, KEY_UNKNOWN),
62 BCM47XX_GPIO_KEY(6, KEY_RESTART),
63 @@ -327,6 +333,12 @@ bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
64 };
65
66 static const struct gpio_keys_button
67 +bcm47xx_buttons_netgear_wndr3400_v3[] __initconst = {
68 + BCM47XX_GPIO_KEY(12, KEY_RESTART),
69 + BCM47XX_GPIO_KEY(23, KEY_WPS_BUTTON),
70 +};
71 +
72 +static const struct gpio_keys_button
73 bcm47xx_buttons_netgear_wndr3700v3[] __initconst = {
74 BCM47XX_GPIO_KEY(2, KEY_RFKILL),
75 BCM47XX_GPIO_KEY(3, KEY_RESTART),
76 @@ -516,6 +528,9 @@ int __init bcm47xx_buttons_register(void)
77 case BCM47XX_BOARD_LINKSYS_WRT160NV3:
78 err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt160nv3);
79 break;
80 + case BCM47XX_BOARD_LINKSYS_WRT300N_V1:
81 + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt300n_v1);
82 + break;
83 case BCM47XX_BOARD_LINKSYS_WRT300NV11:
84 err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt300nv11);
85 break;
86 @@ -557,6 +572,9 @@ int __init bcm47xx_buttons_register(void)
87 case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
88 err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
89 break;
90 + case BCM47XX_BOARD_NETGEAR_WNDR3400_V3:
91 + err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400_v3);
92 + break;
93 case BCM47XX_BOARD_NETGEAR_WNDR3700V3:
94 err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3700v3);
95 break;
96 diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c
97 index 903a656..0e4ade3 100644
98 --- a/arch/mips/bcm47xx/leds.c
99 +++ b/arch/mips/bcm47xx/leds.c
100 @@ -292,6 +292,13 @@ bcm47xx_leds_linksys_wrt160nv3[] __initconst = {
101 };
102
103 static const struct gpio_led
104 +bcm47xx_leds_linksys_wrt300n_v1[] __initconst = {
105 + BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
106 + BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
107 + BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
108 +};
109 +
110 +static const struct gpio_led
111 bcm47xx_leds_linksys_wrt300nv11[] __initconst = {
112 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
113 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
114 @@ -585,6 +592,9 @@ void __init bcm47xx_leds_register(void)
115 case BCM47XX_BOARD_LINKSYS_WRT160NV3:
116 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv3);
117 break;
118 + case BCM47XX_BOARD_LINKSYS_WRT300N_V1:
119 + bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300n_v1);
120 + break;
121 case BCM47XX_BOARD_LINKSYS_WRT300NV11:
122 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300nv11);
123 break;
124 diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
125 index 1f5643b..c41d1dc 100644
126 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
127 +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
128 @@ -67,6 +67,7 @@ enum bcm47xx_board {
129 BCM47XX_BOARD_LINKSYS_WRT150NV11,
130 BCM47XX_BOARD_LINKSYS_WRT160NV1,
131 BCM47XX_BOARD_LINKSYS_WRT160NV3,
132 + BCM47XX_BOARD_LINKSYS_WRT300N_V1,
133 BCM47XX_BOARD_LINKSYS_WRT300NV11,
134 BCM47XX_BOARD_LINKSYS_WRT310NV1,
135 BCM47XX_BOARD_LINKSYS_WRT310NV2,
136 @@ -74,6 +75,7 @@ enum bcm47xx_board {
137 BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101,
138 BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467,
139 BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708,
140 + BCM47XX_BOARD_LINKSYS_WRT600N_V11,
141 BCM47XX_BOARD_LINKSYS_WRT610NV1,
142 BCM47XX_BOARD_LINKSYS_WRT610NV2,
143 BCM47XX_BOARD_LINKSYS_WRTSL54GS,
144 @@ -86,9 +88,11 @@ enum bcm47xx_board {
145
146 BCM47XX_BOARD_NETGEAR_WGR614V8,
147 BCM47XX_BOARD_NETGEAR_WGR614V9,
148 + BCM47XX_BOARD_NETGEAR_WGR614_V10,
149 BCM47XX_BOARD_NETGEAR_WNDR3300,
150 BCM47XX_BOARD_NETGEAR_WNDR3400V1,
151 BCM47XX_BOARD_NETGEAR_WNDR3400V2,
152 + BCM47XX_BOARD_NETGEAR_WNDR3400_V3,
153 BCM47XX_BOARD_NETGEAR_WNDR3400VCNA,
154 BCM47XX_BOARD_NETGEAR_WNDR3700V3,
155 BCM47XX_BOARD_NETGEAR_WNDR4000,
156 --
157 1.8.4.5
158