2 * Atheros AP83 board support
4 * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
5 * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
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.
12 #include <linux/platform_device.h>
13 #include <linux/input.h>
15 #include <asm/mips_machine.h>
16 #include <asm/mach-ar71xx/ar71xx.h>
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
26 static struct gpio_led ap83_leds_gpio[] __initdata = {
28 .name = "ap83:green:jumpstart",
29 .gpio = AP83_GPIO_LED_JUMPSTART,
32 .name = "ap83:green:power",
33 .gpio = AP83_GPIO_LED_POWER,
36 .name = "ap83:green:wlan",
37 .gpio = AP83_GPIO_LED_WLAN,
42 static struct gpio_button ap83_gpio_buttons[] __initdata = {
48 .gpio = AP83_GPIO_BTN_RESET,
55 .gpio = AP83_GPIO_BTN_JUMPSTART,
60 static void __init ap83_setup(void)
62 ar71xx_add_device_mdio(0xfffffffe);
64 ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
65 ar71xx_eth0_data.phy_mask = 0x1;
67 ar71xx_add_device_eth(0);
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;
74 ar71xx_add_device_eth(1);
76 ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ap83_leds_gpio),
79 ar71xx_add_device_gpio_buttons(-1, 20, ARRAY_SIZE(ap83_gpio_buttons),
82 ar71xx_add_device_usb();
84 ar91xx_add_device_wmac();
87 MIPS_MACHINE(AR71XX_MACH_AP83, "Atheros AP83", ap83_setup);