tcl/board: add SPDX tag
[fw/openocd] / tcl / board / ethernut3.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 #
4 # Ethernut 3 board configuration file
5 #
6 # http://www.ethernut.de/en/hardware/enut3/
7
8
9 # AT91R40008-66AU ARM7TDMI Microcontroller
10 # 256kB internal RAM
11 source [find target/at91r40008.cfg]
12
13
14 # AT49BV322A-70TU NOR Flash
15 # 2M x 16 mode at address 0x10000000
16 # Common flash interface supported
17 #
18 set _FLASHNAME $_CHIPNAME.flash
19 flash bank $_FLASHNAME cfi 0x10000000 0x400000 2 2 $_TARGETNAME
20
21
22 # Micrel MIC2775-29YM5 Supervisor
23 # Reset output will remain active for 280ms (maximum)
24 #
25 adapter srst delay 300
26 jtag_ntrst_delay 300
27
28
29 arm7_9 fast_memory_access enable
30 arm7_9 dcc_downloads enable
31 adapter speed 16000
32
33
34 # Target events
35 #
36 $_TARGETNAME configure -event reset-init { board_init }
37
38 # Initialize board hardware
39 #
40 proc board_init { } {
41         board_remap
42         flash probe 0
43 }
44
45 # Memory remap
46 #
47 proc board_remap {{VERBOSE 0}} {
48         # CS0: NOR flash
49         #      16MB @ 0x10000000
50         #      16-bit data bus
51         #      4 wait states
52         #
53         mww 0xffe00000 0x1000212d
54
55         # CS1: Ethernet controller
56         #      1MB @ 0x20000000
57         #      16-bit data bus
58         #      2 wait states
59         #      Byte select access
60         #
61         mww 0xffe00004 0x20003025
62
63         # CS2: CPLD registers
64         #      1MB @ 0x21000000
65         #      8-bit data bus
66         #      2 wait states
67         #
68         mww 0xffe00008 0x21002026
69
70         # CS3: Expansion bus
71         #      1MB @ 0x22000000
72         #      8-bit data bus
73         #      8 wait states
74         #
75         mww 0xffe00010 0x22002e3e
76
77         # Remap command
78         #
79         mww 0xffe00020 0x00000001
80
81         if {$VERBOSE != 0} {
82                 echo "0x00000000 RAM"
83                 echo "0x10000000 Flash"
84                 echo "0x20000000 Ethernet"
85                 echo "0x21000000 CPLD"
86                 echo "0x22000000 Expansion"
87         }
88 }