summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/patches-4.4/610-MIPS-ath79-UBNT-add-airGateway-pro-support.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-30 13:19:53 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-30 13:19:53 +0000
commit2530640f07cd2b3b14fe9ec03fa63a586452cc5f (patch)
treeda4d0e63a6771cbd044d3ba8d8dc97bd0615920f /target/linux/ar71xx/patches-4.4/610-MIPS-ath79-UBNT-add-airGateway-pro-support.patch
parente5b5cce442f6fdaccf86064657518a5d0404f78e (diff)
downloadmtk-20170518-2530640f07cd2b3b14fe9ec03fa63a586452cc5f.zip
mtk-20170518-2530640f07cd2b3b14fe9ec03fa63a586452cc5f.tar.gz
mtk-20170518-2530640f07cd2b3b14fe9ec03fa63a586452cc5f.tar.bz2
ar71xx: add support for linux 4.4
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48563
Diffstat (limited to 'target/linux/ar71xx/patches-4.4/610-MIPS-ath79-UBNT-add-airGateway-pro-support.patch')
-rw-r--r--target/linux/ar71xx/patches-4.4/610-MIPS-ath79-UBNT-add-airGateway-pro-support.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/target/linux/ar71xx/patches-4.4/610-MIPS-ath79-UBNT-add-airGateway-pro-support.patch b/target/linux/ar71xx/patches-4.4/610-MIPS-ath79-UBNT-add-airGateway-pro-support.patch
new file mode 100644
index 0000000..27cc1e5
--- /dev/null
+++ b/target/linux/ar71xx/patches-4.4/610-MIPS-ath79-UBNT-add-airGateway-pro-support.patch
@@ -0,0 +1,62 @@
+--- a/arch/mips/ath79/mach-ubnt-xm.c
++++ b/arch/mips/ath79/mach-ubnt-xm.c
+@@ -642,3 +642,59 @@ static void __init ubnt_airgateway_setup
+ MIPS_MACHINE(ATH79_MACH_UBNT_AIRGW, "UBNT-AGW", "Ubiquiti AirGateway",
+ ubnt_airgateway_setup);
+
++static struct gpio_led ubnt_airgateway_pro_gpio_leds[] __initdata = {
++ {
++ .name = "ubnt:blue:wlan",
++ .gpio = 13,
++ }, {
++ .name = "ubnt:white:status",
++ .gpio = 17,
++ },
++};
++
++
++static struct gpio_keys_button airgateway_pro_gpio_keys[] __initdata = {
++ {
++ .desc = "reset",
++ .type = EV_KEY,
++ .code = KEY_RESTART,
++ .debounce_interval = UBNT_XM_KEYS_DEBOUNCE_INTERVAL,
++ .gpio = 12,
++ .active_low = 1,
++ }
++};
++
++static void __init ubnt_airgateway_pro_setup(void)
++{
++ u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff0000);
++ u8 *mac0 = (u8 *) KSEG1ADDR(0x1fff0000);
++
++ ath79_register_m25p80(NULL);
++ ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_airgateway_pro_gpio_leds),
++ ubnt_airgateway_pro_gpio_leds);
++
++ ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
++ ARRAY_SIZE(airgateway_pro_gpio_keys),
++ airgateway_pro_gpio_keys);
++
++ ath79_register_wmac(eeprom + UAP_PRO_WMAC_CALDATA_OFFSET, NULL);
++ ap91_pci_init(eeprom + UAP_PRO_PCI_CALDATA_OFFSET, NULL);
++
++
++ ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_ONLY_MODE);
++
++ ath79_register_mdio(1, 0x0);
++
++ /* GMAC0 is left unused in this configuration */
++
++ /* GMAC1 is connected to MAC0 on the internal switch */
++ /* The PoE/WAN port connects to port 5 on the internal switch */
++ /* The LAN port connects to port 4 on the internal switch */
++ ath79_init_mac(ath79_eth1_data.mac_addr, mac0, 0);
++ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
++ ath79_register_eth(1);
++
++}
++
++MIPS_MACHINE(ATH79_MACH_UBNT_AIRGWP, "UBNT-AGWP", "Ubiquiti AirGateway Pro",
++ ubnt_airgateway_pro_setup);