connect all the jtag pins and connect PU_CHIP pin to nReset/srst/sreset of the ftdi jtag adapter/rv debugger plus
and use the bellow config
pine64jtag.cfg
interface ftdi
#may need to change this to your adapters vid and pid
ftdi_vid_pid 0x0403 0x6014
ftdi_channel 0
transport select jtag
adapter_khz 4000
ftdi_layout_init 0x00f8 0x00fb
ftdi layout_signal nSRST -data 0x0020 -oe 0x0020
adapter_nsrst_delay 8
tgt_e907.cfg
set _CHIPNAME riscv
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x10000b6f
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME
$_TARGETNAME.0 configure -work-area-phys 0x40000000 -work-area-size 0x10000 -work-area-backup 0
echo "Ready for Remote Connections"
gdb_memory_map enable
gdb_flash_program disable
riscv set_prefer_sba off
reset_config srst_only srst_pulls_trst
riscv set_command_timeout_sec 3
init
then
openocd -f pine64jtag.cfg -f tgt_e907.cfg
in gdb
target extended-remote :3333
monitor reset init
monitor gdb_sync
si
PC should be somewhere in bootrom.
if you get bellow error, increase adapter_nsrst_delay
JTAG scan chain interrogation failed: all ones
Check JTAG interface, timings, target power, etc.
Trying to use configured scan chain anyway...
Bypassing JTAG setup events due to errors
To get additional csrs exposed, use this config, the most interesting one is
mpcfifo
tgt_e907.cfg