tcl/interface: add SPDX tag
[fw/openocd] / tcl / interface / ftdi / c232hm.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 # FTDI USB Hi-Speed to MPSSE Cable
4 #
5 # http://www.ftdichip.com/Products/Cables/USBMPSSE.htm
6 #
7 # C232HM-DDHSL-0 and C232HM-EDSL-0 provide 3.3V and 5V on pin 1 (Red),
8 # respectively.
9 #
10 # Adapter: http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_C232HM_MPSSE_CABLE.PDF
11 # Chip: http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT232H.pdf
12 # See pinout/colors at end of this file.
13 #
14 # Tech notes:
15 # http://www.ftdichip.com/Support/Documents/AppNotes/AN_135_MPSSE_Basics.pdf
16 # http://www.ftdichip.com/Support/Documents/AppNotes/AN_129_FTDI_Hi_Speed_USB_To_JTAG_Example.pdf
17
18 adapter driver ftdi
19 #ftdi device_desc "C232HM-DDHSL-0"
20 #ftdi device_desc "C232HM-EDHSL-0"
21
22 # Common PID for FT232H
23 ftdi vid_pid 0x0403 0x6014
24
25 # Layout
26 # High data byte 0x40 configures red LED on ACBUS6 initially high (unlit, since active-low)
27 # Low data byte 0x08 configures TMS on ACBUS3 initially high (asserted); TCK, TDI low
28 # High direction byte 0x40 configures red LED on ACBUS6 as high (output)
29 # Low direction byte 0x0b configures TDO on ACBUS2 as low (input)
30 ftdi layout_init 0x4008 0x400b
31
32 # ---A*BUS-------CCCCCCCC|DDDDDDDD
33 # --------\______76543210|76543210
34 # LED   0x4000 = 01000000|00000000 = ACBUS6
35 #GPIOL0 0x0010 = 00000000|00010000 = ADBUS4
36 #GPIOL1 0x0020 = 00000000|00100000 = ADBUS5
37 #GPIOL2 0x0040 = 00000000|01000000 = ADBUS6
38 #GPIOL3 0x0080 = 00000000|10000000 = ADBUS7
39 # -ndata treats the LED as active-low for expected behavior (toggle when transferring)
40 ftdi layout_signal LED -ndata 0x4000
41 # Available for aliasing as desired
42 ftdi layout_signal GPIOL0 -data 0x0010 -oe 0x0010
43 ftdi layout_signal GPIOL1 -data 0x0020 -oe 0x0020
44 ftdi layout_signal GPIOL2 -data 0x0040 -oe 0x0040
45 ftdi layout_signal GPIOL3 -data 0x0080 -oe 0x0080
46
47 # C232HM                FT232H  JTAG/Other
48 # Num   Color   Name    Func
49 # 1             Red             VCC             Optionally, can power the board if it is not using its own power supply.
50 # 2             Orange  ADBUS0  TCK
51 # 3             Yellow  ADBUS1  TDI
52 # 4             Green   ADBUS2  TDO
53 # 5             Brown   ADBUS3  TMS
54 # 6             Grey    ADBUS4  GPIOL0
55 # 7             Purple  ADBUS5  GPIOL1
56 # 8             White   ADBUS6  GPIOL2
57 # 9             Blue    ADBUS7  GPIOL3
58 # 10    Black   GND             Connect to ground