bcm63xx: add support for Innacomm W3400V6
authorSieng Piaw Liew <liew.s.piaw@gmail.com>
Fri, 9 Oct 2020 09:04:03 +0000 (17:04 +0800)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Wed, 9 Dec 2020 07:42:26 +0000 (08:42 +0100)
Innacomm W3400V6 is an xDSL B/G wireless router based on Broadcom BCM6328 SoC.

Hardware:
   SoC:          Broadcom BCM6328
   CPU:          BMIPS4350 V8.0, 320 MHz, 1 core
   Flash:        SPI-NOR 8MB, MX25L6406E
   RAM:          64 MB
   Ethernet:     4x 10/100 Mbps
   Switch:       Integrated
   Wireless:     802.11b/g, BCM4312
   LEDs/Buttons: 9x / 2x

Flash instruction, web UI:
1) Set a static IP on your computer compatible
with 192.168.1.1, i.e 192.168.1.100
2) Connect the ethernet cable from your computer to the router.
3) Make sure the router is powered off.
4) Press the reset button, don't release it yet!
5) While pressing reset, power on the router.
6) Wait 10 seconds or more.
Note: The power LED is red at first then turns to solid
green when ready.
8) Release the reset button.
9) Browse to 192.168.1.1
10) Select .bin file.
10) Upgrade the image.
11) Wait for it to reboot.

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
[Ammend commit description, merge patches, DT improvements]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
12 files changed:
target/linux/bcm63xx/base-files/etc/board.d/02_network
target/linux/bcm63xx/dts/bcm6328-innacomm-w3400v6.dts [new file with mode: 0644]
target/linux/bcm63xx/image/bcm63xx.mk
target/linux/bcm63xx/patches-5.4/512-board_bcm6328.patch
target/linux/bcm63xx/patches-5.4/513-board-bcm6338.patch
target/linux/bcm63xx/patches-5.4/514-board_bcm6345.patch
target/linux/bcm63xx/patches-5.4/515-board-bcm6348.patch
target/linux/bcm63xx/patches-5.4/516-board-bcm6358.patch
target/linux/bcm63xx/patches-5.4/517-board_bcm6362.patch
target/linux/bcm63xx/patches-5.4/518-board_bcm6368.patch
target/linux/bcm63xx/patches-5.4/519-board_bcm63268.patch
target/linux/bcm63xx/patches-5.4/531-board_bcm6348-bt-voyager-2500v-bb.patch

index 700439ec36f6226a4eb963b9227dde219d096164..cca607fce1a8187858f202e784b0011b7dd51390 100755 (executable)
@@ -100,6 +100,7 @@ huawei,echolife-hg556a-c)
                "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "5t@eth0"
        ;;
 comtrend,ar-5315u|\
+innacomm,w3400v6|\
 observa,vh4032n|\
 sagem,fast-2704n)
        ucidef_add_switch "switch0" \
