annotate doc/DUART28-EEPROM-config @ 101:ba741a1af0e3

doc/CP2102-EEPROM-tools: article started
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 28 Sep 2023 06:35:39 +0000
parents dbaf239436cf
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
34
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 The EEPROM on the DUART28 adapter board has two valid configurations: DUART28C
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 and DUART28S. As of this writing the S configuration is the default shipping
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 one, but this situation may change in the future. The difference between the
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 two configs is in the USB VID:PID presented by the USB device, and this USB ID
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 difference has the following practical impact:
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 * The C configuration presents a custom USB ID and requires a custom patch to
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 the Linux kernel ftdi_sio driver in order to work - without this ftdi_sio
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 driver patch it won't work at all. But if you do go through the pain of
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 applying the needed patch to your Linux kernel ftdi_sio driver, the reward
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 is that you get not only the two Calypso UARTs, but also working boot control
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 outputs.
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 * The S configuration presents the default FT2232x USB ID and is therefore
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 supported out of the box by the standard Linux ftdi_sio driver without needing
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 any patches. However, the adapter's CTL1 and CTL2 outputs cannot be used in
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 this configuration (they will be bogusly asserted whenever Channel B ttyUSB
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 device is opened), and thus they must be left unconnected, and you don't get
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 to play with the remote boot control feature.
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 The physical hardware is identical between the two configurations, only the
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 EEPROM programming changes, thus end users need to be able to switch freely
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 between the two EEPROM configs as they wish. This article explains how to
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 program the EEPROM back and forth between the two configs.
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25
43
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
26 Using fc-duart28-conf utility
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
27 =============================
34
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28
43
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
29 The present fc-usbser-tools package includes a specialized high-level utility
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
30 for examining and changing DUART28 adapter configuration. This utility has two
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
31 operation modes:
34
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32
43
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
33 fc-duart28-conf show -- check and show current configuration
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
34 fc-duart28-conf set C|S -- set new config by programming the EEPROM
34
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35
43
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
36 The show command is completely non-invasive: it looks through the system tree
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
37 of connected USB devices, looking for a DUART28 adapter (as identified not only
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
38 by USB VID:PID, but also by manufacturer and product ID strings), and if it
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
39 finds a DUART28 device, the tool reports its current configuration.
34
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40
43
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
41 The set command is invasive by necessity, as the fundamental identity of the
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
42 connected USB device is being changed: the tool commands the Linux kernel to
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
43 unbind the ftdi_sio driver from both interfaces (both ttyUSB devices disappear),
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
44 checks the current EEPROM configuration, and then reprograms it for the new
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
45 desired config. Once the operation completes, the DUART28 adapter needs to be
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
46 unplugged and replugged for the EEPROM change to take effect and for the
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
47 ftdi_sio driver to rebind.
34
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48
43
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
49 Unless you intentionally fool it by programming DUART28C or DUART28S EEPROM
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
50 config into some other FTDI device, fc-duart28-conf cannot hit a non-DUART28
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
51 USB device by mistake: VID:PID, manufacturer ID string and product ID string
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
52 all have to match either DUART28C or DUART28S. If you have multiple DUART28
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
53 adapters plugged in, the tool will hit the first one it finds - not a
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
54 recommended arrangement, but also one which is not expected to arise by
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
55 accident.
34
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56
43
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
57 Manual programming with ftee-gen2232c and fteeprom-prog
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
58 =======================================================
34
f5fbcf1ff032 doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59
43
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
60 In order to be safe in terms of not accidentally hitting some other FTDI-based
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
61 USB device, fc-duart28-conf requires the current state of the DUART28 adapter
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
62 to be either valid DUART28C or valid DUART28S. Under ordinary expected usage
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
63 this requirement is not a problem, but if you somehow manage to totally hose
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
64 your adapter's EEPROM, then fc-duart28-conf won't be able to recover it. If
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
65 you find yourself in the latter situation, see DUART28-EEPROM-manual article
dbaf239436cf doc/DUART28-EEPROM-config: update for fc-duart28-conf
Mychaela Falconia <falcon@freecalypso.org>
parents: 34
diff changeset
66 for the older manual method which is always possible.