brcm63xx: Add Observa VH4032N support

Add support for the Observa Telecom VH4032N router.

This is another BCM6368 router, 128 MB RAM, 32MB flash and 3 USB
host ports.

The wifi chip is an onboard Broadcom BCM43222.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
[jonas.gorski: use gpio-hog instead of abusing ephy-reset]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
This commit is contained in:
Daniel Gonzalez Cabanelas 2016-12-03 15:51:05 +01:00 committed by Jo-Philipp Wich
parent 105d5b6f03
commit bf534e45ea
7 changed files with 193 additions and 0 deletions

View File

@ -98,6 +98,11 @@ vr-3026e)
"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t@eth0"
;;
vh4032n)
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "8t@eth0"
;;
bcm96368mvwg)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "4:lan" "5:lan" "8t@eth0"

View File

@ -33,6 +33,9 @@ set_state() {
spw303v)
status_led="spw303v:green:power+adsl"
;;
vh4032n)
status_led="VH4032N:red:power"
;;
vr-3025un)
status_led="VR-3025un:green:power"
;;

View File

@ -31,6 +31,7 @@ case "$(brcm63xx_board_name)" in
spw303v |\
v2110 |\
v2500v_bb |\
vh4032n |\
vr-3025u |\
vr-3025un |\
vr-3026e |\

View File

@ -189,6 +189,9 @@ brcm63xx_dt_detect() {
"NuCom R5010UN v2")
board_name="r5010un_v2"
;;
"Observa VH4032N")
board_name="vh4032n"
;;
"Pirelli A226G")
board_name="a226g"
;;

View File

@ -0,0 +1,102 @@
/dts-v1/;
#include "bcm6368.dtsi"
#include <dt-bindings/input/input.h>
/ {
model = "Observa VH4032N";
compatible = "observa,vh4032n", "brcm,bcm6368";
chosen {
bootargs = "root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
};
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>;
};
};
};
&gpio0 {
usb_hub_reset {
gpio-hog;
gpios = <27 0>;
output-high;
line-name = "usb-hub-reset-gpio";
};
};
&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>;
};
};

View File

@ -806,6 +806,21 @@ define Device/R5010UNv2
endef
TARGET_DEVICES += R5010UNv2
### Observa ###
define Device/VH4032N
$(Device/bcm63xx)
IMAGES += sysupgrade.bin
DEVICE_TITLE := Observa VH4032N
DEVICE_DTS := vh4032n
CFE_BOARD_ID := 96368VVW
CFE_CHIP_ID := 6368
BLOCK_SIZE := 0x20000
FLASH_MB := 32
DEVICE_PACKAGES := \
$(B43_PACKAGES) $(USB2_PACKAGES)
endef
TARGET_DEVICES += VH4032N
### Pirelli ###
define Device/A226G
$(Device/bcm63xx)

View File

@ -0,0 +1,64 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -2356,6 +2356,45 @@ static struct board_info __initdata boar
},
};
+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,
+
+ .has_enetsw = 1,
+ .enetsw = {
+ .used_ports = {
+ [0] = {
+ .used = 1,
+ .phy_id = 1,
+ .name = "LAN4",
+ },
+ [1] = {
+ .used = 1,
+ .phy_id = 2,
+ .name = "LAN3",
+ },
+ [2] = {
+ .used = 1,
+ .phy_id = 3,
+ .name = "LAN2",
+ },
+ [3] = {
+ .used = 1,
+ .phy_id = 4,
+ .name = "LAN1",
+ },
+ },
+ },
+
+ .use_fallback_sprom = 1,
+};
+
static struct b53_platform_data WAP5813n_b53_pdata = {
.alias = "eth0",
};
@@ -2662,6 +2701,7 @@ static const struct board_info __initcon
&board_HG622,
&board_HG655b,
&board_P870HW51A_V2,
+ &board_VH4032N,
&board_VR3025u,
&board_VR3025un,
&board_VR3026e,
@@ -2773,6 +2813,7 @@ static struct of_device_id const bcm963x
{ .compatible = "huawei,hg655b", .data = &board_HG655b, },
{ .compatible = "netgear,dgnd3700v1", .data = &board_DGND3700v1_3800B, },
{ .compatible = "netgear,evg2000", .data = &board_EVG2000, },
+ { .compatible = "observa,vh4032n", .data = &board_VH4032N, },
{ .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, },
#endif
#ifdef CONFIG_BCM63XX_CPU_63268