bugfix: migrate the TP-LINK CPE610 v1 device to the ath79 branch

This commit is contained in:
apcameron 2020-04-10 07:50:22 -05:00 committed by Joe AE6XE
parent 3298de7fb8
commit b452af4c05
6 changed files with 129 additions and 4 deletions

View File

@ -88,7 +88,7 @@ TPLink CPE220 v3.0 | ath79 | cpe220-v3 | 64Mb | stable
TPLink CPE510 v1.0/v1.1 | ar71xx | cpe510-520-v1 | 64Mb | stable
TPLink CPE510 v2.0 | ath79 | cpe510-v2 | 64Mb | stable
TPLink CPE510 v3.0 | ath79 | cpe510-v3 | 64Mb | stable
TPLink CPE610 v1.0 | ar71xx | cpe610-v1 | 64Mb | stable
TPLink CPE610 v1.0 | ath79 | cpe610-v1 | 64Mb | stable
TPLink WBS210 v1.0 | ar71xx | wbs210-v1 | 64mb | stable
TPLink WBS510 v2.0 | ar71xx | wbs510-v2 | 64mb | stable
Mikrotik Basebox RB912UAG-5HPnD/2HPnD | ar71xx | mikrotik-nand-large | 64Mb | stable

View File

@ -4,7 +4,6 @@ CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_cpe220-v2=y
CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_cpe210-220-v1=y
CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_cpe510-520-v1=y
CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_cpe610-v1=y
CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_wbs210-v1=y
CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_wbs510-v2=y
CONFIG_TARGET_DEVICE_ar71xx_generic_DEVICE_ubnt-bullet-m=y

View File

@ -4,6 +4,7 @@ CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_glinet_gl-ar150=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe510-v2=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe510-v3=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe610-v1=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe210-v2=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe210-v3=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_cpe220-v3=y

View File

@ -1129,8 +1129,8 @@ sub hardware_info
'rfband' => '5800ubntus',
'chanpower' => { 140 => '17', 184 => '26' },
},
'TP-Link CPE610 v1.0' => {
'name' => 'TP-Link CPE610 v1.0',
'TP-Link CPE610 v1' => {
'name' => 'TP-Link CPE610 v1',
'comment' => '',
'supported' => '1',
'maxpower' => '30',

View File

@ -0,0 +1,124 @@
--- a/target/linux/ath79/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/base-files/etc/board.d/01_leds
@@ -177,6 +177,9 @@ tplink,cpe510-v3)
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"
;;
+tplink,cpe610-v1)
+ ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
+ ;;
tplink,re450-v2)
ucidef_set_led_netdev "lan_data" "LAN Data" "tp-link:green:lan_data" "eth0" "tx rx"
ucidef_set_led_netdev "lan_link" "LAN Link" "tp-link:green:lan_link" "eth0" "link"
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -28,6 +28,7 @@ ath79_setup_interfaces()
tplink,cpe210-v3|\
tplink,cpe510-v2|\
tplink,cpe510-v3|\
+ tplink,cpe610-v1|\
tplink,re350k-v1|\
tplink,re450-v2|\
tplink,tl-mr10u|\
--- /dev/null
+++ b/target/linux/ath79/dts/ar9344_tplink_cpe610-v1.dts
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar9344_tplink_cpe.dtsi"
+
+/ {
+ model = "TP-Link CPE610 v1";
+ compatible = "tplink,cpe610-v1", "qca,ar9344";
+
+ aliases {
+ led-boot = &led_lan;
+ led-failsafe = &led_lan;
+ led-upgrade = &led_lan;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_lan: lan {
+ label = "tp-link:green:lan";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "tp-link:green:wlan5g";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
+
+&eth1 {
+ status = "okay";
+
+ compatible = "syscon", "simple-mfd";
+};
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -211,6 +211,22 @@ define Device/tplink_cpe510-v3
endef
TARGET_DEVICES += tplink_cpe510-v3
+define Device/tplink_cpe610-v1
+ $(Device/tplink-safeloader)
+ ATH_SOC := ar9344
+ IMAGE_SIZE := 7680k
+ DEVICE_TITLE := TP-Link CPE610 v1
+ DEVICE_PACKAGES := rssileds
+ TPLINK_BOARD_ID := CPE610
+ LOADER_TYPE := elf
+ LOADER_FLASH_OFFS := 0x43000
+ COMPILE := loader-$(1).elf
+ COMPILE/loader-$(1).elf := loader-okli-compile
+ KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 12288
+ SUPPORTED_DEVICES += cpe610
+endef
+TARGET_DEVICES += tplink_cpe610-v1
+
define Device/tplink_archer-d50-v1
ATH_SOC := qca9531
DEVICE_TITLE := TP-Link Archer D50 v1
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -308,21 +308,20 @@ static struct device_info boards[] = {
.soft_ver = NULL,
.partitions = {
- {"fs-uboot", 0x00000, 0x20000},
- {"partition-table", 0x20000, 0x02000},
- {"default-mac", 0x30000, 0x00020},
- {"product-info", 0x31100, 0x00100},
- {"device-info", 0x31400, 0x00400},
- {"signature", 0x32000, 0x00400},
- {"device-id", 0x33000, 0x00100},
- {"firmware", 0x40000, 0x770000},
- {"soft-version", 0x7b0000, 0x00100},
- {"support-list", 0x7b1000, 0x01000},
- {"user-config", 0x7c0000, 0x10000},
- {"default-config", 0x7d0000, 0x10000},
- {"log", 0x7e0000, 0x10000},
- {"radio", 0x7f0000, 0x10000},
- {NULL, 0, 0}
+ {"fs-uboot", 0x00000, 0x20000},
+ {"partition-table", 0x20000, 0x02000},
+ {"default-mac", 0x30000, 0x00020},
+ {"product-info", 0x31100, 0x00100},
+ {"signature", 0x32000, 0x00400},
+ {"os-image", 0x40000, 0x1c0000},
+ {"file-system", 0x200000, 0x5b0000},
+ {"soft-version", 0x7b0000, 0x00100},
+ {"support-list", 0x7b1000, 0x00400},
+ {"user-config", 0x7c0000, 0x10000},
+ {"default-config", 0x7d0000, 0x10000},
+ {"log", 0x7e0000, 0x10000},
+ {"radio", 0x7f0000, 0x10000},
+ {NULL, 0, 0}
},
.first_sysupgrade_partition = "os-image",

View File

@ -5,6 +5,7 @@
001-add_support_for_TP-Link_CPE220_v2.patch
001-add_support_for_TP-Link_WBS510_v2.patch
001-add_support_for_TP-Link_ATH79_CPE510_v2_v3.patch
001-add_support_for_TP-Link_ATH79_CPE610_v1.patch
001-ath79-cpe220v3-sysupgrade-supported.patch
004-add-lhg-5hpnd-xl.patch
004-add-ldf-5nd.patch