[ar71xx] fix a typo
[openwrt-10.03/.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 #define AP83_GPIO_BTN_JUMPSTART 12
24 #define AP83_GPIO_BTN_RESET     21
25
26 static struct gpio_led ap83_leds_gpio[] __initdata = {
27         {
28                 .name           = "ap83:green:jumpstart",
29                 .gpio           = AP83_GPIO_LED_JUMPSTART,
30                 .active_low     = 0,
31         }, {
32                 .name           = "ap83:green:power",
33                 .gpio           = AP83_GPIO_LED_POWER,
34                 .active_low     = 0,
35         }, {
36                 .name           = "ap83:green:wlan",
37                 .gpio           = AP83_GPIO_LED_WLAN,
38                 .active_low     = 0,
39         },
40 };
41
42 static struct gpio_button ap83_gpio_buttons[] __initdata = {
43         {
44                 .desc           = "soft_reset",
45                 .type           = EV_KEY,
46                 .code           = BTN_0,
47                 .threshold      = 5,
48                 .gpio           = AP83_GPIO_BTN_RESET,
49                 .active_low     = 1,
50         } , {
51                 .desc           = "jumpstart",
52                 .type           = EV_KEY,
53                 .code           = BTN_1,
54                 .threshold      = 5,
55                 .gpio           = AP83_GPIO_BTN_JUMPSTART,
56                 .active_low     = 1,
57         }
58 };
59
60 static void __init ap83_setup(void)
61 {
62         ar71xx_add_device_mdio(0xfffffffe);
63
64         ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
65         ar71xx_eth0_data.phy_mask = 0x1;
66
67         ar71xx_add_device_eth(0);
68
69         ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
70         ar71xx_eth1_data.phy_mask = 0x0;
71         ar71xx_eth1_data.speed = SPEED_1000;
72         ar71xx_eth1_data.duplex = DUPLEX_FULL;
73
74         ar71xx_add_device_eth(1);
75
76         ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ap83_leds_gpio),
77                                         ap83_leds_gpio);
78
79         ar71xx_add_device_gpio_buttons(-1, 20, ARRAY_SIZE(ap83_gpio_buttons),
80                                         ap83_gpio_buttons);
81
82         ar71xx_add_device_usb();
83 }
84
85 MIPS_MACHINE(AR71XX_MACH_AP83, "Atheros AP83", ap83_setup);