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