Add support for the Observa VH4032N router.

It's a BCM6368 based board with 128MB RAM, 32MB flash.
Equiped with an onboard USB hub. This hub has the RST#
pin wired to the GPIO27 pin. For pulling the chip out of reset,
we use ephy_reset since there isn't specific code for this
function in the USB driver.

The board has also switch LEDs, but they don't work as it 
happens with other bcm6368 boards. The GPIO pinmux
still needs to be fixed for these hw controlled switch LEDs.

Signed-off-by: Daniel Gonzalez <dgcb...@gmail.com>
diff -urN ./target/linux/brcm63xx/profiles/observa.mk 
./target/linux/brcm63xx/profiles/observa.mk
--- ./target/linux/brcm63xx/profiles/observa.mk 1970-01-01 01:00:00.000000000 
+0100
+++ ./target/linux/brcm63xx/profiles/observa.mk 2016-04-20 21:13:56.680702590 
+0200
@@ -0,0 +1,9 @@
+define Profile/VH4032N
+  NAME:=Observa Telecom VH4032N 
+  PACKAGES:=kmod-b43 kmod-usb-core kmod-usb-ohci kmod-usb2 wpad-mini
+endef
+define Profile/VH4032N/Description
+       Package set for the Observa Telecom VH4032N
+endef
+$(eval $(call Profile,VH4032N))
+
diff -urN ./target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc 
./target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
--- ./target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc      
2016-04-20 14:23:53.371339556 +0200
+++ ./target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc      
2016-04-20 19:41:14.853717064 +0200
@@ -30,6 +30,7 @@
        spw303v |\
        v2110 |\
        v2500v_bb |\
+       vh4032n |\
        vr-3025u |\
        vr-3025un |\
        vr-3026e |\
diff -urN ./target/linux/brcm63xx/base-files/etc/board.d/02_network 
./target/linux/brcm63xx/base-files/etc/board.d/02_network
--- ./target/linux/brcm63xx/base-files/etc/board.d/02_network   2016-04-20 
14:23:53.371339556 +0200
+++ ./target/linux/brcm63xx/base-files/etc/board.d/02_network   2016-04-20 
19:41:14.853717064 +0200
@@ -90,6 +90,7 @@
 hg655b |\
 p870hw-51a_v2 |\
 r5010un_v2 |\
+vh4032n |\
 vr-3025un |\
 vr-3025u |\
 vr-3026e)
diff -urN ./target/linux/brcm63xx/base-files/etc/diag.sh 
./target/linux/brcm63xx/base-files/etc/diag.sh
--- ./target/linux/brcm63xx/base-files/etc/diag.sh      2016-04-20 
14:23:53.371339556 +0200
+++ ./target/linux/brcm63xx/base-files/etc/diag.sh      2016-04-20 
19:30:24.628933412 +0200
@@ -30,6 +30,9 @@
        bcm96348gw-11)
                status_led="96348GW-11:green:power"
                ;;
+       vh4032n)
+               status_led="VH4032N:red:power"
+               ;;
        spw303v)
                status_led="spw303v:green:power+adsl"
                ;;
diff -urN ./target/linux/brcm63xx/base-files/lib/brcm63xx.sh 
./target/linux/brcm63xx/base-files/lib/brcm63xx.sh
--- ./target/linux/brcm63xx/base-files/lib/brcm63xx.sh  2016-04-20 
14:23:53.371339556 +0200
+++ ./target/linux/brcm63xx/base-files/lib/brcm63xx.sh  2016-04-20 
20:53:21.196234734 +0200
@@ -186,6 +186,9 @@
        "NuCom R5010UN v2")
                board_name="r5010un_v2"
                ;;
+       "Observa VH4032N")
+               board_name="vh4032n"
+               ;;
        "Pirelli A226G")
                board_name="a226g"
                ;;
