From: Piotr Dymacz Date: Wed, 16 Aug 2017 14:36:19 +0000 (+0200) Subject: Add support for TP-Link TL-MR6400 v1/v2 (QCA9531 based) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dc1074af8f607abe33168db32ee89f9df8779f6f;p=oweals%2Fu-boot_mod.git Add support for TP-Link TL-MR6400 v1/v2 (QCA9531 based) --- diff --git a/Makefile b/Makefile index 8f9a677..b4053ee 100644 --- a/Makefile +++ b/Makefile @@ -226,6 +226,7 @@ $(COMMON_AR933X_TARGETS): COMMON_ETHS27_TARGETS = \ tp-link_tl-mr3420_v2 \ tp-link_tl-mr3420_v3 \ + tp-link_tl-mr6400_v1v2 \ tp-link_tl-wa801nd_v2 \ tp-link_tl-wa850re_v2 \ tp-link_tl-wa830re_v2 \ diff --git a/README.md b/README.md index 9a69098..1a7378c 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ Currently supported devices: - P&W CPE505N - P&W R602N - TP-Link TL-MR3420 v3 + - TP-Link TL-MR6400 v1, v2 - TP-Link TL-WA850RE v2 - TP-Link TL-WR802N - TP-Link TL-WR810N @@ -146,6 +147,7 @@ More information about supported devices: | [TP-Link TL-MR3220 v2](http://wiki.openwrt.org/toh/tp-link/tl-mr3420) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | | [TP-Link TL-MR3420 v2](http://wikidevi.com/wiki/TP-LINK_TL-MR3420_v2) | AR9341 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | | [TP-Link TL-MR3420 v3](http://wikidevi.com/wiki/TP-LINK_TL-MR3420_v3) | QCA9531 | 4 MiB | 32 MiB DDR2 | 64 KiB, LZMA | RO | +| TP-Link TL-MR6400 v1/2 | QCA9531 | 8 MiB | 64 MiB DDR1 | 64 KiB, LZMA | RO | | [TP-Link TL-WA801ND v2](http://wikidevi.com/wiki/TP-LINK_TL-WA801ND_v2) | AR9341 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | | [TP-Link TL-WA830RE v2](http://wikidevi.com/wiki/TP-LINK_TL-WA830RE_v2) | AR9341 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | | TP-Link TL-WA850RE v2 | QCA9533 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | diff --git a/u-boot/Makefile b/u-boot/Makefile index 751f491..5ef890c 100644 --- a/u-boot/Makefile +++ b/u-boot/Makefile @@ -526,6 +526,14 @@ tp-link_tl-mr3420_v3: qca953x_common lsdk_kernel @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 +tp-link_tl-mr6400_v1v2: qca953x_common lsdk_kernel + @$(call config_init,TP-Link TL-MR6400 v1/v2,tl-mr6400-v1v2,8,12,1,QCA_QCA953X_SOC) + @$(call define_add,CONFIG_FOR_TPLINK_MR6400_V1V2,1) + @$(call define_add,CONFIG_QCA_ETH_PHY_SWAP,1) + @$(call define_add,CFG_ATHRS27_PHY,1) + @$(call define_add,CFG_ATH_GMAC_NMACS,2) + @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 + tp-link_tl-wa801nd_v2: ar934x_common lsdk_kernel @$(call config_init,TP-Link TL-WA801ND v2,tl-wa801nd-v2,4,17,1,QCA_AR9341_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WA801ND_V2,1) diff --git a/u-boot/include/configs/ap143.h b/u-boot/include/configs/ap143.h index eb662ff..4b130a3 100644 --- a/u-boot/include/configs/ap143.h +++ b/u-boot/include/configs/ap143.h @@ -64,6 +64,16 @@ #define CONFIG_QCA_GPIO_MASK_IN GPIO17 #define CONFIG_QCA_GPIO_MASK_OUT_INIT_H CONFIG_QCA_GPIO_MASK_LED_ACT_L +#elif defined(CONFIG_FOR_TPLINK_MR6400_V1V2) + + #define CONFIG_QCA_GPIO_MASK_LED_ACT_H GPIO0 | GPIO1 | GPIO3 |\ + GPIO11 | GPIO16 + #define CONFIG_QCA_GPIO_MASK_OUT GPIO4 | GPIO13 |\ + CONFIG_QCA_GPIO_MASK_LED_ACT_H + #define CONFIG_QCA_GPIO_MASK_IN GPIO12 | GPIO14 + #define CONFIG_QCA_GPIO_MASK_OUT_INIT_H GPIO4 | GPIO13 + #define CONFIG_QCA_GPIO_MASK_OUT_INIT_L CONFIG_QCA_GPIO_MASK_LED_ACT_H + #elif defined(CONFIG_FOR_TPLINK_WA850RE_V2) #define CONFIG_QCA_GPIO_MASK_LED_ACT_L GPIO0 | GPIO1 | GPIO2 |\ @@ -206,7 +216,8 @@ "rootfstype=squashfs init=/sbin/init "\ "mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),14528k(rootfs),1472k(kernel),64k(art),16000k(firmware)" -#elif defined(CONFIG_FOR_TPLINK_WR810N) +#elif defined(CONFIG_FOR_TPLINK_MR6400_V1V2) ||\ + defined(CONFIG_FOR_TPLINK_WR810N) #define CONFIG_BOOTARGS "console=ttyS0,115200 root=31:02 "\ "rootfstype=squashfs init=/sbin/init "\ @@ -254,6 +265,7 @@ defined(CONFIG_FOR_COMFAST_CF_E520N) ||\ defined(CONFIG_FOR_COMFAST_CF_E530N) ||\ defined(CONFIG_FOR_TPLINK_MR3420_V3) ||\ + defined(CONFIG_FOR_TPLINK_MR6400_V1V2) ||\ defined(CONFIG_FOR_TPLINK_WA850RE_V2) ||\ defined(CONFIG_FOR_TPLINK_WR802N) ||\ defined(CONFIG_FOR_TPLINK_WR810N) ||\ @@ -303,15 +315,16 @@ #define CFG_ENV_ADDR 0x9F040000 #define CFG_ENV_SIZE 0xFC00 #define CFG_ENV_SECT_SIZE 0x10000 -#elif defined(CONFIG_FOR_TPLINK_MR3420_V3) ||\ - defined(CONFIG_FOR_TPLINK_WA850RE_V2) ||\ - defined(CONFIG_FOR_TPLINK_WR802N) ||\ - defined(CONFIG_FOR_TPLINK_WR810N) ||\ - defined(CONFIG_FOR_TPLINK_WR820N_CN) ||\ - defined(CONFIG_FOR_TPLINK_WR841N_V10) ||\ - defined(CONFIG_FOR_TPLINK_WR841N_V11) ||\ - defined(CONFIG_FOR_TPLINK_WR841N_V9) ||\ - defined(CONFIG_FOR_TPLINK_WR842N_V3) ||\ +#elif defined(CONFIG_FOR_TPLINK_MR3420_V3) ||\ + defined(CONFIG_FOR_TPLINK_MR6400_V1V2) ||\ + defined(CONFIG_FOR_TPLINK_WA850RE_V2) ||\ + defined(CONFIG_FOR_TPLINK_WR802N) ||\ + defined(CONFIG_FOR_TPLINK_WR810N) ||\ + defined(CONFIG_FOR_TPLINK_WR820N_CN) ||\ + defined(CONFIG_FOR_TPLINK_WR841N_V10) ||\ + defined(CONFIG_FOR_TPLINK_WR841N_V11) ||\ + defined(CONFIG_FOR_TPLINK_WR841N_V9) ||\ + defined(CONFIG_FOR_TPLINK_WR842N_V3) ||\ defined(CONFIG_FOR_TPLINK_WR902AC_V1) #define CFG_ENV_ADDR 0x9F01EC00 #define CFG_ENV_SIZE 0x1000 @@ -355,13 +368,14 @@ #define OFFSET_MAC_DATA_BLOCK 0x3c0000 #define OFFSET_MAC_DATA_BLOCK_LENGTH 0x010000 #define OFFSET_MAC_ADDRESS 0x000008 -#elif defined(CONFIG_FOR_TPLINK_MR3420_V3) ||\ - defined(CONFIG_FOR_TPLINK_WR802N) ||\ - defined(CONFIG_FOR_TPLINK_WR810N) ||\ - defined(CONFIG_FOR_TPLINK_WR820N_CN) ||\ - defined(CONFIG_FOR_TPLINK_WR841N_V10) ||\ - defined(CONFIG_FOR_TPLINK_WR841N_V11) ||\ - defined(CONFIG_FOR_TPLINK_WR841N_V9) ||\ +#elif defined(CONFIG_FOR_TPLINK_MR3420_V3) ||\ + defined(CONFIG_FOR_TPLINK_MR6400_V1V2) ||\ + defined(CONFIG_FOR_TPLINK_WR802N) ||\ + defined(CONFIG_FOR_TPLINK_WR810N) ||\ + defined(CONFIG_FOR_TPLINK_WR820N_CN) ||\ + defined(CONFIG_FOR_TPLINK_WR841N_V10) ||\ + defined(CONFIG_FOR_TPLINK_WR841N_V11) ||\ + defined(CONFIG_FOR_TPLINK_WR841N_V9) ||\ defined(CONFIG_FOR_TPLINK_WR842N_V3) #define OFFSET_MAC_DATA_BLOCK 0x010000 #define OFFSET_MAC_DATA_BLOCK_LENGTH 0x010000 @@ -418,6 +432,7 @@ defined(CONFIG_FOR_COMFAST_CF_E520N) ||\ defined(CONFIG_FOR_COMFAST_CF_E530N) ||\ defined(CONFIG_FOR_TPLINK_MR3420_V3) ||\ + defined(CONFIG_FOR_TPLINK_MR6400_V1V2) ||\ defined(CONFIG_FOR_TPLINK_WR802N) ||\ defined(CONFIG_FOR_TPLINK_WR810N) ||\ defined(CONFIG_FOR_TPLINK_WR820N_CN) ||\ @@ -457,8 +472,9 @@ defined(CONFIG_FOR_COMFAST_CF_E320N_V2) ||\ defined(CONFIG_FOR_COMFAST_CF_E520N) ||\ defined(CONFIG_FOR_COMFAST_CF_E530N) ||\ - defined(CONFIG_FOR_TPLINK_WA850RE_V2) ||\ defined(CONFIG_FOR_TPLINK_MR3420_V3) ||\ + defined(CONFIG_FOR_TPLINK_MR6400_V1V2) ||\ + defined(CONFIG_FOR_TPLINK_WA850RE_V2) ||\ defined(CONFIG_FOR_TPLINK_WR802N) ||\ defined(CONFIG_FOR_TPLINK_WR810N) ||\ defined(CONFIG_FOR_TPLINK_WR820N_CN) ||\