ar71xx: Add support for TP-Link CPE210 v3
authorRobert Marko <robimarko@gmail.com>
Sat, 11 Aug 2018 15:32:48 +0000 (17:32 +0200)
committerPetr Štetiar <ynezz@true.cz>
Tue, 2 Apr 2019 00:09:58 +0000 (02:09 +0200)
Looks identical to the v2.

This PR adds support for a popular low-cost 2.4GHz N based AP

Specifications:
 - SoC: Qualcomm Atheros QCA9533 (650MHz)
 - RAM: 64MB
 - Storage: 8 MB SPI NOR
 - Wireless: 2.4GHz N based built into SoC 2x2
 - Ethernet: 1x 100/10 Mbps, integrated into SoC, 24V POE IN

Installation:
Flash factory image through stock firmware WEB UI
or through TFTP
To get to TFTP recovery just hold reset button while powering on for
around 4-5 seconds and release.
Rename factory image to recovery.bin
Stock TFTP server IP:192.168.0.100
Stock device TFTP adress:192.168.0.254

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Robert Marko <robimarko@gmail.com>
[Rebased, adjusted for separate tplink-safeloader entry, dynamic partitioning]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ar71xx/base-files/etc/board.d/01_leds
target/linux/ar71xx/base-files/etc/board.d/02_network
target/linux/ar71xx/base-files/lib/ar71xx.sh
target/linux/ar71xx/base-files/lib/upgrade/platform.sh
target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
target/linux/ar71xx/image/generic-tp-link.mk

index edca185c62d4d3466534d903a46dc67339a86ad7..79f452d8cfe201246f185ee0015b75fae8c3f7da 100755 (executable)
@@ -252,6 +252,7 @@ cf-e530n)
        ;;
 cpe210|\
 cpe210-v2|\
+cpe210-v3|\
 cpe510|\
 wbs210|\
 wbs510)
@@ -262,7 +263,8 @@ wbs510)
        ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:green:link4" "wlan0" "76" "100" "-75" "13"
 
        case "$board" in
-       cpe210-v2)
+       cpe210-v2|\
+       cpe210-v3)
                ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan0" "eth0"
                ;;
        *)
index b6d77ee60fac651e370c92447b1a4fcd161e84a7..a7b97bb3dd171cde41f8d8460936675a3abb3308 100755 (executable)
@@ -74,6 +74,7 @@ ar71xx_setup_interfaces()
        cf-e380ac-v1|\
        cf-e380ac-v2|\
        cpe210-v2|\
+       cpe210-v3|\
        dr342|\
        eap120|\
        eap300v2|\
index 9a123b60e1ac469c47c5dead15516ddba1a792a2..56a4fab80c8ee58c1e14cf33a70f0b94052b523b 100755 (executable)
@@ -586,6 +586,10 @@ ar71xx_board_detect() {
                name="cpe210-v2"
                tplink_pharos_board_detect "$(tplink_pharos_v2_get_model_string)"
                ;;
+       *"CPE210 v3")
+               name="cpe210-v3"
+               tplink_pharos_board_detect "$(tplink_pharos_v2_get_model_string)"
+               ;;
        *"CPE505N")
                name="cpe505n"
                ;;
index e9227aaa7b77be70ea7571d9636a8ccb90793a6b..7fc3d4e3b3a4923a799b439a7bb0f6bae685fa42 100755 (executable)
@@ -590,7 +590,8 @@ platform_check_image() {
                tplink_pharos_check_image "$1" "7f454c46" "$(tplink_pharos_get_model_string)" '' && return 0
                return 1
                ;;
-       cpe210-v2)
+       cpe210-v2|\
+       cpe210-v3)
                tplink_pharos_check_image "$1" "01000000" "$(tplink_pharos_v2_get_model_string)" '\0\xff\r' && return 0
                return 1
                ;;
index ceb1769ddd522d51014228fe65e2662f2f3e627c..16efbc8802ab96a10aab474721902344664c7f8f 100644 (file)
@@ -236,6 +236,9 @@ MIPS_MACHINE(ATH79_MACH_CPE210, "CPE210", "TP-LINK CPE210/220",
 MIPS_MACHINE(ATH79_MACH_CPE210_V2, "CPE210V2", "TP-LINK CPE210 v2",
             cpe210_v2_setup);
 
+MIPS_MACHINE(ATH79_MACH_CPE210_V3, "CPE210V3", "TP-LINK CPE210 v3",
+            cpe210_v2_setup);
+
 MIPS_MACHINE(ATH79_MACH_CPE510, "CPE510", "TP-LINK CPE510/520",
             cpe510_setup);
 
index 974b69fda689b80f713fe3e65fee204b5702e4ba..fb832390c14fbe33ccf178ea1016d4981d3473e6 100644 (file)
@@ -76,6 +76,7 @@ enum ath79_mach_type {
        ATH79_MACH_CF_E530N,                    /* COMFAST CF-E530N */
        ATH79_MACH_CPE210,                      /* TP-LINK CPE210 v1 */
        ATH79_MACH_CPE210_V2,                   /* TP-LINK CPE210 v2 */
+       ATH79_MACH_CPE210_V3,                   /* TP-LINK CPE210 v3 */
        ATH79_MACH_CPE505N,                     /* P&W CPE505N */
        ATH79_MACH_CPE510,                      /* TP-LINK CPE510 */
        ATH79_MACH_CPE830,                      /* YunCore CPE830 */
index 7df1025eec5eb54924ccb43f7f531c1b37ce570d..c38108775ce8624bd1ea6817ae16c88a9ee0a006 100644 (file)
@@ -200,6 +200,21 @@ define Device/cpe210-v2
 endef
 TARGET_DEVICES += cpe210-v2
 
+define Device/cpe210-v3
+  $(Device/tplink-safeloader)
+  DEVICE_TITLE := TP-LINK CPE210 v3
+  BOARDNAME := CPE210V3
+  TPLINK_BOARD_ID := CPE210V3
+  TPLINK_HWID := 0x0
+  TPLINK_HWREV := 0
+  MTDPARTS := spi0.0:128k(u-boot)ro,64k(partition-table)ro,64k(product-info)ro,7680k(firmware),192k(config)ro,64k(ART)ro
+  IMAGE_SIZE := 7680k
+  KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header -O
+  KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | tplink-v1-header
+  DEVICE_PACKAGES := rssileds
+endef
+TARGET_DEVICES += cpe210-v3
+
 define Device/wbs210-v1
   $(Device/cpe510-520-v1)
   DEVICE_TITLE := TP-LINK WBS210 v1