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"
;;
ucidef_add_switch "switch0" \
"1:lan:3" "2:lan:2" "3:lan:1" "0:wan" "8t@eth0"
;;
+sercomm,h500-s-lowi|\
+sercomm,h500-s-vfes)
+ ucidef_add_switch "switch0" "4:lan" "3:wan" "8t@eth0"
+ ;;
sfr,neufbox-6-sercomm-r0)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9t@eth0"
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
;;
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"
;;
--- /dev/null
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree file for Sercomm H500-s lowi
+ *
+ * Copyright (C) 2020 Daniel González Cabanelas <dgcbueu@gmail.com>
+ */
+
+/dts-v1/;
+
+#include "bcm63167-sercomm-h500-s.dtsi"
+
+/ {
+ model = "Sercomm H500-s lowi";
+ compatible = "sercomm,h500-s-lowi", "brcm,bcm63167", "brcm,bcm63268";
+};
--- /dev/null
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree file for Sercomm H500-s vfes
+ *
+ * Copyright (C) 2020 Daniel González Cabanelas <dgcbueu@gmail.com>
+ */
+
+/dts-v1/;
+
+#include "bcm63167-sercomm-h500-s.dtsi"
+
+/ {
+ model = "Sercomm H500-s vfes";
+ compatible = "sercomm,h500-s-vfes", "brcm,bcm63167", "brcm,bcm63268";
+};
--- /dev/null
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree file for Sercomm H500-s
+ *
+ * Copyright (C) 2020 Daniel González Cabanelas <dgcbueu@gmail.com>
+ */
+
+#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@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@0 {
+ label = "cferom";
+ reg = <0x0000000 0x0020000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "part_map";
+ reg = <0x0020000 0x00a0000>;
+ read-only;
+ };
+
+ partition@c0000 {
+ label = "cferam1";
+ reg = <0x00c0000 0x0140000>;
+ read-only;
+ };
+
+ partition@200000 {
+ label = "cferam2";
+ reg = <0x0200000 0x0140000>;
+ read-only;
+ };
+
+ partition@6920000 {
+ label = "bootflag1";
+ reg = <0x6920000 0x0140000>;
+ };
+
+ partition@6a60000 {
+ label = "bootflag2";
+ reg = <0x6a60000 0x0140000>;
+ };
+
+ partition@520000 {
+ compatible = "sercomm,wfi";
+ label = "wfi";
+ reg = <0x0520000 0x6400000>; /* 2 images, 97152 KiB */
+ };
+
+ partition@6ba0000 {
+ label = "xml_cfg";
+ reg = <0x6ba0000 0x0280000>;
+ read-only;
+ };
+
+ partition@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";
+};
define Device/sercomm-nand
$(Device/bcm63xx-nand)
- IMAGES = factory.img sysupgrade.bin
+ IMAGES := factory.img sysupgrade.bin
IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | cfe-sercomm-part | gzip | cfe-sercomm-load | cfe-sercomm-crypto
SERCOM_PID :=
SERCOMM_VERSION :=
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
+ DEVICE_LOADADDR := $(KERNEL_LOADADDR)
+ KERNEL := kernel-bin | append-dtb | lzma | cfe-jffs2-kernel
+ 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
+ DEVICE_LOADADDR := $(KERNEL_LOADADDR)
+ KERNEL := kernel-bin | append-dtb | lzma | cfe-jffs2-kernel
+ 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
--- /dev/null
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -2869,6 +2869,37 @@ static struct board_info __initdata boar
+ },
+ },
+ };
++
++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 */
+
+ /*
+@@ -2983,6 +3014,7 @@ static const struct board_info __initcon
+ &board_VR3032u,
+ &board_vw6339gu,
+ &board_BSKYB_63168,
++ &board_H500s,
+ #endif
+ };
+
+@@ -3101,6 +3133,8 @@ static struct of_device_id const bcm963x
+ { .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 */