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