summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-07-13 10:03:41 +0000
committerJohn Crispin <john@openwrt.org>2014-07-13 10:03:41 +0000
commit9e26031a8897eac44c16445f83729ba972fd95a7 (patch)
tree1b2c39efb8e0a7d40586e2597f2f2f10104e5dc6 /target
parent1475263d5c53e6723fb757214e4cac10abd60913 (diff)
downloadmtk-20170518-9e26031a8897eac44c16445f83729ba972fd95a7.zip
mtk-20170518-9e26031a8897eac44c16445f83729ba972fd95a7.tar.gz
mtk-20170518-9e26031a8897eac44c16445f83729ba972fd95a7.tar.bz2
ar71xx: add support for TP-LINK TL-WA860RE v1
New router/repeater from TP-LINK - CPU: Atheros AR9341-DL3A (AP123) - Flash: 4MB - Ram: 32MB Similar to TL-WA850RE. Changes: rename file after r41596 Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz@gmail.com> SVN-Revision: 41598
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/diag.sh3
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/uci-defaults/01_leds5
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/ar71xx.sh3
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/upgrade/platform.sh1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c73
-rw-r--r--target/linux/ar71xx/generic/profiles/tp-link.mk11
-rw-r--r--target/linux/ar71xx/image/Makefile1
-rw-r--r--target/linux/ar71xx/patches-3.10/715-MIPS-ath79-add-TL-WA860RE-support.patch10
8 files changed, 107 insertions, 0 deletions
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index d2e4937..f6c113e 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -167,6 +167,9 @@ get_status_led() {
tl-wa850re)
status_led="tp-link:blue:re"
;;
+ tl-wa860re)
+ status_led="tp-link:green:power"
+ ;;
tl-mr3220 | \
tl-mr3220-v2 | \
tl-mr3420 | \
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index ebc8942..21f049f 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -234,6 +234,11 @@ tl-wa850re)
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:blue:signal5" "wlan0" "80" "100" "-79" "13"
;;
+tl-wa860re)
+ ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
+ ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
+ ;;
+
tl-wa901nd)
ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 88a1c86..dd36962 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -145,6 +145,9 @@ tplink_board_detect() {
"085000"*)
model="TP-Link TL-WA850RE"
;;
+ "086000"*)
+ model="TP-Link TL-WA860RE"
+ ;;
"090100"*)
model="TP-Link TL-WA901N/ND"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 8f3b563..f7c3b9a 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -240,6 +240,7 @@ platform_check_image() {
tl-wa7510n | \
tl-wa750re | \
tl-wa850re | \
+ tl-wa860re | \
tl-wa801nd-v2 | \
tl-wa901nd | \
tl-wa901nd-v2 | \
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c
index cdb1f5a..965b1cd 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c
@@ -33,12 +33,22 @@
#define TL_WAX50RE_GPIO_LED_SIGNAL4 3
#define TL_WAX50RE_GPIO_LED_SIGNAL5 4
+#define TL_WA860RE_GPIO_LED_WLAN_ORANGE 0
+#define TL_WA860RE_GPIO_LED_WLAN_GREEN 2
+#define TL_WA860RE_GPIO_LED_POWER_ORANGE 12
+#define TL_WA860RE_GPIO_LED_POWER_GREEN 14
+#define TL_WA860RE_GPIO_LED_LAN 20
+
#define TL_WA801ND_V2_GPIO_LED_LAN 18
#define TL_WA801ND_V2_GPIO_LED_SYSTEM 14
#define TL_WAX50RE_GPIO_BTN_RESET 17
#define TL_WAX50RE_GPIO_BTN_WPS 16
+#define TL_WA860RE_GPIO_BTN_RESET 17
+#define TL_WA860RE_GPIO_BTN_WPS 16
+#define TL_WA860RE_GPIO_BTN_ONOFF 11
+
#define TL_WAX50RE_KEYS_POLL_INTERVAL 20 /* msecs */
#define TL_WAX50RE_KEYS_DEBOUNCE_INTERVAL (3 * TL_WAX50RE_KEYS_POLL_INTERVAL)
@@ -123,6 +133,30 @@ static struct gpio_led tl_wa850re_leds_gpio[] __initdata = {
},
};
+static struct gpio_led tl_wa860re_leds_gpio[] __initdata = {
+ {
+ .name = "tp-link:green:lan",
+ .gpio = TL_WA860RE_GPIO_LED_LAN,
+ .active_low = 1,
+ }, {
+ .name = "tp-link:green:power",
+ .gpio = TL_WA860RE_GPIO_LED_POWER_GREEN,
+ .active_low = 1,
+ }, {
+ .name = "tp-link:orange:power",
+ .gpio = TL_WA860RE_GPIO_LED_POWER_ORANGE,
+ .active_low = 1,
+ }, {
+ .name = "tp-link:green:wlan",
+ .gpio = TL_WA860RE_GPIO_LED_WLAN_GREEN,
+ .active_low = 1,
+ }, {
+ .name = "tp-link:orange:wlan",
+ .gpio = TL_WA860RE_GPIO_LED_WLAN_ORANGE,
+ .active_low = 1,
+ },
+};
+
static struct gpio_keys_button tl_wax50re_gpio_keys[] __initdata = {
{
@@ -142,6 +176,31 @@ static struct gpio_keys_button tl_wax50re_gpio_keys[] __initdata = {
},
};
+static struct gpio_keys_button tl_wa860re_gpio_keys[] __initdata = {
+ {
+ .desc = "Reset button",
+ .type = EV_KEY,
+ .code = KEY_RESTART,
+ .debounce_interval = TL_WAX50RE_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = TL_WA860RE_GPIO_BTN_RESET,
+ .active_low = 1,
+ }, {
+ .desc = "WPS",
+ .type = EV_KEY,
+ .code = KEY_WPS_BUTTON,
+ .debounce_interval = TL_WAX50RE_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = TL_WA860RE_GPIO_BTN_WPS,
+ .active_low = 1,
+ }, {
+ .desc = "ONOFF",
+ .type = EV_KEY,
+ .code = BTN_1,
+ .debounce_interval = TL_WAX50RE_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = TL_WA860RE_GPIO_BTN_ONOFF,
+ .active_low = 1,
+ },
+};
+
static struct gpio_led tl_wa801nd_v2_leds_gpio[] __initdata = {
{
.name = "tp-link:green:lan",
@@ -225,6 +284,20 @@ static void __init tl_wa850re_setup(void)
MIPS_MACHINE(ATH79_MACH_TL_WA850RE, "TL-WA850RE", "TP-LINK TL-WA850RE",
tl_wa850re_setup);
+static void __init tl_wa860re_setup(void)
+{
+ tl_ap123_setup();
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa860re_leds_gpio),
+ tl_wa860re_leds_gpio);
+
+ ath79_register_gpio_keys_polled(-1, TL_WAX50RE_KEYS_POLL_INTERVAL,
+ ARRAY_SIZE(tl_wa860re_gpio_keys),
+ tl_wa860re_gpio_keys);
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_WA860RE, "TL-WA860RE", "TP-LINK TL-WA860RE",
+ tl_wa860re_setup);
+
static void __init tl_wa901nd_v3_setup(void)
{
tl_ap123_setup();
diff --git a/target/linux/ar71xx/generic/profiles/tp-link.mk b/target/linux/ar71xx/generic/profiles/tp-link.mk
index 5bd2cf6..d6516fe 100644
--- a/target/linux/ar71xx/generic/profiles/tp-link.mk
+++ b/target/linux/ar71xx/generic/profiles/tp-link.mk
@@ -202,6 +202,17 @@ endef
$(eval $(call Profile,TLWA850))
+define Profile/TLWA860
+ NAME:=TP-LINK TL-WA860RE
+ PACKAGES:=
+endef
+
+define Profile/TLWA860/Description
+ Package set optimized for the TP-LINK TL-WA860RE.
+endef
+$(eval $(call Profile,TLWA860))
+
+
define Profile/TLWA901
NAME:=TP-LINK TL-WA901N/ND
PACKAGES:=
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 4b5f502..a103639 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1154,6 +1154,7 @@ $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR841NV9,tl-wr841n-v9,TL-WR841N
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR842V2,tl-wr842n-v2,TL-WR842N-v2,ttyS0,115200,0x8420002,1,8Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA801NV2,tl-wa801nd-v2,TL-WA801ND-v2,ttyS0,115200,0x08010002,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA850,tl-wa850re-v1,TL-WA850RE,ttyS0,115200,0x08500001,1,4Mlzma))
+$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA860,tl-wa860re-v1,TL-WA860RE,ttyS0,115200,0x08600001,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA901NV3,tl-wa901nd-v3,TL-WA901ND-v3,ttyS0,115200,0x09010003,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR941NV6,tl-wr941nd-v6,TL-WDR3500,ttyS0,115200,0x09410006,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1041,tl-wr1041n-v2,TL-WR1041N-v2,ttyS0,115200,0x10410002,1,4Mlzma))
diff --git a/target/linux/ar71xx/patches-3.10/715-MIPS-ath79-add-TL-WA860RE-support.patch b/target/linux/ar71xx/patches-3.10/715-MIPS-ath79-add-TL-WA860RE-support.patch
new file mode 100644
index 0000000..2fdb8fe
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.10/715-MIPS-ath79-add-TL-WA860RE-support.patch
@@ -0,0 +1,10 @@
+--- a/arch/mips/ath79/machtypes.h 2014-07-13 10:00:11.952353943 +0200
++++ b/arch/mips/ath79/machtypes.h 2014-07-13 10:00:25.312354497 +0200
+@@ -113,6 +113,7 @@
+ ATH79_MACH_TL_WA750RE, /* TP-LINK TL-WA750RE */
+ ATH79_MACH_TL_WA7510N_V1, /* TP-LINK TL-WA7510N v1*/
+ ATH79_MACH_TL_WA850RE, /* TP-LINK TL-WA850RE */
++ ATH79_MACH_TL_WA860RE, /* TP-LINK TL-WA860RE */
+ ATH79_MACH_TL_WA801ND_V2, /* TP-LINK TL-WA801ND v2 */
+ ATH79_MACH_TL_WA830RE_V2, /* TP-LINK TL-WA830RE v2 */
+ ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */