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