diff -urN ./target/linux/brcm63xx/dts/vh4032n.dts 
./target/linux/brcm63xx/dts/vh4032n.dts
--- ./target/linux/brcm63xx/dts/vh4032n.dts     1970-01-01 01:00:00.000000000 
+0100
+++ ./target/linux/brcm63xx/dts/vh4032n.dts     2016-04-20 20:21:35.905231536 
+0200
@@ -0,0 +1,89 @@
+/dts-v1/;
+
+#include "bcm6368.dtsi"
+
+#include <dt-bindings/input/input.h>
+
+/ {
+       model = "Observa VH4032N";
+       compatible = "observa,vh4032n", "brcm,bcm6368";
+
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+               debounce-interval = <60>;
+
+               reset {
+                       label = "reset";
+                       gpios = <&gpio1 2 1>;
+                       linux,code = <KEY_RESTART>;
+               };
+               wps {
+                       label = "wps";
+                       gpios = <&gpio1 3 1>;
+                       linux,code = <KEY_WPS_BUTTON>;
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               dsl_blue {
+                       label = "VH4032N:blue:dsl";
+                       gpios = <&gpio0 2 1>;
+               };
+               dsl_red {
+                       label = "VH4032N:red:dsl";
+                       gpios = <&gpio0 5 1>;
+               };
+               hspa_blue {
+                       label = "VH4032N:blue:hspa";
+                       gpios = <&gpio0 11 1>;
+               };
+               hspa_red {
+                       label = "VH4032N:red:hspa";
+                       gpios = <&gpio0 12 1>;
+               };
+               power_blue {
+                       label = "VH4032N:blue:power";
+                       gpios = <&gpio0 22 0>;
+               };
+               power_red {
+                       label = "VH4032N:red:power";
+                       gpios = <&gpio0 24 0>;
+                       default-state = "on";
+               };
+               voice_blue {
+                       label = "VH4032N:blue:voice";
+                       gpios = <&gpio0 25 1>;
+               };
+               voice_red {
+                       label = "VH4032N:red:voice";
+                       gpios = <&gpio0 26 1>;
+               };
+       };
+};
+
+&pflash {
+       status = "ok";
+
+       linux,part-probe = "bcm63xxpart";
+
+       cfe@0 {
+               label = "CFE";
+               reg = <0x0000000 0x0020000>;
+               read-only;
+       };
+
+       linux@20000 {
+               label = "linux";
+               reg = <0x0020000 0x1fc0000>;
+       };
+
+       nvram@1fe0000 {
+               label = "nvram";
+               reg = <0x1fe0000 0x020000>;
+       };
+};
\ No newline at end of file
diff -urN ./target/linux/brcm63xx/image/Makefile 
./target/linux/brcm63xx/image/Makefile
--- ./target/linux/brcm63xx/image/Makefile      2016-04-20 14:23:53.379343455 
+0200
+++ ./target/linux/brcm63xx/image/Makefile      2016-04-20 20:59:38.543490836 
+0200
@@ -595,6 +595,9 @@
 $(eval $(call 
bcm63xxCfeNetgear,DGND3700v1_3800B,DGND3800B,dgnd3700v1,96368MVWG,6368,--image-offset
 0x20000 --block-size 0x20000,U12L144T11_NETGEAR_NEWLED,1))
 # NuCom R5010UNv2
 $(eval $(call bcm63xxCfe,R5010UNV2,R5010UNv2,r5010unv2,96328ang,6328,--pad 8))
+# Observa VH4032N
+$(eval $(call bcm63xxCfe,VH4032N,VH4032N,vh4032n,96368VVW,6368,--image-offset 
0x20000 --block-size 0x20000 --pad 16))
+$(eval $(call 
bcm63xxCfe,VH4032N,VH4032N-sysupgrade,vh4032n,96368VVW,6368,--image-offset 
0x20000 --block-size 0x20000))
 # Pirelli Alice Gate VoIP 2 Plus Wi-Fi AGPF-S0
 $(eval $(call bcm63xxCfe,AGPF_S0,AGV2+W,agpf-s0,AGPF-S0,6358,--block-size 
0x20000 --image-offset 0x20000 --signature2 IMAGE --tag-version 8))
 # Pirelli A226G
