diff options
author | Claudio Mignanti <c.mignanti@gmail.com> | 2010-11-06 21:08:48 +0000 |
---|---|---|
committer | Claudio Mignanti <c.mignanti@gmail.com> | 2010-11-06 21:08:48 +0000 |
commit | 20b2a4417affc2d85e6c0eba48f19edcdb54c359 (patch) | |
tree | 8869ae96e47643acd01ebd228e03bb39c5d96fda /target/linux/ar71xx/files/arch/mips | |
parent | 7583fe86687dc64c70eadfd000f2e890781ba3f0 (diff) | |
download | upstream-20b2a4417affc2d85e6c0eba48f19edcdb54c359.tar.gz upstream-20b2a4417affc2d85e6c0eba48f19edcdb54c359.tar.bz2 upstream-20b2a4417affc2d85e6c0eba48f19edcdb54c359.zip |
Add support for Ubiquiti UniFi AP
SVN-Revision: 23904
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c | 37 | ||||
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h | 1 |
2 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c index 5af18a7e05..e99542f2b8 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c @@ -281,3 +281,40 @@ static void __init ubnt_nano_m_setup(void) MIPS_MACHINE(AR71XX_MACH_UBNT_NANO_M, "UBNT-NM", "Ubiquiti Nanostation M", ubnt_nano_m_setup); + +static struct gpio_led ubnt_unifi_leds_gpio[] __initdata = { + { + .name = "ubnt:orange:dome", + .gpio = 1, + .active_low = 0, + }, { + .name = "ubnt:green:dome", + .gpio = 0, + .active_low = 0, + } +}; + +static void __init ubnt_unifi_setup(void) +{ + u8 *mac = (u8 *) KSEG1ADDR(0x1fff0000); + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); + + ar71xx_add_device_m25p80(NULL); + + ar71xx_add_device_mdio(~0); + + ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0); + ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ar71xx_eth0_data.speed = SPEED_100; + ar71xx_eth0_data.duplex = DUPLEX_FULL; + + ar71xx_add_device_eth(0); + + ap91_pci_init(ee, NULL); + + ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ubnt_unifi_leds_gpio), + ubnt_unifi_leds_gpio); +} + +MIPS_MACHINE(AR71XX_MACH_UBNT_UNIFI, "UBNT-XM", "Ubiquiti UniFi", + ubnt_unifi_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h b/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h index 4e2bc90231..ec35677be2 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h @@ -61,6 +61,7 @@ enum ar71xx_mach_type { AR71XX_MACH_ZCN_1523H_2, /* Zcomax ZCN-1523H-2-xx */ AR71XX_MACH_ZCN_1523H_5, /* Zcomax ZCN-1523H-5-xx */ AR71XX_MACH_AP96, /* Atheros AP96 */ + AR71XX_MACH_UBNT_UNIFI, /* Unifi */ }; #endif /* _AR71XX_MACHTYPE_H */ |