spear320cpu.cfg 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. # Configuration for the ST SPEAr320 CPU board
  3. # EVAL_SPEAr320CPU Rev. 2.0
  4. # http://www.st.com/spear
  5. #
  6. # Date: 2011-11-18
  7. # Author: Antonio Borneo <borneo.antonio@gmail.com>
  8. # The standard board has JTAG SRST not connected.
  9. # This script targets such boards using quirky code to bypass the issue.
  10. source [find mem_helper.tcl]
  11. source [find target/spear3xx.cfg]
  12. source [find chip/st/spear/spear3xx_ddr.tcl]
  13. source [find chip/st/spear/spear3xx.tcl]
  14. arm7_9 dcc_downloads enable
  15. arm7_9 fast_memory_access enable
  16. # Serial NOR on SMI CS0. 8Mbyte.
  17. set _FLASHNAME1 $_CHIPNAME.snor
  18. flash bank $_FLASHNAME1 stmsmi 0xf8000000 0 0 0 $_TARGETNAME
  19. if { [info exists BOARD_HAS_SRST] } {
  20. # Modified board has SRST on JTAG connector
  21. reset_config trst_and_srst separate srst_gates_jtag \
  22. trst_push_pull srst_open_drain
  23. } else {
  24. # Standard board has no SRST on JTAG connector
  25. reset_config trst_only separate srst_gates_jtag trst_push_pull
  26. source [find chip/st/spear/quirk_no_srst.tcl]
  27. }
  28. $_TARGETNAME configure -event reset-init { spear320cpu_init }
  29. if { [info exists DDR_CHIPS] } {
  30. set _DDR_CHIPS $DDR_CHIPS
  31. } else {
  32. set _DDR_CHIPS 1
  33. }
  34. proc spear320cpu_init {} {
  35. global _DDR_CHIPS
  36. reg pc 0xffff0020; # loop forever
  37. sp3xx_clock_default
  38. sp3xx_common_init
  39. sp3xx_ddr_init "mt47h64m16_3_333_cl5_async" $_DDR_CHIPS
  40. sp320_init
  41. }