d603287589fdc38fd95d703e284675f02f82c516
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / patches-3.14 / 534-board_hw556.patch
1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -12,6 +12,7 @@
4 #include <linux/string.h>
5 #include <linux/gpio_keys.h>
6 #include <linux/input.h>
7 +#include <linux/pci_ids.h>
8 #include <linux/platform_device.h>
9 #include <linux/spi/spi.h>
10 #include <linux/spi/spi_gpio.h>
11 @@ -2681,6 +2682,405 @@ static struct board_info __initdata boar
12 },
13 };
14
15 +static struct board_info __initdata board_HW556_C = {
16 + .name = "HW556_C",
17 + .of_board_id = "huawei,hg556a-c",
18 + .expected_cpu_id = 0x6358,
19 +
20 + .has_uart0 = 1,
21 + .has_pci = 1,
22 + .has_ohci0 = 1,
23 + .has_ehci0 = 1,
24 + .num_usbh_ports = 2,
25 +
26 + .has_caldata = 1,
27 + .caldata = {
28 + {
29 + .vendor = PCI_VENDOR_ID_RALINK,
30 + .caldata_offset = 0xeffe00,
31 + .slot = 1,
32 + .eeprom = "rt2x00.eeprom",
33 + },
34 + },
35 +
36 + .has_enet1 = 1,
37 + .enet1 = {
38 + .has_phy = 1,
39 + .phy_id = 0,
40 + .force_speed_100 = 1,
41 + .force_duplex_full = 1,
42 + },
43 +
44 + .leds = {
45 + {
46 + .name = "HW556:green:lan1",
47 + .gpio = 0,
48 + .active_low = 1,
49 + },
50 + {
51 + .name = "HW556:green:lan2",
52 + .gpio = 1,
53 + .active_low = 1,
54 + },
55 + {
56 + .name = "HW556:red:dsl",
57 + .gpio = 2,
58 + .active_low = 1,
59 + },
60 + {
61 + .name = "HW556:red:power",
62 + .gpio = 3,
63 + .active_low = 1,
64 + .default_trigger = "default-on",
65 + },
66 + {
67 + .name = "HW556:red:message",
68 + .gpio = 12,
69 + .active_low = 1,
70 + },
71 + {
72 + .name = "HW556:red:lan1",
73 + .gpio = 13,
74 + .active_low = 1,
75 + },
76 + {
77 + .name = "HW556:red:hspa",
78 + .gpio = 15,
79 + .active_low = 1,
80 + },
81 + {
82 + .name = "HW556:red:lan2",
83 + .gpio = 22,
84 + .active_low = 1,
85 + },
86 + {
87 + .name = "HW556:green:lan3",
88 + .gpio = 23,
89 + .active_low = 1,
90 + },
91 + {
92 + .name = "HW556:red:lan3",
93 + .gpio = 26,
94 + .active_low = 1,
95 + },
96 + {
97 + .name = "HW556:green:lan4",
98 + .gpio = 27,
99 + .active_low = 1,
100 + },
101 + {
102 + .name = "HW556:red:lan4",
103 + .gpio = 28,
104 + .active_low = 1,
105 + },
106 + },
107 +
108 + .buttons = {
109 + {
110 + .desc = "help",
111 + .gpio = 8,
112 + .active_low = 1,
113 + .type = EV_KEY,
114 + .code = KEY_HELP,
115 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
116 + },
117 + {
118 + .desc = "wlan",
119 + .gpio = 9,
120 + .active_low = 1,
121 + .type = EV_KEY,
122 + .code = KEY_WLAN,
123 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
124 + },
125 + {
126 + .desc = "restart",
127 + .gpio = 10,
128 + .active_low = 1,
129 + .type = EV_KEY,
130 + .code = KEY_RESTART,
131 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
132 + },
133 + {
134 + .desc = "reset",
135 + .gpio = 11,
136 + .active_low = 1,
137 + .type = EV_KEY,
138 + .code = KEY_CONFIG,
139 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
140 + },
141 + },
142 +};
143 +static struct board_info __initdata board_HW556_A = {
144 + .name = "HW556_A",
145 + .of_board_id = "huawei,hg556a-a",
146 + .expected_cpu_id = 0x6358,
147 +
148 + .has_uart0 = 1,
149 + .has_pci = 1,
150 + .has_ohci0 = 1,
151 + .has_ehci0 = 1,
152 + .num_usbh_ports = 2,
153 +
154 + .has_caldata = 1,
155 + .caldata = {
156 + {
157 + .vendor = PCI_VENDOR_ID_ATHEROS,
158 + .caldata_offset = 0xf7e000,
159 + .slot = 1,
160 + .endian_check = 1,
161 + .led_pin = 2,
162 + },
163 + },
164 +
165 + .has_enet1 = 1,
166 + .enet1 = {
167 + .has_phy = 1,
168 + .phy_id = 0,
169 + .force_speed_100 = 1,
170 + .force_duplex_full = 1,
171 + },
172 +
173 + .leds = {
174 + {
175 + .name = "HW556:red:message",
176 + .gpio = 0,
177 + .active_low = 1,
178 + },
179 + {
180 + .name = "HW556:red:hspa",
181 + .gpio = 1,
182 + .active_low = 1,
183 + },
184 + {
185 + .name = "HW556:red:dsl",
186 + .gpio = 2,
187 + .active_low = 1,
188 + },
189 + {
190 + .name = "HW556:red:power",
191 + .gpio = 3,
192 + .active_low = 1,
193 + .default_trigger = "default-on",
194 + },
195 + {
196 + .name = "HW556:red:all",
197 + .gpio = 6,
198 + .active_low = 1,
199 + .default_trigger = "default-on",
200 + },
201 + {
202 + .name = "HW556:green:lan1",
203 + .gpio = 12,
204 + .active_low = 1,
205 + },
206 + {
207 + .name = "HW556:red:lan1",
208 + .gpio = 13,
209 + .active_low = 1,
210 + },
211 + {
212 + .name = "HW556:green:lan2",
213 + .gpio = 15,
214 + .active_low = 1,
215 + },
216 + {
217 + .name = "HW556:red:lan2",
218 + .gpio = 22,
219 + .active_low = 1,
220 + },
221 + {
222 + .name = "HW556:green:lan3",
223 + .gpio = 23,
224 + .active_low = 1,
225 + },
226 + {
227 + .name = "HW556:red:lan3",
228 + .gpio = 26,
229 + .active_low = 1,
230 + },
231 + {
232 + .name = "HW556:green:lan4",
233 + .gpio = 27,
234 + .active_low = 1,
235 + },
236 + {
237 + .name = "HW556:red:lan4",
238 + .gpio = 28,
239 + .active_low = 1,
240 + },
241 + },
242 +
243 + .buttons = {
244 + {
245 + .desc = "help",
246 + .gpio = 8,
247 + .active_low = 1,
248 + .type = EV_KEY,
249 + .code = KEY_HELP,
250 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
251 + },
252 + {
253 + .desc = "wlan",
254 + .gpio = 9,
255 + .active_low = 1,
256 + .type = EV_KEY,
257 + .code = KEY_WLAN,
258 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
259 + },
260 + {
261 + .desc = "restart",
262 + .gpio = 10,
263 + .active_low = 1,
264 + .type = EV_KEY,
265 + .code = KEY_RESTART,
266 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
267 + },
268 + {
269 + .desc = "reset",
270 + .gpio = 11,
271 + .active_low = 1,
272 + .type = EV_KEY,
273 + .code = KEY_CONFIG,
274 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
275 + },
276 + },
277 +};
278 +static struct board_info __initdata board_HW556_B = {
279 + .name = "HW556_B",
280 + .of_board_id = "huawei,hg556a-b",
281 + .expected_cpu_id = 0x6358,
282 +
283 + .has_uart0 = 1,
284 + .has_pci = 1,
285 + .has_ohci0 = 1,
286 + .has_ehci0 = 1,
287 + .num_usbh_ports = 2,
288 +
289 + .has_caldata = 1,
290 + .caldata = {
291 + {
292 + .vendor = PCI_VENDOR_ID_ATHEROS,
293 + .caldata_offset = 0xefe000,
294 + .slot = 1,
295 + .endian_check = 1,
296 + .led_pin = 2,
297 + },
298 + },
299 +
300 + .has_enet1 = 1,
301 + .enet1 = {
302 + .has_phy = 1,
303 + .phy_id = 0,
304 + .force_speed_100 = 1,
305 + .force_duplex_full = 1,
306 + },
307 +
308 + .leds = {
309 + {
310 + .name = "HW556:red:message",
311 + .gpio = 0,
312 + .active_low = 1,
313 + },
314 + {
315 + .name = "HW556:red:hspa",
316 + .gpio = 1,
317 + .active_low = 1,
318 + },
319 + {
320 + .name = "HW556:red:dsl",
321 + .gpio = 2,
322 + .active_low = 1,
323 + },
324 + {
325 + .name = "HW556:red:power",
326 + .gpio = 3,
327 + .active_low = 1,
328 + .default_trigger = "default-on",
329 + },
330 + {
331 + .name = "HW556:red:all",
332 + .gpio = 6,
333 + .active_low = 1,
334 + .default_trigger = "default-on",
335 + },
336 + {
337 + .name = "HW556:green:lan1",
338 + .gpio = 12,
339 + .active_low = 1,
340 + },
341 + {
342 + .name = "HW556:red:lan1",
343 + .gpio = 13,
344 + .active_low = 1,
345 + },
346 + {
347 + .name = "HW556:green:lan2",
348 + .gpio = 15,
349 + .active_low = 1,
350 + },
351 + {
352 + .name = "HW556:red:lan2",
353 + .gpio = 22,
354 + .active_low = 1,
355 + },
356 + {
357 + .name = "HW556:green:lan3",
358 + .gpio = 23,
359 + .active_low = 1,
360 + },
361 + {
362 + .name = "HW556:red:lan3",
363 + .gpio = 26,
364 + .active_low = 1,
365 + },
366 + {
367 + .name = "HW556:green:lan4",
368 + .gpio = 27,
369 + .active_low = 1,
370 + },
371 + {
372 + .name = "HW556:red:lan4",
373 + .gpio = 28,
374 + .active_low = 1,
375 + },
376 + },
377 +
378 + .buttons = {
379 + {
380 + .desc = "help",
381 + .gpio = 8,
382 + .active_low = 1,
383 + .type = EV_KEY,
384 + .code = KEY_HELP,
385 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
386 + },
387 + {
388 + .desc = "wlan",
389 + .gpio = 9,
390 + .active_low = 1,
391 + .type = EV_KEY,
392 + .code = KEY_WLAN,
393 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
394 + },
395 + {
396 + .desc = "restart",
397 + .gpio = 10,
398 + .active_low = 1,
399 + .type = EV_KEY,
400 + .code = KEY_RESTART,
401 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
402 + },
403 + {
404 + .desc = "reset",
405 + .gpio = 11,
406 + .active_low = 1,
407 + .type = EV_KEY,
408 + .code = KEY_CONFIG,
409 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
410 + },
411 + },
412 +};
413 +
414 /* T-Home Speedport W 303V Typ B */
415 static struct board_info __initdata board_spw303v = {
416 .name = "96358-502V",
417 @@ -3119,6 +3519,9 @@ static const struct board_info __initcon
418 &board_nb4_fxc_r1,
419 &board_ct6373_1,
420 &board_HW553,
421 + &board_HW556_A,
422 + &board_HW556_B,
423 + &board_HW556_C,
424 &board_spw303v,
425 &board_DVAG3810BN,
426 #endif