Add support for TP-Link TL-WA850RE v2 (QCA9533 based)
authorPiotr Dymacz <pepe2k@gmail.com>
Sat, 11 Feb 2017 20:36:47 +0000 (21:36 +0100)
committerPiotr Dymacz <pepe2k@gmail.com>
Sat, 11 Feb 2017 20:36:47 +0000 (21:36 +0100)
Makefile
README.md
u-boot/Makefile
u-boot/include/configs/ap143.h

index 5bc8c385d7a8e908af74d53736229a6bf5f91a2e..30d2df518fcb17fc334d82d18fcc47e229f0e7e4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -217,6 +217,7 @@ $(COMMON_AR933X_TARGETS):
 COMMON_ETHS27_TARGETS = \
        tp-link_tl-mr3420_v2 \
        tp-link_tl-wa801nd_v2 \
+       tp-link_tl-wa850re_v2 \
        tp-link_tl-wa830re_v2 \
        tp-link_tl-wdr3500 \
        tp-link_tl-wr802n \
index 3f6f511a01699c60d94ad957f4405d001a168d85..b9cbd6ff2c36faef3254a40ba81fdf56fd8ed194 100644 (file)
--- a/README.md
+++ b/README.md
@@ -101,6 +101,7 @@ Currently supported devices:
   - Comfast CF-E520N/CF-E530N
   - P&W CPE505N
   - P&W R602N
+  - TP-Link TL-WA850RE v2
   - TP-Link TL-WR802N
   - TP-Link TL-WR810N
   - TP-Link TL-WR820N (version for Chinese market)
@@ -137,6 +138,7 @@ More information about supported devices:
 | [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-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 |
 | [TP-Link TL-WDR3500 v1](http://wiki.openwrt.org/toh/tp-link/tl-wdr3500) | AR9344 | 8 MiB | 128 MiB DDR2 | 64 KiB, LZMA | RO |
 | [TP-Link TL-WDR3600 v1](http://wiki.openwrt.org/toh/tp-link/tl-wdr3600) | AR9344 | 8 MiB | 128 MiB DDR2 | 64 KiB, LZMA | RO |
 | [TP-Link TL-WDR43x0 v1](http://wiki.openwrt.org/toh/tp-link/tl-wdr4300) | AR9344 | 8 MiB | 128 MiB DDR2 | 64 KiB, LZMA | RO |
index c719acdc9c5899dfbd1b31337381853c3814edc3..47a0d63b3f5c4c1f0f751be2171426d048f43550 100644 (file)
@@ -513,6 +513,13 @@ tp-link_tl-wa830re_v2: ar934x_common
        @$(call define_add,CFG_AG7240_NMACS,2)
        @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240
 
+tp-link_tl-wa850re_v2: qca953x_common
+       @$(call config_init,TP-Link TL-WA850RE v2,tl-wa850re-v2,4,17,1,QCA_QCA953X_SOC)
+       @$(call define_add,CONFIG_FOR_TPLINK_WA850RE_V2,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-wdr3500: ar934x_common
        @$(call config_init,TP-Link TL-WDR3500,tl-wdr3500,8,16,1,QCA_AR9344_SOC)
        @$(call define_add,CONFIG_FOR_TPLINK_WDR3500_V1,1)
index 16313c2b03366a83594f05366aa44fa508f74654..a2a48ed941cd94a314d79e0b767d91621c2210d5 100644 (file)
        #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_WA850RE_V2)
+
+       #define CONFIG_QCA_GPIO_MASK_LED_ACT_L  GPIO0  | GPIO1 | GPIO2  |\
+                                               GPIO3  | GPIO4 | GPIO12 |\
+                                               GPIO13 | GPIO14
+       #define CONFIG_QCA_GPIO_MASK_OUT        GPIO15 |\
+                                               CONFIG_QCA_GPIO_MASK_LED_ACT_L
+       #define CONFIG_QCA_GPIO_MASK_IN         GPIO16 | GPIO17
+       #define CONFIG_QCA_GPIO_MASK_OUT_INIT_H GPIO15 |\
+                                               CONFIG_QCA_GPIO_MASK_LED_ACT_L
+
 #elif defined(CONFIG_FOR_TPLINK_WR810N)
 
        #define CONFIG_QCA_GPIO_MASK_LED_ACT_L  GPIO13
                                "rootfstype=squashfs init=/sbin/init "\
                                "mtdparts=ath-nor0:32k(u-boot1),32k(u-boot2),3008k(rootfs),896k(uImage),64k(mib0),64k(art)"
 
-#elif defined(CONFIG_FOR_TPLINK_WR841N_V10) ||\
+#elif defined(CONFIG_FOR_TPLINK_WA850RE_V2) ||\
+      defined(CONFIG_FOR_TPLINK_WR841N_V10) ||\
       defined(CONFIG_FOR_TPLINK_WR841N_V11) ||\
       defined(CONFIG_FOR_TPLINK_WR841N_V9)  ||\
       defined(CONFIG_FOR_TPLINK_WR802N)
     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_WR802N)       ||\
     defined(CONFIG_FOR_TPLINK_WR810N)       ||\
     defined(CONFIG_FOR_TPLINK_WR820N_CN)    ||\
        #define CFG_ENV_ADDR            0x9F040000
        #define CFG_ENV_SIZE            0xFC00
        #define CFG_ENV_SECT_SIZE       0x10000
-#elif defined(CONFIG_FOR_TPLINK_WR802N)     ||\
+#elif 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) ||\
        #define OFFSET_MAC_DATA_BLOCK           0xFF0000
        #define OFFSET_MAC_DATA_BLOCK_LENGTH    0x010000
        #define OFFSET_MAC_ADDRESS              0x000000
+#elif defined(CONFIG_FOR_TPLINK_WA850RE_V2)
+       #define OFFSET_MAC_DATA_BLOCK           0x3c0000
+       #define OFFSET_MAC_DATA_BLOCK_LENGTH    0x010000
+       #define OFFSET_MAC_ADDRESS              0x000008
 #elif defined(CONFIG_FOR_TPLINK_WR802N)     ||\
       defined(CONFIG_FOR_TPLINK_WR810N)     ||\
       defined(CONFIG_FOR_TPLINK_WR820N_CN)  ||\
     defined(CONFIG_FOR_TPLINK_WR841N_V11)   ||\
     defined(CONFIG_FOR_TPLINK_WR841N_V9)
        #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES        (192 * 1024)
+#elif defined(CONFIG_FOR_TPLINK_WA850RE_V2)
+       #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES        (448 * 1024)
 #elif defined(CONFIG_FOR_P2W_CPE505N)    ||\
       defined(CONFIG_FOR_P2W_R602N)      ||\
       defined(CONFIG_FOR_WALLYS_DR531)   ||\
  * PLL/Clocks configuration
  * ========================
  */
-#if defined(CONFIG_FOR_TPLINK_WR802N)    ||\
-    defined(CONFIG_FOR_TPLINK_WR820N_CN) ||\
+#if defined(CONFIG_FOR_TPLINK_WA850RE_V2) ||\
+    defined(CONFIG_FOR_TPLINK_WR802N)     ||\
+    defined(CONFIG_FOR_TPLINK_WR820N_CN)  ||\
     defined(CONFIG_FOR_TPLINK_WR841N_V9)
        #define CONFIG_QCA_PLL  QCA_PLL_PRESET_550_400_200
 #else
     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_WR802N)       ||\
     defined(CONFIG_FOR_TPLINK_WR810N)       ||\
     defined(CONFIG_FOR_TPLINK_WR820N_CN)    ||\