From 9fec39a03388677ce5c8e56de8f049391b8c4ed7 Mon Sep 17 00:00:00 2001 From: Federico Cappon Date: Fri, 9 Jun 2017 15:11:39 +0000 Subject: ar71xx: add support for TP-Link TL-WA855RE v1 TP-Link TL-WA855RE v1 is a wall-plug N300 Wi-Fi range extender, based on Qualcomm/Atheros QCA9533 v2. Short specification: - 550/397/198 MHz (CPU/DDR/AHB) - 1x 10/100 Mbps Ethernet - 32 MB of RAM (DDR1) - 4 MB of FLASH - 2T2R 2.4 GHz - 2x external antennas - 2x LED (green and orange in the same package), 2x button - UART: TP5(TX) and TP4(RX) test points on PCB Flash instruction: use "factory" image directly in vendor GUI. Warning: this device does not include any kind of recovery mechanism in the bootloader and disassembling process is not trivial. You can access vendor firmware over serial line using: - login: root - password: sohoadmin Image was tested only in EU version of the device, but should work also with the same device version sold in other countries. Signed-off-by: Federico Cappon --- .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 9 ++++++ target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + .../ar71xx/files/arch/mips/ath79/mach-tl-wax50re.c | 33 ++++++++++++++++++++++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + 4 files changed, 44 insertions(+) (limited to 'target/linux/ar71xx/files/arch/mips') diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index 0df5a88dc3..0ae9a11ff6 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -1503,6 +1503,15 @@ config ATH79_MACH_TL_WA850RE_V2 select ATH79_DEV_M25P80 select ATH79_DEV_WMAC +config ATH79_MACH_TL_WA855RE_V1 + bool "TP-LINK TL-WA855RE V1 support" + select SOC_QCA953X + select ATH79_DEV_ETH + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_M25P80 + select ATH79_DEV_WMAC + config ATH79_MACH_TL_WA901ND bool "TP-LINK TL-WA901ND/TL-WA7510N support" select SOC_AR724X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index 5a848d0399..869920ca30 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -188,6 +188,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WA7210N_V2) += mach-tl-wa7210n-v2.o obj-$(CONFIG_ATH79_MACH_TL_WA801ND_V3) += mach-tl-wa801nd-v3.o obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2) += mach-tl-wa830re-v2.o obj-$(CONFIG_ATH79_MACH_TL_WA850RE_V2) += mach-tl-wax50re.o +obj-$(CONFIG_ATH79_MACH_TL_WA855RE_V1) += mach-tl-wax50re.o obj-$(CONFIG_ATH79_MACH_TL_WA901ND) += mach-tl-wa901nd.o obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V4) += mach-tl-wa901nd-v4.o 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 d7a1af4e2c..955628fecb 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 @@ -3,11 +3,14 @@ * - TL-WA750RE v1 * - TL-WA801ND v2 * - TL-WA850RE v1/v2 + * - TL-WA855RE v1 * - TL-WA901ND v3 * * Copyright (C) 2013 Martijn Zilverschoon * Copyright (C) 2013 Jiri Pirko * Copyright (C) 2017 Piotr Dymacz + * Copyright (C) 2017 Federico Cappon + * Copyright (C) 2017 Nicolò Veronese * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published @@ -48,6 +51,9 @@ #define TL_WA850RE_V2_GPIO_ENABLE_LEDS 15 +#define TL_WA855REV1_GPIO_LED_RED 11 +#define TL_WA855REV1_GPIO_LED_GREEN 12 + #define TL_WA860RE_GPIO_LED_WLAN_ORANGE 0 #define TL_WA860RE_GPIO_LED_WLAN_GREEN 2 #define TL_WA860RE_GPIO_LED_POWER_ORANGE 12 @@ -184,6 +190,18 @@ static struct gpio_led tl_wa850re_v2_leds_gpio[] __initdata = { }, }; +static struct gpio_led tl_wa855re_v1_leds_gpio[] __initdata = { + { + .name = "tp-link:green:power", + .gpio = TL_WA855REV1_GPIO_LED_GREEN, + .active_low = 0, + }, { + .name = "tp-link:red:power", + .gpio = TL_WA855REV1_GPIO_LED_RED, + .active_low = 0, + }, +}; + static struct gpio_led tl_wa860re_leds_gpio[] __initdata = { { .name = "tp-link:green:lan", @@ -383,6 +401,21 @@ static void __init tl_wa850re_v2_setup(void) MIPS_MACHINE(ATH79_MACH_TL_WA850RE_V2, "TL-WA850RE-V2", "TP-LINK TL-WA850RE v2", tl_wa850re_v2_setup); +static void __init tl_wa855re_v1_setup(void) +{ + tl_ap143_setup(); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa855re_v1_leds_gpio), + tl_wa855re_v1_leds_gpio); + + ath79_register_gpio_keys_polled(-1, TL_WAX50RE_KEYS_POLL_INTERVAL, + ARRAY_SIZE(tl_wax50re_gpio_keys), + tl_wax50re_gpio_keys); +} + +MIPS_MACHINE(ATH79_MACH_TL_WA855RE_V1, "TL-WA855RE-v1", "TP-LINK TL-WA855RE v1", + tl_wa855re_v1_setup); + static void __init tl_wa860re_setup(void) { tl_ap123_setup(); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 8d0dfd662b..618abfb1dc 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -226,6 +226,7 @@ enum ath79_mach_type { ATH79_MACH_TL_WA830RE_V2, /* TP-LINK TL-WA830RE v2 */ ATH79_MACH_TL_WA850RE, /* TP-LINK TL-WA850RE */ ATH79_MACH_TL_WA850RE_V2, /* TP-LINK TL-WA850RE v2 */ + ATH79_MACH_TL_WA855RE_V1, /* TP-LINK TL-WA855RE v1 */ ATH79_MACH_TL_WA860RE, /* TP-LINK TL-WA860RE */ ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */ ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */ -- cgit v1.2.3