A0 chip: remove pad isolation
A2 chip: instead of reset init fixes we will fix the flash driver
with the following patch by Luke Wren:
8729: flash/nor/rp2xxx: fix flash operation after halt in RISC-V bootsel
https://review.openocd.org/c/openocd/+/8729
I don't have A1 version to test.
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I9e9fab04ead929fe6e0a17c6c2f32a6f02e9beb9
Reviewed-on: https://review.openocd.org/c/openocd/+/8450
Tested-by: jenkins
target create $_TARGETNAME_RV0 riscv -dap $_CHIPNAME.dap -ap-num 0xa000 -coreid 0
$_TARGETNAME_RV0 riscv set_enable_virt2phys off
- # Workaround for stray IO_QSPI: GPIO_QSPI_SD1_CTRL: INOVER bit in RISC-V BOOTSEL
- $_TARGETNAME_RV0 configure -event reset-init { mww 0x4003002c 0 }
+ $_TARGETNAME_RV0 configure -event reset-init "_rv_reset_init"
if { [info exists _TARGETNAME_CM0] } {
# just for setting after init when the event become-available is not fired
init
rescue_reset
}
+
+proc _rv_reset_init { } {
+ set chip_id [format 0x%08x [read_memory 0x40000000 32 1]]
+
+ # Version related workarounds
+ switch $chip_id {
+ 0x00004927 { # A0
+ # remove IO_QSPI isolation
+ mww 0x40030014 0
+ mww 0x4003001c 0
+ mww 0x40030024 0
+ mww 0x4003002c 0
+ mww 0x40030034 0
+ mww 0x4003003c 0
+ }
+ }
+
+ rp2xxx rom_api_call FC
+}