Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!

add-mr34220v2+mr3420v2-support

By: cindy_wijaya on Jan 10th, 2013  |  syntax: Diff  |  size: 8.89 KB  |  views: 6,944  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Index: target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c
  2. ===================================================================
  3. --- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c       (revision 35052)
  4. +++ target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c       (working copy)
  5. @@ -8,6 +8,9 @@
  6.   *  by the Free Software Foundation.
  7.   */
  8.  
  9. +#include "dev-usb.h"
  10. +#include <linux/gpio.h>
  11. +
  12.  #include <linux/platform_device.h>
  13.  
  14.  #include <asm/mach-ath79/ath79.h>
  15. @@ -32,7 +35,7 @@
  16.  
  17.  #define TL_WR841NV8_GPIO_BTN_RESET     17
  18.  #define TL_WR841NV8_GPIO_SW_RFKILL     16
  19. -
  20. +#define TL_WR841NV8_GPIO_USB_POWER     4
  21.  #define TL_WR841NV8_KEYS_POLL_INTERVAL 20      /* msecs */
  22.  #define TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR841NV8_KEYS_POLL_INTERVAL)
  23.  
  24. @@ -111,6 +114,13 @@
  25.                                         ARRAY_SIZE(tl_wr841n_v8_gpio_keys),
  26.                                         tl_wr841n_v8_gpio_keys);
  27.  
  28. +       /* enable power for the USB port */
  29. +       gpio_request(TL_WR841NV8_GPIO_USB_POWER, "USB power");
  30. +       gpio_direction_input(TL_WR841NV8_GPIO_USB_POWER);
  31. +
  32. +       ath79_register_usb();
  33. +       /* END for the USB port */
  34. +
  35.         ath79_register_m25p80(&tl_wr841n_v8_flash_data);
  36.  
  37.         ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_PHY_SWAP);
  38. @@ -135,5 +145,5 @@
  39.         ath79_register_wmac(ee, mac);
  40.  }
  41.  
  42. -MIPS_MACHINE(ATH79_MACH_TL_WR841N_V8, "TL-WR841N-v8", "TP-LINK TL-WR841N/ND v8",
  43. +MIPS_MACHINE(ATH79_MACH_TL_WR841N_V8, "TL-WR841N-v8", "TP-LINK TL-MR3420 v2 | TP-LINK TL-WR841N/ND v8 (3G)",
  44.              tl_wr841n_v8_setup);
  45. Index: target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr741nd-v4.c
  46. ===================================================================
  47. --- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr741nd-v4.c      (revision 35052)
  48. +++ target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr741nd-v4.c      (working copy)
  49. @@ -13,6 +13,7 @@
  50.  #include <asm/mach-ath79/ath79.h>
  51.  #include <asm/mach-ath79/ar71xx_regs.h>
  52.  
  53. +#include "dev-usb.h"
  54.  #include "common.h"
  55.  #include "dev-eth.h"
  56.  #include "dev-gpio-buttons.h"
  57. @@ -120,6 +121,7 @@
  58.                                         ARRAY_SIZE(tl_wr741ndv4_gpio_keys),
  59.                                         tl_wr741ndv4_gpio_keys);
  60.  
  61. +       ath79_register_usb();
  62.         ath79_register_m25p80(&tl_wr741ndv4_flash_data);
  63.         ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
  64.         ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1);
  65. @@ -132,4 +134,4 @@
  66.  }
  67.  
  68.  MIPS_MACHINE(ATH79_MACH_TL_WR741ND_V4, "TL-WR741ND-v4",
  69. -            "TP-LINK TL-WR741ND v4", tl_wr741ndv4_setup);
  70. +            "TP-LINK TL-MR3220 v2 | TP-LINK TL-WR741ND v4 (3G)", tl_wr741ndv4_setup);
  71. Index: target/linux/ar71xx/image/Makefile
  72. ===================================================================
  73. --- target/linux/ar71xx/image/Makefile  (revision 35052)
  74. +++ target/linux/ar71xx/image/Makefile  (working copy)
  75. @@ -848,8 +848,7 @@
  76.  
  77.  $(eval $(call SingleProfile,TPLINKOLD,$(fs_squash),TLWR841NV15,tl-wr841nd-v1.5,TL-WR841N-v1.5,ttyS0,115200,0x08410002,2,4M))
  78.  
  79. -$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3220,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M))
  80. -$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3420,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
  81. +
  82.  $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA701,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
  83.  $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M))
  84.  $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA901NV1,tl-wa901nd-v1,TL-WA901ND,ttyS0,115200,0x09010001,1,4M))
  85. @@ -869,11 +868,12 @@
  86.  $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR1043,tl-wr1043nd-v1,TL-WR1043ND,ttyS0,115200,0x10430001,1,8M))
  87.  
  88.  $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR11U,tl-mr11u-v1,TL-MR11U,ttyATH0,115200,0x00110101,1,4Mlzma))
  89. -$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3020,tl-mr3020-v1,TL-MR3020,ttyATH0,115200,0x30200001,1,4Mlzma))
  90. -$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3040,tl-mr3040-v1,TL-MR3040,ttyATH0,115200,0x30400001,1,4Mlzma))
  91. +
  92.  $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR703,tl-wr703n-v1,TL-WR703N,ttyATH0,115200,0x07030101,1,4Mlzma))
  93.  $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR740NV4,tl-wr740n-v4,TL-WR741ND-v4,ttyATH0,115200,0x07400004,1,4Mlzma))
  94. +########### referensi mr3220 v.2
  95.  $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR741NV4,tl-wr741nd-v4,TL-WR741ND-v4,ttyATH0,115200,0x07410004,1,4Mlzma))
  96. +###########
  97.  $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR841NV8,tl-wr841n-v8,TL-WR841N-v8,ttyS0,115200,0x08410008,1,4Mlzma))
  98.  $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR1041,tl-wr1041n-v2,TL-WR1041N-v2,ttyS0,115200,0x10410002,1,4Mlzma))
  99.  $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR2543,tl-wr2543-v1,TL-WR2543N,ttyS0,115200,0x25430001,1,8Mlzma,-v 3.13.99))
  100. @@ -912,6 +912,19 @@
  101.  
  102.  $(eval $(call SingleProfile,ZyXEL,$(fs_64k),NBG_460N_550N_550NH,nbg460n_550n_550nh,NBG460N,ttyS0,115200,NBG-460N))
  103.  
  104. +$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3020V1,tl-mr3020-v1,TL-MR3020,ttyATH0,115200,0x30200001,1,4Mlzma))
  105. +$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3040V1,tl-mr3040-v1,TL-MR3040,ttyATH0,115200,0x30400001,1,4Mlzma))
  106. +$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3220V1,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M))
  107. +$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
  108. +############ MR3220 V.2
  109. +$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3220V2,tl-mr3220-v2,TL-WR741ND-v4,ttyATH0,115200,0x32200002,1,4Mlzma))
  110. +$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3420V2,tl-mr3420-v2,TL-WR841N-v8,ttyS0,115200,0x34200002,1,4Mlzma))
  111. +############
  112. +#----------------------tambahan
  113. +$(eval $(call MultiProfile,TLMR3220,TLMR3220V1 TLMR3220V2))
  114. +$(eval $(call MultiProfile,TLMR3420,TLMR3420V1 TLMR3420V2))
  115. +$(eval $(call MultiProfile,TLMR3020,TLMR3020V1 TLMR3020V2))
  116. +#----------------------
  117.  $(eval $(call MultiProfile,AP121,AP121_2M AP121_4M))
  118.  $(eval $(call MultiProfile,EWDORIN, EWDORINAP EWDORINRT))
  119.  $(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW TEW652BRP_RECOVERY))
  120. Index: target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
  121. ===================================================================
  122. --- target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch       (revision 35052)
  123. +++ target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch       (working copy)
  124. @@ -555,6 +555,7 @@
  125.  +config ATH79_MACH_TL_WR741ND_V4
  126.  +      bool "TP-LINK TL-WR741ND v4 support"
  127.  +      select SOC_AR933X
  128. ++      select ATH79_DEV_USB
  129.  +      select ATH79_DEV_ETH
  130.  +      select ATH79_DEV_GPIO_BUTTONS
  131.  +      select ATH79_DEV_LEDS_GPIO
  132. @@ -573,6 +574,7 @@
  133.  +config ATH79_MACH_TL_WR841N_V8
  134.  +      bool "TP-LINK TL-WR841N/ND v8 support"
  135.  +      select SOC_AR934X
  136. ++      select ATH79_DEV_USB
  137.  +      select ATH79_DEV_ETH
  138.  +      select ATH79_DEV_GPIO_BUTTONS
  139.  +      select ATH79_DEV_LEDS_GPIO
  140. Index: target/linux/ar71xx/base-files/etc/uci-defaults/network
  141. ===================================================================
  142. --- target/linux/ar71xx/base-files/etc/uci-defaults/network     (revision 35052)
  143. +++ target/linux/ar71xx/base-files/etc/uci-defaults/network     (working copy)
  144. @@ -134,6 +134,12 @@
  145.         ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
  146.         ;;
  147.  
  148. +tl-mr3420-v2)
  149. +       ucidef_set_interfaces_lan_wan "eth1" "eth0"
  150. +       ucidef_add_switch "switch0" "1" "1"
  151. +       ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
  152. +       ;;
  153. +
  154.  wrt160nl)
  155.         ucidef_set_interfaces_lan_wan "eth0" "eth1"
  156.         ucidef_add_switch "eth0" "1" "1"
  157. @@ -187,6 +193,7 @@
  158.  tew-632brp |\
  159.  tew-712br |\
  160.  tl-mr3220 |\
  161. +tl-mr3220-v2 |\
  162.  tl-mr3420 |\
  163.  tl-wr741nd |\
  164.  tl-wr741nd-v4 |\
  165. Index: tools/firmware-utils/src/mktplinkfw.c
  166. ===================================================================
  167. --- tools/firmware-utils/src/mktplinkfw.c       (revision 35052)
  168. +++ tools/firmware-utils/src/mktplinkfw.c       (working copy)
  169. @@ -32,7 +32,9 @@
  170.  #define HEADER_VERSION_V1      0x01000000
  171.  #define HWID_TL_MR3020_V1      0x30200001
  172.  #define HWID_TL_MR3220_V1      0x32200001
  173. +#define HWID_TL_MR3220_V2      0x32200002
  174.  #define HWID_TL_MR3420_V1      0x34200001
  175. +#define HWID_TL_MR3420_V2      0x34200002
  176.  #define HWID_TL_WA701N_V1      0x07010001
  177.  #define HWID_TL_WA7510N_V1     0x75100001
  178.  #define HWID_TL_WA901ND_V1     0x09010001
  179. @@ -173,6 +175,12 @@
  180.                 .kernel_ep      = 0x80060000,
  181.                 .rootfs_ofs     = 0x100000,
  182.         }, {
  183. +               .id             = "16Mlzma",
  184. +               .fw_max_len     = 0xfc0000,
  185. +               .kernel_la      = 0x80060000,
  186. +               .kernel_ep      = 0x80060000,
  187. +               .rootfs_ofs     = 0x100000,
  188. +       }, {
  189.                 /* terminating entry */
  190.         }
  191.  };
  192. @@ -189,11 +197,21 @@
  193.                 .hw_rev         = 1,
  194.                 .layout_id      = "4M",
  195.         }, {
  196. +               .id             = "TL-MR3220v2",
  197. +               .hw_id          = HWID_TL_MR3220_V2,
  198. +               .hw_rev         = 1,
  199. +               .layout_id      = "4Mlzma",
  200. +       }, {
  201.                 .id             = "TL-MR3420v1",
  202.                 .hw_id          = HWID_TL_MR3420_V1,
  203.                 .hw_rev         = 1,
  204.                 .layout_id      = "4M",
  205.         }, {
  206. +               .id             = "TL-MR3420v2",
  207. +               .hw_id          = HWID_TL_MR3420_V2,
  208. +               .hw_rev         = 1,
  209. +               .layout_id      = "4Mlzma",
  210. +       }, {
  211.                 .id             = "TL-WA701Nv1",
  212.                 .hw_id          = HWID_TL_WA701N_V1,
  213.                 .hw_rev         = 1,