annotate doc/FTDI-EEPROM-format @ 72:6dc3aa777fd6

doc/FTDI-EEPROM-format: document config file language
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 25 Sep 2023 00:04:22 +0000
parents 0b37be8b23ca
children f14d04e4d85d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
69
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 FTDI configuration EEPROM format
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 ================================
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 Unfortunately FTDI never documented the format of their EEPROM configuration
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 structure - apparently they consider it a proprietary trade secret just like
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 the wire protocol spoken over USB between their chips and their closed-source
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 proprietary drivers. All FOSS community support for these chips is based on
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 reverse engineering, and that includes the EEPROM format.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 We (FreeCalypso) have not done any significant FTDI RE of our own - instead we
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 are taking the knowledge that already exists in the FOSS community (including
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 RE-based knowledge of FTDI EEPROM format) and using it to produce better tools.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 The present document summarizes the bits of knowledge we have collected
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 regarding FTDI's EEPROM configuration structure - this knowledge base is what
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 our generator and decoder tools are built on, as well as shipped EEPROM
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 programming in all physical hw products made by FreeCalypso.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 Word-based vs byte-based views
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 ==============================
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 Before FTDI started integrating the EEPROM inside their FT232R and FT-X chips,
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 their original design used external serial EEPROMs of 93C46, 93C56 or 93C66
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 type. These EEPROMs are physically structured as an array of 16-bit words - or
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 more precisely, some EEPROM parts support both word and byte organization modes,
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 selected by pin strapping, but FTDI chips require word-structured EEPROMs.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 Given this physical organization, we tend to view the EEPROM structure as an
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 array of 16-bit words. For some parts of the configuration structure, such as
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 16-bit ID words and UCS-2 strings, this word-based view is ideal - however,
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 there are also times when the EEPROM structure needs to be viewed in terms of
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 bytes:
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 * Some configuration parameters are given as bytes rather than words;
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 * Pointers from the fixed structure at the beginning of the EEPROM to string
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 descriptors in the "user" area use byte-based addressing.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 The correspondence order between bytes and words is little-endian.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 Fixed header structure
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 ======================
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 The first 10 words (20 or 0x14 bytes) of the EEPROM follow the same basic
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 structure across all known-to-us FTDI chips:
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 Word 0 (bytes 0x00 and 0x01): this word is best viewed as two separate bytes,
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 and these bytes encode FTDI-specific functions detailed later in this document.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 Word 1 (bytes 0x02 and 0x03): USB vendor ID, called idVendor in the USB spec.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 Word 2 (bytes 0x04 and 0x05): USB product ID, called idProduct in the USB spec.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 Word 3 (bytes 0x06 and 0x07): originally allocated for the bcdDevice word in
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 the USB device descriptor, see Table 9-8 in the USB 2.0 specification. On older
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 FTDI chips such as FT2232D, the chip takes the value programmed in this EEPROM
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 word and actually reports this value in its device descriptor - thus if the
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 EEPROM is misprogrammed, all standard host software will be misled; see our
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 FTDI-chip-ID article. OTOH, FT232R ignores this word and always reports its
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 bcdDevice as 0x0600; in terms of FT232R EEPROM images captured in the wild,
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 some have zero in this word while others have 0x0600. FT2232H behaves like
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 FT232R (ignores this EEPROM word), but I haven't seen any EEPROM images with
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 this word zeroed out - it appears that FTDI's official tools still insert the
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 correct bcdDevice value.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 Word 4 (bytes 0x08 and 0x09): this word is best viewed as two separate bytes.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 Both bytes go into the USB configuration descriptor: byte 0x08 is bmAttributes
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 and byte 0x09 is bMaxPower. See USB 2.0 specification Table 9-10 for the
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 detailed format.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 Word 5 (bytes 0x0A and 0x0B): this word is best viewed as two separate bytes,
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 and these bytes encode FTDI-specific functions detailed later in this document.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 Word 6 (bytes 0x0C and 0x0D): originally allocated for the bcdUSB word in the
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 USB device descriptor, indicating the version of the USB spec which the device
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 claims to support. Starting with FT2232H this word has been repurposed for
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 other functions, as detailed in the chip-specific sections below.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 Word 7 (bytes 0x0E and 0x0F): pointer to the manufacturer ID string; format
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 explained later in the string descriptors section.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 Word 8 (bytes 0x10 and 0x11): pointer to the product ID string.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 Word 9 (bytes 0x12 and 0x13): pointer to the serial number string if one is
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 present, otherwise 0.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 FTDI-specific bytes in the fixed header
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 =======================================
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 Bytes 00, 01, 0A and 0B in the structure covered above are FTDI-specific (don't
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 correspond to any fields in any of the standard USB descriptors), and many of
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 the functions controlled by these bytes differ significantly from one FTDI chip
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 type to the next.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 FT2232x bytes 00 and 01
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 -----------------------
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 On FT2232x chips bytes 00 and 01 configure channels A and B, respectively.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 The 3 least significant bits of each byte encode the channel mode as follows:
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 0 = UART
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 1 = 245-style FIFO
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 2 = fast opto-isolated serial
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 4 = CPU-style FIFO
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 Bit 3 (mask 0x08) appears to have no function in the chip itself, but is used
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 by FTDI's Losedows drivers: for each of the two channels, FTDI's VCP driver is
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 selected if the bit is set and D2XX driver is selected if the bit is cleared.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 On FT2232C/D only (not on FT2232H), bit 4 (mask 0x10) enables high current drive
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 on the respective A/B channel.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 On FT2232H only, byte 01 bit 7 (mask 0x80) turns on a feature that is misnamed
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 "Suspend on DBus 7 Low" in FTDI's official programming tool. It is misnamed
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 because the actual pin in question is BCBUS7, not "DBUS7". When this function
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 is enabled via this bit, BCBUS7 becomes PWRSAV# input, which is sufficiently
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 documented in the FT2232H datasheet.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 ftee-gen2232c and ftee-gen2232h default for both bytes is 0x08.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 FT232R byte 00
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 --------------
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 This byte is conceptually similar to its counterpart on FT2232x, but not exactly
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 the same, and NOT compatible. FT232R byte 00 bit assignments are as follows:
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 bit 0: 0 for FT232R, 1 for FT245R
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 bit 1: use external oscillator if set
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 bit 2: high current drive if set
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 bit 3: same VCP/D2XX nonsense as on other chips, but with reversed sense:
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 0 means VCP, 1 means D2XX on this chip
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 ftee-gen232r default for this byte is 0x00.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 FT232R byte 01
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 --------------
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 This byte is unique to FT232R: it sets the maximum packet size the chip
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 advertises for its Data In endpoint, via wMaxPacketSize in the endpoint
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 descriptor. The standard value is 64 (0x40), and there does not seem to be
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 any need to change it.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 Byte 0A on all FTDI chips
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 -------------------------
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 This byte has the same bit assignments across all FTDI chips we work with,
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 although newer chips don't support some of the older bits:
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 bit 0: isochronous endpoint control on FT232BM and FT2232C/D
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 bit 1: isochronous endpoint control on FT232BM and FT2232C/D
71
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
151 bit 2: enable suspend mode pull-down on I/O pins (all chips)
69
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 bit 3: 1 means serial number string present, 0 means serial # string absent
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 bit 4: set bcdUSB in device descriptor to EEPROM value (only up to FT2232C/D)
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 bit 5: isochronous endpoint control on FT2232C/D
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 bit 6: isochronous endpoint control on FT2232C/D
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 See chip-specific sections below for the details on isochronous endpoint
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 control bits.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 ftee-gen* default for this byte is 0x00.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 Byte 0B: FT2232x
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 ----------------
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 This byte appears to be unused on FT2232C/D and on FT2232H.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 Byte 0B: FT232R
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 ---------------
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 This byte controls UART signal inversion. Bits 0 through 7 (lsb through msb)
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 correspond to DBUS0 through DBUS7: if a given bit is set, the corresponding
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 DBUS/UART signal is inverted.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 FT232BM specifics
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 =================
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 We don't have much support for this chip as it predates FreeCalypso involvement
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 in the business of FTDI chip tinkering - however, we know the following bits:
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 * The fixed part of the EEPROM config structure is just the 10 words described
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 above, and the strings area begins at byte offset 0x14.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 * Isochronous endpoint control via byte 0A appears to be the same as for
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 Channel A of FT2232C/D, described below.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 FT2232C/D specifics
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 ===================
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 Words 0 through 9 (bytes up to 0x13) are as explained above. The only
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 additional FT2232C/D-specific word is 10:
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 Byte 0x14 (low half of word 10) holds the EEPROM type: set to 0x46 for 93C46,
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 0x56 for 93C56 or 0x66 for 93C66. It is not clear if the chip actually uses
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 this byte for anything: it seems to me that FTDI's EEPROM read engine has to
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 determine the required number of address bits (presumably by asking to read
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 address 0 and looking for the position of the dummy 0 bit from the EEPROM)
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 before it can proceed with incrementing addresses. (The address bit order
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 in the serial EEPROM interface is big-endian, hence one needs to know the
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 correct number of address bits in order to increment linearly.)
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 Byte 0x15 (high half of word 10) appears to be unused.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 The strings area of the EEPROM begins with word 11 or byte offset 0x16.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 Isochronous endpoint control
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 ----------------------------
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 The 4 data endpoints on this chip (In and Out for each channel) are of type
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 Bulk by default, but each of these 4 endpoints is independently selectable
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 between bulk and isochronous via these 4 bits in byte 0A:
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212 bit 0: make Channel A data In endpoint isochronous
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 bit 1: make Channel A data Out endpoint isochronous
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 bit 5: make Channel B data In endpoint isochronous
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 bit 6: make Channel B data Out endpoint isochronous
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 FT2232H specifics
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 =================
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 On both FT2232H and FT4232H (which we don't support yet) EEPROM word 6
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 (originally allocated for bcdUSB override) is repurposed for I/O electrical
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222 interface configuration. The 16-bit word is divided into four 4-bit groups,
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223 mapped to pins as follows:
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225 Group # FT2232H pins FT4232H pins
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 --------------------------------------------
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 0 ADBUSx ADBUSx
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228 1 ACBUSx BDBUSx
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229 2 BDBUSx CDBUSx
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 3 BCBUSx DDBUSx
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 Within each group the 4 bits are assigned as follows:
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 Bits Function
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235 ----------------
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236 1:0 drive strength:
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 00 = 4 mA
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238 01 = 8 mA
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239 10 = 12 mA
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 11 = 16 mA
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241 2 set to 1 for slow slew rate
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242 3 set to 1 for Schmitt trigger
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 Other EEPROM quirks on FT2232H:
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246 * Words 10 and 11, used on FT232R (chronologically between FT2232C and FT2232H)
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
247 for CBUS configuration, appear to be reserved and unused on FT2232H.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249 * Word 12 on FT2232H is same as word 10 on FT2232C/D: EEPROM type code, even
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
250 though it still isn't clear what the chip does with it, if anything.
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
251
065f68a94b6b doc/FTDI-EEPROM-format: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
252 * The strings area of the EEPROM begins with word 13 or byte offset 0x1A.
70
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
253
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
254 FT232R specifics
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
255 ================
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
256
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
257 Words 0 through 9 (bytes up to 0x13) are as explained above. The following
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
258 words 10 and 11 are specific to FT232R - they encode configured functions for
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
259 CBUSx pins as follows:
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
260
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
261 word 10 bits 3:0 CBUS0 config
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
262 word 10 bits 7:4 CBUS1 config
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
263 word 10 bits 11:8 CBUS2 config
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
264 word 10 bits 15:12 CBUS3 config
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
265 word 11 bits 3:0 CBUS4 config
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
266 word 11 bits 15:4 reserved
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
267
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
268 Please refer to libftdi source for the codes that go into individual 4-bit
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
269 fields for each CBUSx.
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
270
09da7db45dce doc/FTDI-EEPROM-format: document FT232R specifics
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
271 The strings area of the EEPROM begins with word 12 or byte offset 0x18.
71
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
272
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
273 USB string descriptors
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
274 ======================
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
275
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
276 The standard USB device descriptor returned by FTDI chips has iManufacturer set
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
277 to 1 and iProduct set to 2, indicating presence of string descriptors at these
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
278 indices. If byte 0A bit 3 is set, iSerialNumber is set to 3, otherwise
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
279 iSerialNumber is set to 0, indicating absence of serial number string.
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
280
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
281 The string descriptors themselves, returned upon the host asking for them at
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
282 these indices, are stored verbatim in the strings area of the EEPROM, i.e., in
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
283 the free space following the fixed configuration structure for each chip.
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
284
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
285 As defined in the USB spec, each string descriptor has the following structure:
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
286
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
287 1 byte: total number of bytes in the descriptor
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
288 1 byte: constant 0x03, meaning string descriptor
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
289 variable bytes: string body in UCS-2
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
290
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
291 The total number of bytes in a string descriptor is the number of UCS-2
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
292 characters times 2 plus 2; this number is written into the first byte of the
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
293 descriptor itself, in the least-significant half of the first 16-bit word. The
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
294 whole descriptor, consisting of this header word followed by UCS-2 character
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
295 words, can be placed at any EEPROM location that isn't taken or reserved for
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
296 something else, and there is a pointer to each of the 3 possible string
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
297 descriptors from the fixed header structure at the beginning of the EEPROM.
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
298
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
299 Each of the 3 string pointers is one 16-bit word, structured as follows:
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
300
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
301 lower byte: EEPROM byte address where the descriptor starts
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
302 upper byte: total number of bytes in the descriptor, same as written
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
303 in the descriptor itself
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
304
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
305 String placement quirk
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
306 ----------------------
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
307
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
308 It should be apparent from the above description that each string descriptor
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
309 can be placed anywhere in the EEPROM, as long as that location doesn't clash
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
310 with something else. The most natural way is to put the manufacturer ID string
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
311 right after the fixed config structure, then the product ID string and then the
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
312 serial number string, if included - but FTDI's official tools *almost* follow
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
313 this principle, with two quirks:
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
314
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
315 * In the case of 93C56 or 93C66 EEPROMs, FTDI's official tools skip 64 words
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
316 (128 bytes) after the end of the chip-defined config structure and then place
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
317 the manufacturer ID string after this gap. The byte-address pointer to each
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
318 string descriptor always has its high bit set as a result of this quirk.
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
319
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
320 * In the case of 1024-bit EEPROMs (93C46 or FT232R internal) nothing is skipped,
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
321 but the byte-address pointers to strings are written with the high bit set,
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
322 as if the EEPROM were of 93C56 type.
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
323
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
324 Our current ftee-gen* tools replicate these quirks, as they are essentially
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
325 harmless. The only downside of this design is that one cannot use a 93C56
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
326 EEPROM to include longer strings - but designing a product with unnaturally
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
327 long ID strings, so long that FTDI's official tools won't support them, seems
0b37be8b23ca doc/FTDI-EEPROM-format: document string descriptors
Mychaela Falconia <falcon@freecalypso.org>
parents: 70
diff changeset
328 like a bad idea.
72
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
329
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
330 ftee-gen* tools: config file language
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
331 =====================================
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
332
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
333 The format of EEPROM config files read by our ftee-gen* tools is line-based.
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
334 Each non-blank, non-comment line defines or tweaks one setting. The following
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
335 settings are common to all ftee-gen* chip variants:
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
336
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
337 Setting Format Meaning
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
338 -------------------------------
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
339 vid hex USB vendor ID
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
340 pid hex USB product ID
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
341 manuf string Manufacturer ID string
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
342 product string Product ID string
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
343 byte00 hex Raw setting of byte 00
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
344 byte01 hex Raw setting of byte 01
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
345 byte08 hex Raw setting of byte 08
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
346 byte0A hex Raw setting of byte 0A
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
347 maxpower decimal bMaxPower declaration, number in mA
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
348 usbver hex bcdUSB word (ftee-gen2232c and ftee-gen232r only)
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
349
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
350 Additional settings for FT2232H (ftee-gen2232h):
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
351
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
352 group0 hex I/O electrical config for ADBUSx
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
353 group1 hex I/O electrical config for ACBUSx
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
354 group2 hex I/O electrical config for BDBUSx
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
355 group3 hex I/O electrical config for BCBUSx
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
356
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
357 Additional settings for FT232R (ftee-gen232r):
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
358
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
359 byte0B hex Raw setting of byte 0B
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
360 cbus0 hex CBUS0 config code
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
361 cbus1 hex CBUS1 config code
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
362 cbus2 hex CBUS2 config code
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
363 cbus3 hex CBUS3 config code
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
364 cbus4 hex CBUS4 config code
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
365
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
366 Only two settings are strictly mandatory: manuf and product strings. For all
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
367 other settings the EEPROM generator tool provides chip-matching defaults:
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
368
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
369 * ftee-gen2232[ch] defaults match the configuration attained by the chip
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
370 with a blank or missing EEPROM;
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
371
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
372 * ftee-gen232r defaults match FTDI's default factory programming of the
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
373 chip-internal EEPROM.
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
374
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
375 As one can see, the config language is very low-level, most bits are set in raw
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
376 hex. This design is justified by the paradigm of writing each config file once:
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
377 if you are designing a new board with an FTDI chip on it, and you need to change
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
378 some setting away from the FTDI chip's default, you research it once, figure out
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
379 the right bits, code the needed byte-level configuration in an EEPROM config
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
380 file, and then you just run a standard command line every time you need to
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
381 program a board.
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
382
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
383 The serial number string is never specified in the config file, instead it is
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
384 specified on the command line - this tool design is in accord with factory
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
385 production paradigm, where each EEPROM config is written once for a given board
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
386 design, and then a shell pipeline is executed for each board to be programmed.
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
387
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
388 Byte 0A bit 3 is always overridden by the generator tool based on the serial
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
389 number command line argument: set if a serial number is given and cleared if
6dc3aa777fd6 doc/FTDI-EEPROM-format: document config file language
Mychaela Falconia <falcon@freecalypso.org>
parents: 71
diff changeset
390 this argument is omitted.