sysreset: sophgo: milkv_duo: Add sysreset support for Milk-V Duo board
cover sysreset: sophgo: milkv_duo: Add sysreset support for Milk-V Duo board
This series add sysreset driver for cv1800b SoC and enable poweroff and reset commands for Sophgo Milk-V Duo board.
Kongyang Liu (3):
sysreset: cv1800b: Add sysreset driver for cv1800b SoC
board: sophgo: milkv_duo: Bind sysreset driver
configs: milkv_duo: Add sysreset configs
board/sophgo/milkv_duo/board.c | 4 ++ configs/milkv_duo_defconfig | 3 ++ drivers/sysreset/Kconfig | 5 +++ drivers/sysreset/Makefile | 1 + drivers/sysreset/sysreset_cv1800b.c | 64 +++++++++++++++++++++++++++++ 5 files changed, 77 insertions(+) create mode 100644 drivers/sysreset/sysreset_cv1800b.c
Signature · 1 line
2.41.0
PATCH 1/3 sysreset: cv1800b: Add sysreset driver for cv1800b SoC
Add sysreset driver for cv1800b SoC
---
drivers/sysreset/Kconfig | 5 +++ drivers/sysreset/Makefile | 1 + drivers/sysreset/sysreset_cv1800b.c | 64 +++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 drivers/sysreset/sysreset_cv1800b.c
drivers/sysreset/Kconfig +5 -0
@@ -59,6 +59,11 @@ config SYSRESET_CMD_POWEROFF endif +config SYSRESET_CV1800B + bool "Enable support for Sophgo cv1800b System Reset" + help + Enable system reset support for Sophgo cv1800b SoC. + config POWEROFF_GPIO bool "Enable support for GPIO poweroff driver" depends on DM_GPIO
drivers/sysreset/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-$(CONFIG_ARCH_ASPEED) += sysreset_ast.o obj-$(CONFIG_ARCH_ROCKCHIP) += sysreset_rockchip.o obj-$(CONFIG_ARCH_STI) += sysreset_sti.o obj-$(CONFIG_SANDBOX) += sysreset_sandbox.o +obj-$(CONFIG_SYSRESET_CV1800B) += sysreset_cv1800b.o obj-$(CONFIG_POWEROFF_GPIO) += poweroff_gpio.o obj-$(CONFIG_SYSRESET_GPIO) += sysreset_gpio.o obj-$(CONFIG_$(SPL_TPL_)SYSRESET_MAX77663) += sysreset_max77663.o
drivers/sysreset/sysreset_cv1800b.c new file +64 -0
64 lines not on this page · raw message
Signature · 1 line
2.41.0
Re: [PATCH 1/3] sysreset: cv1800b: Add sysreset driver for cv1800b SoC
Quoted 10 lines · Kongyang Liu
Add sysreset driver for cv1800b SoC
Signed-off-by Kongyang Liu <[email protected]>---
drivers/sysreset/Kconfig | 5 +++ drivers/sysreset/Makefile | 1 + drivers/sysreset/sysreset_cv1800b.c | 64 +++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 drivers/sysreset/sysreset_cv1800b.c
PATCH 2/3 board: sophgo: milkv_duo: Bind sysreset driver
In reply to Kongyang LiuBind cv1800b sysreset driver for Sophgo Milk-V Duo board in board_init function.
---
board/sophgo/milkv_duo/board.c | 4 ++++ 1 file changed, 4 insertions(+)
board/sophgo/milkv_duo/board.c +4 -0
@@ -3,7 +3,11 @@* Copyright (c) 2024, Kongyang Liu <[email protected]> */ +#include <dm/lists.h> +int board_init (void ) { +if (IS_ENABLED (CONFIG_SYSRESET_CV1800B )) +device_bind_driver (gd->dm_root,"cv1800b_sysreset" ,"sysreset" ,NULL );return 0 ; }
Signature · 1 line
2.41.0
Re: [PATCH 2/3] board: sophgo: milkv_duo: Bind sysreset driver
Quoted 8 lines · Kongyang Liu
Bind cv1800b sysreset driver for Sophgo Milk-V Duo board in
board_initfunction.Signed-off-by Kongyang Liu <[email protected]>---
board/sophgo/milkv_duo/board.c | 4 ++++ 1 file changed, 4 insertions(+)
PATCH 3/3 configs: milkv_duo: Add sysreset configs
In reply to Kongyang LiuAdd sysreset configs as well as poweroff and reset commands for Sophgo Milk-V Duo board.
---
configs/milkv_duo_defconfig | 3 +++ 1 file changed, 3 insertions(+)
configs/milkv_duo_defconfig +3 -0
@@ -19,6 +19,7 @@ CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="milkv_duo# " CONFIG_CMD_MMC=y CONFIG_CMD_PART=y +CONFIG_CMD_POWEROFF=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_ENV_OVERWRITE=y
@@ -30,3 +31,5 @@ CONFIG_MMC_SDHCI_ADMA=y CONFIG_MMC_SDHCI_CV1800B=y CONFIG_SYS_NS16550=y CONFIG_SYS_NS16550_MEM32=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CV1800B=y
Signature · 1 line
2.41.0
Re: [PATCH 3/3] configs: milkv_duo: Add sysreset configs
Quoted 8 lines · Kongyang Liu
Add sysreset configs as well as poweroff and reset commands for Sophgo Milk-V Duo board.
Signed-off-by Kongyang Liu <[email protected]>---
configs/milkv_duo_defconfig | 3 +++ 1 file changed, 3 insertions(+)