ti_dm6446.cfg 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. #
  3. # Texas Instruments DaVinci family: TMS320DM6446
  4. #
  5. if { [info exists CHIPNAME] } {
  6. set _CHIPNAME $CHIPNAME
  7. } else {
  8. set _CHIPNAME dm6446
  9. }
  10. # TI boards default to EMU0/EMU1 *high* -- ARM and ETB are *disabled*
  11. # after JTAG reset until ICEpick is used to route them in.
  12. set EMU01 "-disable"
  13. # With EMU0/EMU1 jumpered *low* ARM and ETB are *enabled* without
  14. # needing any ICEpick interaction.
  15. #set EMU01 "-enable"
  16. source [find target/icepick.cfg]
  17. # Subsidiary TAP: unknown ... must enable via ICEpick
  18. jtag newtap $_CHIPNAME unknown -irlen 8 -disable
  19. jtag configure $_CHIPNAME.unknown -event tap-enable \
  20. "icepick_c_tapenable $_CHIPNAME.jrc 3"
  21. # Subsidiary TAP: C64x+ DSP ... must enable via ICEpick
  22. jtag newtap $_CHIPNAME dsp -irlen 38 -ircapture 0x25 -irmask 0x3f -disable
  23. jtag configure $_CHIPNAME.dsp -event tap-enable \
  24. "icepick_c_tapenable $_CHIPNAME.jrc 2"
  25. # Subsidiary TAP: ARM ETB11, with scan chain for 4K of ETM trace buffer
  26. if { [info exists ETB_TAPID] } {
  27. set _ETB_TAPID $ETB_TAPID
  28. } else {
  29. set _ETB_TAPID 0x2b900f0f
  30. }
  31. jtag newtap $_CHIPNAME etb -irlen 4 -irmask 0xf -expected-id $_ETB_TAPID $EMU01
  32. jtag configure $_CHIPNAME.etb -event tap-enable \
  33. "icepick_c_tapenable $_CHIPNAME.jrc 1"
  34. # Subsidiary TAP: ARM926ejs with scan chains for ARM Debug, EmbeddedICE-RT, ETM.
  35. if { [info exists CPU_TAPID] } {
  36. set _CPU_TAPID $CPU_TAPID
  37. } else {
  38. set _CPU_TAPID 0x07926001
  39. }
  40. jtag newtap $_CHIPNAME arm -irlen 4 -irmask 0xf -expected-id $_CPU_TAPID $EMU01
  41. jtag configure $_CHIPNAME.arm -event tap-enable \
  42. "icepick_c_tapenable $_CHIPNAME.jrc 0"
  43. # Primary TAP: ICEpick-C (JTAG route controller) and boundary scan
  44. if { [info exists JRC_TAPID] } {
  45. set _JRC_TAPID $JRC_TAPID
  46. } else {
  47. set _JRC_TAPID 0x0b70002f
  48. }
  49. jtag newtap $_CHIPNAME jrc -irlen 6 -irmask 0x3f -expected-id $_JRC_TAPID
  50. jtag configure $_CHIPNAME.jrc -event setup \
  51. "jtag tapenable $_CHIPNAME.etb; jtag tapenable $_CHIPNAME.arm"
  52. ################
  53. # GDB target: the ARM, using SRAM1 for scratch. SRAM0 (also 8K)
  54. # and the ETB memory (4K) are other options, while trace is unused.
  55. # Little-endian; use the OpenOCD default.
  56. set _TARGETNAME $_CHIPNAME.arm
  57. target create $_TARGETNAME arm926ejs -chain-position $_TARGETNAME
  58. $_TARGETNAME configure -work-area-phys 0x0000a000 -work-area-size 0x2000
  59. # be absolutely certain the JTAG clock will work with the worst-case
  60. # CLKIN = 20 MHz (best case: 30 MHz) even when no bootloader turns
  61. # on the PLL and starts using it. OK to speed up after clock setup.
  62. adapter speed 1500
  63. $_TARGETNAME configure -event "reset-start" { adapter speed 1500 }
  64. arm7_9 fast_memory_access enable
  65. arm7_9 dcc_downloads enable
  66. # trace setup
  67. etm config $_TARGETNAME 16 normal full etb
  68. etb config $_TARGETNAME $_CHIPNAME.etb