imx6_quad.cfg 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Freescale i.MX6 series single/dual/quad core processor
  2. adapter speed 1000
  3. if { [info exists CHIPNAME] } {
  4. set _CHIPNAME $CHIPNAME
  5. } else {
  6. set _CHIPNAME imx6
  7. }
  8. # CoreSight Debug Access Port
  9. if { [info exists DAP_TAPID] } {
  10. set _DAP_TAPID $DAP_TAPID
  11. } else {
  12. set _DAP_TAPID 0x4ba00477
  13. }
  14. jtag newtap $_CHIPNAME dap -irlen 4 -ircapture 0x01 -irmask 0x0f \
  15. -expected-id $_DAP_TAPID
  16. # SDMA / no IDCODE
  17. jtag newtap $_CHIPNAME sdma -irlen 4 -ircapture 0x00 -irmask 0x0f
  18. # System JTAG Controller
  19. if { [info exists SJC_TAPID] } {
  20. set _SJC_TAPID $SJC_TAPID
  21. } else {
  22. set _SJC_TAPID 0x0191c01d
  23. }
  24. set _SJC_TAPID2 0x2191c01d
  25. set _SJC_TAPID3 0x2191e01d
  26. set _SJC_TAPID4 0x1191c01d
  27. set _SJC_TAPID5 0x1891a01d
  28. jtag newtap $_CHIPNAME sjc -irlen 5 -ircapture 0x01 -irmask 0x1f \
  29. -expected-id $_SJC_TAPID -expected-id $_SJC_TAPID2 \
  30. -expected-id $_SJC_TAPID3 -expected-id $_SJC_TAPID4 \
  31. -expected-id $_SJC_TAPID5
  32. proc imx6_dbginit {target} {
  33. # General Cortex A8/A9 debug initialisation
  34. cortex_a dbginit
  35. }
  36. # GDB target: Cortex-A9, using DAP, configuring only one core
  37. # Base addresses of cores:
  38. # core 0 - 0x82150000
  39. # core 1 - 0x82152000
  40. # core 2 - 0x82154000
  41. # core 3 - 0x82156000
  42. proc imx6_create_core {_CHIPNAME corenum corebase} {
  43. set _TARGETNAME $_CHIPNAME.cpu.$corenum
  44. target create $_TARGETNAME cortex_a -chain-position $_CHIPNAME.dap \
  45. -coreid $corenum -dbgbase $corebase -rtos hwthread
  46. # some TCK cycles are required to activate the DEBUG power domain
  47. jtag configure $_CHIPNAME.sjc -event post-reset "runtest 100"
  48. # Slow speed to be sure it will work
  49. $_TARGETNAME configure -event reset-assert-post "imx6_dbginit $_TARGETNAME"
  50. $_TARGETNAME configure -event gdb-attach { halt }
  51. }
  52. reset_config trst_and_srst
  53. imx6_create_core $_CHIPNAME 0 0x82150000
  54. imx6_create_core $_CHIPNAME 1 0x82152000
  55. imx6_create_core $_CHIPNAME 2 0x82154000
  56. imx6_create_core $_CHIPNAME 3 0x82156000
  57. target smp $_CHIPNAME.cpu.0 $_CHIPNAME.cpu.1 $_CHIPNAME.cpu.2 $_CHIPNAME.cpu.3