[openwrt/openwrt] bmips: bcm6358: add support for Huawei HG556a ver C

LEDE Commits lede-commits at lists.infradead.org
Wed Jun 11 06:12:07 PDT 2025


noltari pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/733067fc9a5d3263e2e6b1fc4d6e9bc27c80a4cf

commit 733067fc9a5d3263e2e6b1fc4d6e9bc27c80a4cf
Author: Álvaro Fernández Rojas <noltari at gmail.com>
AuthorDate: Sat Jun 7 12:01:54 2025 +0200

    bmips: bcm6358: add support for Huawei HG556a ver C
    
    Specifications:
    - SoC: Broadcom BCM6358 dual 300MHz MIPS
    - Flash: 16MB NOR Macronix MX29GL128EHT2I-90G
    - RAM: 64MB DDR
    - Ethernet: 4x 100M
    - Wifi: Ralink RT3062F
    - 3x USB 2.0 port
    - 4x Button
    - 13x LED
    - RJ11 2x FXS VoIP (unsupported)
    - RJ11 xDSL (unsupported)
    
    Install instructions:
    - Assign static IP 192.168.1.100 to PC.
    - Unplug the power source.
    - Press the RESTART button at the router, don't release it yet!
    - Plug the power source and wait at least 15 seconds.
    - Release the RESTART button.
    - Browse to http://192.168.1.1 with your PC.
    - Upload the openwrt-bmips-bcm6358-huawei_hg556a-c-squashfs-cfe.bin file.
    - Wait some minutes until the firmware upgrade completes.
    
    Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
 .../bmips/bcm6358/base-files/etc/board.d/01_leds   |  3 +-
 .../bcm6358/base-files/etc/board.d/02_network      |  3 +-
 target/linux/bmips/dts/bcm6358-huawei-hg556a-c.dts | 53 ++++++++++++++++++++++
 target/linux/bmips/image/Makefile                  |  1 +
 target/linux/bmips/image/bcm6358.mk                | 14 ++++++
 5 files changed, 72 insertions(+), 2 deletions(-)

diff --git a/target/linux/bmips/bcm6358/base-files/etc/board.d/01_leds b/target/linux/bmips/bcm6358/base-files/etc/board.d/01_leds
index 270a6d4bd1..feb72290e8 100644
--- a/target/linux/bmips/bcm6358/base-files/etc/board.d/01_leds
+++ b/target/linux/bmips/bcm6358/base-files/etc/board.d/01_leds
@@ -7,7 +7,8 @@ board_config_update
 
 case "$(board_name)" in
 huawei,hg556a-a |\
-huawei,hg556a-b)
+huawei,hg556a-b |\
+huawei,hg556a-c)
 	ucidef_set_led_netdev "lan1" "LAN1" "green:lan1" "lan1"
 	ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "lan2"
 	ucidef_set_led_netdev "lan3" "LAN3" "green:lan3" "lan3"
diff --git a/target/linux/bmips/bcm6358/base-files/etc/board.d/02_network b/target/linux/bmips/bcm6358/base-files/etc/board.d/02_network
index 79b3c6451b..35d784df61 100644
--- a/target/linux/bmips/bcm6358/base-files/etc/board.d/02_network
+++ b/target/linux/bmips/bcm6358/base-files/etc/board.d/02_network
@@ -6,7 +6,8 @@ board_config_update
 
 case "$(board_name)" in
 huawei,hg556a-a |\
-huawei,hg556a-b)
+huawei,hg556a-b |\
+huawei,hg556a-c)
 	ucidef_set_bridge_device switch
 	ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
 	;;
diff --git a/target/linux/bmips/dts/bcm6358-huawei-hg556a-c.dts b/target/linux/bmips/dts/bcm6358-huawei-hg556a-c.dts
new file mode 100644
index 0000000000..2c948da6d7
--- /dev/null
+++ b/target/linux/bmips/dts/bcm6358-huawei-hg556a-c.dts
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "bcm6358-huawei-hg556a.dtsi"
+
+/ {
+	model = "Huawei EchoLife HG556a (version C)";
+	compatible = "huawei,hg556a-c", "brcm,bcm6358";
+};
+
+&gpio_keys {
+	help {
+		label = "help";
+		gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
+		linux,code = <KEY_HELP>;
+		debounce-interval = <60>;
+	};
+};
+
+&gpio_leds {
+	led-0 {
+		label = "green:lan1";
+		gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+	};
+
+	led-1 {
+		label = "green:lan2";
+		gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+	};
+
+	led-12 {
+		label = "red:message";
+		gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+	};
+
+	led-15 {
+		label = "red:hspa";
+		gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&pci {
+	status = "okay";
+
+	wifi at 1,0 {
+		compatible = "pci0,0";
+		reg = <0x0800 0 0 0 0>;
+
+		ralink,mtd-eeprom = <&cal_data 0x1fe00>;
+
+		nvmem-cells = <&macaddr_cfe_6a0 1>;
+		nvmem-cell-names = "mac-address";
+	};
+};
diff --git a/target/linux/bmips/image/Makefile b/target/linux/bmips/image/Makefile
index 95cf35bb52..7075fb72d3 100644
--- a/target/linux/bmips/image/Makefile
+++ b/target/linux/bmips/image/Makefile
@@ -366,6 +366,7 @@ endef
 ### Package helpers ###
 ATH9K_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic-mbedtls
 B43_PACKAGES := kmod-b43 wpad-basic-mbedtls
+RT28_PACKAGES := kmod-rt2800-pci wpad-basic-mbedtls
 USB1_PACKAGES := kmod-usb-ohci kmod-usb-ledtrig-usbport
 USB2_PACKAGES := $(USB1_PACKAGES) kmod-usb2
 
diff --git a/target/linux/bmips/image/bcm6358.mk b/target/linux/bmips/image/bcm6358.mk
index 57b2b18590..1c7caae966 100644
--- a/target/linux/bmips/image/bcm6358.mk
+++ b/target/linux/bmips/image/bcm6358.mk
@@ -27,3 +27,17 @@ define Device/huawei_hg556a-b
     kmod-leds-gpio
 endef
 TARGET_DEVICES += huawei_hg556a-b
+
+define Device/huawei_hg556a-c
+  $(Device/bcm63xx-cfe-legacy)
+  DEVICE_VENDOR := Huawei
+  DEVICE_MODEL := EchoLife HG556a
+  DEVICE_VARIANT := C
+  CHIP_ID := 6358
+  CFE_BOARD_ID := HW556
+  CFE_EXTRAS += --rsa-signature "EchoLife_HG556a" --tag-version 8
+  BLOCKSIZE := 0x20000
+  DEVICE_PACKAGES += $(USB2_PACKAGES) $(RT28_PACKAGES) \
+    kmod-leds-gpio
+endef
+TARGET_DEVICES += huawei_hg556a-c




More information about the lede-commits mailing list