From 9887afb1afcf387f6892315413e610a6816df463 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 25 Jul 2017 13:32:47 +0200 Subject: ar71xx: add support for TP-LINK Archer C7 v4 TP-Link Archer C7 v4 is a dual-band AC1750 router, based on Qualcomm/Atheros QCA9561+QCA9888. Specification: - 775/650/258 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 3T3R 5 GHz - 5x 10/100/1000 Mbps Ethernet - 7x LED, 2x button - UART header on PCB Flash instruction: 1. Upload lede-ar71xx-generic-archer-c7-v4-squashfs-factory.bin via Web interface Flash instruction using TFTP recovery: 1. Set PC to fixed ip address 192.168.0.66 2. Download lede-ar71xx-generic-archer-c7-v4-squashfs-factory.bin and rename it to ArcherC7v4_tp_recovery.bin 3. Start a tftp server with the file tp_recovery.bin in its root directory 4. Turn off the router 5. Press and hold Reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Wait ~30 second to complete recovery. Flash instruction under U-Boot, using UART: 1. tftp 0x81000000 lede-ar71xx-...-sysupgrade.bin 2. erase 0x9f040000 +$filesize 3. cp.b $fileaddr 0x9f040000 $filesize 4. reset Signed-off-by: Felix Fietkau --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 9 ++++++++- target/linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 1 + .../ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 1 + 6 files changed, 15 insertions(+), 1 deletion(-) (limited to 'target/linux/ar71xx/base-files') 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 0694fe954f..27e6c8a033 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -58,7 +58,8 @@ sc1750|\ sc450) ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt" ;; -archer-c25-v1) +archer-c25-v1|\ +archer-c7-v4) ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0" ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan2g" "phy1tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5g" "phy0tpt" @@ -66,6 +67,12 @@ archer-c25-v1) ucidef_set_led_switch "lan2" "LAN2" "$board:green:lan2" "switch0" "0x08" ucidef_set_led_switch "lan3" "LAN3" "$board:green:lan3" "switch0" "0x04" ucidef_set_led_switch "lan4" "LAN4" "$board:green:lan4" "switch0" "0x02" + case "$board" in + archer-c7-v4) + ucidef_set_led_usbdev "usb1" "USB1" "$board:green:usb1" "1-1" + ucidef_set_led_usbdev "usb2" "USB2" "$board:green:usb2" "2-1" + ;; + esac ;; archer-c58-v1|\ archer-c59-v1|\ diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 46b217136d..a75f5fe29f 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -428,6 +428,7 @@ ar71xx_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth1" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3" ;; + archer-c7-v4|\ tl-wdr4300|\ tl-wr1041n-v2) ucidef_add_switch "switch0" \ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 7fa4ff0bcc..f4ad435ea7 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -58,6 +58,7 @@ get_status_led() { archer-c58-v1|\ archer-c59-v1|\ archer-c60-v1|\ + archer-c7-v4|\ fritz300e|\ gl-usb150|\ mr12|\ 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 9a5f82b7cd..66796593c0 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 @@ -54,6 +54,7 @@ case "$FIRMWARE" in ath10kcal_extract "ART" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) ;; + archer-c7-v4|\ archer-c25-v1|\ archer-c59-v1|\ archer-c60-v1|\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 929845110a..f89c0098e4 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -452,6 +452,9 @@ ar71xx_board_detect() { *"Archer C5") name="archer-c5" ;; + *"Archer C7 v4") + name="archer-c7-v4" + ;; *"Archer C58 v1") name="archer-c58-v1" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 97d560189f..3d6d9ed57f 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -211,6 +211,7 @@ platform_check_image() { archer-c58-v1|\ archer-c59-v1|\ archer-c60-v1|\ + archer-c7-v4|\ bullet-m|\ c-55|\ carambola2|\ -- cgit v1.2.3