tcl/target: add SPDX tag
[fw/openocd] / tcl / target / pxa3xx.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 # Marvell PXA3xx
4
5 if { [info exists CHIPNAME] } {
6    set _CHIPNAME $CHIPNAME
7 } else {
8    set _CHIPNAME pxa3xx
9 }
10
11 if { [info exists ENDIAN] } {
12    set _ENDIAN $ENDIAN
13 } else {
14    set _ENDIAN little
15 }
16
17 # IDs for all currently known PXA3xx chips
18 if { [info exists CPUTAPID_PXA30X_A0] } {
19    set _CPUTAPID_PXA30X_A0 $CPUTAPID_PXA30X_A0
20 } else {
21    set _CPUTAPID_PXA30X_A0 0x0E648013
22 }
23 if { [info exists CPUTAPID_PXA30X_A1] } {
24    set _CPUTAPID_PXA30X_A1 $CPUTAPID_PXA30X_A1
25 } else {
26    set _CPUTAPID_PXA30X_A1 0x1E648013
27 }
28 if { [info exists CPUTAPID_PXA31X_A0] } {
29    set _CPUTAPID_PXA31X_A0 $CPUTAPID_PXA31X_A0
30 } else {
31    set _CPUTAPID_PXA31X_A0 0x0E649013
32 }
33 if { [info exists CPUTAPID_PXA31X_A1] } {
34    set _CPUTAPID_PXA31X_A1 $CPUTAPID_PXA31X_A1
35 } else {
36    set _CPUTAPID_PXA31X_A1 0x1E649013
37 }
38 if { [info exists CPUTAPID_PXA31X_A2] } {
39    set _CPUTAPID_PXA31X_A2 $CPUTAPID_PXA31X_A2
40 } else {
41    set _CPUTAPID_PXA31X_A2 0x2E649013
42 }
43 if { [info exists CPUTAPID_PXA31X_B0] } {
44    set _CPUTAPID_PXA31X_B0 $CPUTAPID_PXA31X_B0
45 } else {
46    set _CPUTAPID_PXA31X_B0 0x3E649013
47 }
48 if { [info exists CPUTAPID_PXA32X_B1] } {
49    set _CPUTAPID_PXA32X_B1 $CPUTAPID_PXA32X_B1
50 } else {
51    set _CPUTAPID_PXA32X_B1 0x5E642013
52 }
53 if { [info exists CPUTAPID_PXA32X_B2] } {
54    set _CPUTAPID_PXA32X_B2 $CPUTAPID_PXA32X_B2
55 } else {
56    set _CPUTAPID_PXA32X_B2 0x6E642013
57 }
58 if { [info exists CPUTAPID_PXA32X_C0] } {
59    set _CPUTAPID_PXA32X_C0 $CPUTAPID_PXA32X_C0
60 } else {
61    set _CPUTAPID_PXA32X_C0 0x7E642013
62 }
63
64 # set adapter srst delay to the delay introduced by your reset circuit
65 # the rest of the needed delays are built into the openocd program
66 adapter srst delay 260
67
68 # set the jtag_ntrst_delay to the delay introduced by a reset circuit
69 # the rest of the needed delays are built into the openocd program
70 jtag_ntrst_delay 250
71
72 set _TARGETNAME $_CHIPNAME.cpu
73 jtag newtap $_CHIPNAME cpu -irlen 11 -ircapture 0x1 -irmask 0x7f \
74         -expected-id $_CPUTAPID_PXA30X_A0 \
75         -expected-id $_CPUTAPID_PXA30X_A1 \
76         -expected-id $_CPUTAPID_PXA31X_A0 \
77         -expected-id $_CPUTAPID_PXA31X_A1 \
78         -expected-id $_CPUTAPID_PXA31X_A2 \
79         -expected-id $_CPUTAPID_PXA31X_B0 \
80         -expected-id $_CPUTAPID_PXA32X_B1 \
81         -expected-id $_CPUTAPID_PXA32X_B2 \
82         -expected-id $_CPUTAPID_PXA32X_C0
83
84 target create $_TARGETNAME xscale -endian $_ENDIAN \
85         -chain-position $_TARGETNAME
86
87 # work area in internal RAM.
88 $_TARGETNAME configure -work-area-phys 0x5c030000 -work-area-size 0x10000