6c0b4d4ab30b778e700a8f0d8ef94a697264a5b1
2 * Atheros AP83 board support
4 * Copyright (C) 2008 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>
17 #include <asm/mach-ar71xx/pci.h>
18 #include <asm/mach-ar71xx/platform.h>
20 #define AP83_GPIO_LED_WLAN 6
21 #define AP83_GPIO_LED_POWER 14
22 #define AP83_GPIO_LED_JUMPSTART 15
24 static struct gpio_led ap83_leds_gpio
[] __initdata
= {
26 .name
= "ap83:green:jumpstart",
27 .gpio
= AP83_GPIO_LED_JUMPSTART
,
30 .name
= "ap83:green:power",
31 .gpio
= AP83_GPIO_LED_POWER
,
34 .name
= "ap83:green:wlan",
35 .gpio
= AP83_GPIO_LED_WLAN
,
40 static void __init
ap83_setup(void)
42 ar71xx_add_device_mdio(0xfffffffe);
44 ar71xx_eth0_data
.phy_if_mode
= PHY_INTERFACE_MODE_RGMII
;
45 ar71xx_eth0_data
.phy_mask
= 0x1;
47 ar71xx_add_device_eth(0);
49 ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ap83_leds_gpio
),
54 MIPS_MACHINE(MACH_AR71XX_AP83
, "Atheros AP83", ap83_setup
);