Support for Comtrend VR-3025u and VR-3025un.

This patch adds support for both VR-3025u and VR-3025un.
Due to these routers are very close in terms of board definitions because the only differences are a led name and the board_id, the patch covers both boards.

Signed off by: José Vázquez Fernández <ppvazquez...@gmail.com>
Signed off by: Álvaro Fernández <nolt...@gmail.com>

Index: target/linux/brcm63xx/image/Makefile
===================================================================
--- target/linux/brcm63xx/image/Makefile        (revisión: 40826)
+++ target/linux/brcm63xx/image/Makefile        (copia de trabajo)
@@ -190,6 +190,10 @@
        $(call Image/Build/CFE,$(1),96368MVNgr,6368,96368MVNgr-generic)
        $(call Image/Build/CFE,$(1),96368MVWG,6368,96368MVWG-generic)

+       # Comtrend VR-3025xx
+       $(call Image/Build/CFE,$(1),96368M-1541N,6368,VR-3025u,,--pad 16)
+       $(call Image/Build/CFE,$(1),96368M-1341N,6368,VR-3025un,,--pad 4)
+
        # Asmax AR 1004g
        $(call Image/Build/CFEFIXUP,$(1),96348GW-10,AR1004G,6348,AR1004G)
        # BT Voyager V210_BTR
Index: target/linux/brcm63xx/patches-3.10/561-VR_3025.patch
===================================================================
--- target/linux/brcm63xx/patches-3.10/561-VR_3025.patch        (revisión: 0)
+++ target/linux/brcm63xx/patches-3.10/561-VR_3025.patch        (revisión: 0)
@@ -0,0 +1,202 @@
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -4334,6 +4334,190 @@ static struct board_info __initdata boar
+  * known 6368 boards
+  */
+ #ifdef CONFIG_BCM63XX_CPU_6368
++static struct board_info __initdata board_VR3025u = {
++      .name                                   = "96368M-1541N",
++      .expected_cpu_id                = 0x6368,
++
++      .has_uart0                              = 1,
++      .has_pci                                = 1,
++      .has_ohci0                              = 1,
++      .has_ehci0                              = 1,
++
++      .has_enetsw                             = 1,
++      .enetsw = {
++              .used_ports = {
++                      [0] = {
++                              .used           = 1,
++                              .phy_id         = 1,
++                              .name           = "port1",
++                      },
++                      [1] = {
++                              .used           = 1,
++                              .phy_id         = 2,
++                              .name           = "port2",
++                      },
++                      [2] = {
++                              .used           = 1,
++                              .phy_id         = 3,
++                              .name           = "port3",
++                      },
++                      [3] = {
++                              .used           = 1,
++                              .phy_id         = 4,
++                              .name           = "port4",
++                      },
++              },
++      },
++
++      .leds = {
++              {
++                      .name           = "VR-3025u:green:dsl",
++                      .gpio           = 2,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "VR-3025u:green:inet",
++                      .gpio           = 5,
++              },
++              {
++                      .name           = "VR-3025u:green:lan1",
++                      .gpio           = 6,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "VR-3025u:green:lan2",
++                      .gpio           = 7,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "VR-3025u:green:lan3",
++                      .gpio           = 8,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "VR-3025u:green:lan4",
++                      .gpio           = 9,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "VR-3025u:green:power",
++                      .gpio           = 22,
++                      .default_trigger = "default-on",
++              },
++              {
++                      .name           = "VR-3025u:red:power",
++                      .gpio           = 24,
++              },
++              {
++                      .name           = "VR-3025u:red:inet",
++                      .gpio           = 31,
++              },
++      },
++
++      .buttons = {
++              {
++                      .desc                   = "reset",
++                      .gpio                   = 34,
++                      .type                   = EV_KEY,
++                      .code                   = KEY_RESTART,
++                      .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++                      .active_low             = 1,
++              },
++      },
++};
++
++static struct board_info __initdata board_VR3025un = {
++      .name                                   = "96368M-1341N",
++      .expected_cpu_id                = 0x6368,
++
++      .has_uart0                              = 1,
++      .has_pci                                = 1,
++      .has_ohci0                              = 1,
++      .has_ehci0                              = 1,
++
++      .has_enetsw                             = 1,
++      .enetsw = {
++              .used_ports = {
++                      [0] = {
++                              .used           = 1,
++                              .phy_id         = 1,
++                              .name           = "port1",
++                      },
++                      [1] = {
++                              .used           = 1,
++                              .phy_id         = 2,
++                              .name           = "port2",
++                      },
++                      [2] = {
++                              .used           = 1,
++                              .phy_id         = 3,
++                              .name           = "port3",
++                      },
++                      [3] = {
++                              .used           = 1,
++                              .phy_id         = 4,
++                              .name           = "port4",
++                      },
++              },
++      },
++
++      .leds = {
++              {
++                      .name           = "VR-3025un:green:dsl",
++                      .gpio           = 2,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "VR-3025un:green:inet",
++                      .gpio           = 5,
++              },
++              {
++                      .name           = "VR-3025un:green:lan1",
++                      .gpio           = 6,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "VR-3025un:green:lan2",
++                      .gpio           = 7,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "VR-3025un:green:lan3",
++                      .gpio           = 8,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "VR-3025un:green:iptv",
++                      .gpio           = 9,
++                      .active_low     = 1,
++              },
++              {
++                      .name           = "VR-3025un:green:power",
++                      .gpio           = 22,
++                      .default_trigger = "default-on",
++              },
++              {
++                      .name           = "VR-3025un:red:power",
++                      .gpio           = 24,
++              },
++              {
++                      .name           = "VR-3025un:red:inet",
++                      .gpio           = 31,
++              },
++      },
++
++      .buttons = {
++              {
++                      .desc                   = "reset",
++                      .gpio                   = 34,
++                      .type                   = EV_KEY,
++                      .code                   = KEY_RESTART,
++                      .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
++                      .active_low             = 1,
++              },
++      },
++};
++
+ static struct board_info __initdata board_96368mvwg = {
+       .name                           = "96368MVWG",
+       .expected_cpu_id                = 0x6368,
+@@ -4854,6 +5038,8 @@ static const struct board_info __initcon
+ #endif
+
+ #ifdef CONFIG_BCM63XX_CPU_6368
++      &board_VR3025u,
++      &board_VR3025un,
+       &board_96368mvwg,
+       &board_96368mvngr,
+ #endif
Index: target/linux/brcm63xx/patches-3.10/801-ssb_export_fallback_sprom.patch
===================================================================
--- target/linux/brcm63xx/patches-3.10/801-ssb_export_fallback_sprom.patch (revisión: 40826) +++ target/linux/brcm63xx/patches-3.10/801-ssb_export_fallback_sprom.patch (copia de trabajo)
@@ -8,7 +8,7 @@
  #include <linux/spi/spi.h>
  #include <linux/spi/spi_gpio.h>
  #include <linux/spi/74x164.h>
-@@ -4869,7 +4870,7 @@ static const struct board_info __initcon
+@@ -5055,7 +5056,7 @@ static const struct board_info __initcon
   * bcm4318 WLAN work
   */
  #ifdef CONFIG_SSB_PCIHOST
@@ -17,7 +17,7 @@
        .revision               = 0x02,
        .board_rev              = 0x17,
        .country_code           = 0x0,
-@@ -4889,6 +4890,7 @@ static struct ssb_sprom bcm63xx_sprom =
+@@ -5075,6 +5076,7 @@ static struct ssb_sprom bcm63xx_sprom =
        .boardflags_lo          = 0x2848,
        .boardflags_hi          = 0x0000,
  };
