ar71xx: add support for COMFAST CF-E355AC v2
authorDing Tengfei <dtf@comfast.cn>
Mon, 22 Jan 2018 06:57:57 +0000 (14:57 +0800)
committerPiotr Dymacz <pepe2k@gmail.com>
Thu, 22 Feb 2018 17:53:22 +0000 (18:53 +0100)
COMFAST CF-E355AC v2 is a ceiling mount AP with PoE support, based on
Qualcomm/Atheros QCA9531 + QCA9886.

Short specification:

- 2x 10/100 Mbps Ethernet, with PoE support
- 128MB of RAM (DDR2)
- 16 MB of FLASH
- 2T2R 2.4 GHz, 802.11b/g/n
- 2T2R 5 GHz, 802.11ac/n/a, WAVE 2
- 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: Ding Tengfei <dtf@comfast.cn>
[updated kernel config for both boards]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
target/linux/ar71xx/base-files/etc/board.d/01_leds
target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ar71xx/base-files/lib/ar71xx.sh
target/linux/ar71xx/base-files/lib/upgrade/platform.sh
target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
target/linux/ar71xx/files/arch/mips/ath79/mach-cf-e316n-v2.c
target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
target/linux/ar71xx/image/generic.mk

index 725bab2c71d2e9b1c6201e72c065acc5ac040d87..99e4141e7eb47f1f23c518e40af26b57857a87b1 100755 (executable)
@@ -216,6 +216,11 @@ cf-e375ac)
        ucidef_set_led_wlan "wlan1" "WLAN" "comfast:blue:wlan" "phy1tpt"
        ;;
 cf-e355ac|\
+cf-e355ac-v2)
+       ucidef_set_led_netdev "lan" "LAN" "cf-e355ac:green:lan" "eth0"
+       ucidef_set_led_wlan "wlan2g" "WLAN2G" "cf-e355ac:blue:wlan2g" "phy1tpt"
+       ucidef_set_led_wlan "wlan5g" "WLAN5G" "cf-e355ac:red:wlan5g" "phy0tpt"
+       ;;
 cf-e380ac-v1|\
 cf-e380ac-v2)
        ucidef_set_led_netdev "lan" "LAN" "$board:green:lan" "eth0"
index b0ada3b3423cb856962dea6feaee85aa80ed435b..f1301d0556c9b1fa67594fbe87b193eb14c3115f 100644 (file)
@@ -155,6 +155,7 @@ case "$FIRMWARE" in
        archer-c58-v1|\
        archer-c59-v1|\
        archer-c60-v1|\
+       cf-e355ac-v2|\
        cf-e375ac)
                ath10kcal_extract "art" 20480 12064
                ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
index a9c6821ba85ec51c73c2cae486e88169979406be..9df2853e360351176813a9e15d24dce85fcd785c 100755 (executable)
@@ -519,6 +519,9 @@ ar71xx_board_detect() {
        *"CF-E355AC")
                name="cf-e355ac"
                ;;
+       *"CF-E355AC v2")
+               name="cf-e355ac-v2"
+               ;;
        *"CF-E375AC")
                name="cf-e375ac"
                ;;
index 614692d6639eb24f55e520c371f2864b0a82b24d..bc28e8b3aaf056e05a5528cc1f2e71795c5996b5 100755 (executable)
@@ -209,6 +209,7 @@ platform_check_image() {
        cf-e316n-v2|\
        cf-e320n-v2|\
        cf-e355ac|\
+       cf-e355ac-v2|\
        cf-e375ac|\
        cf-e380ac-v1|\
        cf-e380ac-v2|\
index ad4e2a23c68131cac11316448e63afe5f228bf05..228e7ef898129145946debd0f9b246bbaebc843c 100644 (file)
@@ -2176,11 +2176,14 @@ config ATH79_MACH_CF_E320N_V2
        select ATH79_DEV_WMAC
 
 config ATH79_MACH_CF_E355AC
-       bool "COMFAST CF-E355AC support"
+       bool "COMFAST CF-E355AC v1/v2 support"
        select SOC_QCA953X
+       select ATH79_DEV_AP9X_PCI if PCI
        select ATH79_DEV_ETH
        select ATH79_DEV_GPIO_BUTTONS
-       select ATH79_DEV_AP9X_PCI if PCI
+       select ATH79_DEV_LEDS_GPIO
+       select ATH79_DEV_M25P80
+       select ATH79_DEV_USB
        select ATH79_DEV_WMAC
 
 config ATH79_MACH_CF_E375AC
index 90937a4503c0ccf156283b210da686f9918889af..ef6cff4b1acaf7f0feb66bb17629c092110d520a 100644 (file)
@@ -2,7 +2,8 @@
  *  Support for COMFAST boards:
  *  - CF-E316N v2 (AR9341)
  *  - CF-E320N v2 (QCA9531)
- *  - CF-E355AC (QCA9531)
+ *  - CF-E355AC (QCA9531 + QCA9882)
+ *  - CF-E355AC v2 (QCA9531 + QCA9886)
  *  - CF-E375AC (QCA9563 + QCA9886 + QCA8337)
  *  - CF-E380AC v1/v2 (QCA9558)
  *  - CF-E520N/CF-E530N (QCA9531)
@@ -481,6 +482,9 @@ static void __init cf_e355ac_setup(void)
 MIPS_MACHINE(ATH79_MACH_CF_E355AC, "CF-E355AC", "COMFAST CF-E355AC",
             cf_e355ac_setup);
 
+MIPS_MACHINE(ATH79_MACH_CF_E355AC_V2, "CF-E355AC-V2", "COMFAST CF-E355AC v2",
+            cf_e355ac_setup);
+
 static void __init cf_e375ac_setup(void)
 {
        u8 *mac = (u8 *) KSEG1ADDR(0x1f040000);
index e22ebd06f8961265c46a6b91872a46663811e672..2d26b86c4d5fda4197d448e8c28b7740a9415778 100644 (file)
@@ -64,6 +64,7 @@ enum ath79_mach_type {
        ATH79_MACH_CF_E316N_V2,                 /* COMFAST CF-E316N v2 */
        ATH79_MACH_CF_E320N_V2,                 /* COMFAST CF-E320N v2 */
        ATH79_MACH_CF_E355AC,                   /* COMFAST CF-E355AC */
+       ATH79_MACH_CF_E355AC_V2,                /* COMFAST CF-E355AC v2*/
        ATH79_MACH_CF_E375AC,                   /* COMFAST CF-E375AC */
        ATH79_MACH_CF_E380AC_V1,                /* COMFAST CF-E380AC v1 */
        ATH79_MACH_CF_E380AC_V2,                /* COMFAST CF-E380AC v2 */
index beb56bde7a0617db3af8e446f4d6b513170878c0..435fa13593b49db4ae1a963ef90ab5965e87eee6 100644 (file)
@@ -203,6 +203,14 @@ define Device/cf-e355ac
 endef
 TARGET_DEVICES += cf-e355ac
 
+define Device/cf-e355ac-v2
+  $(Device/cf-e355ac)
+  DEVICE_TITLE := COMFAST CF-E355AC v2
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca9888
+  BOARDNAME := CF-E355AC-V2
+endef
+TARGET_DEVICES += cf-e355ac-v2
+
 define Device/cf-e375ac
   DEVICE_TITLE := COMFAST CF-E375AC
   DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca9888