riscv: enable reset via SBI on PolarFire Icicle Kit
PATCH 1/1 riscv: enable reset via SBI on PolarFire Icicle Kit
HSS 2022.10 provides support for resetting the board.
--- configs/microchip_mpfs_icicle_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/microchip_mpfs_icicle_defconfig +2 -0
@@ -21,3 +21,5 @@ CONFIG_SYS_MEM_TOP_HIDE=0x400000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_BOOTP_SEND_HOSTNAME=y CONFIG_DM_MTD=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_SBI=y
Signature · 1 line
2.37.2
Quoted 16 lines · Heinrich Schuchardt
HSS 2022.10 provides support for resetting the board.
Signed-off-by Heinrich Schuchardt <[email protected]Quoted 1 line
--- configs/microchip_mpfs_icicle_defconfig | 2 ++ 1 file changed, 2 insertions(+)configs/microchip_mpfs_icicle_defconfig +0
-0
configs/microchip_mpfs_icicle_defconfig CONFIG_SYS_MEM_TOP_HIDE=0x400000 · line 25
Quoted 5 lines
configs/microchip_mpfs_icicle_defconfig +2
-0@@ -21,3 +21,5 @@ CONFIG_SYS_MEM_TOP_HIDE=0x400000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_BOOTP_SEND_HOSTNAME=y CONFIG_DM_MTD=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_SBI=y
Quoted 3 lines
--
2.37.2
Quoted 1 line · Heinrich Schuchardt
HSS 2022.10 provides support for resetting the board.
It's actually v2022.09 that added support for reset. I don't think that that is important to correct though, since v2022.10 is the version we are updating the dt in U-Boot to match.
One minor & mostly unrelated question below.
Quoted 10 lines
Signed-off-by Heinrich Schuchardt <[email protected]>--- configs/microchip_mpfs_icicle_defconfig | 2 ++ 1 file changed, 2 insertions(+)configs/microchip_mpfs_icicle_defconfig +0
-0
configs/microchip_mpfs_icicle_defconfig CONFIG_SYS_MEM_TOP_HIDE=0x400000 · line 25
Quoted 5 lines
configs/microchip_mpfs_icicle_defconfig +2
-0@@ -21,3 +21,5 @@ CONFIG_SYS_MEM_TOP_HIDE=0x400000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_BOOTP_SEND_HOSTNAME=y CONFIG_DM_MTD=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_SBI=y
I took a look at the config option, but something seemed odd to me. It says "depends on SBI_V02" but the help text says "version 0.3". I see there's no define for SBI_V03 so I assume that's why there's a mismatch.
I didn't see a comment about it in the commit hence asking. AFAIR, v0.3 is the correct version.
Quoted 8 lines
config
SYSRESET_SBI
bool "Enable support for SBI System Reset"
depends onRISCV_SMODE&&SBI_V02
default y
selectSYSRESET_CMD_POWEROFFifCMD_POWEROFF
help
Enable system reset and poweroff via the SBI system reset extension. The extension was introduced in version 0.3 of the SBI specification.
Quoted 30 lines · Conor Dooley
Quoted 1 line · Heinrich Schuchardt
HSS 2022.10 provides support for resetting the board.
It's actually v2022.09 that added support for reset. I don't think that that is important to correct though, since v2022.10 is the version we are updating the dt in U-Boot to match.
Reviewed-by Conor Dooley <[email protected]>One minor & mostly unrelated question below.
Quoted 10 lines
Signed-off-by Heinrich Schuchardt <[email protected]>--- configs/microchip_mpfs_icicle_defconfig | 2 ++ 1 file changed, 2 insertions(+)configs/microchip_mpfs_icicle_defconfig +0
-0configs/microchip_mpfs_icicle_defconfig CONFIG_SYS_MEM_TOP_HIDE=0x400000 · line 25
Quoted 5 lines
configs/microchip_mpfs_icicle_defconfig +2
-0@@ -21,3 +21,5 @@ CONFIG_SYS_MEM_TOP_HIDE=0x400000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_BOOTP_SEND_HOSTNAME=y CONFIG_DM_MTD=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_SBI=yI took a look at the config option, but something seemed odd to me. It says "depends on
SBI_V02" but the help text says "version 0.3". I see there's no define forSBI_V03so I assume that's why there's a mismatch.
Quoted 2 lines
I didn't see a comment about it in the commit hence asking. AFAIR, v0.3 is the correct version.
IIRC 0.3 is the same as 0.2 except it was ratified.
Quoted 8 lines
Quoted 8 lines
config
SYSRESET_SBI
bool "Enable support for SBI System Reset"
depends onRISCV_SMODE&&SBI_V02
default y
selectSYSRESET_CMD_POWEROFFifCMD_POWEROFF
help
Enable system reset and poweroff via the SBI system reset extension. The extension was introduced in version 0.3 of the SBI specification.
Quoted 11 lines · Sean Anderson
Quoted 8 lines · Conor Dooley
Quoted 1 line
+CONFIG_SYSRESET_SBI=y
I took a look at the config option, but something seemed odd to me. It says "depends on
SBI_V02" but the help text says "version 0.3". I see there's no define forSBI_V03so I assume that's why there's a mismatch.I didn't see a comment about it in the commit hence asking. AFAIR, v0.3 is the correct version.
IIRC 0.3 is the same as 0.2 except it was ratified.
Ah I see. Apologies for the noise on that one so, had a quick look on the riscv-non-isa github but obviously not enough!
Thanks Sean.
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
config
SYSRESET_SBI
bool "Enable support for SBI System Reset"
depends onRISCV_SMODE&&SBI_V02
default y
selectSYSRESET_CMD_POWEROFFifCMD_POWEROFF
help
Enable system reset and poweroff via the SBI system reset extension. The extension was introduced in version 0.3 of the SBI specification.
Quoted 30 lines · Conor Dooley
Quoted 1 line · Heinrich Schuchardt
HSS 2022.10 provides support for resetting the board.
It's actually v2022.09 that added support for reset. I don't think that that is important to correct though, since v2022.10 is the version we are updating the dt in U-Boot to match.
Reviewed-by Conor Dooley <[email protected]>One minor & mostly unrelated question below.
Quoted 10 lines
Signed-off-by Heinrich Schuchardt <[email protected]>--- configs/microchip_mpfs_icicle_defconfig | 2 ++ 1 file changed, 2 insertions(+)configs/microchip_mpfs_icicle_defconfig +0
-0configs/microchip_mpfs_icicle_defconfig CONFIG_SYS_MEM_TOP_HIDE=0x400000 · line 25
Quoted 5 lines
configs/microchip_mpfs_icicle_defconfig +2
-0@@ -21,3 +21,5 @@ CONFIG_SYS_MEM_TOP_HIDE=0x400000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_BOOTP_SEND_HOSTNAME=y CONFIG_DM_MTD=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_SBI=yI took a look at the config option, but something seemed odd to me. It says "depends on
SBI_V02" but the help text says "version 0.3". I see there's no define forSBI_V03so I assume that's why there's a mismatch.
Quoted 2 lines
I didn't see a comment about it in the commit hence asking. AFAIR, v0.3 is the correct version.
The only ratified version of the SBI specification is 1.0.
v0.2 introduced the concept of extensions.
v0.3 introduced the SRST extension.
CONFIG_SBI_V02=y means SBI specification v0.2 or later. We should update the description of CONFIG_SBI_V02 accordingly.
HSS 2022.10 provides an OpenSBI 1.0 which is good enough.
If you use a 0.1 or 0.2 SBI, the worst thing that can happen is that sbi_probe_extension(SBI_EXT_SRST) will return an error and the reset driver is not loaded.
Best regards
Heinrich
Quoted 9 lines
Quoted 9 lines
config
SYSRESET_SBI
bool "Enable support for SBI System Reset"
depends onRISCV_SMODE&&SBI_V02
default y
selectSYSRESET_CMD_POWEROFFifCMD_POWEROFF
help
Enable system reset and poweroff via the SBI system reset extension. The extension was introduced in version 0.3 of the SBI specification.