aboutsummaryrefslogtreecommitdiff
path: root/tcl/board/imx27lnst.cfg
blob: e0ed05794c4a5bd4203d9d92114355cf625e7a3f (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# The Linuxstamp-mx27 is board has a single IMX27 chip
# For further info see http://opencircuits.com/Linuxstamp_mx27#OpenOCD
source [find target/imx27.cfg]
$_TARGETNAME configure -event gdb-attach { reset init }
$_TARGETNAME configure -event reset-init { imx27lnst_init }

proc imx27lnst_init { } {
	# This setup puts RAM at 0xA0000000

	# reset the board correctly
	adapter_khz 500
	reset run
	reset halt

	mww 0x10000000 0x20040304
	mww 0x10020000 0x00000000
	mww 0x10000004 0xDFFBFCFB
	mww 0x10020004 0xFFFFFFFF

	sleep 100

	# ========================================
	#  Configure DDR on CSD0 -- initial reset
	# ========================================
	mww 0xD8001010 0x00000008

	sleep 100

	# ========================================
	#  Configure DDR on CSD0 -- wait 5000 cycle
	# ========================================
	mww 0x10027828 0x55555555
	mww 0x10027830 0x55555555
	mww 0x10027834 0x55555555
	mww 0x10027838 0x00005005
	mww 0x1002783C 0x15555555

	mww 0xD8001010 0x00000004

	mww 0xD8001004 0x00795729

	#mww 0xD8001000 0x92200000
	mww 0xD8001000 0x91120000
	mww 0xA0000F00 0x0

	#mww 0xD8001000 0xA2200000
	mww 0xD8001000 0xA1120000
	mww 0xA0000F00 0x0
	mww 0xA0000F00 0x0

	#mww 0xD8001000 0xB2200000
	mww 0xD8001000 0xB1120000
	mwb 0xA0000033 0xFF
	mwb 0xA1000000 0xAA

	#mww 0xD8001000 0x82228085
	mww 0xD8001000 0x81128080

}