From: Tomislav Požega Date: Thu, 17 Aug 2017 13:05:38 +0000 (+0200) Subject: Add support for TP-LINK TL-MR22U v1 (QCA9531 based) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=54dcf68e84b321d29e38eea289105c6052055c5c;p=oweals%2Fu-boot_mod.git Add support for TP-LINK TL-MR22U v1 (QCA9531 based) Reset button, netconsole and webserver recovery tested and working. Signed-off-by: Tomislav Požega --- diff --git a/Makefile b/Makefile index 50c3bc3..c6ddf2d 100644 --- a/Makefile +++ b/Makefile @@ -224,6 +224,7 @@ $(COMMON_AR933X_TARGETS): @$(call build,123,1) COMMON_ETHS27_TARGETS = \ + tp-link_tl-mr22u_v1 \ tp-link_tl-mr3420_v2 \ tp-link_tl-mr3420_v3 \ tp-link_tl-mr6400_v1v2 \ diff --git a/README.md b/README.md index 652ea7b..d83a109 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ Currently supported devices: - Comfast CF-E520N/CF-E530N - P&W CPE505N - P&W R602N + - TP-Link TL-MR22U v1 - TP-Link TL-MR3420 v3 - TP-Link TL-MR6400 v1, v2 - TP-Link TL-WA850RE v2 @@ -144,6 +145,7 @@ More information about supported devices: | P&W R602N | QCA9531 | 16 MiB | 64 MiB DDR2 | 256 KiB | R/W | | [TP-Link TL-MR10U v1](http://wiki.openwrt.org/toh/tp-link/tl-mr10u) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | | [TP-Link TL-MR13U v1](http://wiki.openwrt.org/toh/tp-link/tl-mr13u) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | +| [TP-Link TL-MR22U v1](https://wiki.openwrt.org/toh/tp-link/tp-link_tl-mr22u_v1) | QCA9531 | 8 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | | [TP-Link TL-MR3020 v1](http://wiki.openwrt.org/toh/tp-link/tl-mr3020) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | | [TP-Link TL-MR3040 v1/2](http://wiki.openwrt.org/toh/tp-link/tl-mr3040) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | | [TP-Link TL-MR3220 v2](http://wiki.openwrt.org/toh/tp-link/tl-mr3420) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | diff --git a/u-boot/Makefile b/u-boot/Makefile index 2a026e6..2546eac 100644 --- a/u-boot/Makefile +++ b/u-boot/Makefile @@ -504,6 +504,14 @@ tp-link_tl-mr13u_v1: ar933x_common lsdk_kernel @$(call define_add,CONFIG_FOR_TPLINK_MR13U_V1,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 +tp-link_tl-mr22u_v1: qca953x_common lsdk_kernel + @$(call config_init,TP-Link TL-MR22U v1,tl-mr22u-v1,8,12,,QCA_QCA953X_SOC) + @$(call define_add,CONFIG_FOR_TPLINK_MR22U_V1,1) + @$(call define_add,CONFIG_USB,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-mr3020_v1: ar933x_common lsdk_kernel @$(call config_init,TP-Link TL-MR3020 v1,tl-mr3020-v1,4,11,,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_MR3020_V1,1) diff --git a/u-boot/include/configs/ap143.h b/u-boot/include/configs/ap143.h index ce05457..f03c6b9 100644 --- a/u-boot/include/configs/ap143.h +++ b/u-boot/include/configs/ap143.h @@ -64,6 +64,15 @@ #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_MR22U_V1) + + #define CONFIG_QCA_GPIO_MASK_LED_ACT_L GPIO13 + #define CONFIG_QCA_GPIO_MASK_OUT GPIO11 |\ + CONFIG_QCA_GPIO_MASK_LED_ACT_L + #define CONFIG_QCA_GPIO_MASK_IN GPIO12 | GPIO14 | GPIO16 + #define CONFIG_QCA_GPIO_MASK_OUT_INIT_H GPIO11 |\ + 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 |\ @@ -216,7 +225,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_MR6400_V1V2) ||\ +#elif defined(CONFIG_FOR_TPLINK_MR22U_V1) ||\ + defined(CONFIG_FOR_TPLINK_MR6400_V1V2) ||\ defined(CONFIG_FOR_TPLINK_WR810N_V1) #define CONFIG_BOOTARGS "console=ttyS0,115200 root=31:02 "\ @@ -264,6 +274,7 @@ defined(CONFIG_FOR_COMFAST_CF_E320N_V2) ||\ defined(CONFIG_FOR_COMFAST_CF_E520N) ||\ defined(CONFIG_FOR_COMFAST_CF_E530N) ||\ + defined(CONFIG_FOR_TPLINK_MR22U_V1) ||\ defined(CONFIG_FOR_TPLINK_MR3420_V3) ||\ defined(CONFIG_FOR_TPLINK_MR6400_V1V2) ||\ defined(CONFIG_FOR_TPLINK_WA850RE_V2) ||\ @@ -315,7 +326,8 @@ #define CFG_ENV_ADDR 0x9F040000 #define CFG_ENV_SIZE 0xFC00 #define CFG_ENV_SECT_SIZE 0x10000 -#elif defined(CONFIG_FOR_TPLINK_MR3420_V3) ||\ +#elif defined(CONFIG_FOR_TPLINK_MR22U_V1) ||\ + defined(CONFIG_FOR_TPLINK_MR3420_V3) ||\ defined(CONFIG_FOR_TPLINK_MR6400_V1V2) ||\ defined(CONFIG_FOR_TPLINK_WA850RE_V2) ||\ defined(CONFIG_FOR_TPLINK_WR802N_V1) ||\ @@ -368,7 +380,8 @@ #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) ||\ +#elif defined(CONFIG_FOR_TPLINK_MR22U_V1) ||\ + defined(CONFIG_FOR_TPLINK_MR3420_V3) ||\ defined(CONFIG_FOR_TPLINK_MR6400_V1V2) ||\ defined(CONFIG_FOR_TPLINK_WR802N_V1) ||\ defined(CONFIG_FOR_TPLINK_WR810N_V1) ||\ @@ -431,6 +444,7 @@ defined(CONFIG_FOR_COMFAST_CF_E320N_V2) ||\ defined(CONFIG_FOR_COMFAST_CF_E520N) ||\ defined(CONFIG_FOR_COMFAST_CF_E530N) ||\ + defined(CONFIG_FOR_TPLINK_MR22U_V1) ||\ defined(CONFIG_FOR_TPLINK_MR3420_V3) ||\ defined(CONFIG_FOR_TPLINK_MR6400_V1V2) ||\ defined(CONFIG_FOR_TPLINK_WR802N_V1) ||\ @@ -459,7 +473,8 @@ * PLL/Clocks configuration * ======================== */ -#if defined(CONFIG_FOR_TPLINK_WA850RE_V2) ||\ +#if defined(CONFIG_FOR_TPLINK_MR22U_V1) ||\ + defined(CONFIG_FOR_TPLINK_WA850RE_V2) ||\ defined(CONFIG_FOR_TPLINK_WR802N_V1) ||\ defined(CONFIG_FOR_TPLINK_WR820N_V1_CN) ||\ defined(CONFIG_FOR_TPLINK_WR841N_V9) @@ -472,6 +487,7 @@ defined(CONFIG_FOR_COMFAST_CF_E320N_V2) ||\ defined(CONFIG_FOR_COMFAST_CF_E520N) ||\ defined(CONFIG_FOR_COMFAST_CF_E530N) ||\ + defined(CONFIG_FOR_TPLINK_MR22U_V1) ||\ defined(CONFIG_FOR_TPLINK_MR3420_V3) ||\ defined(CONFIG_FOR_TPLINK_MR6400_V1V2) ||\ defined(CONFIG_FOR_TPLINK_WA850RE_V2) ||\