Index: target/linux/brcm63xx/base-files/etc/uci-defaults/02_network
===================================================================
--- target/linux/brcm63xx/base-files/etc/uci-defaults/02_network (revisión: 40826) +++ target/linux/brcm63xx/base-files/etc/uci-defaults/02_network (copia de trabajo)
@@ -81,6 +81,8 @@
 96328A-1441N1 |\
 963281TAN |\
 963281T_TEF |\
+96368M-1341N |\
+96368M-1541N |\
 96368MVNgr |\
 "F@ST2504n" |\
 "F@ST2704V2")
Index: target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
===================================================================
--- target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc (revisión: 40826) +++ target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc (copia de trabajo)
@@ -20,6 +20,8 @@
        963281T_TEF |\
        96358-502V |\
        "CPVA502+" |\
+       96368M-1341N |\
+       96368M-1541N |\
        AW4339U |\
        CPVA642 |\
        CT6373-1 |\
Index: target/linux/brcm63xx/base-files/lib/brcm63xx.sh
===================================================================
--- target/linux/brcm63xx/base-files/lib/brcm63xx.sh    (revisión: 40826)
+++ target/linux/brcm63xx/base-files/lib/brcm63xx.sh    (copia de trabajo)
@@ -95,6 +95,18 @@
                brcm63xx_has_reset_button="true"
                ifname=eth0
                ;;
+       "96368M-1341N")
+               board_model="Comtrend VR-3025un"
+               status_led="VR-3025un:green:power"
+               brcm63xx_has_reset_button="true"
+               ifname="eth0"
+               ;;
+       "96368M-1541N")
+               board_model="Comtrend VR-3025u"
+               status_led="VR-3025u:green:power"
+               brcm63xx_has_reset_button="true"
+               ifname="eth0"
+               ;;
        AW4139 |\
        AW4339U)
                status_led="dsl-274xb:green:power"
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to