diff --git a/target/linux/bcm63xx/dts/bcm6328-innacomm-w3400v6.dts b/target/linux/bcm63xx/dts/bcm6328-innacomm-w3400v6.dts
new file mode 100644 (file)
index 0000000..dd8ab12
--- /dev/null
@@ -0,0 +1,118 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "bcm6328.dtsi"
+
+#include <dt-bindings/input/input.h>
+
+/ {
+       model = "Innacomm W3400V6";
+       compatible = "innacomm,w3400v6", "brcm,bcm6328";
+
+       aliases {
+               led-boot = &led_power_green;
+               led-failsafe = &led_power_red;
+               led-running = &led_power_green;
+               led-upgrade = &led_power_green;
+       };
+
+       chosen {
+               bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
+               stdout-path = "serial0:115200n8";
+       };
+
+       keys {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+
+               wps {
+                       label = "wps";
+                       gpios = <&pinctrl 15 1>;
+                       linux,code = <KEY_WPS_BUTTON>;
+                       debounce-interval = <60>;
+               };
+
+               reset {
+                       label = "reset";
+                       gpios = <&pinctrl 23 1>;
+                       linux,code = <KEY_RESTART>;
+                       debounce-interval = <60>;
+               };
+       };
+};
+
+&hsspi {
+       status = "okay";
+
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               spi-max-frequency = <16666667>;
+               spi-tx-bus-width = <2>;
+               spi-rx-bus-width = <2>;
+               reg = <0>;
+
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               partitions {
+                       compatible = "brcm,bcm963xx-cfe-nor-partitions";
+               };
+       };
+};
+
+&leds {
+       status = "okay";
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_leds>;
+
+       led@1 {
+               reg = <1>;
+               active-low;
+               label = "green:inet";
+       };
+
+       led@2 {
+               reg = <2>;
+               active-low;
+               label = "red:inet";
+       };
+
+       led@3 {
+               reg = <3>;
+               active-low;
+               label = "green:dsl";
+       };
+
+       led_power_green: led@4 {
+               reg = <4>;
+               active-low;
+               label = "green:power";
+               default-state = "on";
+       };
+
+       led_power_red: led@5 {
+               reg = <5>;
+               active-low;
+               label = "red:power";
+       };
+
+       led@11 {
+               reg = <11>;
+               active-low;
+               label = "green:wps";
+       };
+};
+
+&pinctrl {
+       pinctrl_leds: leds {
+               function = "led";
+               pins = "gpio1", "gpio2", "gpio3",
+                      "gpio4", "gpio5", "gpio11";
+       };
+};
+
+&uart0 {
+       status = "okay";
+};
index 773f098dea0a50cf479e71b1ab3eab0346ad93ce..24b150c063c778f53c15fdf1089100bff8642bcb 100644 (file)
@@ -781,6 +781,18 @@ define Device/huawei_echolife-hg655b
 endef
 TARGET_DEVICES += huawei_echolife-hg655b
 
+### Innacomm ###
+define Device/innacomm_w3400v6
+  $(Device/bcm63xx)
+  DEVICE_VENDOR := Innacomm
+  DEVICE_MODEL := W3400V6
+  CFE_BOARD_ID := 96328ang
+  CHIP_ID := 6328
+  FLASH_MB := 8
+  DEVICE_PACKAGES := $(B43_PACKAGES)
+endef
+TARGET_DEVICES += innacomm_w3400v6
+
 ### Inteno ###
 define Device/inteno_vg50
   $(Device/bcm63xx)
index ae0c538660b5343b458cecb6c2590c00538e0d08..e28ff912cb3bf376819fa265b296b6f8a9d85407 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -348,6 +348,611 @@ static struct board_info __initdata boar
+@@ -348,6 +348,651 @@ static struct board_info __initdata boar
                },
        },
  };
 +              .pci_bus = 1,
 +              .pci_dev = 0,
 +      },
++};
++
++static struct board_info __initdata board_W3400V6 = {
++      .name = "96328ang",
++      .expected_cpu_id = 0x6328,
++
++      .has_pci = 1,
++
++      .has_enetsw = 1,
++      .enetsw = {
++              .used_ports = {
++                      [0] = {
++                              .used = 1,
++                              .phy_id = 1,
++                              .name = "Port 1",
++                      },
++                      [1] = {
++                              .used = 1,
++                              .phy_id = 2,
++                              .name = "Port 2",
++                      },
++                      [2] = {
++                              .used = 1,
++                              .phy_id = 3,
++                              .name = "Port 3",
++                      },
++                      [3] = {
++                              .used = 1,
++                              .phy_id = 4,
++                              .name = "Port 4",
++                      },
++              },
++      },
++
++      .use_fallback_sprom = 1,
++      .fallback_sprom = {
++              .type = SPROM_BCM4318,
++              .pci_bus = 1,
++              .pci_dev = 0,
++      },
 +};
  #endif /* CONFIG_BCM63XX_CPU_6328 */
  
  /*
-@@ -703,6 +1308,19 @@ static const struct board_info __initcon
+@@ -703,6 +1348,20 @@ static const struct board_info __initcon
  #endif /* CONFIG_BCM63XX_CPU_6318 */
  #ifdef CONFIG_BCM63XX_CPU_6328
        &board_96328avng,
 +      &board_TG582N,
 +      &board_TG582N_TELECOM_ITALIA,
 +      &board_R5010UNV2,
