lantiq: fix falcon build breakage
[openwrt/svn-archive/archive.git] / target / linux / lantiq / files-3.1 / arch / mips / lantiq / xway / mach-arv45xx.c
1 /*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License version 2 as published
4 * by the Free Software Foundation.
5 *
6 * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
7 */
8
9 #include <linux/init.h>
10 #include <linux/platform_device.h>
11 #include <linux/leds.h>
12 #include <linux/gpio.h>
13 #include <linux/gpio_buttons.h>
14 #include <linux/mtd/mtd.h>
15 #include <linux/mtd/partitions.h>
16 #include <linux/mtd/physmap.h>
17 #include <linux/input.h>
18 #include <linux/etherdevice.h>
19 #include <linux/ath5k_platform.h>
20 #include <linux/pci.h>
21
22 #include <lantiq_soc.h>
23 #include <lantiq_platform.h>
24 #include <dev-gpio-leds.h>
25 #include <dev-gpio-buttons.h>
26
27 #include "../machtypes.h"
28 #include "dev-wifi-rt2x00.h"
29 #include "devices.h"
30 #include "dev-dwc_otg.h"
31
32 static struct mtd_partition arv4510_partitions[] =
33 {
34 {
35 .name = "uboot",
36 .offset = 0x0,
37 .size = 0x20000,
38 },
39 {
40 .name = "uboot_env",
41 .offset = 0x20000,
42 .size = 0x120000,
43 },
44 {
45 .name = "linux",
46 .offset = 0x40000,
47 .size = 0xfa0000,
48 },
49 {
50 .name = "board_config",
51 .offset = 0xfe0000,
52 .size = 0x20000,
53 },
54 };
55
56 static struct mtd_partition arv45xx_partitions[] =
57 {
58 {
59 .name = "uboot",
60 .offset = 0x0,
61 .size = 0x20000,
62 },
63 {
64 .name = "uboot_env",
65 .offset = 0x20000,
66 .size = 0x10000,
67 },
68 {
69 .name = "linux",
70 .offset = 0x30000,
71 .size = 0x3c0000,
72 },
73 {
74 .name = "board_config",
75 .offset = 0x3f0000,
76 .size = 0x10000,
77 },
78 };
79
80 static struct mtd_partition arv7525_partitions[] =
81 {
82 {
83 .name = "uboot",
84 .offset = 0x0,
85 .size = 0x10000,
86 },
87 {
88 .name = "uboot_env",
89 .offset = 0x10000,
90 .size = 0x10000,
91 },
92 {
93 .name = "linux",
94 .offset = 0x20000,
95 .size = 0x3d0000,
96 },
97 {
98 .name = "board_config",
99 .offset = 0x3f0000,
100 .size = 0x10000,
101 },
102 };
103
104 static struct mtd_partition arv75xx_partitions[] =
105 {
106 {
107 .name = "uboot",
108 .offset = 0x0,
109 .size = 0x10000,
110 },
111 {
112 .name = "uboot_env",
113 .offset = 0x10000,
114 .size = 0x10000,
115 },
116 {
117 .name = "linux",
118 .offset = 0x20000,
119 .size = 0x7d0000,
120 },
121 {
122 .name = "board_config",
123 .offset = 0x7f0000,
124 .size = 0x10000,
125 },
126 };
127
128 static struct physmap_flash_data arv4510_flash_data = {
129 .nr_parts = ARRAY_SIZE(arv4510_partitions),
130 .parts = arv4510_partitions,
131 };
132
133 static struct physmap_flash_data arv45xx_flash_data = {
134 .nr_parts = ARRAY_SIZE(arv45xx_partitions),
135 .parts = arv45xx_partitions,
136 };
137
138 static struct physmap_flash_data arv7525_flash_data = {
139 .nr_parts = ARRAY_SIZE(arv7525_partitions),
140 .parts = arv7525_partitions,
141 };
142
143 static struct physmap_flash_data arv75xx_flash_data = {
144 .nr_parts = ARRAY_SIZE(arv75xx_partitions),
145 .parts = arv75xx_partitions,
146 };
147
148 static struct ltq_pci_data ltq_pci_data = {
149 .clock = PCI_CLOCK_EXT,
150 .gpio = PCI_GNT1 | PCI_REQ1,
151 .irq = {
152 [14] = INT_NUM_IM0_IRL0 + 22,
153 },
154 };
155
156 static struct ltq_eth_data ltq_eth_data = {
157 .mii_mode = PHY_INTERFACE_MODE_RMII,
158 };
159
160 static struct gpio_led
161 arv4510pw_gpio_leds[] __initdata = {
162 { .name = "soc:green:foo", .gpio = 4, .active_low = 1, },
163 };
164
165 static struct gpio_led
166 arv4518pw_gpio_leds[] __initdata = {
167 { .name = "soc:green:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" },
168 { .name = "soc:green:adsl", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
169 { .name = "soc:green:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
170 { .name = "soc:green:wifi", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
171 { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, .default_trigger = "default-on" },
172 { .name = "soc:red:fail", .gpio = 8, .active_low = 1, .default_trigger = "default-on" },
173 { .name = "soc:green:usb", .gpio = 19, .active_low = 1, .default_trigger = "default-on" },
174 { .name = "soc:green:voip", .gpio = 100, .active_low = 1, .default_trigger = "default-on" },
175 { .name = "soc:green:fxs1", .gpio = 101, .active_low = 1, .default_trigger = "default-on" },
176 { .name = "soc:green:fxs2", .gpio = 102, .active_low = 1, .default_trigger = "default-on" },
177 { .name = "soc:green:fxo", .gpio = 103, .active_low = 1, .default_trigger = "default-on" },
178 };
179
180 static struct gpio_button
181 arv4518pw_gpio_buttons[] __initdata = {
182 { .desc = "wifi", .type = EV_KEY, .code = BTN_0, .threshold = 3, .gpio = 28, .active_low = 1, },
183 { .desc = "wps", .type = EV_KEY, .code = BTN_1, .threshold = 3, .gpio = 29, .active_low = 1, },
184 { .desc = "reset", .type = EV_KEY, .code = BTN_2, .threshold = 3, .gpio = 30, .active_low = 1, },
185 };
186
187 static struct gpio_led
188 arv4520pw_gpio_leds[] __initdata = {
189 { .name = "soc:blue:power", .gpio = 3, .active_low = 1, },
190 { .name = "soc:blue:adsl", .gpio = 4, .active_low = 1, },
191 { .name = "soc:blue:internet", .gpio = 5, .active_low = 1, },
192 { .name = "soc:red:power", .gpio = 6, .active_low = 1, },
193 { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, },
194 { .name = "soc:red:wps", .gpio = 9, .active_low = 1, },
195 { .name = "soc:blue:voip", .gpio = 100, .active_low = 1, },
196 { .name = "soc:blue:fxs1", .gpio = 101, .active_low = 1, },
197 { .name = "soc:blue:fxs2", .gpio = 102, .active_low = 1, },
198 { .name = "soc:blue:fxo", .gpio = 103, .active_low = 1, },
199 { .name = "soc:blue:voice", .gpio = 104, .active_low = 1, },
200 { .name = "soc:blue:usb", .gpio = 105, .active_low = 1, },
201 { .name = "soc:blue:wifi", .gpio = 106, .active_low = 1, },
202 };
203
204 static struct gpio_led
205 arv452cpw_gpio_leds[] __initdata = {
206 { .name = "soc:blue:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" },
207 { .name = "soc:blue:adsl", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
208 { .name = "soc:blue:isdn", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
209 { .name = "soc:red:power", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
210 { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, .default_trigger = "default-on" },
211 { .name = "soc:red:wps", .gpio = 9, .active_low = 1, .default_trigger = "default-on" },
212 { .name = "soc:blue:fxs1", .gpio = 100, .active_low = 1, .default_trigger = "default-on" },
213 { .name = "soc:blue:fxs2", .gpio = 101, .active_low = 1, .default_trigger = "default-on" },
214 { .name = "soc:blue:wps", .gpio = 102, .active_low = 1, .default_trigger = "default-on" },
215 { .name = "soc:blue:fxo", .gpio = 103, .active_low = 1, .default_trigger = "default-on" },
216 { .name = "soc:blue:voice", .gpio = 104, .active_low = 1, .default_trigger = "default-on" },
217 { .name = "soc:blue:usb", .gpio = 105, .active_low = 1, .default_trigger = "default-on" },
218 { .name = "soc:blue:wifi", .gpio = 106, .active_low = 1, .default_trigger = "default-on" },
219 { .name = "soc:blue:internet", .gpio = 108, .active_low = 1, .default_trigger = "default-on" },
220 { .name = "soc:red:internet", .gpio = 109, .active_low = 1, .default_trigger = "default-on" },
221 };
222
223 static struct gpio_led
224 arv4525pw_gpio_leds[] __initdata = {
225 { .name = "soc:green:fxs1", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
226 { .name = "soc:green:fxs2", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
227 { .name = "soc:red:dsl", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
228 { .name = "soc:green:wifi", .gpio = 8, .active_low = 1, .default_trigger = "default-on" },
229 { .name = "soc:green:online", .gpio = 9, .active_low = 1, .default_trigger = "default-on" },
230 };
231
232 static struct gpio_led
233 arv752dpw22_gpio_leds[] __initdata = {
234 { .name = "soc:blue:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" },
235 { .name = "soc:red:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
236 { .name = "soc:red:power", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
237 { .name = "soc:red:wps", .gpio = 8, .active_low = 1, .default_trigger = "default-on" },
238 { .name = "soc:red:fxo", .gpio = 103, .active_low = 1, .default_trigger = "default-on" },
239 { .name = "soc:red:voice", .gpio = 104, .active_low = 1, .default_trigger = "default-on" },
240 { .name = "soc:green:usb", .gpio = 105, .active_low = 1, .default_trigger = "default-on" },
241 { .name = "soc:green:wifi", .gpio = 106, .active_low = 1, .default_trigger = "default-on" },
242 { .name = "soc:green:wifi1", .gpio = 107, .active_low = 1, .default_trigger = "default-on" },
243 { .name = "soc:blue:wifi", .gpio = 108, .active_low = 1, .default_trigger = "default-on" },
244 { .name = "soc:blue:wifi1", .gpio = 109, .active_low = 1, .default_trigger = "default-on" },
245 { .name = "soc:green:eth1", .gpio = 111, .active_low = 1, .default_trigger = "default-on" },
246 { .name = "soc:green:eth2", .gpio = 112, .active_low = 1, .default_trigger = "default-on" },
247 { .name = "soc:green:eth3", .gpio = 113, .active_low = 1, .default_trigger = "default-on" },
248 { .name = "soc:green:eth4", .gpio = 114, .active_low = 1, .default_trigger = "default-on", },
249 };
250
251 static struct gpio_button
252 arv752dpw22_gpio_buttons[] __initdata = {
253 { .desc = "btn0", .type = EV_KEY, .code = BTN_0, .threshold = 3, .gpio = 12, .active_low = 1, },
254 { .desc = "btn1", .type = EV_KEY, .code = BTN_1, .threshold = 3, .gpio = 13, .active_low = 1, },
255 { .desc = "btn2", .type = EV_KEY, .code = BTN_2, .threshold = 3, .gpio = 28, .active_low = 1, },
256 };
257
258 static struct gpio_led
259 arv7518pw_gpio_leds[] __initdata = {
260 { .name = "soc:green:power", .gpio = 2, .active_low = 1, },
261 { .name = "soc:green:adsl", .gpio = 4, .active_low = 1, },
262 { .name = "soc:green:internet", .gpio = 5, .active_low = 1, },
263 { .name = "soc:green:wifi", .gpio = 6, .active_low = 1, },
264 { .name = "soc:red:internet", .gpio = 8, .active_low = 1, },
265 { .name = "soc:green:usb", .gpio = 19, .active_low = 1, },
266 };
267
268 static struct gpio_button
269 arv7518pw_gpio_buttons[] __initdata = {
270 { .desc = "reset", .type = EV_KEY, .code = BTN_0, .threshold = 3, .gpio = 23, .active_low = 1, },
271 { .desc = "wifi", .type = EV_KEY, .code = BTN_1, .threshold = 3, .gpio = 25, .active_low = 1, },
272 };
273
274 static void
275 arv45xx_register_ethernet(void)
276 {
277 #define ARV45XX_BRN_MAC 0x3f0016
278 memcpy_fromio(&ltq_eth_data.mac.sa_data,
279 (void *)KSEG1ADDR(LTQ_FLASH_START + ARV45XX_BRN_MAC), 6);
280 ltq_register_etop(&ltq_eth_data);
281 }
282
283 static void
284 arv75xx_register_ethernet(void)
285 {
286 #define ARV75XX_BRN_MAC 0x7f0016
287 memcpy_fromio(&ltq_eth_data.mac.sa_data,
288 (void *)KSEG1ADDR(LTQ_FLASH_START + ARV75XX_BRN_MAC), 6);
289 ltq_register_etop(&ltq_eth_data);
290 }
291
292 static void
293 bewan_register_ethernet(void)
294 {
295 #define BEWAN_BRN_MAC 0x3f0014
296 memcpy_fromio(&ltq_eth_data.mac.sa_data,
297 (void *)KSEG1ADDR(LTQ_FLASH_START + BEWAN_BRN_MAC), 6);
298 ltq_register_etop(&ltq_eth_data);
299 }
300
301 static u16 arv45xx_ath5k_eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS];
302 static struct ath5k_platform_data arv45xx_ath5k_platform_data;
303
304 /*static int arv45xx_pci_plat_dev_init(struct pci_dev *dev)
305 {
306 dev->dev.platform_data = &arv45xx_ath5k_platform_data;
307 return 0;
308 }
309 */
310 void __init
311 arv45xx_register_ath5k(void)
312 {
313 #define ARV45XX_BRN_ATH 0x3f0478
314 int i;
315 unsigned char eeprom_mac[6];
316 static u16 eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS];
317 u32 *p = (u32*)arv45xx_ath5k_eeprom_data;
318
319 memcpy_fromio(eeprom_mac,
320 (void *)KSEG1ADDR(LTQ_FLASH_START + ARV45XX_BRN_MAC), 6);
321 eeprom_mac[5]++;
322 memcpy_fromio(arv45xx_ath5k_eeprom_data,
323 (void *)KSEG1ADDR(LTQ_FLASH_START + ARV45XX_BRN_ATH), ATH5K_PLAT_EEP_MAX_WORDS);
324 // swap eeprom bytes
325 for (i = 0; i < ATH5K_PLAT_EEP_MAX_WORDS>>1; i++){
326 //arv4518_ath5k_eeprom_data[i] = ((eeprom_data[i]&0xff)<<8)|((eeprom_data[i]&0xff00)>>8);
327 p[i] = ((eeprom_data[(i<<1)+1]&0xff)<<24)|((eeprom_data[(i<<1)+1]&0xff00)<<8)|((eeprom_data[i<<1]&0xff)<<8)|((eeprom_data[i<<1]&0xff00)>>8);
328 if (i == 0xbf>>1){
329 // printk ("regdomain: 0x%x --> 0x%x\n", p[i], (p[i] & 0xffff0000)|0x67);
330 /* regdomain is invalid?? how did original fw convert
331 * value to 0x82d4 ??
332 * for now, force to 0x67 */
333 p[i] &= 0xffff0000;
334 p[i] |= 0x67;
335 }
336 }
337 arv45xx_ath5k_platform_data.eeprom_data = arv45xx_ath5k_eeprom_data;
338 arv45xx_ath5k_platform_data.macaddr = eeprom_mac;
339 //lqpci_plat_dev_init = arv45xx_pci_plat_dev_init;
340 }
341
342 static void __init
343 arv3527p_init(void)
344 {
345 ltq_register_gpio_stp();
346 //ltq_add_device_gpio_leds(arv3527p_gpio_leds, ARRAY_SIZE(arv3527p_gpio_leds));
347 ltq_register_nor(&arv45xx_flash_data);
348 arv45xx_register_ethernet();
349 }
350
351 MIPS_MACHINE(LANTIQ_MACH_ARV3527P,
352 "ARV3527P",
353 "ARV3527P - Arcor Easybox 401",
354 arv3527p_init);
355
356 static void __init
357 arv4510pw_init(void)
358 {
359 ltq_register_gpio_stp();
360 ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4510pw_gpio_leds), arv4510pw_gpio_leds);
361 ltq_register_nor(&arv4510_flash_data);
362 ltq_pci_data.irq[12] = (INT_NUM_IM2_IRL0 + 31);
363 ltq_pci_data.irq[15] = (INT_NUM_IM0_IRL0 + 26);
364 ltq_pci_data.gpio |= PCI_EXIN2 | PCI_REQ2;
365 ltq_register_pci(&ltq_pci_data);
366 bewan_register_ethernet();
367 }
368
369 MIPS_MACHINE(LANTIQ_MACH_ARV4510PW,
370 "ARV4510PW",
371 "ARV4510PW - Wippies Homebox",
372 arv4510pw_init);
373
374 static void __init
375 arv4518pw_init(void)
376 {
377 #define ARV4518PW_EBU 0
378 #define ARV4518PW_USB 14
379 #define ARV4518PW_SWITCH_RESET 13
380 #define ARV4518PW_MADWIFI_ADDR 0xb07f0400
381
382 ltq_register_gpio_ebu(ARV4518PW_EBU);
383 ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4518pw_gpio_leds), arv4518pw_gpio_leds);
384 ltq_register_gpio_buttons(arv4518pw_gpio_buttons, ARRAY_SIZE(arv4518pw_gpio_buttons));
385 ltq_register_nor(&arv45xx_flash_data);
386 ltq_pci_data.gpio = PCI_GNT2 | PCI_REQ2;
387 ltq_register_pci(&ltq_pci_data);
388 ltq_register_madwifi_eep(ARV4518PW_MADWIFI_ADDR);
389 xway_register_dwc(ARV4518PW_USB);
390 arv45xx_register_ethernet();
391 arv45xx_register_ath5k();
392
393 gpio_request(ARV4518PW_SWITCH_RESET, "switch");
394 gpio_direction_output(ARV4518PW_SWITCH_RESET, 1);
395 gpio_export(ARV4518PW_SWITCH_RESET, 0);
396 }
397
398 MIPS_MACHINE(LANTIQ_MACH_ARV4518PW,
399 "ARV4518PW",
400 "ARV4518PW - SMC7908A-ISP, Airties WAV-221",
401 arv4518pw_init);
402
403 static void __init
404 arv4520pw_init(void)
405 {
406 #define ARV4520PW_EBU 0x400
407 #define ARV4520PW_USB 28
408 #define ARV4520PW_SWITCH_RESET 110
409
410 ltq_register_gpio_ebu(ARV4520PW_EBU);
411 ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4520pw_gpio_leds), arv4520pw_gpio_leds);
412 ltq_register_nor(&arv45xx_flash_data);
413 ltq_register_pci(&ltq_pci_data);
414 ltq_register_tapi();
415 arv45xx_register_ethernet();
416 xway_register_dwc(ARV4520PW_USB);
417
418 gpio_request(ARV4520PW_SWITCH_RESET, "switch");
419 gpio_set_value(ARV4520PW_SWITCH_RESET, 1);
420 }
421
422 MIPS_MACHINE(LANTIQ_MACH_ARV4520PW,
423 "ARV4520PW",
424 "ARV4520PW - Airties WAV-281, Arcor A800",
425 arv4520pw_init);
426
427 static void __init
428 arv452Cpw_init(void)
429 {
430 #define ARV452CPW_EBU 0x77f
431 #define ARV452CPW_USB 28
432 #define ARV452CPW_RELAY1 31
433 #define ARV452CPW_RELAY2 107
434 #define ARV452CPW_SWITCH_RESET 110
435 #define ARV452CPW_MADWIFI_ADDR 0xb07f0400
436
437 ltq_register_gpio_ebu(ARV452CPW_EBU);
438 ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv452cpw_gpio_leds), arv452cpw_gpio_leds);
439 ltq_register_nor(&arv45xx_flash_data);
440 ltq_register_pci(&ltq_pci_data);
441 ltq_register_madwifi_eep(ARV452CPW_MADWIFI_ADDR);
442 xway_register_dwc(ARV452CPW_USB);
443 arv45xx_register_ethernet();
444 arv45xx_register_ath5k();
445
446 gpio_request(ARV452CPW_SWITCH_RESET, "switch");
447 gpio_set_value(ARV452CPW_SWITCH_RESET, 1);
448 gpio_export(ARV452CPW_SWITCH_RESET, 0);
449
450 gpio_request(ARV452CPW_RELAY1, "relay1");
451 gpio_direction_output(ARV452CPW_RELAY1, 1);
452 gpio_export(ARV452CPW_RELAY1, 0);
453
454 gpio_request(ARV452CPW_RELAY2, "relay2");
455 gpio_set_value(ARV452CPW_RELAY2, 1);
456 gpio_export(ARV452CPW_RELAY2, 0);
457 }
458
459 MIPS_MACHINE(LANTIQ_MACH_ARV452CPW,
460 "ARV452CPW",
461 "ARV452CPW - Arcor A801",
462 arv452Cpw_init);
463
464
465 static void __init
466 arv4525pw_init(void)
467 {
468 #define ARV4525PW_MADWIFI_ADDR 0xb07f0400
469 ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4525pw_gpio_leds), arv4525pw_gpio_leds);
470 ltq_register_nor(&arv45xx_flash_data);
471 ltq_pci_data.clock = PCI_CLOCK_INT;
472 ltq_register_pci(&ltq_pci_data);
473 ltq_register_madwifi_eep(ARV4525PW_MADWIFI_ADDR);
474 ltq_eth_data.mii_mode = PHY_INTERFACE_MODE_MII;
475 arv45xx_register_ethernet();
476 }
477
478 MIPS_MACHINE(LANTIQ_MACH_ARV4525PW,
479 "ARV4525PW",
480 "ARV4525PW - Speedport W502V",
481 arv4525pw_init);
482
483 static struct gpio_keys_button
484 arv7525pw_gpio_keys[] __initdata = {
485 {
486 .desc = "restart",
487 .type = EV_KEY,
488 .code = BTN_0,
489 .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
490 .gpio = 29,
491 .active_low = 1,
492 },
493 };
494
495 static void __init
496 arv7525pw_init(void)
497 {
498 ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4525pw_gpio_leds), arv4525pw_gpio_leds);
499 ltq_register_nor(&arv7525_flash_data);
500 ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL,
501 ARRAY_SIZE(arv7525pw_gpio_keys), arv7525pw_gpio_keys);
502 ltq_pci_data.clock = PCI_CLOCK_INT;
503 ltq_pci_data.gpio = PCI_GNT1 | PCI_EXIN1;
504 ltq_pci_data.irq[14] = (INT_NUM_IM3_IRL0 + 31);
505 ltq_register_pci(&ltq_pci_data);
506 ltq_eth_data.mii_mode = PHY_INTERFACE_MODE_MII;
507 arv45xx_register_ethernet();
508 ltq_register_rt2x00("RT2860.eeprom");
509 ltq_register_tapi();
510 }
511
512 MIPS_MACHINE(LANTIQ_MACH_ARV7525PW,
513 "ARV7525PW",
514 "ARV7525PW - Speedport W303V",
515 arv7525pw_init);
516
517 static void __init
518 arv7518pw_init(void)
519 {
520 #define ARV7518PW_EBU 0x2
521 #define ARV7518PW_USB 14
522
523 ltq_register_gpio_ebu(ARV7518PW_EBU);
524 ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv7518pw_gpio_leds), arv7518pw_gpio_leds);
525 ltq_register_gpio_buttons(arv7518pw_gpio_buttons, ARRAY_SIZE(arv7518pw_gpio_buttons));
526 ltq_register_nor(&arv75xx_flash_data);
527 ltq_register_pci(&ltq_pci_data);
528 ltq_register_tapi();
529 xway_register_dwc(ARV7518PW_USB);
530 arv75xx_register_ethernet();
531 //arv7518_register_ath9k(mac);
532 }
533
534 MIPS_MACHINE(LANTIQ_MACH_ARV7518PW,
535 "ARV7518PW",
536 "ARV7518PW - ASTORIA",
537 arv7518pw_init);
538
539 static void __init
540 arv752dpw22_init(void)
541 {
542 #define ARV752DPW22_EBU 0x2
543 #define ARV752DPW22_USB 100
544 #define ARV752DPW22_RELAY 101
545
546 ltq_register_gpio_ebu(ARV752DPW22_EBU);
547 ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv752dpw22_gpio_leds), arv752dpw22_gpio_leds);
548 ltq_register_gpio_buttons(arv752dpw22_gpio_buttons, ARRAY_SIZE(arv752dpw22_gpio_buttons));
549 ltq_register_nor(&arv75xx_flash_data);
550 ltq_pci_data.irq[15] = (INT_NUM_IM3_IRL0 + 31);
551 ltq_pci_data.gpio |= PCI_EXIN1 | PCI_REQ2;
552 ltq_register_pci(&ltq_pci_data);
553 xway_register_dwc(ARV752DPW22_USB);
554 arv75xx_register_ethernet();
555
556 gpio_request(ARV752DPW22_RELAY, "relay");
557 gpio_set_value(ARV752DPW22_RELAY, 1);
558 gpio_export(ARV752DPW22_RELAY, 0);
559 }
560
561 MIPS_MACHINE(LANTIQ_MACH_ARV752DPW22,
562 "ARV752DPW22",
563 "ARV752DPW22 - Arcor A803",
564 arv752dpw22_init);