FreeCalypso > hg > fc-usbser-tools
annotate doc/DUART28-EEPROM-config @ 39:b9ecfa54fe2b
fc-duart28-conf: replace find and check-eeprom with single show command
The original design with separate find and check-eeprom commands
was driven by the assumption that we had to bump off the ftdi_sio driver
in order to read the EEPROM, while a USB device tree check could be done
non-invasively. However, now that we know that we can read the EEPROM
non-invasively too, we can simplify the tool with a single show command.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 10 Sep 2023 19:21:20 +0000 |
parents | f5fbcf1ff032 |
children | dbaf239436cf |
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 |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 Determining your current DUART28 config |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 ======================================= |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 Connect the USB cable between your DUART28 board and your Linux host, and |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 observe dmesg output. If your DUART28 board is in the C configuration, it will |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 present as USB ID 0403:7152, and if it is in the S config, it will present as |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 USB ID 0403:6010. You can also see these USB IDs with lsusb. The product ID |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 string is also programmed as "DUART28C" or "DUART28S". |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 Converting from DUART28S to DUART28C |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 ==================================== |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 If your DUART28 board is currently in the S config, its USB ID will be |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 0403:6010, which is the default ID for FTDI's two-channel FT2232x family. |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 Because it is the standard default, there are plenty of other gadgets using the |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 same ID - thus you need to ensure that you have no other USB devices with the |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 same ID connected to your system during the reprogramming operation. Run lsusb |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 and ensure that you see only one USB device with ID 0403:6010. Ensure that this |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 one device really is your DUART28 board: unplug that USB cable and make sure |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 that the device disappears, plug it back in and make sure that it reappears. |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 One you have confirmed that you won't inadvertently hit some other FT2232x |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 device, execute the actual programming command as follows (from the top |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 directory of this code repository): |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 ftee-gen2232c eeproms/duart28c $Serial | fteeprom-prog i:0x0403:0x6010 |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 (See FTDI-EEPROM-tools article for other ways to specify the target device to |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 fteeprom-prog.) |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 Replace the $Serial metavariable with the 3-digit serial number of your DUART28 |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 adapter board as it appears on the factory serial number sticker. |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 After this operation completes successfully, unplug and replug the USB cable |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 between the DUART28 board and your host - the adapter should now show up with |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 USB ID 0403:7152. |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 Converting from DUART28C to DUART28S |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 ==================================== |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 If your DUART28 board is currently in the C config, its USB ID will be |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 0403:7152, which is a private ID that belongs to us and should not be used by |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 other parties. The reverse conversion command is as follows: |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 |
f5fbcf1ff032
doc: initial import from freecalypso-hwlab
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 ftee-gen2232c eeproms/duart28s $Serial | fteeprom-prog i:0x0403:0x7152 |