aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorPiotr Dymacz <pepe2k@gmail.com>2018-02-05 21:31:07 +0100
committerPiotr Dymacz <pepe2k@gmail.com>2018-02-22 18:53:22 +0100
commit106a56238ff319469f58d6e844a3e6259925427a (patch)
tree131e3615ac9a44eebe5ca97e878f7a074d40b98a /target
parent54b1be5f91f1b2fa1d59b1b86849e04ecae34668 (diff)
downloadupstream-106a56238ff319469f58d6e844a3e6259925427a.tar.gz
upstream-106a56238ff319469f58d6e844a3e6259925427a.tar.bz2
upstream-106a56238ff319469f58d6e844a3e6259925427a.zip
ar71xx: rename COMFAST CF-E355AC to CF-E355AC v1
There are now supported two versions of the CF-E355AC board which differ in 802.11ac radio chip. Include version number in board, model, image filename, etc., also for the v1. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/01_leds8
-rw-r--r--target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata2
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/ar71xx.sh4
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/upgrade/platform.sh2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-cf-e316n-v2.c53
-rw-r--r--target/linux/ar71xx/image/generic.mk10
6 files changed, 52 insertions, 27 deletions
diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 99e4141e7e..85f104a5fd 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -215,12 +215,8 @@ cf-e375ac)
ucidef_set_led_switch "lan" "LAN" "comfast:green:lan" "switch0" "0x04"
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-e355ac-v1|\
+cf-e355ac-v2|\
cf-e380ac-v1|\
cf-e380ac-v2)
ucidef_set_led_netdev "lan" "LAN" "$board:green:lan" "eth0"
diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index f1301d0556..3aa5e3c90f 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -63,7 +63,7 @@ case "$FIRMWARE" in
ath10kcal_extract "art" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1)
;;
- cf-e355ac|\
+ cf-e355ac-v1|\
cf-e380ac-v1|\
cf-e380ac-v2|\
dlan-pro-1200-ac|\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 9df2853e36..842f1c5081 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -516,8 +516,8 @@ ar71xx_board_detect() {
*"CF-E320N v2")
name="cf-e320n-v2"
;;
- *"CF-E355AC")
- name="cf-e355ac"
+ *"CF-E355AC v1")
+ name="cf-e355ac-v1"
;;
*"CF-E355AC v2")
name="cf-e355ac-v2"
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index bc28e8b3aa..c408c7dfce 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -208,7 +208,7 @@ platform_check_image() {
carambola2|\
cf-e316n-v2|\
cf-e320n-v2|\
- cf-e355ac|\
+ cf-e355ac-v1|\
cf-e355ac-v2|\
cf-e375ac|\
cf-e380ac-v1|\
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 ef6cff4b1a..1ac6c8eddd 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,7 +2,7 @@
* Support for COMFAST boards:
* - CF-E316N v2 (AR9341)
* - CF-E320N v2 (QCA9531)
- * - CF-E355AC (QCA9531 + QCA9882)
+ * - CF-E355AC v1 (QCA9531 + QCA9882)
* - CF-E355AC v2 (QCA9531 + QCA9886)
* - CF-E375AC (QCA9563 + QCA9886 + QCA8337)
* - CF-E380AC v1/v2 (QCA9558)
@@ -134,7 +134,7 @@ static struct gpio_keys_button cf_e320n_v2_gpio_keys[] __initdata = {
},
};
-/* CF-E355AC */
+/* CF-E355AC v1/v2 */
#define CF_E355AC_GPIO_LED_LAN 3
#define CF_E355AC_GPIO_LED_WLAN2G 0
#define CF_E355AC_GPIO_LED_WLAN5G 2
@@ -143,17 +143,33 @@ static struct gpio_keys_button cf_e320n_v2_gpio_keys[] __initdata = {
#define CF_E355AC_GPIO_BTN_RESET 17
-static struct gpio_led cf_e355ac_leds_gpio[] __initdata = {
+static struct gpio_led cf_e355ac_v1_leds_gpio[] __initdata = {
{
- .name = "cf-e355ac:green:lan",
+ .name = "cf-e355ac-v1:green:lan",
.gpio = CF_E355AC_GPIO_LED_LAN,
.active_low = 0,
}, {
- .name = "cf-e355ac:blue:wlan2g",
+ .name = "cf-e355ac-v1:blue:wlan2g",
.gpio = CF_E355AC_GPIO_LED_WLAN2G,
.active_low = 0,
}, {
- .name = "cf-e355ac:red:wlan5g",
+ .name = "cf-e355ac-v1:red:wlan5g",
+ .gpio = CF_E355AC_GPIO_LED_WLAN5G,
+ .active_low = 0,
+ },
+};
+
+static struct gpio_led cf_e355ac_v2_leds_gpio[] __initdata = {
+ {
+ .name = "cf-e355ac-v2:green:lan",
+ .gpio = CF_E355AC_GPIO_LED_LAN,
+ .active_low = 0,
+ }, {
+ .name = "cf-e355ac-v2:blue:wlan2g",
+ .gpio = CF_E355AC_GPIO_LED_WLAN2G,
+ .active_low = 0,
+ }, {
+ .name = "cf-e355ac-v2:red:wlan5g",
.gpio = CF_E355AC_GPIO_LED_WLAN5G,
.active_low = 0,
},
@@ -471,19 +487,32 @@ static void __init cf_e355ac_setup(void)
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_e355ac_v1_setup(void)
+{
+ cf_e355ac_setup();
+
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(cf_e355ac_v1_leds_gpio),
+ cf_e355ac_v1_leds_gpio);
+}
+
+static void __init cf_e355ac_v2_setup(void)
+{
+ cf_e355ac_setup();
+
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(cf_e355ac_v2_leds_gpio),
+ cf_e355ac_v2_leds_gpio);
+}
+
+MIPS_MACHINE(ATH79_MACH_CF_E355AC, "CF-E355AC-V1", "COMFAST CF-E355AC v1",
+ cf_e355ac_v1_setup);
MIPS_MACHINE(ATH79_MACH_CF_E355AC_V2, "CF-E355AC-V2", "COMFAST CF-E355AC v2",
- cf_e355ac_setup);
+ cf_e355ac_v2_setup);
static void __init cf_e375ac_setup(void)
{
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
index 7440ba7975..c4404bc49a 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -194,17 +194,17 @@ define Device/cf-e320n-v2
endef
TARGET_DEVICES += cf-e320n-v2
-define Device/cf-e355ac
- DEVICE_TITLE := COMFAST CF-E355AC
+define Device/cf-e355ac-v1
+ DEVICE_TITLE := COMFAST CF-E355AC v1
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x
- BOARDNAME := CF-E355AC
+ BOARDNAME := CF-E355AC-V1
IMAGE_SIZE := 16192k
MTDPARTS := spi0.0:64k(u-boot)ro,64k(art)ro,16192k(firmware),64k(art-backup)ro
endef
-TARGET_DEVICES += cf-e355ac
+TARGET_DEVICES += cf-e355ac-v1
define Device/cf-e355ac-v2
- $(Device/cf-e355ac)
+ $(Device/cf-e355ac-v1)
DEVICE_TITLE := COMFAST CF-E355AC v2
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca9888
BOARDNAME := CF-E355AC-V2