Skip to content

Commit

Permalink
Add JTAG configuration for ARM926 with XIO2001.
Browse files Browse the repository at this point in the history
Boards like the cifX 50E have a XIO2001 PCIE to PCI bridge chip in the
scan chain together with the ARM926 CPU.

Please note that the adapter speed is set to 50kHz. This is very slow and
results in long transfer times. The hardware setup used to develop this
patch included an FTDI JTAG adapter, a "Papa Schlumpf" PCIE tester board,
a PCIE adapter board and finally a CIFX 50E. This is quite a long way for
a JTAG signal. In this setup 100kHz was already too fast.
  • Loading branch information
docbacardi committed Jan 16, 2024
1 parent 95e8821 commit 3e57aa0
Showing 1 changed file with 37 additions and 6 deletions.
43 changes: 37 additions & 6 deletions plugins/romloader/jtag/openocd/tcl/jtag_detect_init.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,13 @@ proc probe_interface {} {
# ###################################################################

set KNOWN_CPUS {
{ "netX_ARM966" probe_cpu_netx_arm966 }
{ "netX_ARM926" probe_cpu_netx_arm926 }
{ "netX4000_R7" probe_cpu_netx4000_r7 }
{ "netX90_MPW_COM" probe_cpu_netx90_mpw_com }
{ "netX90_COM" probe_cpu_netx90_com }
{ "netIOL" probe_cpu_netiol }
{ "netX_ARM966" probe_cpu_netx_arm966 }
{ "XIO2001_netXARM926" probe_cpu_xio2001_netx_arm926 }
{ "netX_ARM926" probe_cpu_netx_arm926 }
{ "netX4000_R7" probe_cpu_netx4000_r7 }
{ "netX90_MPW_COM" probe_cpu_netx90_mpw_com }
{ "netX90_COM" probe_cpu_netx90_com }
{ "netIOL" probe_cpu_netiol }
}

proc probe_cpu_netx_arm966 {} {
Expand Down Expand Up @@ -348,6 +349,36 @@ proc probe_cpu_netx_arm926 {} {
}
}

proc probe_cpu_xio2001_netx_arm926 {} {
echo "probe_cpu XIO2001 with netX_ARM926"

global SC_CFG_RESULT
global __JTAG_RESET__

jtag newtap netX_ARM926 cpu -irlen 4 -ircapture 1 -irmask 0xf -expected-id 0x07926021
jtag newtap XIO2001 tap -irlen 5 -expected-id 0x00000000
jtag configure netX_ARM926.cpu -event setup { global SC_CFG_RESULT ; echo {Yay} ; set SC_CFG_RESULT {OK} }
jtag init

if { $SC_CFG_RESULT=={OK} } {
target create netX_ARM926.cpu arm926ejs -endian little -chain-position netX_ARM926.cpu
if { $__JTAG_RESET__==1 } {
netX_ARM926.cpu configure -event reset-assert { reset_assert }
netX_ARM926.cpu configure -event reset-deassert-post { reset_deassert_post }
}
netX_ARM926.cpu configure -event reset-init { echo {netX_ARM926.cpu reset-init event}; halt }
netX_ARM926.cpu configure -work-area-phys 0x0380 -work-area-size 0x0080 -work-area-backup 1

global strTarget
set strTarget XIO2001_ARM926

global ADAPTER_MAX_KHZ
set ADAPTER_MAX_KHZ 50
} else {
return -code error "Failed to probe XIO with netX_ARM926."
}
}

proc probe_cpu_netx4000_r7 {} {
echo "probe_cpu netX4000_R7"

Expand Down

0 comments on commit 3e57aa0

Please sign in to comment.