diff options
author | Enrique Giraldo <enrique.giraldo@galgus.net> | 2017-06-29 12:03:03 +0200 |
---|---|---|
committer | Piotr Dymacz <pepe2k@gmail.com> | 2017-09-10 22:15:03 +0200 |
commit | fefdb1e0b9e0cc22ab93e6fcf51dc9e917565d26 (patch) | |
tree | 5ba243a989b80029c3a93ccae602262568a66d15 /target/linux/ar71xx/files/arch/mips/ath79/mach-cf-e316n-v2.c | |
parent | 90d8c0f0a2f4c902348a2f514ba33f2c9c34e005 (diff) | |
download | upstream-fefdb1e0b9e0cc22ab93e6fcf51dc9e917565d26.tar.gz upstream-fefdb1e0b9e0cc22ab93e6fcf51dc9e917565d26.tar.bz2 upstream-fefdb1e0b9e0cc22ab93e6fcf51dc9e917565d26.zip |
ar71xx: add support for COMFAST CF-E355AC
COMFAST CF-E355AC is a ceiling mount AP with PoE support, based on
Qualcomm/Atheros QCA9531 + QCA9882.
Short specification:
- 2x 10/100 Mbps Ethernet, with PoE support
- 64MB of RAM (DDR2)
- 16 MB of FLASH
- 2T2R 2.4 GHz, 802.11b/g/n
- 2T2R 5 GHz, 802.11ac/n/a
- built-in 4x 3 dBi antennas
- output power (max): 500 mW (27 dBm)
- 1x RGB LED, 1x button
- built-in watchdog chipset
Flash instruction:
Original firmware is based on OpenWrt.
Use sysupgrade image directly in vendor GUI.
Signed-off-by: Enrique Giraldo <enrique.giraldo@galgus.net>
[whitespace fixes, ac radio caldata offset fix]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/ath79/mach-cf-e316n-v2.c')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-cf-e316n-v2.c | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-cf-e316n-v2.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-cf-e316n-v2.c index 2c202e3754..82fe83f01e 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-cf-e316n-v2.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-cf-e316n-v2.c @@ -2,6 +2,7 @@ * Support for COMFAST boards: * - CF-E316N v2 (AR9341) * - CF-E320N v2 (QCA9531) + * - CF-E355AC (QCA9531) * - CF-E380AC v1/v2 (QCA9558) * - CF-E520N/CF-E530N (QCA9531) * @@ -130,6 +131,42 @@ static struct gpio_keys_button cf_e320n_v2_gpio_keys[] __initdata = { }, }; +/* CF-E355AC */ +#define CF_E355AC_GPIO_LED_LAN 3 +#define CF_E355AC_GPIO_LED_WLAN2G 0 +#define CF_E355AC_GPIO_LED_WLAN5G 2 + +#define CF_E355AC_GPIO_EXT_WDT 13 + +#define CF_E355AC_GPIO_BTN_RESET 17 + +static struct gpio_led cf_e355ac_leds_gpio[] __initdata = { + { + .name = "cf-e355ac:green:lan", + .gpio = CF_E355AC_GPIO_LED_LAN, + .active_low = 0, + }, { + .name = "cf-e355ac:blue:wlan2g", + .gpio = CF_E355AC_GPIO_LED_WLAN2G, + .active_low = 0, + }, { + .name = "cf-e355ac:red:wlan5g", + .gpio = CF_E355AC_GPIO_LED_WLAN5G, + .active_low = 0, + }, +}; + +static struct gpio_keys_button cf_e355ac_gpio_keys[] __initdata = { + { + .desc = "Reset button", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = CF_EXXXN_KEYS_DEBOUNCE_INTERVAL, + .gpio = CF_E355AC_GPIO_BTN_RESET, + .active_low = 1, + }, +}; + /* CF-E380AC v1/v2 */ #define CF_E380AC_V1V2_GPIO_LED_LAN 0 #define CF_E380AC_V1V2_GPIO_LED_WLAN2G 2 @@ -355,6 +392,34 @@ static void __init cf_e320n_v2_setup(void) MIPS_MACHINE(ATH79_MACH_CF_E320N_V2, "CF-E320N-V2", "COMFAST CF-E320N v2", cf_e320n_v2_setup); +static void __init cf_e355ac_setup(void) +{ + u8 *art = (u8 *) KSEG1ADDR(0x1f010000); + + /* Disable JTAG, enabling GPIOs 0-3 */ + ath79_gpio_function_setup(AR934X_GPIO_FUNC_JTAG_DISABLE, 0); + + cf_exxxn_common_setup(0x10000, CF_E355AC_GPIO_EXT_WDT); + + cf_exxxn_qca953x_eth_setup(); + + ath79_gpio_output_select(CF_E355AC_GPIO_LED_LAN, 0); + ath79_gpio_output_select(CF_E355AC_GPIO_LED_WLAN2G, 0); + ath79_gpio_output_select(CF_E355AC_GPIO_LED_WLAN5G, 0); + + ap91_pci_init(art + 0x5000, NULL); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(cf_e355ac_leds_gpio), + cf_e355ac_leds_gpio); + + ath79_register_gpio_keys_polled(1, CF_EXXXN_KEYS_POLL_INTERVAL, + ARRAY_SIZE(cf_e355ac_gpio_keys), + cf_e355ac_gpio_keys); +} + +MIPS_MACHINE(ATH79_MACH_CF_E355AC, "CF-E355AC", "COMFAST CF-E355AC", + cf_e355ac_setup); + static void __init cf_e380ac_v1v2_common_setup(unsigned long art_ofs) { u8 *mac = (u8 *) KSEG1ADDR(0x1f000000 + art_ofs); |