aboutsummaryrefslogtreecommitdiff
path: root/tcl/board/spear300evb.cfg
blob: 9f957038d3245ac5bcc446071e82815d34a626e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Configuration for the ST SPEAr300 Evaluation board
# EVALSPEAr300 Rev. 1.0
# http://www.st.com/spear
#
# Date:      2010-11-27
# Author:    Antonio Borneo <borneo.antonio@gmail.com>

# The standard board has JTAG SRST not connected.
# This script targets such boards using quirky code to bypass the issue.


source [find mem_helper.tcl]
source [find target/spear3xx.cfg]
source [find chip/st/spear/spear3xx_ddr.tcl]
source [find chip/st/spear/spear3xx.tcl]

arm7_9 dcc_downloads enable
arm7_9 fast_memory_access enable


# Serial NOR on SMI CS0. 8Mbyte.
set _FLASHNAME1 $_CHIPNAME.snor
flash bank $_FLASHNAME1 stmsmi 0xf8000000 0 0 0 $_TARGETNAME

if { [info exists BOARD_HAS_SRST] } {
	# Modified board has SRST on JTAG connector
	reset_config trst_and_srst separate srst_gates_jtag \
		trst_push_pull srst_open_drain
} else {
	# Standard board has no SRST on JTAG connector
	reset_config trst_only separate srst_gates_jtag trst_push_pull
	source [find chip/st/spear/quirk_no_srst.tcl]
}

$_TARGETNAME configure -event reset-init { spear300evb_init }

proc spear300evb_init {} {
	reg pc 0xffff0020;	# loop forever

	sp3xx_clock_default
	sp3xx_common_init
	sp3xx_ddr_init "mt47h64m16_3_333_cl5_async"
	sp300_init
}