++      &board_W3400V6,
  #endif /* CONFIG_BCM63XX_CPU_6328 */
  #ifdef CONFIG_BCM63XX_CPU_6338
        &board_96338gw,
-@@ -742,7 +1360,22 @@ static struct of_device_id const bcm963x
+@@ -742,7 +1401,23 @@ static struct of_device_id const bcm963x
        { .compatible = "sagem,fast-2704n", .data = &board_FAST2704N, },
  #endif /* CONFIG_BCM63XX_CPU_6318 */
  #ifdef CONFIG_BCM63XX_CPU_6328
 +      { .compatible = "comtrend,ar-5387un", .data = &board_AR5387un, },
 +      { .compatible = "d-link,dsl-274xb-f1", .data = &board_dsl_274xb_f1, },
 +      { .compatible = "d-link,dsl-2750u-c1", .data = &board_A4001N, },
++      { .compatible = "innacomm,w3400v6", .data = &board_W3400V6, },
 +      { .compatible = "nucom,r5010un-v2", .data = &board_R5010UNV2, },
 +      { .compatible = "sagem,fast-2704-v2", .data = &board_FAST2704V2, },
 +      { .compatible = "sercomm,ad1018", .data = &board_AD1018, },
index 9319f974accab8cfb85bcb1d7611940d44b1a461..f3847c8140f76fc88ddd377769bed69ec637bda9 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -986,6 +986,32 @@ static struct board_info __initdata boar
+@@ -1026,6 +1026,32 @@ static struct board_info __initdata boar
                .force_duplex_full      = 1,
        },
  };
@@ -33,7 +33,7 @@
  #endif /* CONFIG_BCM63XX_CPU_6338 */
  
  /*
-@@ -1325,6 +1351,8 @@ static const struct board_info __initcon
+@@ -1366,6 +1392,8 @@ static const struct board_info __initcon
  #ifdef CONFIG_BCM63XX_CPU_6338
        &board_96338gw,
        &board_96338w,
@@ -42,7 +42,7 @@
  #endif /* CONFIG_BCM63XX_CPU_6338 */
  #ifdef CONFIG_BCM63XX_CPU_6345
        &board_96345gw2,
-@@ -1380,6 +1408,8 @@ static struct of_device_id const bcm963x
+@@ -1422,6 +1450,8 @@ static struct of_device_id const bcm963x
  #ifdef CONFIG_BCM63XX_CPU_6338
        { .compatible = "brcm,bcm96338gw", .data = &board_96338gw, },
        { .compatible = "brcm,bcm96338w", .data = &board_96338w, },
index 3b1f2842b5f1c978282965d413718bafd8add8f1..3f84c953851030cc5c97f4d1f5b7d95d1a8a09f3 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1022,6 +1022,19 @@ static struct board_info __initdata boar
+@@ -1062,6 +1062,19 @@ static struct board_info __initdata boar
        .name                           = "96345GW2",
        .expected_cpu_id                = 0x6345,
  };
@@ -20,7 +20,7 @@
  #endif /* CONFIG_BCM63XX_CPU_6345 */
  
  /*
-@@ -1356,6 +1369,7 @@ static const struct board_info __initcon
+@@ -1397,6 +1410,7 @@ static const struct board_info __initcon
  #endif /* CONFIG_BCM63XX_CPU_6338 */
  #ifdef CONFIG_BCM63XX_CPU_6345
        &board_96345gw2,
