Support for FT232R eeprom features
authorHermann Kraus <herm@scribus.info>
Wed, 18 Aug 2010 07:50:55 +0000 (09:50 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 18 Aug 2010 07:50:55 +0000 (09:50 +0200)
commit2ff8b87c6e8ec258b705240b03cc2100b50c16bf
treecab6d6f5256dfe114c15ec1f5216615aafa98595
parentf7a0895323f540636d226d9e5ac41b78f079ae06
Support for FT232R eeprom features

From the mailinglist:
Hello!

I added support for creating FT232R-EEPROM images. They differ from
FT232BM images making communication unreliable if you don't get them right:
- Addr 0x00: Bit 6 selects between normal and high-current output mode
- Addr 0x01: IN endpoint size. !!! It is essential to set this to 0x40 to
get reliable communication! !!!
- Addr 0x07: (Device version) Was changed from 0x04 to 0x06
- Addr 0x0B: Invert outputs. Bit numbers:
0 TXD
1 RXD
2 RTS#
3 CTS#
4 DTR#
5 DSR#
6 DCD#
7 RI#
- Addr 0x14-0x16: Change function of CBUS pins. Low nibble of 0x14 is
CBUS0, high nibble CBUS1 and so on.
Values (hex):
TXDEN = 0
PWREN# = 1
RXLED# = 2
TXLED# = 3
TX_RX_LED# = 4
SLEEP# = 5
CLK48 = 6
CLK24 = 7
CLK12 = 8
CLK6 = 9
IO_MODE = A
BIT_WR = B
BIT_RD = C
RXF/TXE/RD/WR = D

It should be noted that 0x14-0x16 are used by the current library to
strings and therefore change behavior depending on the string descriptor.
In images created by FT_Prog 0x17 is 0 so I threat this as reserved.
FT_Prog has problems parsing string descriptor from devices written by
ftdi-eeprom without this patch.

I also have investigated FT2232L-EEPROM (=FT2232C) but have no final
conclusion yet,
because I don't want to change the information in this device. Just some
obvious differences.
- Addr 0x00/0x01: value 0x11 0x08
- Addr 0x07: (Device version) 0x05
- Addr 0x14/0x15: value 0x46 0x00
String descriptors start at 0x16.
src/ftdi.c
src/ftdi.h