FreeCalypso > hg > freecalypso-hwlab
annotate doc/Unbuffered-FT2232x-JTAG @ 174:4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 11 Sep 2023 07:23:18 +0000 |
parents | bbeec8f293dc |
children |
rev | line source |
---|---|
52
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 How to make a safe JTAG adapter out of a generic unbuffered FT2232x board |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 ========================================================================= |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 |
174
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
4 [This guide was originally written in 2019; it has been updated slightly for |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
5 the move of FTDI EEPROM utilities to fc-usbser-tools, plus other minor updates |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
6 for the situation in 2023, but the principal ideas are all from 2019.] |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
7 |
52
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 Among the FOSS community of tinkerers who use OpenOCD to operate on the JTAG |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 interfaces of various hardware targets, one of the most common JTAG adapter |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 choices (if not the most common) is to use some adapter gadget based on an FTDI |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 chip, most commonly one of FT2232x variants. However, a major distinction needs |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 to be drawn between specialized purpose-made JTAG adapter products which just |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 happen to use an FT2232x chip internally, versus generic FT2232x breakout boards |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 which the user wires up for JTAG on his or her own. |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 In an ideal world, using a purpose-made buffered JTAG adapter (one that has a |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 buffer inserted between FT2232x I/O pins and the target connection interface) |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 would be strongly preferable for a whole host of reasons. However, to this |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 author's disappointment, there are very few community vendors who make such |
174
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
20 adapters, and when I last looked in 2019, I was NOT able to find any high- |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
21 quality buffered JTAG adapter which could be readily bought and which comes |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
22 with published schematics. |
52
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 |
174
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
24 Given the sorry state of availability of buffered JTAG adapters, I gave more |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
25 thought to the unbuffered option, and I found what appears to be a way to make |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
26 them safe - but my method requires programming the EEPROM on the FT2232x board |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
27 with a special custom configuration, and in this article I am going to provide |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
28 the full details and instructions. |
52
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 To begin with, an unbuffered JTAG adapter (one in which the target JTAG signals |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 are connected directly to FT2232x I/O pins without any buffer in between) can |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 work only with targets that operate their JTAG interface at 3.3 V, or perhaps |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 a slightly lower but still fully 3.3V-compatible logic voltage level like the |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 2.8 V I/O on Calypso GSM baseband processors. An unbuffered adapter CANNOT |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 work with, say, a 1.8 V JTAG interface - but as long as your target runs at |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 3.3 or 2.8 V, then we can continue. |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 The next big problem with unbuffered FT2232x adapters is that if you don't put |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 a special configuration in the EEPROM (or if your FT2232x board omits the EEPROM |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 altogether), the channel which you are going to wire up for JTAG (can only be |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 Channel A on FT2232C/D, can be either channel on FT2232H) is going to come up |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 in FTDI's default UART mode on power-up, and it is going to stay in that mode |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 until and unless you run OpenOCD, which will then switch it into MPSSE mode for |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 JTAG. Why is it a problem? Answer: you need to connect the TDO line from the |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 target to the FT2232x chip's ADBUS2 pin for JTAG to work via MPSSE, but in the |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 power-up default UART mode this ADBUS2 pin is the RTS output. FT2232x RTS |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 output fighting with the target's TDO output - not good, and it could even fry |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 one or both of the chips. |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 Unfortunately FTDI's stupid chip design does not allow the desired MPSSE mode |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 to be configured in the EEPROM so that it is there right from power-up. But |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 there is a workaround: if the EEPROM config is set up to put Channel A (the one |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 that will be wired for JTAG) into the rarely-used 245 FIFO mode instead of UART, |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 all 8 ADBUS pins (including ADBUS2 where TDO will be connected) will power up |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 as inputs with weak internal pull-ups (as long as the ACBUS2 control line is |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 left unconnected), which is much safer than what these pins do in the default |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 UART mode. |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 And if we need to program the EEPROM with a special custom config to change |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 Channel A from 232 UART to 245 FIFO, we can also assign a different USB VID:PID |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 at the same time. FTDI's default FT2232x ID of 0403:6010 works great when both |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 channels of the FT2232x device are used as UARTs - the Linux kernel recognizes |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 this USB ID, creates a pair of ttyUSB devices (one for each channel), and |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 everything Just Works. But what if Channel A is used for JTAG and is therefore |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 not a valid UART channel? If the default USB ID is left unchanged, what happens |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 is that a pair of ttyUSB devices still gets created, with the first out of the |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 pair being completely bogus and non-functional. And when you run OpenOCD, that |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 bogus Channel A ttyUSB device disappears, while the Channel B ttyUSB device |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 (which will actually work if Channel B is wired as a UART) remains, creating a |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 gap in ttyUSB numbers. If you have a ton of ttyUSB devices on your system and |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 are struggling to keep track of which is which, this behaviour certainly does |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 not help. |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 As it happens, our company Falconia Partners LLC has received a block of 8 PIDs |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 from FTDI, allocated out of FTDI's VID range - these PIDs have been officially |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 allocated by FTDI to our company for use in products based on FTDI chips. And |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 because we can spare one PID for a worthy cause, one of these PIDs (0403:7151) |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 is hereby being donated to the community for use on generic FT2232x boards in |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 the unbuffered JTAG adapter configuration. |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 |
80
1d38af6d7be8
0403:7151 USB ID support in mainline Linux
Mychaela Falconia <falcon@freecalypso.org>
parents:
59
diff
changeset
|
81 Support for this 0403:7151 USB ID has been added to Linux ftdi_sio driver in |
1d38af6d7be8
0403:7151 USB ID support in mainline Linux
Mychaela Falconia <falcon@freecalypso.org>
parents:
59
diff
changeset
|
82 2020-09 with this commit: |
1d38af6d7be8
0403:7151 USB ID support in mainline Linux
Mychaela Falconia <falcon@freecalypso.org>
parents:
59
diff
changeset
|
83 |
81
bbeec8f293dc
FC JTAG+UART ftdi_sio patch made it to stable
Mychaela Falconia <falcon@freecalypso.org>
parents:
80
diff
changeset
|
84 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6cf87e5edd9944e1d3b6efd966ea401effc304ee |
80
1d38af6d7be8
0403:7151 USB ID support in mainline Linux
Mychaela Falconia <falcon@freecalypso.org>
parents:
59
diff
changeset
|
85 |
174
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
86 This commit is included in mainline kernel versions from 5.10 onward, and in |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
87 stable kernel versions 4.4.240, 4.9.240, 4.14.202, 4.19.152, 5.4.72, 5.8.16 and |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
88 5.9.1. If your Linux kernel version (or rather ftdi_sio driver version if it's |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
89 a module) includes this commit, the ftdi_sio driver will create a ttyUSB device |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
90 for Channel B, allowing that channel to function as a UART if desired, but |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
91 Channel A will be left alone by the kernel driver, reserved for userspace |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
92 applications like OpenOCD. If your kernel/driver version (older than late 2020) |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
93 does not include the commit in question, both FT2232x channels will be left |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
94 alone by the kernel driver, i.e., no ttyUSB devices will be created. If you are |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
95 interested only in JTAG and don't need an extra UART on Channel B, it should not |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
96 matter whether your ftdi_sio driver knows about the new custom USB ID or not - |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
97 you simply configure your OpenOCD in userspace to find your unbuffered and |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
98 ad-hoc-wired JTAG adapter at USB ID 0403:7151. If you do need the UART on |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
99 Channel B but your Linux kernel version is old, you will need to manually apply |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
100 the trivial patch from the commit linked above. |
52
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 Choice of FT2232x breakout board |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 ================================ |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 |
174
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
105 In earlier years we made heavy use of generic FT2232D breakout boards made by |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
106 PLDkit OU in Estonia. We are not sure if that original company still makes |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
107 them or not, but the person behind that company name did eventually sell us |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
108 their Gerber files, and we have published them here: |
52
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 |
174
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
110 ftp://ftp.freecalypso.org/pub/USB/FTDI/ |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
111 or |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
112 https://www.freecalypso.org/pub/USB/FTDI/ |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
113 |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
114 Given that we have a stash of FT2232D chips and given that we still have use |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
115 cases for these generic breakout boards, we have a tentative plan to produce |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
116 our own Falconia-branded version of the same adapter/breakout board. |
52
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 These days FT2232H chips and FT2232H breakout boards are much more popular, but |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 I generally prefer FT2232C/D for classicness and simplicity. Additionally, |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 FTDI's AN_184 document lists I/O pin behaviour of various FTDI chips including |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 FT2232D and FT2232H; according to this document FT2232H I/O pins go through a |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 brief phase of acting as UART signals (including RTS output on ADBUS2) while |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 the EEPROM is being read, whereas FT2232D I/O pins are tristated during this |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 time. Thus I strongly recommend using an FT2232D breakout board. |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 Programming the EEPROM |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 ====================== |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 |
174
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
129 The boards we used to buy from PLDkit (FT2232D breakout) have 93C46 EEPROMs on |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
130 them, and the boards were shipped with blank EEPROMs. The blank EEPROM state |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
131 is perfectly good for operating the board as a dual UART, but our JTAG |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
132 application calls for custom EEPROM programming. A number of people in the |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
133 FOSS community have produced several different tools for programming FTDI |
52
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 EEPROMs, and you could even use FTDI's official Winblows tools if you like, but |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 I am going to describe how to program the EEPROM using the tools which I |
174
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
136 developed and which are used in production here at FreeCalypso HQ. |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
137 |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
138 FreeCalypso FTDI EEPROM tools reside in this Hg repository: |
52
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 |
174
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
140 https://www.freecalypso.org/hg/fc-usbser-tools/ |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
141 |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
142 You will need to compile and install these tools, then continue. |
52
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 If you have the FT2232D board in its initial blank-EEPROM state plugged into |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 your system and you don't have any other FT2232x devices with 0403:6010 IDs, |
174
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
146 you can program the EEPROM for JTAG as follows (the command is a shell |
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
147 pipeline): |
52
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 |
174
4f5abad5dd40
doc/Unbuffered-FT2232x-JTAG: update for fc-usbser-tools
Mychaela Falconia <falcon@freecalypso.org>
parents:
81
diff
changeset
|
149 ftee-gen2232c jtag-unbuf | fteeprom-prog i:0x0403:0x6010 |
52
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 Then unplug and replug the FT2232D board, and it should come back with the new |
80
1d38af6d7be8
0403:7151 USB ID support in mainline Linux
Mychaela Falconia <falcon@freecalypso.org>
parents:
59
diff
changeset
|
152 0403:7151 USB ID. If you wish to bring it back to its original blank-EEPROM |
52
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 state, you can do so by erasing the EEPROM: |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 fteeprom-erase i:0x0403:0x7151 |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 Wire connections |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 ================ |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 The JTAG signal connections to ADBUS0 through ADBUS3 are fixed by FTDI, and if |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 you go against my advice and use FT2232H rather than FT2232C/D, then ADBUS7 is |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 also reserved for RTCK. The I/O pins available for reset and other sideband or |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 GPIO signals are ADBUS4 through ADBUS7 on FT2232C/D adapters, or ADBUS4 through |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 ADBUS6 and ACBUS5 through ACBUS7 on FT2232H. The other pins should be left |
ace3ed1d5ddf
Unbuffered FT2232x JTAG article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 untouched to avoid problems with the 245 FIFO mode which is active in the time |
59
96232f00bc9c
doc/Unbuffered-FT2232x-JTAG: typo fix
Mychaela Falconia <falcon@freecalypso.org>
parents:
52
diff
changeset
|
166 window between power-up (USB plug-in) and running OpenOCD. |