From 5c5bf8b8658a588423f6ec445d7ef6a36f99a396 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 19 Jan 2018 14:45:42 +0100 Subject: ar71xx: Add support for TP-Link CPE210 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 Notes: TP-Link does not use bootstrap registers so without this patch reference clock detects as 40MHz while it is actually 25MHz. This is due to messed up bootstrap resistor configuration on the PCB. Provided GPL code just forces 25MHz reference clock. That causes booting with completely wrong clocks, for example, CPU tries to boot at 1040MHz while the stock is 650MHz. So this PR depends on PR #672 to remove 40MHz reference clock. Thanks to Sven Eckelmann for properly patching that. Signed-off-by: Robert Marko Signed-off-by: Adrian Schmutzler --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 13 +++++++++++-- target/linux/ar71xx/base-files/etc/board.d/02_network | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) (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 2f9f1054a8..c44fb7d047 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -235,16 +235,25 @@ cf-e530n) ucidef_set_led_netdev "wan" "WAN" "$board:blue:wan" "eth1" ;; cpe210|\ +cpe210-v2|\ cpe510|\ wbs210|\ wbs510) - ucidef_set_led_switch "lan0" "LAN0" "tp-link:green:lan0" "switch0" "0x20" - ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10" ucidef_set_rssimon "wlan0" "200000" "1" ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:green:link1" "wlan0" "1" "100" "0" "13" ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:green:link2" "wlan0" "26" "100" "-25" "13" ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:green:link3" "wlan0" "51" "100" "-50" "13" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:green:link4" "wlan0" "76" "100" "-75" "13" + + case "$board" in + cpe210-v2) + ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan0" "eth0" + ;; + *) + ucidef_set_led_switch "lan0" "LAN0" "tp-link:green:lan0" "switch0" "0x20" + ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10" + ;; + esac ;; cr3000) ucidef_set_led_netdev "wan" "WAN" "pcs:blue:wan" "eth1" 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 d8039fdf6c..4a141e9f87 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -74,6 +74,7 @@ ar71xx_setup_interfaces() cap4200ag|\ cf-e380ac-v1|\ cf-e380ac-v2|\ + cpe210-v2|\ dr342|\ eap120|\ eap300v2|\ -- cgit v1.2.3