tcl/target: add SPDX tag
[fw/openocd] / tcl / target / allwinner_v3s.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 # This is the config for an Allwinner V3/V3s (sun8iw8).
4 #
5 # Notes:
6 # - Single core ARM Cortex-A7 with a maximum frequency of 1.2 GHz.
7 # - Thumb-2 Technology
8 # - Support NEON Advanced SIMD(Single Instruction Multiple Data)instruction
9 #   for acceleration of media and signal processing functions
10 # - Support Large Physical Address Extensions(LPAE)
11 # - VFPv4 Floating Point Unit
12 # - 32KB L1 Instruction cache and 32KB L1 Data cache
13 # - 128KB L2 cache
14 # - has some integrated DDR2 RAM.
15 #
16 # Pins related for debug and bootstrap:
17 #   JTAG
18 # JTAG_TMS      PF0, SDC0_D1
19 # JTAG_TDI      PF1, SDC0_D0
20 # JTAG_TDO      PF3, SDC0_CMD
21 # JTAG_TCK      PF5, SDC0_D2
22 #   UART
23 # None of UART ports seems to be enabled by ROM.
24 # UART0_TX      PF2, SDC0_CLK           Per default disabled
25 # UART0_RX      PF4, SDC0_D3            Per default disabled
26 # UART1_TX      PE21                    Per default disabled
27 # UART1_RX      PE22                    Per default disabled
28 # UART2_TX      PB0                     Per default disabled
29 # UART2_RX      PB1                     Per default disabled
30 #
31 # JTAG is enabled by default after power on on listed JTAG_* pins. So far the
32 # boot sequence is:
33 # Time          Action
34 # 0000ms        Power ON
35 # 0200ms        JTAG enabled
36 # 0220ms        JTAG pins switched to SD mode
37 #
38 # The time frame of 20ms can be not enough to init and halt the CPU. In this
39 # case I would recommend to set: "adapter speed 15000"
40 # To get more or less precise timings, the board should provide reset pin,
41 # or some bench power supply with remote function. In my case I used
42 # EEZ H24005 with this command to power on and halt the target:
43 # "exec  echo "*TRG" > /dev/ttyACM0; sleep 220; reset halt"
44 # After this it is possible to enable JTAG mode again from boot loader or OS.
45 # Following DAPs are available:
46 # dap[0]->MEM-AP AHB
47 # dap[1]->MEM-AP APB->CA7[0]
48 #
49
50 if { [info exists CHIPNAME] } {
51    set  _CHIPNAME $CHIPNAME
52 } else {
53    set  _CHIPNAME v3s
54 }
55
56 if { [info exists DAP_TAPID] } {
57         set _DAP_TAPID $DAP_TAPID
58 } else {
59         set _DAP_TAPID 0x5ba00477
60 }
61
62 # No NRST or SRST is present on the SoC. Boards may provide
63 # some sort of Power cycle reset for complete board or SoC.
64 # For this case we provide srst_pulls_trst so the board config
65 # only needs to set srst_only.
66 reset_config none srst_pulls_trst
67
68 jtag newtap $_CHIPNAME dap -irlen 4 -ircapture 0x01 -irmask 0x0f \
69         -expected-id $_DAP_TAPID
70
71 # Add Cortex A7 core
72 set _TARGETNAME $_CHIPNAME.cpu
73 target create $_TARGETNAME cortex_a -chain-position $_CHIPNAME.dap