tcl/board: add SPDX tag
[fw/openocd] / tcl / board / spear310evb20.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 # Configuration for the ST SPEAr310 Evaluation board
4 # EVALSPEAr310 Rev. 2.0
5 # http://www.st.com/spear
6 #
7 # Date:      2010-08-17
8 # Author:    Antonio Borneo <borneo.antonio@gmail.com>
9
10 # The standard board has JTAG SRST not connected.
11 # This script targets such boards using quirky code to bypass the issue.
12 #
13 # Check ST Application Note AN3321 on how to fix SRST on
14 # the board, then use the script board/spear310evb20_mod.cfg
15
16
17 source [find mem_helper.tcl]
18 source [find target/spear3xx.cfg]
19 source [find chip/st/spear/spear3xx_ddr.tcl]
20 source [find chip/st/spear/spear3xx.tcl]
21
22 arm7_9 dcc_downloads enable
23 arm7_9 fast_memory_access enable
24
25 # CFI parallel NOR on EMI CS0. 2x 16bit 8M devices = 16Mbyte.
26 set _FLASHNAME0 $_CHIPNAME.pnor
27 flash bank $_FLASHNAME0 cfi 0x50000000 0x01000000 2 4 $_TARGETNAME
28
29 # Serial NOR on SMI CS0. 8Mbyte.
30 set _FLASHNAME1 $_CHIPNAME.snor
31 flash bank $_FLASHNAME1 stmsmi 0xf8000000 0 0 0 $_TARGETNAME
32
33 if { [info exists BOARD_HAS_SRST] } {
34         # Modified board has SRST on JTAG connector
35         reset_config trst_and_srst separate srst_gates_jtag \
36                 trst_push_pull srst_open_drain
37 } else {
38         # Standard board has no SRST on JTAG connector
39         reset_config trst_only separate srst_gates_jtag trst_push_pull
40         source [find chip/st/spear/quirk_no_srst.tcl]
41 }
42
43 $_TARGETNAME configure -event reset-init { spear310evb20_init }
44
45 proc spear310evb20_init {} {
46         reg pc 0xffff0020       ;# loop forever
47
48         sp3xx_clock_default
49         sp3xx_common_init
50         sp3xx_ddr_init "mt47h64m16_3_333_cl5_async"
51         sp310_init
52         sp310_emi_init
53 }