add support for tl-mr13u 1/head
authorZhiqiang Wang <wang.9264@gmail.com>
Thu, 29 Aug 2013 20:10:49 +0000 (16:10 -0400)
committerZhiqiang Wang <wang.9264@gmail.com>
Fri, 30 Aug 2013 00:22:25 +0000 (20:22 -0400)
Makefile
u-boot/Makefile
u-boot/board/ar7240/ap121/ap121.c
u-boot/include/configs/ap121.h

index 0017a4bc0ff60775fa4ae32506258f9f92b053ca..21ff475adea1d7cd30adee79b3fd13417d7edf72 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -59,7 +59,14 @@ tplink_mr10u:
        @cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) ENDIANNESS=-EB V=1 all
        @cp $(BUILD_TOPDIR)/u-boot/tuboot.bin $(BUILD_TOPDIR)/bin/temp.bin
        @make show_size
-
+tplink_mr13u:   export UBOOT_FILE_NAME=uboot_for_tp-link_tl-mr13u
+tplink_mr13u:   export MAX_UBOOT_SIZE=64
+tplink_mr13u:   export COMPRESSED_UBOOT=1
+tplink_mr13u:
+       @cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) mr13u_config
+       @cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) ENDIANNESS=-EB V=1 all
+       @cp $(BUILD_TOPDIR)/u-boot/tuboot.bin $(BUILD_TOPDIR)/bin/temp.bin
+       @make show_size
 tplink_wr740n_v4:      export UBOOT_FILE_NAME=uboot_for_tp-link_tl-wr740n_v4
 tplink_wr740n_v4:      export MAX_UBOOT_SIZE=64
 tplink_wr740n_v4:      export COMPRESSED_UBOOT=1
index ec5309e1206e4bf9e6c98b37bce85670aec3617d..60155b3f0dfb99db2a0b96fd07969b1b39db0327 100755 (executable)
@@ -365,6 +365,18 @@ mr10u_config : unconfig hornet_common_config
        
        @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
 
+mr13u_config : unconfig hornet_common_config
+       @echo '======= Configuring for TP-Link TL-MR13U at:' `date` '======='
+       @echo "#define CONFIG_FOR_TPLINK_MR13U_V1           1" >> include/config.h
+       @echo "#define GPIO_SYS_LED_BIT                    27" >> include/config.h
+       @echo "#define GPIO_SYS_LED_ON                      0" >> include/config.h
+       @echo "#define GPIO_RST_BUTTON_BIT                 11" >> include/config.h
+       @echo "#define DEFAULT_FLASH_SIZE_IN_MB             4" >> include/config.h
+       @echo "#define BOARD_CUSTOM_STRING                  \"AP121 (AR9331) U-Boot for TL-MR13U\"" >> include/config.h
+
+       @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
+
+
 wr740n_v4_config : unconfig hornet_common_config
        @echo '======= Configuring for TP-Link TL-WR740N v4 at:' `date` '======='
        @echo "#define CONFIG_FOR_TPLINK_WR740N_V4          1" >> include/config.h
index 5ed9454eaa0db4bb38abd80eaf74e832bfbf57d9..612d735d032d615916e5c53f33341a0a6d181d27 100755 (executable)
@@ -25,7 +25,7 @@ void led_toggle(void){
        gpio ^= 1 << GPIO_SYS_LED_BIT;
 #elif defined(CONFIG_FOR_TPLINK_MR3040_V1V2)
        gpio ^= 1 << GPIO_INTERNET_LED_BIT;
-#elif defined(CONFIG_FOR_TPLINK_MR10U_V1)
+#elif defined(CONFIG_FOR_TPLINK_MR10U_V1) || defined(CONFIG_FOR_TPLINK_MR13U_V1)
        gpio ^= 1 << GPIO_SYS_LED_BIT;
 #elif defined(CONFIG_FOR_TPLINK_WR740N_V4) || defined(CONFIG_FOR_TPLINK_MR3220_V2)
        gpio ^= 1 << GPIO_SYS_LED_BIT;
@@ -56,7 +56,7 @@ void all_led_on(void){
        SETBITVAL(gpio, GPIO_INTERNET_LED_BIT, GPIO_INTERNET_LED_ON);
        SETBITVAL(gpio, GPIO_WLAN_LED_BIT, GPIO_WLAN_LED_ON);
        SETBITVAL(gpio, GPIO_ETH_LED_BIT, GPIO_ETH_LED_ON);
-#elif defined(CONFIG_FOR_TPLINK_MR10U_V1)
+#elif defined(CONFIG_FOR_TPLINK_MR10U_V1) || defined(CONFIG_FOR_TPLINK_MR13U_V1)
        SETBITVAL(gpio, GPIO_SYS_LED_BIT, GPIO_SYS_LED_ON);
 #elif defined(CONFIG_FOR_TPLINK_WR740N_V4) || defined(CONFIG_FOR_TPLINK_MR3220_V2)
        SETBITVAL(gpio, GPIO_SYS_LED_BIT, GPIO_SYS_LED_ON);
@@ -98,7 +98,7 @@ void all_led_off(void){
        SETBITVAL(gpio, GPIO_INTERNET_LED_BIT, !GPIO_INTERNET_LED_ON);
        SETBITVAL(gpio, GPIO_WLAN_LED_BIT, !GPIO_WLAN_LED_ON);
        SETBITVAL(gpio, GPIO_ETH_LED_BIT, !GPIO_ETH_LED_ON);
-#elif defined(CONFIG_FOR_TPLINK_MR10U_V1)
+#elif defined(CONFIG_FOR_TPLINK_MR10U_V1) || defined(CONFIG_FOR_TPLINK_MR13U_V1)
        SETBITVAL(gpio, GPIO_SYS_LED_BIT, !GPIO_SYS_LED_ON);
 #elif defined(CONFIG_FOR_TPLINK_WR740N_V4) || defined(CONFIG_FOR_TPLINK_MR3220_V2)
        SETBITVAL(gpio, GPIO_SYS_LED_BIT, !GPIO_SYS_LED_ON);
@@ -224,7 +224,7 @@ void gpio_config(void){
 
        /* Disable clock obs, added by zcf, 20110509 */
        //ar7240_reg_wr (AR7240_GPIO_FUNC, (ar7240_reg_rd(AR7240_GPIO_FUNC) & 0xffe7e07f));
-#elif defined(CONFIG_FOR_TPLINK_MR10U_V1)
+#elif defined(CONFIG_FOR_TPLINK_MR10U_V1) || defined(CONFIG_FOR_TPLINK_MR13U_V1)
 
        /* LED's GPIOs on MR10U:
         *
index 7ade40142e40bfdd6fc6a9442ee66a380999db98..4d07c89c28ca0b336c386f0155d9b5ba51eccc9b 100755 (executable)
@@ -40,7 +40,8 @@
        defined(CONFIG_FOR_TPLINK_MR3040_V1V2) || \
        defined(CONFIG_FOR_TPLINK_MR10U_V1) || \
        defined(CONFIG_FOR_TPLINK_WR740N_V4) || \
-       defined(CONFIG_FOR_TPLINK_MR3220_V2)
+       defined(CONFIG_FOR_TPLINK_MR3220_V2) || \
+       defined(CONFIG_FOR_TPLINK_MR13U_V1)
 
        #define CONFIG_BOOTARGS "console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:128k(u-boot),1024k(kernel),2816k(rootfs),64k(config),64k(ART)"