comparison doc/Unbuffered-FT2232x-JTAG @ 80:1d38af6d7be8

0403:7151 USB ID support in mainline Linux
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 13 Oct 2020 04:29:10 +0000
parents 96232f00bc9c
children bbeec8f293dc
comparison
equal deleted inserted replaced
79:026dd69e4ebb 80:1d38af6d7be8
79 allocated by FTDI to our company for use in products based on FTDI chips. And 79 allocated by FTDI to our company for use in products based on FTDI chips. And
80 because we can spare one PID for a worthy cause, one of these PIDs (0403:7151) 80 because we can spare one PID for a worthy cause, one of these PIDs (0403:7151)
81 is hereby being donated to the community for use on generic FT2232x boards in 81 is hereby being donated to the community for use on generic FT2232x boards in
82 the unbuffered JTAG adapter configuration. 82 the unbuffered JTAG adapter configuration.
83 83
84 As of this writing, this 0403:7151 PID has not been submitted to Linux ftdi_sio 84 Support for this 0403:7151 USB ID has been added to Linux ftdi_sio driver in
85 kernel maintainers yet, thus if you program it into your FT2232x EEPROM 85 2020-09 with this commit:
86 following the instructions below, the kernel will leave that FT2232x device 86
87 completely alone. If you are interested only in JTAG and don't need an extra 87 https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git/commit/?id=6cf87e5edd9944e1d3b6efd966ea401effc304ee
88 UART on Channel B, this arrangement should be fully sufficient - you simply 88
89 configure your OpenOCD in userspace to find your unbuffered and ad-hoc-wired 89 This commit is not included in Linux 5.9, but is expected to appear in the
90 JTAG adapter at that USB ID. And if you do need the UART on Channel B, you can 90 mainline tree as of 5.10-rc1. If your Linux kernel version (or rather ftdi_sio
91 trivially patch your ftdi_sio.c kernel driver, adding the new ID to the table 91 driver version if it's a module) includes this commit, the ftdi_sio driver will
92 with JTAG quirk (&ftdi_jtag_quirk) specified. 92 create a ttyUSB device for Channel B, allowing that channel to function as a
93 UART if desired, but Channel A will be left alone by the kernel driver, reserved
94 for userspace applications like OpenOCD. If your kernel/driver version does not
95 include the newly added commit, both FT2232x channels will be left alone by the
96 kernel driver, i.e., no ttyUSB devices will be created. If you are interested
97 only in JTAG and don't need an extra UART on Channel B, it should not matter
98 whether your ftdi_sio driver knows about the new custom USB ID or not - you
99 simply configure your OpenOCD in userspace to find your unbuffered and ad-hoc-
100 wired JTAG adapter at USB ID 0403:7151. If you do need the UART on Channel B
101 but your Linux kernel version does not include the recent addition, you will
102 need to manually apply the trivial patch from the commit linked above.
93 103
94 Choice of FT2232x breakout board 104 Choice of FT2232x breakout board
95 ================================ 105 ================================
96 106
97 Here at FreeCalypso HQ we make very extensive use of FT2232C/D breakout boards 107 Here at FreeCalypso HQ we make very extensive use of FT2232C/D breakout boards
98 by PLDkit, and I officially recommend and endorse this vendor: 108 by PLDkit, and I officially recommend and endorse this vendor:
99 109
100 http://pldkit.com/other/ft2232d-module 110 http://pldkit.com/other/ft2232d-module
101 111
102 These modules were originally made with FT2232D chips, then the vendor found a 112 These modules were originally made with FT2232D chips, then the vendor found a
103 stash of old but still good FT2232C chips, so apparently the current ones are 113 stash of old but still good FT2232C chips, and some modules were made with these
104 FT2232C, not D - but this distinction makes no difference for the present 114 FT2232C chips. Now it looks like the vendor has gone back to FT2232D - but this
105 purpose. 115 distinction makes no difference for the present purpose.
106 116
107 These days FT2232H chips and FT2232H breakout boards are much more popular, but 117 These days FT2232H chips and FT2232H breakout boards are much more popular, but
108 I generally prefer FT2232C/D for classicness and simplicity. Additionally, 118 I generally prefer FT2232C/D for classicness and simplicity. Additionally,
109 FTDI's AN_184 document lists I/O pin behaviour of various FTDI chips including 119 FTDI's AN_184 document lists I/O pin behaviour of various FTDI chips including
110 FT2232D and FT2232H; according to this document FT2232H I/O pins go through a 120 FT2232D and FT2232H; according to this document FT2232H I/O pins go through a
136 directory of this code repository: 146 directory of this code repository:
137 147
138 fteeprom/ftee-gen2232c eeproms/jtag-unbuf | fteeprom/fteeprom-prog i:0x0403:0x6010 148 fteeprom/ftee-gen2232c eeproms/jtag-unbuf | fteeprom/fteeprom-prog i:0x0403:0x6010
139 149
140 Then unplug and replug the FT2232D board, and it should come back with the new 150 Then unplug and replug the FT2232D board, and it should come back with the new
141 0403:7151 USD ID. If you wish to bring it back to its original blank-EEPROM 151 0403:7151 USB ID. If you wish to bring it back to its original blank-EEPROM
142 state, you can do so by erasing the EEPROM: 152 state, you can do so by erasing the EEPROM:
143 153
144 fteeprom-erase i:0x0403:0x7151 154 fteeprom-erase i:0x0403:0x7151
145 155
146 Wire connections 156 Wire connections