diff -urN ./target/linux/brcm63xx/patches-4.1/575-board_VH4032N.patch 
./target/linux/brcm63xx/patches-4.1/575-board_VH4032N.patch
--- ./target/linux/brcm63xx/patches-4.1/575-board_VH4032N.patch 1970-01-01 
01:00:00.000000000 +0100
+++ ./target/linux/brcm63xx/patches-4.1/575-board_VH4032N.patch 2016-04-20 
21:09:05.696360759 +0200
@@ -0,0 +1,68 @@
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c        2016-04-21 
13:16:08.000000000 +0200
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c        2016-04-22 
12:39:36.540538748 +0200
+@@ -2309,6 +2309,49 @@
+       },
+ };
+ 
++static struct board_info __initdata board_VH4032N = {
++      .name                           = "VH4032N",
++      .expected_cpu_id                = 0x6368,
++
++      .has_uart0                      = 1,
++      .has_pci                        = 1,
++      .has_ohci0                      = 1,
++      .has_ehci0                      = 1,
++      .num_usbh_ports                 = 2,
++
++      // Reset onboard USB hub chip using bcm63xx_enet driver. FIXME
++      .ephy_reset_gpio                = 27,
++      .ephy_reset_gpio_flags          = GPIO_ACTIVE_LOW,
++
++      .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",
++                      },
++              },
++      },
++
++      .use_fallback_sprom             = 1,
++};
++
+ static struct b53_platform_data WAP5813n_b53_pdata = {
+       .alias = "eth0",
+ };
+@@ -2613,6 +2672,7 @@
+       &board_HG622,
+       &board_HG655b,
+       &board_P870HW51A_V2,
++      &board_VH4032N,
+       &board_VR3025u,
+       &board_VR3025un,
+       &board_VR3026e,
+@@ -2722,6 +2782,7 @@
+       { .compatible = "huawei,hg622", .data = &board_HG622, },
+       { .compatible = "huawei,hg655b", .data = &board_HG655b, },
+       { .compatible = "netgear,dgnd3700v1", .data = &board_DGND3700v1_3800B, 
},
++      { .compatible = "observa,vh4032n", .data = &board_VH4032N, },
+       { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, },
+ #endif
+ #ifdef CONFIG_BCM63XX_CPU_63268
diff -urN ./target/linux/brcm63xx/patches-4.4/575-board_VH4032N.patch 
./target/linux/brcm63xx/patches-4.4/575-board_VH4032N.patch
--- ./target/linux/brcm63xx/patches-4.4/575-board_VH4032N.patch 1970-01-01 
01:00:00.000000000 +0100
+++ ./target/linux/brcm63xx/patches-4.4/575-board_VH4032N.patch 2016-04-20 
21:09:05.696360759 +0200
@@ -0,0 +1,68 @@
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c        2016-04-21 
13:16:08.000000000 +0200
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c        2016-04-22 
12:39:36.540538748 +0200
+@@ -2310,6 +2310,49 @@
+       },
+ };
+ 
++static struct board_info __initdata board_VH4032N = {
++      .name                           = "VH4032N",
++      .expected_cpu_id                = 0x6368,
++
++      .has_uart0                      = 1,
++      .has_pci                        = 1,
++      .has_ohci0                      = 1,
++      .has_ehci0                      = 1,
++      .num_usbh_ports                 = 2,
++
++      // Reset onboard USB hub chip using bcm63xx_enet driver. FIXME
++      .ephy_reset_gpio                = 27,
++      .ephy_reset_gpio_flags          = GPIO_ACTIVE_LOW,
++
++      .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",
++                      },
++              },
++      },
++
++      .use_fallback_sprom             = 1,
++};
++
+ static struct b53_platform_data WAP5813n_b53_pdata = {
+       .alias = "eth0",
+ };
+@@ -2614,6 +2673,7 @@
+       &board_HG622,
+       &board_HG655b,
+       &board_P870HW51A_V2,
++      &board_VH4032N,
+       &board_VR3025u,
+       &board_VR3025un,
+       &board_VR3026e,
+@@ -2723,6 +2783,7 @@
+       { .compatible = "huawei,hg622", .data = &board_HG622, },
+       { .compatible = "huawei,hg655b", .data = &board_HG655b, },
+       { .compatible = "netgear,dgnd3700v1", .data = &board_DGND3700v1_3800B, 
},
++      { .compatible = "observa,vh4032n", .data = &board_VH4032N, },
+       { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, },
+ #endif
+ #ifdef CONFIG_BCM63XX_CPU_63268
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to