spear310evb20.cfg 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. # Configuration for the ST SPEAr310 Evaluation board
  3. # EVALSPEAr310 Rev. 2.0
  4. # http://www.st.com/spear
  5. #
  6. # Date: 2010-08-17
  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. #
  11. # Check ST Application Note AN3321 on how to fix SRST on
  12. # the board, then use the script board/spear310evb20_mod.cfg
  13. source [find mem_helper.tcl]
  14. source [find target/spear3xx.cfg]
  15. source [find chip/st/spear/spear3xx_ddr.tcl]
  16. source [find chip/st/spear/spear3xx.tcl]
  17. arm7_9 dcc_downloads enable
  18. arm7_9 fast_memory_access enable
  19. # CFI parallel NOR on EMI CS0. 2x 16bit 8M devices = 16Mbyte.
  20. set _FLASHNAME0 $_CHIPNAME.pnor
  21. flash bank $_FLASHNAME0 cfi 0x50000000 0x01000000 2 4 $_TARGETNAME
  22. # Serial NOR on SMI CS0. 8Mbyte.
  23. set _FLASHNAME1 $_CHIPNAME.snor
  24. flash bank $_FLASHNAME1 stmsmi 0xf8000000 0 0 0 $_TARGETNAME
  25. if { [info exists BOARD_HAS_SRST] } {
  26. # Modified board has SRST on JTAG connector
  27. reset_config trst_and_srst separate srst_gates_jtag \
  28. trst_push_pull srst_open_drain
  29. } else {
  30. # Standard board has no SRST on JTAG connector
  31. reset_config trst_only separate srst_gates_jtag trst_push_pull
  32. source [find chip/st/spear/quirk_no_srst.tcl]
  33. }
  34. $_TARGETNAME configure -event reset-init { spear310evb20_init }
  35. proc spear310evb20_init {} {
  36. reg pc 0xffff0020 ;# loop forever
  37. sp3xx_clock_default
  38. sp3xx_common_init
  39. sp3xx_ddr_init "mt47h64m16_3_333_cl5_async"
  40. sp310_init
  41. sp310_emi_init
  42. }