Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from rainlake/tp-mr13u
Browse files Browse the repository at this point in the history
add support for tl-mr13u
  • Loading branch information
pepe2k committed Sep 1, 2013
2 parents a9593fc + b83ad04 commit 8faf461
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions u-boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions u-boot/board/ar7240/ap121/ap121.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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:
*
Expand Down
3 changes: 2 additions & 1 deletion u-boot/include/configs/ap121.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)"

Expand Down

0 comments on commit 8faf461

Please sign in to comment.