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