[source] brcm63xx: Add Observa VH4032N support

LEDE Commits lede-commits at lists.infradead.org
Thu Feb 9 13:03:55 PST 2017


jogo pushed a commit to source.git, branch master:
https://git.lede-project.org/41ad9ed13a7792775ad3cca88e9d4eac6e594c63

commit 41ad9ed13a7792775ad3cca88e9d4eac6e594c63
Author: Daniel Gonzalez Cabanelas <dgcbueu at gmail.com>
AuthorDate: Sat Dec 3 15:51:05 2016 +0100

    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 at gmail.com>
    [jonas.gorski: use gpio-hog instead of abusing ephy-reset]
    Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
---
 .../brcm63xx/base-files/etc/board.d/02_network     |   5 +
 target/linux/brcm63xx/base-files/etc/diag.sh       |   3 +
 .../base-files/etc/uci-defaults/09_fix_crc         |   1 +
 target/linux/brcm63xx/base-files/lib/brcm63xx.sh   |   3 +
 target/linux/brcm63xx/dts/vh4032n.dts              | 102 +++++++++++++++++++++
 target/linux/brcm63xx/image/bcm63xx.mk             |  15 +++
 .../brcm63xx/patches-4.4/577-board_VH4032N.patch   |  64 +++++++++++++
 7 files changed, 193 insertions(+)

diff --git a/target/linux/brcm63xx/base-files/etc/board.d/02_network b/target/linux/brcm63xx/base-files/etc/board.d/02_network
index 1cf54cb..ff5fc7a 100755
--- a/target/linux/brcm63xx/base-files/etc/board.d/02_network
+++ b/target/linux/brcm63xx/base-files/etc/board.d/02_network
@@ -99,6 +99,11 @@ vr-3026e)
 		"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t at eth0"
 	;;
 
+vh4032n)
+	ucidef_add_switch "switch0" \
+		"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "8t at eth0"
+	;;
+
 bcm96368mvwg)
 	ucidef_add_switch "switch0" \
 		"1:lan" "2:lan" "4:lan" "5:lan" "8t at eth0"
diff --git a/target/linux/brcm63xx/base-files/etc/diag.sh b/target/linux/brcm63xx/base-files/etc/diag.sh
index 5f9a4d0..df1d616 100644
--- a/target/linux/brcm63xx/base-files/etc/diag.sh
+++ b/target/linux/brcm63xx/base-files/etc/diag.sh
@@ -36,6 +36,9 @@ set_state() {
 	spw303v)
 		status_led="spw303v:green:power+adsl"
 		;;
+	vh4032n)
+		status_led="VH4032N:red:power"
+		;;
 	vr-3025un)
 		status_led="VR-3025un:green:power"
 		;;
diff --git a/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc b/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
index 1201168..650db9d 100644
--- a/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
+++ b/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
@@ -31,6 +31,7 @@ case "$(brcm63xx_board_name)" in
 	spw303v |\
 	v2110 |\
 	v2500v_bb |\
+	vh4032n |\
 	vr-3025u |\
 	vr-3025un |\
 	vr-3026e |\
diff --git a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
index 1679482..bceba8f 100755
--- a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
+++ b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
@@ -192,6 +192,9 @@ brcm63xx_dt_detect() {
 	"NuCom R5010UN v2")
 		board_name="r5010un_v2"
 		;;
+	"Observa VH4032N")
+		board_name="vh4032n"
+		;;
 	"Pirelli A226G")
 		board_name="a226g"
 		;;
diff --git a/target/linux/brcm63xx/dts/vh4032n.dts b/target/linux/brcm63xx/dts/vh4032n.dts
new file mode 100644
index 0000000..8b8abd9
--- /dev/null
+++ b/target/linux/brcm63xx/dts/vh4032n.dts
@@ -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 at 0 {
+		label = "CFE";
+		reg = <0x0000000 0x0020000>;
+		read-only;
+	};
+
+	linux at 20000 {
+		label = "linux";
+		reg = <0x0020000 0x1fc0000>;
+	};
+
+	nvram at 1fe0000 {
+		label = "nvram";
+		reg = <0x1fe0000 0x020000>;
+	};
+};
diff --git a/target/linux/brcm63xx/image/bcm63xx.mk b/target/linux/brcm63xx/image/bcm63xx.mk
index f38147e..0749c29 100644
--- a/target/linux/brcm63xx/image/bcm63xx.mk
+++ b/target/linux/brcm63xx/image/bcm63xx.mk
@@ -818,6 +818,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)
diff --git a/target/linux/brcm63xx/patches-4.4/577-board_VH4032N.patch b/target/linux/brcm63xx/patches-4.4/577-board_VH4032N.patch
new file mode 100644
index 0000000..2e5c13e
--- /dev/null
+++ b/target/linux/brcm63xx/patches-4.4/577-board_VH4032N.patch
@@ -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



More information about the lede-commits mailing list