[OpenWrt-Devel] [PATCH 4/4 v3] bcm63xx: add support for the Sercomm H500-s
Daniel González Cabanelas
dgcbueu at gmail.com
Sat Jun 6 08:23:07 EDT 2020
Sercomm H500-s is an xDSL dual band wireless router based on Broadcom
BCM63167 SoC.
Hardware:
SoC: Broadcom BCM63167
CPU: BMIPS4350 V8.0, 400 MHz, 2 cores
Flash: NAND 128 MiB
RAM: DDR3 128 MiB
Ethernet: 4x 10/100/1000 Mbps
Switch: BCM53134S
Wireless: 802.11b/g/n: BCM435f (integrated)
802.11ac: Quantenna QT3740BC (onboard SoC)
USB: 1x 2.0
LEDs/Buttons: 11x / 2x
Flash instruction, web UI:
1. Reset to defaults using the reset button if the admin password is
unknown
2. Login into the web UI as admin.
Address: http://192.168.0.1
User: admin
Password: VF-ESVodafone-H-500-s or l033i-h500s
3. Go to Settings -> Firmware Update, and select the Openwrt factory
firmware
4. Update the firmware.
5. Wait until it finish, the device will reboot with Openwrt installed
on the alternative image partitions keeping the stock firmware in
the former.
Notes:
- The patch also adds support for the lowi version. Only the factory
firmware is different.
- The integrated Wifi in the Broadcom Soc isn't still supported.
- The Quantenna 802.11ac wifi works ok, but needs to be configured with
the Quantenna client application. It can't be configured with Luci
nor any iw command since it's a separated subsystem linked via
ethernet.
Signed-off-by: Daniel González Cabanelas <dgcbueu at gmail.com>
Reviewed-by: Álvaro Fernández Rojas <noltari at gmail.com>
Reviewed-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
Changes in v2:
- Fixed passwords in commit log
- Added unsupported switch in dts
- Added custom LOADER_ENTRY to fix the ramdisk for this specific device
- Removed unneded b43 package
- Cosmetic changes
Changes in v3:
- Device splitted: lowi, vfes
- Removed unsupported switch in dts
- Cosmetic changes
.../bcm63xx/base-files/etc/board.d/01_leds | 4 +
.../bcm63xx/base-files/etc/board.d/02_network | 4 +
.../base-files/lib/upgrade/platform.sh | 8 +-
.../dts/bcm63167-sercomm-h500-s-lowi.dts | 15 ++
.../dts/bcm63167-sercomm-h500-s-vfes.dts | 15 ++
.../bcm63xx/dts/bcm63167-sercomm-h500-s.dtsi | 196 ++++++++++++++++++
target/linux/bcm63xx/image/bcm63xx_nand.mk | 54 +++++
.../bcm63xx/patches-5.4/568-board-H500s.patch | 69 ++++++
8 files changed, 363 insertions(+), 2 deletions(-)
create mode 100644 target/linux/bcm63xx/dts/bcm63167-sercomm-h500-s-lowi.dts
create mode 100644 target/linux/bcm63xx/dts/bcm63167-sercomm-h500-s-vfes.dts
create mode 100644 target/linux/bcm63xx/dts/bcm63167-sercomm-h500-s.dtsi
create mode 100644 target/linux/bcm63xx/patches-5.4/568-board-H500s.patch
diff --git a/target/linux/bcm63xx/base-files/etc/board.d/01_leds b/target/linux/bcm63xx/base-files/etc/board.d/01_leds
index 91d67f0c0b..cdaf0e77c9 100755
--- a/target/linux/bcm63xx/base-files/etc/board.d/01_leds
+++ b/target/linux/bcm63xx/base-files/etc/board.d/01_leds
@@ -100,6 +100,10 @@ sercomm,ad1018)
sercomm,ad1018-nor)
ucidef_set_led_netdev "wlan0" "WLAN" "AD1018:green:wifi" "wlan0"
;;
+sercomm,h500-s-lowi|\
+sercomm,h500-s-vfes)
+ ucidef_set_led_netdev "wan" "WAN" "h500-s:green:internet" "eth0.2"
+ ;;
telsey,cpva502plus)
ucidef_set_led_netdev "lan" "LAN" "CPVA502+:amber:link" "eth0"
;;
diff --git a/target/linux/bcm63xx/base-files/etc/board.d/02_network b/target/linux/bcm63xx/base-files/etc/board.d/02_network
index 784af29cb4..f02eabe68f 100755
--- a/target/linux/bcm63xx/base-files/etc/board.d/02_network
+++ b/target/linux/bcm63xx/base-files/etc/board.d/02_network
@@ -142,6 +142,10 @@ sercomm,ad1018-nor)
ucidef_add_switch "switch0" \
"1:lan:3" "2:lan:2" "3:lan:1" "0:wan" "8t at eth0"
;;
+sercomm,h500-s-lowi|\
+sercomm,h500-s-vfes)
+ ucidef_add_switch "switch0" "4:lan" "3:wan" "8t at eth0"
+ ;;
sfr,neufbox-6-sercomm-r0)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9t at eth0"
diff --git a/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh
index 7d416297dd..525d3b90b5 100644
--- a/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh
@@ -9,7 +9,9 @@ platform_check_image() {
comtrend,vr-3032u|\
huawei,hg253s-v2|\
netgear,dgnd3700-v2|\
- sercomm,ad1018)
+ sercomm,ad1018|\
+ sercomm,h500-s-lowi|\
+ sercomm,h500-s-vfes)
# NAND sysupgrade
return 0
;;
@@ -69,7 +71,9 @@ platform_do_upgrade() {
comtrend,vr-3032u|\
huawei,hg253s-v2|\
netgear,dgnd3700-v2|\
- sercomm,ad1018)
+ sercomm,ad1018|\
+ sercomm,h500-s-lowi|\
+ sercomm,h500-s-vfes)
REQUIRE_IMAGE_METADATA=1
cfe_jffs2_upgrade_tar "$1"
;;
diff --git a/target/linux/bcm63xx/dts/bcm63167-sercomm-h500-s-lowi.dts b/target/linux/bcm63xx/dts/bcm63167-sercomm-h500-s-lowi.dts
new file mode 100644
index 0000000000..b0c3f23c79
--- /dev/null
+++ b/target/linux/bcm63xx/dts/bcm63167-sercomm-h500-s-lowi.dts
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree file for Sercomm H500-s
+ *
+ * Copyright (C) 2020 Daniel González Cabanelas <dgcbueu at gmail.com>
+ */
+
+/dts-v1/;
+
+#include "bcm63167-sercomm-h500-s.dtsi"
+
+/ {
+ model = "Sercomm H500-s lowi";
+ compatible = "sercomm,h500-s-lowi", "brcm,bcm63268";
+};
diff --git a/target/linux/bcm63xx/dts/bcm63167-sercomm-h500-s-vfes.dts b/target/linux/bcm63xx/dts/bcm63167-sercomm-h500-s-vfes.dts
new file mode 100644
index 0000000000..e64410c3ad
--- /dev/null
+++ b/target/linux/bcm63xx/dts/bcm63167-sercomm-h500-s-vfes.dts
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree file for Sercomm H500-s
+ *
+ * Copyright (C) 2020 Daniel González Cabanelas <dgcbueu at gmail.com>
+ */
+
+/dts-v1/;
+
+#include "bcm63167-sercomm-h500-s.dtsi"
+
+/ {
+ model = "Sercomm H500-s vfes";
+ compatible = "sercomm,h500-s-vfes", "brcm,bcm63268";
+};
diff --git a/target/linux/bcm63xx/dts/bcm63167-sercomm-h500-s.dtsi b/target/linux/bcm63xx/dts/bcm63167-sercomm-h500-s.dtsi
new file mode 100644
index 0000000000..e16819140b
--- /dev/null
+++ b/target/linux/bcm63xx/dts/bcm63167-sercomm-h500-s.dtsi
@@ -0,0 +1,196 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree file for Sercomm H500-s
+ *
+ * Copyright (C) 2020 Daniel González Cabanelas <dgcbueu at gmail.com>
+ */
+
+/dts-v1/;
+
+#include "bcm63268.dtsi"
+
+#include <dt-bindings/input/input.h>
+
+/ {
+ 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,ubifs 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 34 1>;
+ linux,code = <KEY_WPS_BUTTON>;
+ debounce-interval = <60>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&pinctrl 35 1>;
+ linux,code = <KEY_RESTART>;
+ debounce-interval = <60>;
+ };
+ };
+};
+
+&leds {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_leds>;
+
+ mobile_red {
+ reg = <0>;
+ label = "h500-s:red:mobile";
+ };
+
+ mobile_green {
+ reg = <1>;
+ label = "h500-s:green:mobile";
+ };
+
+ led_power_red: power_red {
+ reg = <8>;
+ label = "h500-s:red:power";
+ };
+
+ wifi_green {
+ reg = <9>;
+ label = "h500-s:green:wifi";
+ };
+
+ phone_red {
+ reg = <12>;
+ label = "h500-s:red:phone";
+ };
+
+ wifi_red {
+ reg = <13>;
+ label = "h500-s:red:wifi";
+ };
+
+ internet_red {
+ reg = <14>;
+ label = "h500-s:red:internet";
+ };
+
+ internet_green {
+ reg = <15>;
+ label = "h500-s:green:internet";
+ };
+
+ phone_green {
+ reg = <16>;
+ label = "h500-s:green:phone";
+ };
+
+ led_power_green: power_green {
+ reg = <17>;
+ label = "h500-s:green:power";
+ default-state = "on";
+ };
+
+ mobile_blue {
+ reg = <23>;
+ label = "h500-s:blue:mobile";
+ };
+};
+
+&nflash {
+ status = "okay";
+
+ nandcs at 0 {
+ compatible = "brcm,nandcs";
+ #size-cells = <1>;
+ #address-cells = <1>;
+ reg = <0>;
+ nand-ecc-step-size = <512>;
+ nand-ecc-strength = <4>;
+ nand-on-flash-bbt;
+ brcm,nand-oob-sector-size = <64>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition at 0 {
+ label = "cferom";
+ reg = <0x0000000 0x0020000>;
+ read-only;
+ };
+
+ partition at 20000 {
+ label = "part_map";
+ reg = <0x0020000 0x00a0000>;
+ read-only;
+ };
+
+ partition at c0000 {
+ label = "cferam1";
+ reg = <0x00c0000 0x0140000>;
+ read-only;
+ };
+
+ partition at 200000 {
+ label = "cferam2";
+ reg = <0x0200000 0x0140000>;
+ read-only;
+ };
+
+ partition at 6920000 {
+ label = "bootflag1";
+ reg = <0x6920000 0x0140000>;
+ };
+
+ partition at 6a60000 {
+ label = "bootflag2";
+ reg = <0x6a60000 0x0140000>;
+ };
+
+ partition at 520000 {
+ compatible = "sercomm,wfi";
+ label = "wfi";
+ reg = <0x0520000 0x6400000>; /* 2 images, 97152 KiB */
+ };
+
+ partition at 6ba0000 {
+ label = "xml_cfg";
+ reg = <0x6ba0000 0x0280000>;
+ read-only;
+ };
+
+ partition at 6e20000 {
+ label = "app_data";
+ reg = <0x6e20000 0x0280000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pinctrl {
+ pinctrl_leds: leds {
+ function = "led";
+ pins = "gpio0", "gpio1", "gpio8", "gpio9",
+ "gpio12", "gpio13", "gpio14", "gpio15",
+ "gpio16", "gpio17", "gpio23";
+ };
+};
+
+&uart0 {
+ status = "okay";
+};
diff --git a/target/linux/bcm63xx/image/bcm63xx_nand.mk b/target/linux/bcm63xx/image/bcm63xx_nand.mk
index 7b2039c988..4f030cbdab 100644
--- a/target/linux/bcm63xx/image/bcm63xx_nand.mk
+++ b/target/linux/bcm63xx/image/bcm63xx_nand.mk
@@ -149,3 +149,57 @@ define Device/sercomm_ad1018
SERCOMM_VERSION := 1001
endef
TARGET_DEVICES += sercomm_ad1018
+
+define Device/sercomm_h500-s-lowi
+ $(Device/sercomm-nand)
+ DEVICE_VENDOR := Sercomm
+ DEVICE_MODEL := H500-s
+ DEVICE_VARIANT := lowi
+ LOADER_ENTRY := 0x80010000
+ KERNEL := kernel-bin | append-dtb | lzma | cfe-jffs2-kernel $$(KERNEL_LOADADDR)
+ CHIP_ID := 63268
+ SOC := bcm63167
+ BLOCKSIZE := 128k
+ PAGESIZE := 2048
+ SUBPAGESIZE := 512
+ VID_HDR_OFFSET := 2048
+ DEVICE_PACKAGES += $(USB2_PACKAGES)
+ SERCOMM_PID := \
+ 30 30 30 30 30 30 30 31 34 33 34 62 33 31 30 30 \
+ 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \
+ 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \
+ 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \
+ 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \
+ 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \
+ 30 30 30 30 33 33 30 35 30 30 30 30 30 30 30 30 \
+ 0D 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ SERCOMM_VERSION := 1001
+endef
+TARGET_DEVICES += sercomm_h500-s-lowi
+
+define Device/sercomm_h500-s-vfes
+ $(Device/sercomm-nand)
+ DEVICE_VENDOR := Sercomm
+ DEVICE_MODEL := H500-s
+ DEVICE_VARIANT := vfes
+ LOADER_ENTRY := 0x80010000
+ KERNEL := kernel-bin | append-dtb | lzma | cfe-jffs2-kernel $$(KERNEL_LOADADDR)
+ CHIP_ID := 63268
+ SOC := bcm63167
+ BLOCKSIZE := 128k
+ PAGESIZE := 2048
+ SUBPAGESIZE := 512
+ VID_HDR_OFFSET := 2048
+ DEVICE_PACKAGES += $(USB2_PACKAGES)
+ SERCOMM_PID := \
+ 30 30 30 30 30 30 30 31 34 32 35 38 34 62 30 30 \
+ 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \
+ 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \
+ 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \
+ 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \
+ 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \
+ 30 30 30 30 33 34 31 37 30 30 30 30 30 30 30 30 \
+ 0D 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ SERCOMM_VERSION := 1001
+endef
+TARGET_DEVICES += sercomm_h500-s-vfes
diff --git a/target/linux/bcm63xx/patches-5.4/568-board-H500s.patch b/target/linux/bcm63xx/patches-5.4/568-board-H500s.patch
new file mode 100644
index 0000000000..d94d5cfeb7
--- /dev/null
+++ b/target/linux/bcm63xx/patches-5.4/568-board-H500s.patch
@@ -0,0 +1,69 @@
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -2867,10 +2867,41 @@
+ },
+
+ },
+ },
+ };
++
++static struct board_info __initdata board_H500s = {
++ .name = "BXK00C-1.6",
++ .expected_cpu_id = 0x63268,
++
++ .has_ehci0 = 1,
++ .has_ohci0 = 1,
++ .num_usbh_ports = 1,
++
++ .has_enetsw = 1,
++ .enetsw = {
++ .used_ports = {
++ [3] = {
++ .used = 1,
++ .phy_id = 12,
++ .name = "WAN",
++ },
++
++ [4] = {
++ .used = 1,
++ .phy_id = 0,
++ .bypass_link = 1,
++ .force_speed = 1000,
++ .force_duplex_full = 1,
++ .mii_override = 1,
++ .timing_sel = 1,
++ .name = "RGMII",
++ },
++ },
++ },
++};
+ #endif /* CONFIG_BCM63XX_CPU_63268 */
+
+ /*
+ * all boards
+ */
+@@ -2981,10 +3012,11 @@
+ &board_963269bhr,
+ &board_VG8050,
+ &board_VR3032u,
+ &board_vw6339gu,
+ &board_BSKYB_63168,
++ &board_H500s,
+ #endif
+ };
+
+ static struct of_device_id const bcm963xx_boards_dt[] = {
+ #ifdef CONFIG_OF
+@@ -3099,10 +3131,12 @@
+ { .compatible = "brcm,bcm963268bu-p300", .data = &board_963268bu_p300, },
+ { .compatible = "brcm,bcm963269bhr", .data = &board_963269bhr, },
+ { .compatible = "comtrend,vg-8050", .data = &board_VG8050, },
+ { .compatible = "comtrend,vr-3032u", .data = &board_VR3032u, },
+ { .compatible = "inteno,vg50", .data = &board_vw6339gu, },
++ { .compatible = "sercomm,h500-s-lowi", .data = &board_H500s, },
++ { .compatible = "sercomm,h500-s-vfes", .data = &board_H500s, },
+ { .compatible = "sky,sr102", .data = &board_BSKYB_63168, },
+ #endif
+ #endif /* CONFIG_OF */
+ { },
+ };
--
2.27.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list