From: Chukun Pan Date: Tue, 9 Dec 2025 10:06:25 +0000 (+0800) Subject: uboot-rockchip: add HINLINK H28K support X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=384127320e0bfc29f31501c2e90aaf4cdba66ca0;p=thirdparty%2Fopenwrt.git uboot-rockchip: add HINLINK H28K support Add pending uboot support for the HINLINK H28K. Signed-off-by: Chukun Pan --- diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile index 9d098125246..88979a23fdc 100644 --- a/package/boot/uboot-rockchip/Makefile +++ b/package/boot/uboot-rockchip/Makefile @@ -174,6 +174,13 @@ define U-Boot/rk3528/Default TPL:=rk3528_ddr_1056MHz_v1.11.bin endef +define U-Boot/hinlink-h28k-rk3528 + $(U-Boot/rk3528/Default) + NAME:=HINLINK H28K + BUILD_DEVICES:= \ + hinlink_h28k +endef + define U-Boot/radxa-e20c-rk3528 $(U-Boot/rk3528/Default) NAME:=E20C @@ -420,6 +427,7 @@ UBOOT_TARGETS := \ rock64-rk3328 \ rock-pi-e-rk3328 \ rock-pi-e-v3-rk3328 \ + hinlink-h28k-rk3528 \ radxa-e20c-rk3528 \ rock-2-rk3528 \ nanopi-r3s-rk3566 \ diff --git a/package/boot/uboot-rockchip/patches/107-board-rockchip-add-HINLINK-H28K.patch b/package/boot/uboot-rockchip/patches/107-board-rockchip-add-HINLINK-H28K.patch new file mode 100644 index 00000000000..230271d8b43 --- /dev/null +++ b/package/boot/uboot-rockchip/patches/107-board-rockchip-add-HINLINK-H28K.patch @@ -0,0 +1,378 @@ +From df056584b1825957ad118b6c1084aae00b1fa0b7 Mon Sep 17 00:00:00 2001 +From: Chukun Pan +Date: Wed, 3 Dec 2025 20:03:22 +0800 +Subject: [PATCH] board: rockchip: add HINLINK H28K + +The HINLINK H28K is a single board computer based on the +RK3528 SoC. Add support for the HINLINK H28K board. + +Features tested on HINLINK H28K: +- SD-card boot +- eMMC boot +- Ethernet + +Signed-off-by: Chukun Pan +--- + +--- /dev/null ++++ b/arch/arm/dts/rk3528-hinlink-h28k-u-boot.dtsi +@@ -0,0 +1,11 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++ ++#include "rk3528-u-boot.dtsi" ++ ++&vdd_arm { ++ regulator-init-microvolt = <953000>; ++}; ++ ++&vdd_logic { ++ regulator-init-microvolt = <900000>; ++}; +--- /dev/null ++++ b/configs/hinlink-h28k-rk3528_defconfig +@@ -0,0 +1,64 @@ ++CONFIG_ARM=y ++CONFIG_SKIP_LOWLEVEL_INIT=y ++CONFIG_COUNTER_FREQUENCY=24000000 ++CONFIG_ARCH_ROCKCHIP=y ++CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3528-hinlink-h28k" ++CONFIG_ROCKCHIP_RK3528=y ++CONFIG_SYS_LOAD_ADDR=0xc00800 ++CONFIG_DEBUG_UART_BASE=0xFF9F0000 ++CONFIG_DEBUG_UART_CLOCK=24000000 ++CONFIG_DEBUG_UART=y ++CONFIG_DEFAULT_FDT_FILE="rockchip/rk3528-hinlink-h28k.dtb" ++# CONFIG_DISPLAY_CPUINFO is not set ++CONFIG_BOARD_RNG_SEED=y ++CONFIG_SPL_MAX_SIZE=0x40000 ++# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set ++CONFIG_CMD_MEMINFO=y ++CONFIG_CMD_MEMINFO_MAP=y ++CONFIG_CMD_ADC=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_GPT=y ++CONFIG_CMD_MISC=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_USB=y ++CONFIG_CMD_ROCKUSB=y ++CONFIG_CMD_USB_MASS_STORAGE=y ++# CONFIG_CMD_SETEXPR is not set ++CONFIG_CMD_RNG=y ++CONFIG_CMD_REGULATOR=y ++# CONFIG_SPL_DOS_PARTITION is not set ++CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" ++CONFIG_BUTTON=y ++CONFIG_BUTTON_ADC=y ++# CONFIG_USB_FUNCTION_FASTBOOT is not set ++CONFIG_ROCKCHIP_GPIO=y ++CONFIG_LED=y ++CONFIG_LED_GPIO=y ++CONFIG_SUPPORT_EMMC_RPMB=y ++CONFIG_MMC_DW=y ++CONFIG_MMC_DW_ROCKCHIP=y ++CONFIG_MMC_SDHCI=y ++CONFIG_MMC_SDHCI_SDMA=y ++CONFIG_MMC_SDHCI_ROCKCHIP=y ++CONFIG_PHY_REALTEK=y ++CONFIG_DM_MDIO=y ++CONFIG_DWC_ETH_QOS=y ++CONFIG_DWC_ETH_QOS_ROCKCHIP=y ++CONFIG_PHY_ROCKCHIP_INNO_USB2=y ++CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y ++CONFIG_REGULATOR_PWM=y ++CONFIG_DM_REGULATOR_GPIO=y ++CONFIG_PWM_ROCKCHIP=y ++CONFIG_BAUDRATE=1500000 ++CONFIG_DEBUG_UART_SHIFT=2 ++CONFIG_SYS_NS16550_MEM32=y ++CONFIG_USB=y ++CONFIG_USB_XHCI_HCD=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_USB_EHCI_GENERIC=y ++CONFIG_USB_DWC3=y ++CONFIG_USB_DWC3_GENERIC=y ++CONFIG_USB_GADGET=y ++CONFIG_USB_GADGET_DOWNLOAD=y ++CONFIG_USB_FUNCTION_ROCKUSB=y ++CONFIG_ERRNO_STR=y +--- /dev/null ++++ b/dts/upstream/src/arm64/rockchip/rk3528-hinlink-h28k.dts +@@ -0,0 +1,278 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++ ++/dts-v1/; ++ ++#include ++#include ++#include ++#include "rk3528.dtsi" ++ ++/ { ++ model = "HINLINK H28K"; ++ compatible = "hinlink,h28k", "rockchip,rk3528"; ++ ++ aliases { ++ ethernet0 = &gmac1; ++ mmc0 = &sdhci; ++ mmc1 = &sdmmc; ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:1500000n8"; ++ }; ++ ++ keys { ++ compatible = "adc-keys"; ++ io-channels = <&saradc 0>; ++ io-channel-names = "buttons"; ++ keyup-threshold-microvolt = <1800000>; ++ poll-interval = <100>; ++ ++ button-boot { ++ label = "BOOT"; ++ linux,code = ; ++ press-threshold-microvolt = <0>; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&lan_led>, <&wan_led>, <&work_led>; ++ ++ led-0 { ++ color = ; ++ function = LED_FUNCTION_LAN; ++ gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "netdev"; ++ }; ++ ++ led-1 { ++ color = ; ++ function = LED_FUNCTION_WAN; ++ gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "netdev"; ++ }; ++ ++ led-2 { ++ color = ; ++ function = LED_FUNCTION_STATUS; ++ gpios = <&gpio4 RK_PB7 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "default-on"; ++ }; ++ }; ++ ++ vdd_0v9: regulator-0v9-vdd { ++ compatible = "regulator-fixed"; ++ regulator-name = "vdd_0v9"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <900000>; ++ vin-supply = <&vcc5v0_sys>; ++ }; ++ ++ vcc_ddr: regulator-1v1-vcc-ddr { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc_ddr"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1100000>; ++ vin-supply = <&vcc5v0_sys>; ++ }; ++ ++ vcc_1v8: regulator-1v8-vcc { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc_1v8"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ vin-supply = <&vcc_3v3>; ++ }; ++ ++ vcc_3v3: regulator-3v3-vcc { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc_3v3"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ vin-supply = <&vcc5v0_sys>; ++ }; ++ ++ vcc3v3_sd: regulator-3v3-vcc-sd { ++ compatible = "regulator-fixed"; ++ gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_LOW>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sdmmc_pwren_l>; ++ regulator-name = "vcc3v3_sd"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ vin-supply = <&vcc_3v3>; ++ }; ++ ++ vcc5v0_sys: regulator-5v0-vcc-sys { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc5v0_sys"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ }; ++ ++ vccio_sd: regulator-vccio-sd { ++ compatible = "regulator-gpio"; ++ gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sdmmc_vol_ctrl_h>; ++ regulator-name = "vccio_sd"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ states = <1800000 0x0>, <3300000 0x1>; ++ vin-supply = <&vcc5v0_sys>; ++ }; ++ ++ vdd_arm: regulator-vdd-arm { ++ compatible = "pwm-regulator"; ++ pwms = <&pwm1 0 5000 PWM_POLARITY_INVERTED>; ++ pwm-supply = <&vcc5v0_sys>; ++ regulator-name = "vdd_arm"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <746000>; ++ regulator-max-microvolt = <1201000>; ++ regulator-settling-time-up-us = <250>; ++ }; ++ ++ vdd_logic: regulator-vdd-logic { ++ compatible = "pwm-regulator"; ++ pwms = <&pwm2 0 5000 PWM_POLARITY_INVERTED>; ++ pwm-supply = <&vcc5v0_sys>; ++ regulator-name = "vdd_logic"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <705000>; ++ regulator-max-microvolt = <1006000>; ++ regulator-settling-time-up-us = <250>; ++ }; ++}; ++ ++&cpu0 { ++ cpu-supply = <&vdd_arm>; ++}; ++ ++&cpu1 { ++ cpu-supply = <&vdd_arm>; ++}; ++ ++&cpu2 { ++ cpu-supply = <&vdd_arm>; ++}; ++ ++&cpu3 { ++ cpu-supply = <&vdd_arm>; ++}; ++ ++&gmac1 { ++ clock_in_out = "output"; ++ phy-handle = <&rgmii_phy>; ++ phy-mode = "rgmii-id"; ++ phy-supply = <&vcc_3v3>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rgmii_miim>, ++ <&rgmii_tx_bus2>, ++ <&rgmii_rx_bus2>, ++ <&rgmii_rgmii_clk>, ++ <&rgmii_rgmii_bus>; ++ status = "okay"; ++}; ++ ++&mdio1 { ++ rgmii_phy: ethernet-phy@1 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <0x1>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gmac1_rstn_l>; ++ reset-assert-us = <20000>; ++ reset-deassert-us = <100000>; ++ reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>; ++ }; ++}; ++ ++&pinctrl { ++ gmac { ++ gmac1_rstn_l: gmac1-rstn-l { ++ rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++ ++ leds { ++ lan_led: lan-led { ++ rockchip,pins = <4 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ ++ wan_led: wan-led { ++ rockchip,pins = <4 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ ++ work_led: work-led { ++ rockchip,pins = <4 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++ ++ sdmmc { ++ sdmmc_pwren_l: sdmmc-pwren-l { ++ rockchip,pins = <4 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ ++ sdmmc_vol_ctrl_h: sdmmc-vol-ctrl-h { ++ rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++}; ++ ++&pwm1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm1m0_pins>; ++ status = "okay"; ++}; ++ ++&pwm2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm2m0_pins>; ++ status = "okay"; ++}; ++ ++&saradc { ++ vref-supply = <&vcc_1v8>; ++ status = "okay"; ++}; ++ ++&sdhci { ++ bus-width = <8>; ++ cap-mmc-highspeed; ++ mmc-hs200-1_8v; ++ non-removable; ++ vmmc-supply = <&vcc_3v3>; ++ vqmmc-supply = <&vcc_1v8>; ++ status = "okay"; ++}; ++ ++&sdmmc { ++ bus-width = <4>; ++ cap-sd-highspeed; ++ disable-wp; ++ sd-uhs-sdr104; ++ vmmc-supply = <&vcc3v3_sd>; ++ vqmmc-supply = <&vccio_sd>; ++ status = "okay"; ++}; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0m0_xfer>; ++ status = "okay"; ++};