@@ -28,7 +28,7 @@
  #endif /* CONFIG_BCM63XX_CPU_6345 */
  #ifdef CONFIG_BCM63XX_CPU_6348
        &board_96348r,
-@@ -1413,6 +1427,8 @@ static struct of_device_id const bcm963x
+@@ -1455,6 +1469,8 @@ static struct of_device_id const bcm963x
  #endif /* CONFIG_BCM63XX_CPU_6338 */
  #ifdef CONFIG_BCM63XX_CPU_6345
        { .compatible = "brcm,bcm96345gw2", .data = &board_96345gw2, },
index eb3eb26dd0dcc8d0f6713a3e5fb58f73b3f75803..891184eedd89731bd9c9642d72af71d6def665b5 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1221,6 +1221,275 @@ static struct board_info __initdata boar
+@@ -1261,6 +1261,275 @@ static struct board_info __initdata boar
  
        .has_ohci0 = 1,
  };
  #endif /* CONFIG_BCM63XX_CPU_6348 */
  
  /*
-@@ -1380,6 +1649,19 @@ static const struct board_info __initcon
+@@ -1421,6 +1690,19 @@ static const struct board_info __initcon
        &board_DV201AMR,
        &board_96348gw_a,
        &board_rta1025w_16,
  #endif /* CONFIG_BCM63XX_CPU_6348 */
  #ifdef CONFIG_BCM63XX_CPU_6358
        &board_96358vw,
-@@ -1431,15 +1713,29 @@ static struct of_device_id const bcm963x
+@@ -1473,15 +1755,29 @@ static struct of_device_id const bcm963x
        { .compatible = "dynalink,rta770w", .data = &board_rta770w, },
  #endif /* CONFIG_BCM63XX_CPU_6345 */
  #ifdef CONFIG_BCM63XX_CPU_6348
index 6af94bdbe085257350b859bc515bd3c60ebe4d7d..c1a4e9bbd51346e0cc1b474bf391069870153340 100644 (file)
@@ -8,7 +8,7 @@
  #include <asm/addrspace.h>
  #include <bcm63xx_board.h>
  #include <bcm63xx_cpu.h>
-@@ -1574,6 +1575,88 @@ static struct board_info __initdata boar
+@@ -1614,6 +1615,88 @@ static struct board_info __initdata boar
        .has_ehci0 = 1,
  };
  
@@ -97,7 +97,7 @@
  static struct board_info __initdata board_DWVS0 = {
        .name                           = "DWV-S0",
        .expected_cpu_id                = 0x6358,
-@@ -1598,6 +1681,238 @@ static struct board_info __initdata boar
+@@ -1638,6 +1721,238 @@ static struct board_info __initdata boar
        .has_ohci0                      = 1,
        .has_ehci0                      = 1,
  };
  #endif /* CONFIG_BCM63XX_CPU_6358 */
  
  /*
-@@ -1667,7 +1982,20 @@ static const struct board_info __initcon
+@@ -1708,7 +2023,20 @@ static const struct board_info __initcon
        &board_96358vw,
        &board_96358vw2,
        &board_AGPFS0,
  #endif /* CONFIG_BCM63XX_CPU_6358 */
  };
  
-@@ -1743,11 +2071,24 @@ static struct of_device_id const bcm963x
+@@ -1785,11 +2113,24 @@ static struct of_device_id const bcm963x
        { .compatible = "alcatel,rg100a", .data = &board_96358vw2, },
        { .compatible = "brcm,bcm96358vw", .data = &board_96358vw, },
        { .compatible = "brcm,bcm96358vw2", .data = &board_96358vw2, },
index c917914dd17b30254cb456308184f3813ded6e8c..71a84937a2dcc49c595a249c9af138ffaef2f167 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1915,6 +1915,117 @@ static struct board_info __initdata boar
+@@ -1955,6 +1955,117 @@ static struct board_info __initdata boar
  };
  #endif /* CONFIG_BCM63XX_CPU_6358 */
  
  /*
   * all boards
   */
