Remove annoying end-of-line whitespace from tcl/* files
[fw/openocd] / tcl / board / imx27ads.cfg
1 # The IMX27 ADS eval board has a single IMX27 chip
2 # Note: tested on IMX27ADS Board REV-2.6 and REV-2.8
3 source [find target/imx27.cfg]
4 $_TARGETNAME configure -event gdb-attach { reset init }
5 $_TARGETNAME configure -event reset-init { imx27ads_init }
6
7 # The IMX27 ADS board has a NOR flash on CS0
8 flash_bank cfi 0xc0000000 0x00200000 2 2 0
9
10 proc imx27ads_init { } {
11         # This setup puts RAM at 0xA0000000
12
13         # reset the board correctly
14         reset run
15         reset halt
16
17         mww 0x10000000 0x20040304
18         mww 0x10020000 0x00000000
19         mww 0x10000004 0xDFFBFCFB
20         mww 0x10020004 0xFFFFFFFF
21
22         sleep 100
23
24         # ========================================
25         #  Configure DDR on CSD0 -- initial reset
26         # ========================================
27         mww 0xD8001010 0x00000008
28
29         # ========================================
30         #  Configure PSRAM on CS5
31         # ========================================
32         mww 0xd8002050 0x0000dcf6
33         mww 0xd8002054 0x444a4541
34         mww 0xd8002058 0x44443302
35
36         #  ========================================
37         #         Configure16 bit NorFlash on CS0
38         #  ========================================
39         mww 0xd8002000 0x0000CC03
40         mww 0xd8002004 0xa0330D01
41         mww 0xd8002008 0x00220800
42
43         # ========================================
44         #  Configure CPLD on CS4
45         # ========================================
46         mww 0xd8002040 0x0000DCF6
47         mww 0xd8002044 0x444A4541
48         mww 0xd8002048 0x44443302
49
50         # ========================================
51         #  Configure DDR on CSD0 -- wait 5000 cycle
52         # ========================================
53         mww 0x10027828 0x55555555
54         mww 0x10027830 0x55555555
55         mww 0x10027834 0x55555555
56         mww 0x10027838 0x00005005
57         mww 0x1002783C 0x15555555
58
59         mww 0xD8001010 0x00000004
60
61         mww 0xD8001004 0x00795729
62
63         mww 0xD8001000 0x92200000
64         mww 0xA0000F00 0x0
65
66         mww 0xD8001000 0xA2200000
67         mww 0xA0000F00 0x0
68         mww 0xA0000F00 0x0
69
70         mww 0xD8001000 0xB2200000
71         mwb 0xA0000033 0xFF
72         mwb 0xA1000000 0xAA
73
74         mww 0xD8001000 0x82228085
75 }