[ar71xx] register USB device on the AP83 board
[openwrt/svn-archive/archive.git] / target / linux / ar71xx / files / arch / mips / ar71xx / mach-ap83.c
1 /*
2 * Atheros AP83 board support
3 *
4 * Copyright (C) 2008 Gabor Juhos <juhosg@openwrt.org>
5 * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published
9 * by the Free Software Foundation.
10 */
11
12 #include <linux/platform_device.h>
13 #include <linux/input.h>
14
15 #include <asm/mips_machine.h>
16 #include <asm/mach-ar71xx/ar71xx.h>
17 #include <asm/mach-ar71xx/pci.h>
18 #include <asm/mach-ar71xx/platform.h>
19
20 #define AP83_GPIO_LED_WLAN 6
21 #define AP83_GPIO_LED_POWER 14
22 #define AP83_GPIO_LED_JUMPSTART 15
23
24 static struct gpio_led ap83_leds_gpio[] __initdata = {
25 {
26 .name = "ap83:green:jumpstart",
27 .gpio = AP83_GPIO_LED_JUMPSTART,
28 .active_low = 0,
29 }, {
30 .name = "ap83:green:power",
31 .gpio = AP83_GPIO_LED_POWER,
32 .active_low = 0,
33 }, {
34 .name = "ap83:green:wlan",
35 .gpio = AP83_GPIO_LED_WLAN,
36 .active_low = 0,
37 },
38 };
39
40 static void __init ap83_setup(void)
41 {
42 ar71xx_add_device_mdio(0xfffffffe);
43
44 ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
45 ar71xx_eth0_data.phy_mask = 0x1;
46
47 ar71xx_add_device_eth(0);
48
49 ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
50 ar71xx_eth1_data.phy_mask = 0x0;
51 ar71xx_eth1_data.speed = SPEED_1000;
52 ar71xx_eth1_data.duplex = DUPLEX_FULL;
53
54 ar71xx_add_device_eth(1);
55
56 ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ap83_leds_gpio),
57 ap83_leds_gpio);
58
59 ar71xx_add_device_usb();
60 }
61
62 MIPS_MACHINE(AR71XX_MACH_AP83, "Atheros AP83", ap83_setup);