1 --- a/arch/mips/include/asm/mach-lantiq/machine.h
2 +++ b/arch/mips/include/asm/mach-lantiq/machine.h
4 LANTIQ_MACH_EASY4010, /* Twinpass evalkit */
5 LANTIQ_MACH_EASY50712, /* Danube evalkit */
6 LANTIQ_MACH_EASY50812, /* AR9 eval board */
7 + LANTIQ_MACH_ARV4518, /* Airties WAV-221, SMC-7908A-ISP */
8 + LANTIQ_MACH_ARV452, /* Airties WAV-281, Arcor EasyboxA800 */
9 + LANTIQ_MACH_ARV4525, /* Speedport W502V */
11 --- a/arch/mips/lantiq/xway/Kconfig
12 +++ b/arch/mips/lantiq/xway/Kconfig
17 +config LANTIQ_MACH_ARV45XX
24 --- a/arch/mips/lantiq/xway/Makefile
25 +++ b/arch/mips/lantiq/xway/Makefile
27 obj-$(CONFIG_LANTIQ_MACH_EASY50812) += mach-easy50812.o
28 obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o
29 obj-$(CONFIG_LANTIQ_MACH_EASY4010) += mach-easy4010.o
30 +obj-$(CONFIG_LANTIQ_MACH_ARV45XX) += mach-arv45xx.o
32 +++ b/arch/mips/lantiq/xway/mach-arv45xx.c
35 + * This program is free software; you can redistribute it and/or modify it
36 + * under the terms of the GNU General Public License version 2 as published
37 + * by the Free Software Foundation.
39 + * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
42 +#include <linux/init.h>
43 +#include <linux/platform_device.h>
44 +#include <linux/leds.h>
45 +#include <linux/gpio.h>
46 +#include <linux/gpio_buttons.h>
47 +#include <linux/mtd/mtd.h>
48 +#include <linux/mtd/partitions.h>
49 +#include <linux/mtd/physmap.h>
50 +#include <linux/input.h>
51 +#include <linux/etherdevice.h>
56 +#include <lantiq_platform.h>
60 +#define ARV452_LATCH_SWITCH (1 << 10)
62 +#ifdef CONFIG_MTD_PARTITIONS
63 +static struct mtd_partition arv45xx_partitions[] =
71 + .name = "uboot_env",
81 + .name = "board_config",
88 +static struct physmap_flash_data arv45xx_flash_data = {
89 +#ifdef CONFIG_MTD_PARTITIONS
90 + .nr_parts = ARRAY_SIZE(arv45xx_partitions),
91 + .parts = arv45xx_partitions,
95 +static struct lq_pci_data lq_pci_data = {
96 + .clock = PCI_CLOCK_EXT,
100 +static struct lq_eth_data lq_eth_data = {
101 + .mii_mode = REV_MII_MODE,
102 + .mac = "\xff\xff\xff\xff\xff\xff",
105 +static struct gpio_led
106 +arv4518_leds_gpio[] __initdata = {
107 + { .name = "soc:blue:power", .gpio = 3, .active_low = 1, },
108 + { .name = "soc:blue:adsl", .gpio = 4, .active_low = 1, },
109 + { .name = "soc:blue:internet", .gpio = 5, .active_low = 1, },
110 + { .name = "soc:red:power", .gpio = 6, .active_low = 1, },
111 + { .name = "soc:yello:wps", .gpio = 7, .active_low = 1, },
112 + { .name = "soc:red:wps", .gpio = 9, .active_low = 1, },
113 + { .name = "soc:blue:voip", .gpio = 32, .active_low = 1, },
114 + { .name = "soc:blue:fxs1", .gpio = 33, .active_low = 1, },
115 + { .name = "soc:blue:fxs2", .gpio = 34, .active_low = 1, },
116 + { .name = "soc:blue:fxo", .gpio = 35, .active_low = 1, },
117 + { .name = "soc:blue:voice", .gpio = 36, .active_low = 1, },
118 + { .name = "soc:blue:usb", .gpio = 37, .active_low = 1, },
119 + { .name = "soc:blue:wlan", .gpio = 38, .active_low = 1, },
122 +static struct gpio_led
123 +arv452_leds_gpio[] __initdata = {
124 + { .name = "soc:blue:power", .gpio = 3, .active_low = 1, },
125 + { .name = "soc:blue:adsl", .gpio = 4, .active_low = 1, },
126 + { .name = "soc:blue:internet", .gpio = 5, .active_low = 1, },
127 + { .name = "soc:red:power", .gpio = 6, .active_low = 1, },
128 + { .name = "soc:yello:wps", .gpio = 7, .active_low = 1, },
129 + { .name = "soc:red:wps", .gpio = 9, .active_low = 1, },
130 + { .name = "soc:blue:voip", .gpio = 32, .active_low = 1, },
131 + { .name = "soc:blue:fxs1", .gpio = 33, .active_low = 1, },
132 + { .name = "soc:blue:fxs2", .gpio = 34, .active_low = 1, },
133 + { .name = "soc:blue:fxo", .gpio = 35, .active_low = 1, },
134 + { .name = "soc:blue:voice", .gpio = 36, .active_low = 1, },
135 + { .name = "soc:blue:usb", .gpio = 37, .active_low = 1, },
136 + { .name = "soc:blue:wlan", .gpio = 38, .active_low = 1, },
139 +static struct gpio_led arv4525_leds_gpio[] __initdata = {
140 + { .name = "soc:green:festnetz", .gpio = 4, .active_low = 1, },
141 + { .name = "soc:green:internet", .gpio = 5, .active_low = 1, },
142 + { .name = "soc:green:dsl", .gpio = 6, .active_low = 1, },
143 + { .name = "soc:green:wlan", .gpio = 8, .active_low = 1, },
144 + { .name = "soc:green:online", .gpio = 9, .active_low = 1, },
148 +arv45xx_register_ethernet(void)
150 +#define ARV45XX_BRN_MAC 0x3f0016
151 + memcpy_fromio(lq_eth_data.mac,
152 + (void *)KSEG1ADDR(LQ_FLASH_START + ARV45XX_BRN_MAC), 6);
153 + lq_register_ethernet(&lq_eth_data);
159 + lq_register_gpio();
160 + lq_register_gpio_ebu(0);
161 + lq_register_gpio_leds(arv4518_leds_gpio, ARRAY_SIZE(arv4518_leds_gpio));
162 + lq_register_asc(0);
163 + lq_register_asc(1);
164 + lq_register_nor(&arv45xx_flash_data);
165 + lq_register_pci(&lq_pci_data);
167 + arv45xx_register_ethernet();
170 +MIPS_MACHINE(LANTIQ_MACH_ARV4518,
172 + "ARV4518 - SMC7908A-ISP",
178 + lq_register_gpio();
179 + lq_register_gpio_ebu(ARV452_LATCH_SWITCH);
180 + lq_register_gpio_leds(arv452_leds_gpio, ARRAY_SIZE(arv452_leds_gpio));
181 + lq_register_asc(0);
182 + lq_register_asc(1);
183 + lq_register_nor(&arv45xx_flash_data);
184 + lq_register_pci(&lq_pci_data);
186 + arv45xx_register_ethernet();
189 +MIPS_MACHINE(LANTIQ_MACH_ARV452,
191 + "ARV452 - Airties WAV-281, Arcor A800",
197 + lq_register_gpio();
198 + lq_register_gpio_leds(arv4525_leds_gpio, ARRAY_SIZE(arv4525_leds_gpio));
199 + lq_register_asc(0);
200 + lq_register_asc(1);
201 + lq_register_nor(&arv45xx_flash_data);
202 + lq_register_pci(&lq_pci_data);
204 + lq_eth_data.mii_mode = MII_MODE;
205 + arv45xx_register_ethernet();
208 +MIPS_MACHINE(LANTIQ_MACH_ARV4525,
210 + "ARV4525 - Speedport W502V",