Add support for YunCore T830 (QCA9531 based)
authorPiotr Dymacz <pepe2k@gmail.com>
Fri, 16 Feb 2018 21:09:50 +0000 (22:09 +0100)
committerPiotr Dymacz <pepe2k@gmail.com>
Thu, 22 Feb 2018 14:13:47 +0000 (15:13 +0100)
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Makefile
README.md
u-boot/Makefile
u-boot/cpu/mips/ar7240/qca_gpio_init.S
u-boot/include/configs/ap143.h

index c8fd387ae2e472a3f90a444956453fd3287bbbfb..928daf85f08d0b19807c8118e9caaa8ec9d4285a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -281,6 +281,7 @@ p2w_cpe505n \
 p2w_r602n \
 yuncore_ap90q \
 yuncore_cpe830 \
+yuncore_t830 \
 whqx_e600g_v2 \
 whqx_e600gac_v2 \
 zbtlink_zbt-we1526:
index 094bac568dc52a2a0d6f545ed3c55ffc2ba2b3fa..61c107031a12d676c937dcf89af8757232442bea 100644 (file)
--- a/README.md
+++ b/README.md
@@ -128,6 +128,7 @@ Currently supported devices:
   - WHQX E600G/AC v2
   - YunCore AP90Q
   - YunCore CPE830
+  - YunCore T830
   - Zbtlink ZBT-WE1526
 
 I tested this modification on most of these devices, with OpenWrt and OFW firmware. If you are not sure about the version of your device, please contact with me **before** you try to make an upgrade. Changing bootloader to a wrong version will probably damage your router and you will need special hardware to fix it, so please, **be very careful**.
@@ -193,6 +194,7 @@ More information about supported devices:
 | YunCore AP90Q | QCA9531 | 16 MiB | 128 MiB DDR2 | 256 KiB | R/W |
 | YunCore CPE830 | QCA9531 | 16 MiB | 64 MiB DDR2 | 256 KiB | R/W |
 | YunCore CPE870 | AR9341 | 8 MiB | 64 MiB DDR2 | 64 KiB, LZMA | R/W |
+| YunCore T830 | QCA9531 | 16 MiB | 128 MiB DDR2 | 256 KiB | R/W |
 | Zbtlink ZBT-WE1526 | QCA9531 | 16 MiB | 128 MiB DDR2 | 256 KiB | R/W |
 
 *(LZMA) - U-Boot binary image is compressed with LZMA.*
index 1e998e094482fefda162825a1e2c142b935edcdd..5f584ee127adae96d7a1c603b4f90429ad1c500f 100644 (file)
@@ -803,6 +803,13 @@ yuncore_cpe870: ar934x_common
        @$(call define_add,CFG_AG7240_NMACS,2)
        @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240
 
+yuncore_t830: qca953x_common
+       @$(call config_init,YunCore T830,t830,16,17,1,QCA_QCA9531_SOC)
+       @$(call define_add,CONFIG_FOR_YUNCORE_T830,1)
+       @$(call define_add,CFG_ATHRS27_PHY,1)
+       @$(call define_add,CFG_ATH_GMAC_NMACS,2)
+       @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
+
 zbtlink_zbt-we1526: qca953x_common
        @$(call config_init,Zbtlink ZBT-WE1526,zbt-we1526,16,17,1,QCA_QCA9531_SOC)
        @$(call define_add,CONFIG_FOR_ZBTLINK_ZBT_WE1526,1)
index 26848704629f34daea57d5806c1cae46e1b414e1..a26c119bb862d17e7bb2c357f798d1d675509480 100644 (file)
@@ -814,8 +814,9 @@ gpio_setup:
  *
  * FIXME!
  */
-#if defined(CONFIG_FOR_YUNCORE_AP90Q) ||\
-    defined(CONFIG_FOR_YUNCORE_CPE830)
+#if defined(CONFIG_FOR_YUNCORE_AP90Q)  ||\
+    defined(CONFIG_FOR_YUNCORE_CPE830) ||\
+    defined(CONFIG_FOR_YUNCORE_T830)
        li t8, 0
        li t9, 0x7530
 
index 6058d4ac11113d068b433de8177065f69d784c4a..81d57c338dee06f89efe9dbeb3119cfe2e2e04ae 100644 (file)
                                                GPIO3 | GPIO4 | GPIO12 |\
                                                GPIO16
 
