Re: [OpenWrt-Devel] [PATCH] Added support for TL-WA801NDv3
Hi, 2 small nitpicks 1) please prefix the subject with "ar71xx:" [...] > diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h > b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h > index a170e8d..967a012 100644 > --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h > +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h > @@ -161,12 +161,13 @@ enum ath79_mach_type { > ATH79_MACH_TL_MR3420_V2,/* TP-LINK TL-MR3420 v2 */ > ATH79_MACH_TL_WA701ND_V2, /* TP-LINK TL-WA701ND v2 */ > ATH79_MACH_TL_WA750RE, /* TP-LINK TL-WA750RE */ > - ATH79_MACH_TL_WA7210N_V2, /* TP-LINK TL-WA7210N v2 */ > + ATH79_MACH_TL_WA7210N_V2, /* TP-LINK TL-WA7210N v2 */ > 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_WA801ND_V3, /* TP-LINK TL-WA801ND v3 */ > ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */ > ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */ > ATH79_MACH_TL_WA901ND_V3, /* TP-LINK TL-WA901ND v3 */ 2) the whitespace fix is great but please put it into a separate patch. John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] Added support for TL-WA801NDv3
Signed-off-by: Tiziano Bacocco --- .../linux/ar71xx/base-files/etc/board.d/02_network | 3 +- target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + target/linux/ar71xx/config-4.1 | 1 + .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 9 +- target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + .../files/arch/mips/ath79/mach-tl-wa801nd-v3.c | 136 + .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 3 +- target/linux/ar71xx/image/Makefile | 9 +- tools/firmware-utils/src/mktplinkfw.c | 7 +- 9 files changed, 167 insertions(+), 5 deletions(-) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa801nd-v3.c 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 51a1b64..e12367c 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -370,7 +370,8 @@ cap324) ucidef_set_interface_lan "eth0" "dhcp" ;; -arduino-yun | \ +arduino-yun |\ +tl-wa801nd-v3 |\ dir-505-a1) ucidef_set_interface_lan "eth1" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 34d5741..e5b7fec 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -824,6 +824,9 @@ ar71xx_board_detect() { *"TL-WA801ND v2") name="tl-wa801nd-v2" ;; + *"TL-WA801ND v3") + name="tl-wa801nd-v3" + ;; *TL-WA901ND) name="tl-wa901nd" ;; diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index fe1dd68..627ae5d 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -134,6 +134,7 @@ CONFIG_ATH79_MACH_TL_MR3020=y CONFIG_ATH79_MACH_TL_MR3X20=y CONFIG_ATH79_MACH_TL_WA701ND_V2=y CONFIG_ATH79_MACH_TL_WA7210N_V2=y +CONFIG_ATH79_MACH_TL_WA801ND_V3=y CONFIG_ATH79_MACH_TL_WA830RE_V2=y CONFIG_ATH79_MACH_TL_WA901ND=y CONFIG_ATH79_MACH_TL_WA901ND_V2=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index da26414..069d338 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -1090,7 +1090,14 @@ config ATH79_MACH_TL_WA7210N_V2 select ATH79_DEV_GPIO_BUTTONS select ATH79_DEV_M25P80 select ATH79_DEV_WMAC - +config ATH79_MACH_TL_WA801ND_V3 + bool "TP-LINK TL-WA801ND v3 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_WA830RE_V2 bool "TP-LINK TL-WA830RE v2 support" select SOC_AR934X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index 991f6f2..ac82a63 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -143,6 +143,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WAX50RE) += mach-tl-wax50re.o obj-$(CONFIG_ATH79_MACH_TL_WA701ND_V2) += mach-tl-wa701nd-v2.o obj-$(CONFIG_ATH79_MACH_TL_WA7210N_V2) += mach-tl-wa7210n-v2.o obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2) += mach-tl-wa830re-v2.o +obj-$(CONFIG_ATH79_MACH_TL_WA801ND_V3) += mach-tl-wa801nd-v3.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_WDR3320_V2) += mach-tl-wdr3320-v2.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa801nd-v3.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa801nd-v3.c new file mode 100644 index 000..39cdb10 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa801nd-v3.c @@ -0,0 +1,136 @@ +/* + * TP-LINK TL-WA801ND v3 adapted from TP-LINK TL-WR841N/ND v9 + * + * Copyright (C) 2014 Matthias Schiffer + * Copyright (C) 2016 Tiziano Bacocco + * + * 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 + * by the Free Software Foundation. + */ + +#include +#include + +#include +#include + +#include "common.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-wmac.h" +#include "machtypes.h" + +#define TL_WA801NDV3_GPIO_LED_WLAN 12 +#define TL_WA801NDV3_GPIO_LED_QSS 13 +#define TL_WA801NDV3_GPIO_LED_SECURITY_RED 11 +#define TL_WA801NDV3_GPIO_LED_SECURITY_GREEN 15 +#define TL_WA801NDV3_GPIO_LED_LAN 3 + +#define TL_WA801NDV3_GPIO_BTN_RESET2 +#define TL_WA801NDV3_GPIO_BTN_WIFI 1 + +#defin