I don't know howto submit patch in a proper way, but on my attachment I
submit patch for MR3420v2 against trunk revision 35287.

On Fri, Feb 8, 2013 at 2:37 AM, OpenWrt <[email protected]>wrote:

> #12748: Add support for  TL-LINK TL-MR3420 v2
> -------------------------------------+-------------------------------------
>   Reporter:  Permadi Witjaksono      |      Owner:  developers
>   <permaditw@…>                      |     Status:  new
>       Type:  task                    |  Milestone:  Attitude Adjustment
>   Priority:  normal                  |  12.09
>  Component:  base system             |    Version:  Trunk
> Resolution:                          |   Keywords:  3420 3420v2
> -------------------------------------+-------------------------------------
>
> Comment (by permaditw@…):
>
>  Replying to [comment:2 Dioptimizer <dioptimizer@…>]:
>  > Hi,
>  > Be so kind
>  > It would be nice to add support MR3420V2 to the trunk, link to the
>  [[https://forum.openwrt.org/viewtopic.php?id=41326|forum]].
>  > Testing of this patch has been successfully for a long time.
>  >
>  > Thank you!
>
>  This is patch from my MeUphi against trunk 35287
>
>
>  Index: target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c
>  ===================================================================
>  --- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c
>  (revision 35287)
>  +++ target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c
>  (working copy)
>  @@ -1,5 +1,5 @@
>   /*
>  - *  TP-LINK TL-WR841N/ND v8 board support
>  + *  TP-LINK TL-WR841N/ND v8/TL-MR3420 v2 board support
>    *
>    *  Copyright (C) 2012 Gabor Juhos <[email protected]>
>    *
>  @@ -8,6 +8,7 @@
>    *  by the Free Software Foundation.
>    */
>
>  +#include <linux/gpio.h>
>   #include <linux/platform_device.h>
>
>   #include <asm/mach-ath79/ath79.h>
>  @@ -18,6 +19,7 @@
>   #include "dev-gpio-buttons.h"
>   #include "dev-leds-gpio.h"
>   #include "dev-m25p80.h"
>  +#include "dev-usb.h"
>   #include "dev-wmac.h"
>   #include "machtypes.h"
>
>  @@ -31,7 +33,10 @@
>   #define TL_WR841NV8_GPIO_LED_SYSTEM    14
>
>   #define TL_WR841NV8_GPIO_BTN_RESET     17
>  -#define TL_WR841NV8_GPIO_SW_RFKILL     16
>  +#define TL_WR841NV8_GPIO_BTN_WPS       16
>  +
>  +#define TL_MR3420V2_GPIO_LED_3G        11
>  +#define TL_MR3420V2_GPIO_USB_POWER     4
>
>   #define TL_WR841NV8_KEYS_POLL_INTERVAL 20      /* msecs */
>   #define TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL (3 *
>  TL_WR841NV8_KEYS_POLL_INTERVAL)
>  @@ -78,44 +83,44 @@
>                  .name           = "tp-link:green:wlan",
>                  .gpio           = TL_WR841NV8_GPIO_LED_WLAN,
>                  .active_low     = 1,
>  +       }, {
>  +               /* the 3G LED is only present on the MR3420 v2 */
>  +               .name           = "tp-link:green:3g",
>  +               .gpio           = TL_MR3420V2_GPIO_LED_3G,
>  +               .active_low     = 1,
>          },
>   };
>
>   static struct gpio_keys_button tl_wr841n_v8_gpio_keys[] __initdata = {
>          {
>  -               .desc           = "Reset button",
>  +               .desc           = "reset",
>                  .type           = EV_KEY,
>                  .code           = KEY_RESTART,
>                  .debounce_interval = TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL,
>                  .gpio           = TL_WR841NV8_GPIO_BTN_RESET,
>                  .active_low     = 1,
>          }, {
>  -               .desc           = "RFKILL switch",
>  -               .type           = EV_SW,
>  -               .code           = KEY_RFKILL,
>  +               /* the WPS button is only present on the MR3420 v2 */
>  +               .desc           = "WPS",
>  +               .type           = EV_KEY,
>  +               .code           = KEY_WPS_BUTTON,
>                  .debounce_interval = TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL,
>  -               .gpio           = TL_WR841NV8_GPIO_SW_RFKILL,
>  +               .gpio           = TL_WR841NV8_GPIO_BTN_WPS,
>                  .active_low     = 0,
>          }
>   };
>
>  -static void __init tl_wr841n_v8_setup(void)
>  +static void __init tl_ap123_setup(void)
>   {
>          u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
>          u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
>
>  -       ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio),
>  -                                tl_wr841n_v8_leds_gpio);
>  -
>  -       ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL,
>  -
>  ARRAY_SIZE(tl_wr841n_v8_gpio_keys),
>  -                                       tl_wr841n_v8_gpio_keys);
>  -
>          ath79_register_m25p80(&tl_wr841n_v8_flash_data);
>
>          ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_PHY_SWAP);
>
>          ath79_register_mdio(1, 0x0);
>  +       ath79_register_mdio(0, 0x0);
>
>          ath79_init_mac(ath79_eth0_data.mac_addr, mac, -1);
>          ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
>  @@ -135,5 +140,37 @@
>          ath79_register_wmac(ee, mac);
>   }
>
>  -MIPS_MACHINE(ATH79_MACH_TL_WR841N_V8, "TL-WR841N-v8", "TP-LINK TL-
>  WR841N/ND v8",
>  -            tl_wr841n_v8_setup);
>  +static void __init tl_wr841n_v8_setup(void)
>  +{
>  +       tl_ap123_setup();
>  +
>  +       ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio) -
>  1,
>  +                               tl_wr841n_v8_leds_gpio);
>  +       ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL,
>  +                               ARRAY_SIZE(tl_wr841n_v8_gpio_keys),
>  +                               tl_wr841n_v8_gpio_keys);
>  +}
>  +
>  +MIPS_MACHINE(ATH79_MACH_TL_WR841N_V8, "TL-WR841N-v8",
>  +       "TP-LINK TL-WR841N/ND v8", tl_wr841n_v8_setup);
>  +
>  +static void __init tl_mr3420v2_setup(void)
>  +{
>  +       tl_ap123_setup();
>  +
>  +       /* enable power for the USB port */
>  +       gpio_request(TL_MR3420V2_GPIO_USB_POWER, "USB power");
>  +       gpio_direction_input(TL_MR3420V2_GPIO_USB_POWER);
>  +
>  +       ath79_register_usb();
>  +       /* END for the USB port */
>  +
>  +       ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio),
>  +                               tl_wr841n_v8_leds_gpio);
>  +       ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL,
>  +                               ARRAY_SIZE(tl_wr841n_v8_gpio_keys) - 1,
>  +                               tl_wr841n_v8_gpio_keys);
>  +}
>  +
>  +MIPS_MACHINE(ATH79_MACH_TL_MR3420_V2, "TL-MR3420-v2",
>  +       "TP-LINK TL-MR3420 v2", tl_mr3420v2_setup);
>  Index: target/linux/ar71xx/patches-3.7/610-MIPS-ath79-openwrt-
>  machines.patch
>  ===================================================================
>  --- target/linux/ar71xx/patches-3.7/610-MIPS-ath79-openwrt-machines.patch
>  (revision 35287)
>  +++ target/linux/ar71xx/patches-3.7/610-MIPS-ath79-openwrt-machines.patch
>  (working copy)
>  @@ -1,6 +1,6 @@
>   --- a/arch/mips/ath79/machtypes.h
>   +++ b/arch/mips/ath79/machtypes.h
>  -@@ -16,22 +16,112 @@
>  +@@ -16,22 +16,113 @@
>
>    enum ath79_mach_type {
>          ATH79_MACH_GENERIC = 0,
>  @@ -67,6 +67,7 @@
>   +      ATH79_MACH_TL_MR3220,           /* TP-LINK TL-MR3220 */
>   +      ATH79_MACH_TL_MR3220_V2,        /* TP-LINK TL-MR3220 v2 */
>   +      ATH79_MACH_TL_MR3420,           /* TP-LINK TL-MR3420 */
>  ++      ATH79_MACH_TL_MR3420_V2,                /* TP-LINK TL-MR3420 v2 */
>   +      ATH79_MACH_TL_WA7510N_V1,       /* TP-LINK TL-WA7510N v1*/
>   +      ATH79_MACH_TL_WA901ND,          /* TP-LINK TL-WA901ND */
>   +      ATH79_MACH_TL_WA901ND_V2,       /* TP-LINK TL-WA901ND v2 */
>  @@ -216,7 +217,7 @@
>    config ATH79_MACH_PB44
>          bool "Atheros PB44 reference board"
>          select SOC_AR71XX
>  -@@ -68,6 +148,488 @@ config ATH79_MACH_PB44
>  +@@ -68,6 +148,489 @@ config ATH79_MACH_PB44
>            Say 'Y' here if you want your kernel to support the
>            Atheros PB44 reference board.
>
>  @@ -613,12 +614,13 @@
>   +      select ATH79_DEV_M25P80
>   +
>   +config ATH79_MACH_TL_WR841N_V8
>  -+      bool "TP-LINK TL-WR841N/ND v8 support"
>  ++      bool "TP-LINK TL-WR841N/ND v8/TL-MR3420 v2 support"
>   +      select SOC_AR934X
>   +      select ATH79_DEV_ETH
>   +      select ATH79_DEV_GPIO_BUTTONS
>   +      select ATH79_DEV_LEDS_GPIO
>   +      select ATH79_DEV_M25P80
>  ++      select ATH79_DEV_USB
>   +      select ATH79_DEV_WMAC
>   +
>   +config ATH79_MACH_TL_WR941ND
>  Index: target/linux/ar71xx/base-files/etc/diag.sh
>  ===================================================================
>  --- target/linux/ar71xx/base-files/etc/diag.sh    (revision 35287)
>  +++ target/linux/ar71xx/base-files/etc/diag.sh    (working copy)
>  @@ -132,6 +132,7 @@
>          tl-mr3220 | \
>          tl-mr3220-v2 | \
>          tl-mr3420 | \
>  +       tl-mr3420-v2 | \
>          tl-wa901nd | \
>          tl-wa901nd-v2 | \
>          tl-wr1041n-v2 | \
>  Index: target/linux/ar71xx/base-files/etc/uci-defaults/leds
>  ===================================================================
>  --- target/linux/ar71xx/base-files/etc/uci-defaults/01_leds    (revision
>  35287)
>  +++ target/linux/ar71xx/base-files/etc/uci-defaults/01_leds    (working
>  copy)
>  @@ -128,6 +128,16 @@
>          ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
>          ;;
>
>  +tl-mr3420-v2)
>  +       ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
>  +       ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0"
>  "0x04"
>  +       ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0"
>  "0x08"
>  +       ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0"
>  "0x10"
>  +       ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0"
>  "0x02"
>  +       ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
>  +       ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
>  +       ;;
>  +
>   tl-wa901nd)
>          ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
>          ;;
>  Index: target/linux/ar71xx/base-files/etc/uci-defaults/network
>  ===================================================================
>  --- target/linux/ar71xx/base-files/etc/uci-defaults/02_network
>  (revision 35287)
>  +++ target/linux/ar71xx/base-files/etc/uci-defaults/02_network    (working
>  copy)
>  @@ -143,6 +143,7 @@
>          ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
>          ;;
>
>  +tl-mr3420-v2 |\
>   tl-wr841n-v8)
>          ucidef_set_interfaces_lan_wan "eth1" "eth0"
>          ucidef_add_switch "switch0" "1" "1"
>  Index: target/linux/ar71xx/base-files/lib/ar71xx.sh
>  ===================================================================
>  --- target/linux/ar71xx/base-files/lib/ar71xx.sh    (revision 35287)
>  +++ target/linux/ar71xx/base-files/lib/ar71xx.sh    (working copy)
>  @@ -357,6 +357,9 @@
>          *TL-MR3420)
>                  name="tl-mr3420"
>                  ;;
>  +       *"TL-MR3420 v2")
>  +               name="tl-mr3420-v2"
>  +               ;;
>          *TL-WA7510N)
>                  name="tl-wa7510n"
>                  ;;
>  Index: target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>  ===================================================================
>  --- target/linux/ar71xx/base-files/lib/upgrade/platform.sh    (revision
>  35287)
>  +++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh    (working
>  copy)
>  @@ -155,6 +155,7 @@
>          tl-mr3220 | \
>          tl-mr3220-v2 | \
>          tl-mr3420 | \
>  +       tl-mr3420-v2 | \
>          tl-wa7510n | \
>          tl-wa901nd | \
>          tl-wa901nd-v2 | \
>  Index: target/linux/ar71xx/image/Makefile
>  ===================================================================
>  --- target/linux/ar71xx/image/Makefile    (revision 35287)
>  +++ target/linux/ar71xx/image/Makefile    (working copy)
>  @@ -883,7 +883,7 @@
>   $(eval $(call SingleProfile,TPLINKOLD,$(fs_squash),TLWR841NV15,tl-
>  wr841nd-v1.5,TL-WR841N-v1.5,ttyS0,115200,0x08410002,2,4M))
>
>   $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3220V1,tl-mr3220-v1
>  ,TL-MR3220,ttyS0,115200,0x32200001,1,4M))
>  -$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3420,tl-mr3420-v1,TL-
>  MR3420,ttyS0,115200,0x34200001,1,4M))
>  +$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3420V1,tl-mr3420-v1
>  ,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
>   $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA701,tl-wa701n-v1,TL-
>  WA901ND,ttyS0,115200,0x07010001,1,4M))
>   $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA7510NV1,tl-wa7510n
>  ,TL-WA7510N,ttyS0,115200,0x75100001,1,4M))
>   $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA801NV1,tl-wa801nd-v1
>  ,TL-WA901ND,ttyS0,115200,0x08010001,1,4M))
>  @@ -907,6 +907,7 @@
>   $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3020,tl-
>  mr3020-v1,TL-MR3020,ttyATH0,115200,0x30200001,1,4Mlzma))
>   $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3040,tl-
>  mr3040-v1,TL-MR3040,ttyATH0,115200,0x30400001,1,4Mlzma))
>   $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3220V2,tl-
>  mr3220-v2,TL-MR3220-v2,ttyATH0,115200,0x32200002,1,4Mlzma))
>  +$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3420V2,tl-
>  mr3420-v2,TL-MR3420-v2,ttyS0,115200,0x34200002,1,4Mlzma))
>   $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR703,tl-wr703n-v1
>  ,TL-WR703N,ttyATH0,115200,0x07030101,1,4Mlzma))
>   $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR740NV4,tl-
>  wr740n-v4,TL-WR741ND-v4,ttyATH0,115200,0x07400004,1,4Mlzma))
>   $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR741NV4,tl-
>  wr741nd-v4,TL-WR741ND-v4,ttyATH0,115200,0x07410004,1,4Mlzma))
>  @@ -956,6 +957,7 @@
>   $(eval $(call MultiProfile,OPENMESH,OM2P MR600))
>   $(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW TEW652BRP_RECOVERY))
>   $(eval $(call MultiProfile,TLMR3220,TLMR3220V1 TLMR3220V2))
>  +$(eval $(call MultiProfile,TLMR3420,TLMR3420V1 TLMR3420V2))
>   $(eval $(call MultiProfile,TLWA801,TLWA801NV1))
>   $(eval $(call MultiProfile,TLWA901,TLWA901NV1 TLWA901NV2))
>   $(eval $(call MultiProfile,TLWA7510,TLWA7510NV1))
>  Index: tools/firmware-utils/src/mktplinkfw.c
>  ===================================================================
>  --- tools/firmware-utils/src/mktplinkfw.c    (revision 35287)
>  +++ tools/firmware-utils/src/mktplinkfw.c    (working copy)
>  @@ -34,6 +34,7 @@
>   #define HWID_TL_MR3220_V1      0x32200001
>   #define HWID_TL_MR3220_V2      0x32200002
>   #define HWID_TL_MR3420_V1      0x34200001
>  +#define HWID_TL_MR3420_V2      0x34200002
>   #define HWID_TL_WA701N_V1      0x07010001
>   #define HWID_TL_WA7510N_V1     0x75100001
>   #define HWID_TL_WA801ND_V1     0x08010001
>  @@ -201,6 +202,11 @@
>                  .hw_rev         = 1,
>                  .layout_id      = "4M",
>          }, {
>  +               .id             = "TL-MR3420v2",
>  +               .hw_id          = HWID_TL_MR3420_V2,
>  +               .hw_rev = 1,
>  +               .layout_id      = "4Mlzma",
>  +       }, {
>                  .id             = "TL-WA701Nv1",
>                  .hw_id          = HWID_TL_WA701N_V1,
>                  .hw_rev         = 1,
>
> --
> Ticket URL: <https://dev.openwrt.org/ticket/12748#comment:3>
> OpenWrt <http://openwrt.org>
> Opensource Wireless Router Technology
>



-- 
Powered by Internet Tangan®

Attachment: mr3420v2_trunk.patch
Description: Binary data

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to