+#elif defined(CONFIG_FOR_YUNCORE_T830)
+
+       #define CONFIG_QCA_GPIO_MASK_LED_ACT_L  GPIO4  | GPIO11 | GPIO12 |\
+                                               GPIO13 | GPIO14 | GPIO15 |\
+                                               GPIO16
+
 #elif defined(CONFIG_FOR_ZBTLINK_ZBT_WE1526)
 
        #define CONFIG_QCA_GPIO_MASK_LED_ACT_L  GPIO4  | GPIO11 | GPIO12 |\
                                "rootfstype=jffs2 init=/sbin/init "\
                                "mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),64k(mib0),64k(ART)"
 
-#elif defined(CONFIG_FOR_WHQX_E600G_V2) ||\
-      defined(CONFIG_FOR_WHQX_E600GAC_V2)
+#elif defined(CONFIG_FOR_WHQX_E600G_V2)   ||\
+      defined(CONFIG_FOR_WHQX_E600GAC_V2) ||\
+      defined(CONFIG_FOR_YUNCORE_T830)
 
        #define CONFIG_BOOTARGS "console=ttyS0,115200 root=31:02 "\
                                "rootfstype=jffs2 init=/sbin/init "\
       defined(CONFIG_FOR_WALLYS_DR531)          ||\
       defined(CONFIG_FOR_YUNCORE_AP90Q)         ||\
       defined(CONFIG_FOR_YUNCORE_CPE830)        ||\
+      defined(CONFIG_FOR_YUNCORE_T830)          ||\
       defined(CONFIG_FOR_ZBTLINK_ZBT_WE1526)
 
        #define CFG_LOAD_ADDR   0x9F050000
     defined(CONFIG_FOR_P2W_R602N)      ||\
     defined(CONFIG_FOR_YUNCORE_AP90Q)  ||\
     defined(CONFIG_FOR_YUNCORE_CPE830) ||\
+    defined(CONFIG_FOR_YUNCORE_T830)   ||\
     defined(CONFIG_FOR_ZBTLINK_ZBT_WE1526)
 
        #define CONFIG_BOOTCOMMAND      "bootm 0x9F050000 || bootm 0x9FE80000"
       defined(CONFIG_FOR_P2W_R602N)      ||\
       defined(CONFIG_FOR_YUNCORE_AP90Q)  ||\
       defined(CONFIG_FOR_YUNCORE_CPE830) ||\
+      defined(CONFIG_FOR_YUNCORE_T830)   ||\
       defined(CONFIG_FOR_ZBTLINK_ZBT_WE1526)
 
        #define CFG_ENV_ADDR            0x9F040000
       defined(CONFIG_FOR_P2W_R602N)             ||\
       defined(CONFIG_FOR_YUNCORE_AP90Q)         ||\
       defined(CONFIG_FOR_YUNCORE_CPE830)        ||\
+      defined(CONFIG_FOR_YUNCORE_T830)          ||\
       defined(CONFIG_FOR_ZBTLINK_ZBT_WE1526)
 
        #define OFFSET_MAC_DATA_BLOCK           0xFF0000
       defined(CONFIG_FOR_WALLYS_DR531)          ||\
       defined(CONFIG_FOR_YUNCORE_AP90Q)         ||\
       defined(CONFIG_FOR_YUNCORE_CPE830)        ||\
+      defined(CONFIG_FOR_YUNCORE_T830)          ||\
       defined(CONFIG_FOR_ZBTLINK_ZBT_WE1526)
 
        #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES        (384 * 1024)
       defined(CONFIG_FOR_P2W_R602N)      ||\
       defined(CONFIG_FOR_YUNCORE_AP90Q)  ||\
       defined(CONFIG_FOR_YUNCORE_CPE830) ||\
+      defined(CONFIG_FOR_YUNCORE_T830)   ||\
       defined(CONFIG_FOR_ZBTLINK_ZBT_WE1526)
 
        #define CONFIG_QCA_PLL_IN_FLASH_BLOCK_OFFSET    0x40000
     !defined(CONFIG_FOR_WHQX_E600GAC_V2)       &&\
     !defined(CONFIG_FOR_YUNCORE_AP90Q)         &&\
     !defined(CONFIG_FOR_YUNCORE_CPE830)        &&\
+    !defined(CONFIG_FOR_YUNCORE_T830)          &&\
     !defined(CONFIG_FOR_ZBTLINK_ZBT_WE1526)
 
        #define CONFIG_UPG_UBOOT_SIZE_BACKUP_HEX        0x20000
     defined(CONFIG_FOR_P2W_R602N)      ||\
     defined(CONFIG_FOR_YUNCORE_AP90Q)  ||\
     defined(CONFIG_FOR_YUNCORE_CPE830) ||\
+    defined(CONFIG_FOR_YUNCORE_T830)   ||\
     defined(CONFIG_FOR_ZBTLINK_ZBT_WE1526)
 
        #define CONFIG_UPG_SCRIPTS_FW_ADDR_HEX  0x9F050000