[PATCH v2 4/6] board: rockchip: Add Sonoff iHost board
Sonoff iHost is gateway device designed to provide a Smart Home Hub, it is based on Rockchip RV1126. There is also a version with 2GB RAM based off the RV1109 dual core SoC however this works with the same config as the RV1126 for uboot purposes. Features: - Rockchip RV1126 - 4GB DDR4 - 8GB eMMC - microSD slot - RMII Ethernet PHY - 1x USB 2.0 Host - 1x USB 2.0 OTG - Realtek RTL8723DS WiFi/BT - EFR32MG21 Silabs Zigbee radio - Speaker/Microphone Signed-off-by: Tim Lunn --- Changes in v2: - Remove board config not required with standard boot arch/arm/dts/rv1126-sonoff-ihost-u-boot.dtsi | 13 + arch/arm/mach-rockchip/rv1126/Kconfig| 8 +++ board/itead/sonoff-ihost/Kconfig | 16 ++ board/itead/sonoff-ihost/MAINTAINERS | 6 ++ configs/sonoff-ihost-rv1126_defconfig| 60 doc/board/rockchip/rockchip.rst | 1 + include/configs/sonoff-ihost.h | 10 7 files changed, 114 insertions(+) create mode 100644 arch/arm/dts/rv1126-sonoff-ihost-u-boot.dtsi create mode 100644 board/itead/sonoff-ihost/Kconfig create mode 100644 board/itead/sonoff-ihost/MAINTAINERS create mode 100644 configs/sonoff-ihost-rv1126_defconfig create mode 100644 include/configs/sonoff-ihost.h diff --git a/arch/arm/dts/rv1126-sonoff-ihost-u-boot.dtsi b/arch/arm/dts/rv1126-sonoff-ihost-u-boot.dtsi new file mode 100644 index 00..a625660d58 --- /dev/null +++ b/arch/arm/dts/rv1126-sonoff-ihost-u-boot.dtsi @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +#include "rv1126-u-boot.dtsi" + +/ { + chosen { + u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc; + }; +}; + +&sdio { + status = "disabled"; +}; diff --git a/arch/arm/mach-rockchip/rv1126/Kconfig b/arch/arm/mach-rockchip/rv1126/Kconfig index a6e2b5903c..55b1112120 100644 --- a/arch/arm/mach-rockchip/rv1126/Kconfig +++ b/arch/arm/mach-rockchip/rv1126/Kconfig @@ -14,6 +14,13 @@ config TARGET_RV1126_NEU2 IO board and Neu2 needs to mount on top of this IO board in order to create complete Edgeble Neural Compute Module 2(Neu2) IO platform. +config TARGET_RV1126_SONOFF_IHOST + bool "Sonoff iHost smart home hub" + help + Sonoff iHost is a smart home gateway based on Rockchip RV1126 SoC. + It features Wifi, Bluetooth and Zigbee radios that are used by many + smart home devices. + config SOC_SPECIFIC_OPTIONS # dummy def_bool y select HAS_CUSTOM_SYS_INIT_SP_ADDR @@ -58,5 +65,6 @@ config TEXT_BASE default 0x60 source board/edgeble/neural-compute-module-2/Kconfig +source board/itead/sonoff-ihost/Kconfig endif diff --git a/board/itead/sonoff-ihost/Kconfig b/board/itead/sonoff-ihost/Kconfig new file mode 100644 index 00..30d9a6b3e6 --- /dev/null +++ b/board/itead/sonoff-ihost/Kconfig @@ -0,0 +1,16 @@ +if TARGET_RV1126_SONOFF_IHOST + +config SYS_BOARD + default "sonoff-ihost" + +config SYS_VENDOR + default "itead" + +config SYS_CONFIG_NAME + default "sonoff-ihost" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select RAM_ROCKCHIP_DDR4 + +endif diff --git a/board/itead/sonoff-ihost/MAINTAINERS b/board/itead/sonoff-ihost/MAINTAINERS new file mode 100644 index 00..eff9274bea --- /dev/null +++ b/board/itead/sonoff-ihost/MAINTAINERS @@ -0,0 +1,6 @@ +RV1126-SONOFF-IHOST +M: Tim Lunn +S: Maintained +F: board/itead/sonoff-ihost +F: include/configs/sonoff-ihost.h +F: configs/sonoff-ihost-rv1126_defconfig diff --git a/configs/sonoff-ihost-rv1126_defconfig b/configs/sonoff-ihost-rv1126_defconfig new file mode 100644 index 00..fe99bd92f9 --- /dev/null +++ b/configs/sonoff-ihost-rv1126_defconfig @@ -0,0 +1,60 @@ +CONFIG_ARM=y +CONFIG_SPL_SKIP_LOWLEVEL_INIT_ONLY=y +CONFIG_TPL_SKIP_LOWLEVEL_INIT_ONLY=y +CONFIG_COUNTER_FREQUENCY=2400 +CONFIG_SYS_ARCH_TIMER=y +CONFIG_ARCH_ROCKCHIP=y +CONFIG_NR_DRAM_BANKS=1 +CONFIG_DEFAULT_DEVICE_TREE="rv1126-sonoff-ihost" +CONFIG_SYS_MONITOR_LEN=614400 +CONFIG_ROCKCHIP_RV1126=y +CONFIG_TARGET_RV1126_SONOFF_IHOST=y +CONFIG_DEBUG_UART_BASE=0xff57 +CONFIG_DEBUG_UART_CLOCK=2400 +CONFIG_SYS_LOAD_ADDR=0xe00800 +CONFIG_DEBUG_UART=y +CONFIG_FIT_VERBOSE=y +CONFIG_NR_DRAM_BANKS=2 +CONFIG_SPL_FIT=y +CONFIG_SPL_LOAD_FIT=y +# CONFIG_USE_SPL_FIT_GENERATOR is not set +CONFIG_SYS_BOOTM_LEN=0x400 +CONFIG_DEFAULT_FDT_FILE="rv1126-sonoff-ihost.dtb" +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_SPL_PAD_TO=0x7f8000 +CONFIG_SPL_NO_BSS_LIMIT=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +# CONFIG_CMD_BOOTD is not set +# CONFIG_CMD_ELF is not set +# CONFIG_CMD_IMI is not set +# CONFIG_CMD_XIMG is not set +CONFIG_CMD_GPT=y +# CONFIG_CMD_LOADB is not set +# CONFIG_CMD_LOADS is not set +CONFIG_CMD_MMC=y +# CONFIG_CMD_ITEST is not set +# CONFIG_CMD_SETEXPR is not set +# CONFIG_SPL_DOS_PARTITIO
Re: [PATCH v2 4/6] board: rockchip: Add Sonoff iHost board
On 2024/1/24 11:26, Tim Lunn wrote: Sonoff iHost is gateway device designed to provide a Smart Home Hub, it is based on Rockchip RV1126. There is also a version with 2GB RAM based off the RV1109 dual core SoC however this works with the same config as the RV1126 for uboot purposes. Features: - Rockchip RV1126 - 4GB DDR4 - 8GB eMMC - microSD slot - RMII Ethernet PHY - 1x USB 2.0 Host - 1x USB 2.0 OTG - Realtek RTL8723DS WiFi/BT - EFR32MG21 Silabs Zigbee radio - Speaker/Microphone Signed-off-by: Tim Lunn Reviewed-by: Kever Yang Thanks, - Kever --- Changes in v2: - Remove board config not required with standard boot arch/arm/dts/rv1126-sonoff-ihost-u-boot.dtsi | 13 + arch/arm/mach-rockchip/rv1126/Kconfig| 8 +++ board/itead/sonoff-ihost/Kconfig | 16 ++ board/itead/sonoff-ihost/MAINTAINERS | 6 ++ configs/sonoff-ihost-rv1126_defconfig| 60 doc/board/rockchip/rockchip.rst | 1 + include/configs/sonoff-ihost.h | 10 7 files changed, 114 insertions(+) create mode 100644 arch/arm/dts/rv1126-sonoff-ihost-u-boot.dtsi create mode 100644 board/itead/sonoff-ihost/Kconfig create mode 100644 board/itead/sonoff-ihost/MAINTAINERS create mode 100644 configs/sonoff-ihost-rv1126_defconfig create mode 100644 include/configs/sonoff-ihost.h diff --git a/arch/arm/dts/rv1126-sonoff-ihost-u-boot.dtsi b/arch/arm/dts/rv1126-sonoff-ihost-u-boot.dtsi new file mode 100644 index 00..a625660d58 --- /dev/null +++ b/arch/arm/dts/rv1126-sonoff-ihost-u-boot.dtsi @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +#include "rv1126-u-boot.dtsi" + +/ { + chosen { + u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc; + }; +}; + +&sdio { + status = "disabled"; +}; diff --git a/arch/arm/mach-rockchip/rv1126/Kconfig b/arch/arm/mach-rockchip/rv1126/Kconfig index a6e2b5903c..55b1112120 100644 --- a/arch/arm/mach-rockchip/rv1126/Kconfig +++ b/arch/arm/mach-rockchip/rv1126/Kconfig @@ -14,6 +14,13 @@ config TARGET_RV1126_NEU2 IO board and Neu2 needs to mount on top of this IO board in order to create complete Edgeble Neural Compute Module 2(Neu2) IO platform. +config TARGET_RV1126_SONOFF_IHOST + bool "Sonoff iHost smart home hub" + help + Sonoff iHost is a smart home gateway based on Rockchip RV1126 SoC. + It features Wifi, Bluetooth and Zigbee radios that are used by many + smart home devices. + config SOC_SPECIFIC_OPTIONS # dummy def_bool y select HAS_CUSTOM_SYS_INIT_SP_ADDR @@ -58,5 +65,6 @@ config TEXT_BASE default 0x60 source board/edgeble/neural-compute-module-2/Kconfig +source board/itead/sonoff-ihost/Kconfig endif diff --git a/board/itead/sonoff-ihost/Kconfig b/board/itead/sonoff-ihost/Kconfig new file mode 100644 index 00..30d9a6b3e6 --- /dev/null +++ b/board/itead/sonoff-ihost/Kconfig @@ -0,0 +1,16 @@ +if TARGET_RV1126_SONOFF_IHOST + +config SYS_BOARD + default "sonoff-ihost" + +config SYS_VENDOR + default "itead" + +config SYS_CONFIG_NAME + default "sonoff-ihost" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select RAM_ROCKCHIP_DDR4 + +endif diff --git a/board/itead/sonoff-ihost/MAINTAINERS b/board/itead/sonoff-ihost/MAINTAINERS new file mode 100644 index 00..eff9274bea --- /dev/null +++ b/board/itead/sonoff-ihost/MAINTAINERS @@ -0,0 +1,6 @@ +RV1126-SONOFF-IHOST +M: Tim Lunn +S: Maintained +F: board/itead/sonoff-ihost +F: include/configs/sonoff-ihost.h +F: configs/sonoff-ihost-rv1126_defconfig diff --git a/configs/sonoff-ihost-rv1126_defconfig b/configs/sonoff-ihost-rv1126_defconfig new file mode 100644 index 00..fe99bd92f9 --- /dev/null +++ b/configs/sonoff-ihost-rv1126_defconfig @@ -0,0 +1,60 @@ +CONFIG_ARM=y +CONFIG_SPL_SKIP_LOWLEVEL_INIT_ONLY=y +CONFIG_TPL_SKIP_LOWLEVEL_INIT_ONLY=y +CONFIG_COUNTER_FREQUENCY=2400 +CONFIG_SYS_ARCH_TIMER=y +CONFIG_ARCH_ROCKCHIP=y +CONFIG_NR_DRAM_BANKS=1 +CONFIG_DEFAULT_DEVICE_TREE="rv1126-sonoff-ihost" +CONFIG_SYS_MONITOR_LEN=614400 +CONFIG_ROCKCHIP_RV1126=y +CONFIG_TARGET_RV1126_SONOFF_IHOST=y +CONFIG_DEBUG_UART_BASE=0xff57 +CONFIG_DEBUG_UART_CLOCK=2400 +CONFIG_SYS_LOAD_ADDR=0xe00800 +CONFIG_DEBUG_UART=y +CONFIG_FIT_VERBOSE=y +CONFIG_NR_DRAM_BANKS=2 +CONFIG_SPL_FIT=y +CONFIG_SPL_LOAD_FIT=y +# CONFIG_USE_SPL_FIT_GENERATOR is not set +CONFIG_SYS_BOOTM_LEN=0x400 +CONFIG_DEFAULT_FDT_FILE="rv1126-sonoff-ihost.dtb" +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_SPL_PAD_TO=0x7f8000 +CONFIG_SPL_NO_BSS_LIMIT=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +# CONFIG_CMD_BOOTD is not set +# CONFIG_CMD_ELF is not set +# CONFIG_CMD_IMI is not set +# CONFIG_CMD_XIMG is not set +CONFIG_CMD_GPT=y +# CONFIG_CMD_LOADB is not set +# CONFIG_CMD_LOADS is not set +C