nxp_imx7sabre.cfg 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. # NXP IMX7SABRE board
  3. # use on-board JTAG header
  4. transport select jtag
  5. # set a safe speed, can be overridden
  6. adapter speed 1000
  7. # reset configuration has TRST and SRST support
  8. reset_config trst_and_srst srst_push_pull
  9. # need at least 100ms delay after SRST release for JTAG
  10. adapter srst delay 100
  11. # source the target file
  12. source [find target/imx7.cfg]
  13. # import mrw proc
  14. source [find mem_helper.tcl]
  15. # function to disable the on-chip watchdog
  16. proc imx7_disable_wdog { } {
  17. # echo "disable watchdog power-down counter"
  18. mwh phys 0x30280008 0x00
  19. }
  20. proc imx7_uart_dbgconf { } {
  21. # disable response to debug_req signal for uart1
  22. mww phys 0x308600b4 0x0a60
  23. }
  24. proc check_bits_set_32 { addr mask } {
  25. while { [expr {[mrw $addr] & $mask} == 0] } { }
  26. }
  27. proc apply_dcd { } {
  28. # echo "apply dcd"
  29. mww phys 0x30340004 0x4F400005
  30. # Clear then set bit30 to ensure exit from DDR retention
  31. mww phys 0x30360388 0x40000000
  32. mww phys 0x30360384 0x40000000
  33. mww phys 0x30391000 0x00000002
  34. mww phys 0x307a0000 0x01040001
  35. mww phys 0x307a01a0 0x80400003
  36. mww phys 0x307a01a4 0x00100020
  37. mww phys 0x307a01a8 0x80100004
  38. mww phys 0x307a0064 0x00400046
  39. mww phys 0x307a0490 0x00000001
  40. mww phys 0x307a00d0 0x00020083
  41. mww phys 0x307a00d4 0x00690000
  42. mww phys 0x307a00dc 0x09300004
  43. mww phys 0x307a00e0 0x04080000
  44. mww phys 0x307a00e4 0x00100004
  45. mww phys 0x307a00f4 0x0000033f
  46. mww phys 0x307a0100 0x09081109
  47. mww phys 0x307a0104 0x0007020d
  48. mww phys 0x307a0108 0x03040407
  49. mww phys 0x307a010c 0x00002006
  50. mww phys 0x307a0110 0x04020205
  51. mww phys 0x307a0114 0x03030202
  52. mww phys 0x307a0120 0x00000803
  53. mww phys 0x307a0180 0x00800020
  54. mww phys 0x307a0184 0x02000100
  55. mww phys 0x307a0190 0x02098204
  56. mww phys 0x307a0194 0x00030303
  57. mww phys 0x307a0200 0x00000016
  58. mww phys 0x307a0204 0x00171717
  59. mww phys 0x307a0214 0x04040404
  60. mww phys 0x307a0218 0x0f040404
  61. mww phys 0x307a0240 0x06000604
  62. mww phys 0x307a0244 0x00000001
  63. mww phys 0x30391000 0x00000000
  64. mww phys 0x30790000 0x17420f40
  65. mww phys 0x30790004 0x10210100
  66. mww phys 0x30790010 0x00060807
  67. mww phys 0x307900b0 0x1010007e
  68. mww phys 0x3079009c 0x00000d6e
  69. mww phys 0x30790020 0x08080808
  70. mww phys 0x30790030 0x08080808
  71. mww phys 0x30790050 0x01000010
  72. mww phys 0x30790050 0x00000010
  73. mww phys 0x307900c0 0x0e407304
  74. mww phys 0x307900c0 0x0e447304
  75. mww phys 0x307900c0 0x0e447306
  76. check_bits_set_32 0x307900c4 0x1
  77. mww phys 0x307900c0 0x0e447304
  78. mww phys 0x307900c0 0x0e407304
  79. mww phys 0x30384130 0x00000000
  80. mww phys 0x30340020 0x00000178
  81. mww phys 0x30384130 0x00000002
  82. mww phys 0x30790018 0x0000000f
  83. check_bits_set_32 0x307a0004 0x1
  84. }
  85. # disable internal reset-assert handling to
  86. # allow reset-init to work
  87. $_TARGETNAME.0 configure -event reset-assert ""
  88. $_TARGETNAME.1 configure -event reset-assert ""
  89. $_TARGETNAME_2 configure -event reset-assert ""
  90. $_TARGETNAME.0 configure -event reset-init {
  91. global _CHIPNAME
  92. imx7_disable_wdog
  93. imx7_uart_dbgconf
  94. apply_dcd
  95. $_CHIPNAME.dap memaccess 0
  96. }
  97. target smp $_TARGETNAME.0 $_TARGETNAME.1