diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-11-13 20:57:17 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-11-13 20:57:17 +0000 |
commit | 9b40fe6ffcdcd6698f962ef3700d85da41499d13 (patch) | |
tree | 95d36a13f2109f2eb458b5aaceed05cdaf93eef2 /target/linux/ar71xx/patches-3.6 | |
parent | 1a6d0dbc956e4262cebe8e5c19a78d7e5eaed0e0 (diff) | |
download | master-187ad058-9b40fe6ffcdcd6698f962ef3700d85da41499d13.tar.gz master-187ad058-9b40fe6ffcdcd6698f962ef3700d85da41499d13.tar.bz2 master-187ad058-9b40fe6ffcdcd6698f962ef3700d85da41499d13.zip |
ar71xx: add support for the Ubiquiti UniFi AP-Outdoor device
[juhosg:
- rename and refresh 660-MIPS-ath79-ubnt-xm-add-unifi-outdoor patches
- wrap long lines in mach-ubnt-xm
- remove default network config, set it from uci-defaults/network
instead
- remove user-space, and image generation stuff]
Signed-off-by: Daniel Dickinson <daniel@powercloudsystems.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34196 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/patches-3.6')
-rw-r--r-- | target/linux/ar71xx/patches-3.6/613-MIPS-ath79-ubnt-xm-add-unifi-outdoor.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/target/linux/ar71xx/patches-3.6/613-MIPS-ath79-ubnt-xm-add-unifi-outdoor.patch b/target/linux/ar71xx/patches-3.6/613-MIPS-ath79-ubnt-xm-add-unifi-outdoor.patch new file mode 100644 index 0000000000..8a1c770ba5 --- /dev/null +++ b/target/linux/ar71xx/patches-3.6/613-MIPS-ath79-ubnt-xm-add-unifi-outdoor.patch @@ -0,0 +1,66 @@ +--- a/arch/mips/ath79/mach-ubnt-xm.c ++++ b/arch/mips/ath79/mach-ubnt-xm.c +@@ -170,6 +170,19 @@ static struct gpio_led ubnt_unifi_leds_g + } + }; + ++static struct gpio_led ubnt_unifi_outdoor_leds_gpio[] __initdata = { ++ { ++ .name = "ubnt:orange:front", ++ .gpio = 1, ++ .active_low = 0, ++ }, { ++ .name = "ubnt:green:front", ++ .gpio = 0, ++ .active_low = 0, ++ } ++}; ++ ++ + static void __init ubnt_unifi_setup(void) + { + u8 *mac = (u8 *) KSEG1ADDR(0x1fff0000); +@@ -194,3 +207,33 @@ static void __init ubnt_unifi_setup(void + + MIPS_MACHINE(ATH79_MACH_UBNT_UNIFI, "UBNT-UF", "Ubiquiti UniFi", + ubnt_unifi_setup); ++ ++ ++#define UBNT_UNIFIOD_PRI_PHYMASK BIT(4) ++#define UBNT_UNIFIOD_2ND_PHYMASK (BIT(0) | BIT(1) | BIT(2) | BIT(3)) ++ ++static void __init ubnt_unifi_outdoor_setup(void) ++{ ++ u8 *mac1 = (u8 *) KSEG1ADDR(0x1fff0000); ++ u8 *mac2 = (u8 *) KSEG1ADDR(0x1fff0000 + ETH_ALEN); ++ u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); ++ ++ ath79_register_m25p80(NULL); ++ ++ ath79_register_mdio(0, ~(UBNT_UNIFIOD_PRI_PHYMASK | ++ UBNT_UNIFIOD_2ND_PHYMASK)); ++ ++ ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0); ++ ath79_init_mac(ath79_eth1_data.mac_addr, mac2, 0); ++ ath79_register_eth(0); ++ ath79_register_eth(1); ++ ++ ap91_pci_init(ee, NULL); ++ ++ ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_unifi_outdoor_leds_gpio), ++ ubnt_unifi_outdoor_leds_gpio); ++} ++ ++MIPS_MACHINE(ATH79_MACH_UBNT_UNIFI_OUTDOOR, "UBNT-U20", ++ "Ubiquiti UniFiAP Outdoor", ++ ubnt_unifi_outdoor_setup); +--- a/arch/mips/ath79/machtypes.h ++++ b/arch/mips/ath79/machtypes.h +@@ -97,6 +97,7 @@ enum ath79_mach_type { + ATH79_MACH_UBNT_RSPRO, /* Ubiquiti RouterStation Pro */ + ATH79_MACH_UBNT_RS, /* Ubiquiti RouterStation */ + ATH79_MACH_UBNT_UNIFI, /* Ubiquiti Unifi */ ++ ATH79_MACH_UBNT_UNIFI_OUTDOOR, /* Ubiquiti UnifiAP Outdoor */ + ATH79_MACH_UBNT_XM, /* Ubiquiti Networks XM board rev 1.0 */ + ATH79_MACH_WHR_G301N, /* Buffalo WHR-G301N */ + ATH79_MACH_WHR_HP_G300N, /* Buffalo WHR-HP-G300N */ |