omap3530.cfg 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. # TI OMAP3530
  3. # http://focus.ti.com/docs/prod/folders/print/omap3530.html
  4. # Other OMAP3 chips remove DSP and/or the OpenGL support
  5. if { [info exists CHIPNAME] } {
  6. set _CHIPNAME $CHIPNAME
  7. } else {
  8. set _CHIPNAME omap3530
  9. }
  10. # ICEpick-C ... used to route Cortex, DSP, and more not shown here
  11. source [find target/icepick.cfg]
  12. # Subsidiary TAP: C64x+ DSP ... must enable via ICEpick
  13. jtag newtap $_CHIPNAME dsp -irlen 38 -ircapture 0x25 -irmask 0x3f -disable
  14. # Subsidiary TAP: CoreSight Debug Access Port (DAP)
  15. if { [info exists DAP_TAPID] } {
  16. set _DAP_TAPID $DAP_TAPID
  17. } else {
  18. set _DAP_TAPID 0x0b6d602f
  19. }
  20. jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf \
  21. -expected-id $_DAP_TAPID -disable
  22. jtag configure $_CHIPNAME.cpu -event tap-enable \
  23. "icepick_c_tapenable $_CHIPNAME.jrc 3"
  24. # Primary TAP: ICEpick-C (JTAG route controller) and boundary scan
  25. if { [info exists JRC_TAPID] } {
  26. set _JRC_TAPID $JRC_TAPID
  27. } else {
  28. set _JRC_TAPID 0x0b7ae02f
  29. }
  30. jtag newtap $_CHIPNAME jrc -irlen 6 -ircapture 0x1 -irmask 0x3f \
  31. -expected-id $_JRC_TAPID
  32. # GDB target: Cortex-A8, using DAP
  33. set _TARGETNAME $_CHIPNAME.cpu
  34. dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
  35. target create $_TARGETNAME cortex_a -dap $_CHIPNAME.dap
  36. # SRAM: 64K at 0x4020.0000; use the first 16K
  37. $_TARGETNAME configure -work-area-phys 0x40200000 -work-area-size 0x4000
  38. ###################
  39. # the reset sequence is event-driven
  40. # and kind of finicky...
  41. # some TCK tycles are required to activate the DEBUG power domain
  42. jtag configure $_CHIPNAME.jrc -event post-reset "runtest 100"
  43. # have the DAP "always" be active
  44. jtag configure $_CHIPNAME.jrc -event setup "jtag tapenable $_CHIPNAME.dap"
  45. proc omap3_dbginit {target} {
  46. # General Cortex-A8 debug initialisation
  47. cortex_a dbginit
  48. # Enable DBGU signal for OMAP353x
  49. $target mww phys 0x5401d030 0x00002000
  50. }
  51. # be absolutely certain the JTAG clock will work with the worst-case
  52. # 16.8MHz/2 = 8.4MHz core clock, even before a bootloader kicks in.
  53. # OK to speed up *after* PLL and clock tree setup.
  54. adapter speed 1000
  55. $_TARGETNAME configure -event "reset-start" { adapter speed 1000 }
  56. # Assume SRST is unavailable (e.g. TI-14 JTAG), so we must assert reset
  57. # ourselves using PRM_RSTCTRL. RST_GS (2) is a warm reset, like ICEpick
  58. # would issue. RST_DPLL3 (4) is a cold reset.
  59. set PRM_RSTCTRL 0x48307250
  60. $_TARGETNAME configure -event reset-assert "$_TARGETNAME mww $PRM_RSTCTRL 2"
  61. $_TARGETNAME configure -event reset-assert-post "omap3_dbginit $_TARGETNAME"