[OpenWrt-Devel] [PATCH] ar71xx: add support for TL-WR720N-v4.

Yousong Zhou yszhou4tech at gmail.com
Sun Jun 14 00:08:56 EDT 2015


The hardware should be almost the same as TL-WR720N-v3.  WiFi and LAN networks
were tested by "Lo Yuk Fai <loyukfai at gmail.com>".  Failsafe and slider switch
were tested by "Wong min <alpha080 at gmail.com>".

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
Well this patch has been sitting on my local tree for a while.  Just refreshed
and should still work.

 target/linux/ar71xx/base-files/lib/ar71xx.sh                 |    2 +-
 .../linux/ar71xx/files/arch/mips/ath79/mach-tl-wr720n-v3.c   |    3 +--
 target/linux/ar71xx/image/Makefile                           |   10 +++++++++-
 .../patches-3.18/610-MIPS-ath79-openwrt-machines.patch       |    4 ++--
 tools/firmware-utils/src/mktplinkfw.c                        |    6 ++++++
 5 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index b13be1e..2a2fddd 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -769,7 +769,7 @@ ar71xx_board_detect() {
 	*"TL-WR710N v1")
 		name="tl-wr710n"
 		;;
-	*"TL-WR720N v3")
+	*"TL-WR720N"*)
 		name="tl-wr720n-v3"
 		;;
 	*"TL-MR10U")
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr720n-v3.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr720n-v3.c
index 80e8df6..2bb3b44 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr720n-v3.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr720n-v3.c
@@ -104,6 +104,5 @@ static void __init tl_wr720n_v3_setup(void)
 	ath79_register_wmac(ee, mac);
 }
 
-MIPS_MACHINE(ATH79_MACH_TL_WR720N_V3, "TL-WR720N-v3", "TP-LINK TL-WR720N v3",
+MIPS_MACHINE(ATH79_MACH_TL_WR720N_V3, "TL-WR720N-v3", "TP-LINK TL-WR720N v3/v4",
 		tl_wr720n_v3_setup);
-
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 580a640..bf20e45 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -433,7 +433,15 @@ define Device/tl-wr720n-v3
     TPLINK_HWID := 0x07200103
     CONSOLE := ttyATH0,115200
 endef
-TARGET_DEVICES += tl-wr703n-v1 tl-wr710n-v1 tl-wr710n-v2 tl-wr720n-v3
+
+define Device/tl-wr720n-v4
+    $(Device/tplink-4mlzma)
+    BOARDNAME := TL-WR720N-v3
+    DEVICE_PROFILE := TLWR720
+    TPLINK_HWID := 0x07200104
+    CONSOLE := ttyATH0,115200
+endef
+TARGET_DEVICES += tl-wr703n-v1 tl-wr710n-v1 tl-wr710n-v2 tl-wr720n-v3 tl-wr720n-v4
 
 define Device/tl-wr740n-v4
     $(Device/tplink-4mlzma)
diff --git a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
index f8a561c..780ac5b 100644
--- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
+++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
@@ -134,7 +134,7 @@
 +	ATH79_MACH_TL_WR2543N,		/* TP-LINK TL-WR2543N/ND */
 +	ATH79_MACH_TL_WR703N,		/* TP-LINK TL-WR703N */
 +	ATH79_MACH_TL_WR710N,		/* TP-LINK TL-WR710N */
-+	ATH79_MACH_TL_WR720N_V3,	/* TP-LINK TL-WR720N v3 */
++	ATH79_MACH_TL_WR720N_V3,	/* TP-LINK TL-WR720N v3/v4 */
 +	ATH79_MACH_TL_WR741ND,		/* TP-LINK TL-WR741ND */
 +	ATH79_MACH_TL_WR741ND_V4,	/* TP-LINK TL-WR741ND  v4*/
 +	ATH79_MACH_TL_WR841N_V1,	/* TP-LINK TL-WR841N v1 */
@@ -1118,7 +1118,7 @@
 +	select ATH79_DEV_WMAC
 +
 +config ATH79_MACH_TL_WR720N_V3
-+	bool "TP-LINK TL-WR720N v3 support"
++	bool "TP-LINK TL-WR720N v3/v4 support"
 +	select SOC_AR933X
 +	select ATH79_DEV_ETH
 +	select ATH79_DEV_GPIO_BUTTONS
diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c
index 80db8f8..f263bc6 100644
--- a/tools/firmware-utils/src/mktplinkfw.c
+++ b/tools/firmware-utils/src/mktplinkfw.c
@@ -53,6 +53,7 @@
 #define HWID_TL_WDR4900_V1	0x49000001
 #define HWID_TL_WR703N_V1	0x07030101
 #define HWID_TL_WR720N_V3	0x07200103
+#define HWID_TL_WR720N_V4	0x07200104
 #define HWID_TL_WR741ND_V1	0x07410001
 #define HWID_TL_WR741ND_V4	0x07410004
 #define HWID_TL_WR740N_V1	0x07400001
@@ -402,6 +403,11 @@ static struct board_info boards[] = {
 		.hw_rev		= 1,
 		.layout_id	= "4Mlzma",
 	}, {
+		.id		= "TL-WR720Nv4",
+		.hw_id		= HWID_TL_WR720N_V4,
+		.hw_rev		= 1,
+		.layout_id	= "4Mlzma",
+	}, {
 		.id		= "GL-INETv1",
 		.hw_id		= HWID_GL_INET_V1,
 		.hw_rev		= 1,
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list