-@@ -1997,6 +2108,12 @@ static const struct board_info __initcon
+@@ -2038,6 +2149,12 @@ static const struct board_info __initcon
        &board_nb4_fxc_r1,
        &board_spw303v,
  #endif /* CONFIG_BCM63XX_CPU_6358 */
  };
  
  static struct of_device_id const bcm963xx_boards_dt[] = {
-@@ -2091,6 +2208,10 @@ static struct of_device_id const bcm963x
+@@ -2133,6 +2250,10 @@ static struct of_device_id const bcm963x
        { .compatible = "telsey,cpva642", .data = &board_CPVA642, },
  #endif /* CONFIG_BCM63XX_CPU_6358 */
  #ifdef CONFIG_BCM63XX_CPU_6362
index 31d724ca24a4631743182bd6402f86d401ff70ea..4b85e0bbabc24501e290f6c52a858a8cc5f87d41 100644 (file)
@@ -9,7 +9,7 @@
  #include <asm/addrspace.h>
  #include <bcm63xx_board.h>
  #include <bcm63xx_cpu.h>
-@@ -2027,6 +2029,648 @@ static struct board_info __initdata boar
+@@ -2067,6 +2069,648 @@ static struct board_info __initdata boar
  #endif /* CONFIG_BCM63XX_CPU_6362 */
  
  /*
   * all boards
   */
  static const struct board_info __initconst *bcm963xx_boards[] = {
-@@ -2114,6 +2758,22 @@ static const struct board_info __initcon
+@@ -2155,6 +2799,22 @@ static const struct board_info __initcon
        &board_hg253s_v2,
        &board_nb6,
  #endif /* CONFIG_BCM63XX_CPU_6362 */
  };
  
  static struct of_device_id const bcm963xx_boards_dt[] = {
-@@ -2214,6 +2874,20 @@ static struct of_device_id const bcm963x
+@@ -2256,6 +2916,20 @@ static struct of_device_id const bcm963x
        { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, },
  #endif /* CONFIG_BCM63XX_CPU_6362 */
  #ifdef CONFIG_BCM63XX_CPU_6368
index 20fbf5e68e942d08a45871049187069fefc33e57..f46cbbedc703114bbd96b3e9ba024991305f20ff 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -2671,6 +2671,273 @@ static struct board_info __initdata boar
+@@ -2711,6 +2711,273 @@ static struct board_info __initdata boar
  #endif /* CONFIG_BCM63XX_CPU_6368 */
  
  /*
   * all boards
   */
  static const struct board_info __initconst *bcm963xx_boards[] = {
-@@ -2774,6 +3041,15 @@ static const struct board_info __initcon
+@@ -2815,6 +3082,15 @@ static const struct board_info __initcon
        &board_VR3026e,
        &board_WAP5813n,
  #endif /* CONFIG_BCM63XX_CPU_6368 */
  };
  
  static struct of_device_id const bcm963xx_boards_dt[] = {
-@@ -2890,6 +3166,14 @@ static struct of_device_id const bcm963x
+@@ -2932,6 +3208,14 @@ static struct of_device_id const bcm963x
        { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, },
  #endif /* CONFIG_BCM63XX_CPU_6368 */
  #ifdef CONFIG_BCM63XX_CPU_63268
index 23fefee97a5c550cdefef98d10d0e7d5c4727a92..ec49e933d64674f7c47c000d43ae437d88b34992 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -3202,6 +3202,22 @@ void __init board_bcm963xx_init(void)
+@@ -3244,6 +3244,22 @@ void __init board_bcm963xx_init(void)
                val &= MPI_CSBASE_BASE_MASK;
        }
        boot_addr = (u8 *)KSEG1ADDR(val);