FreeCalypso > hg > freecalypso-hwlab
annotate doc/DUART28-EEPROM-config @ 152:250d172662ca
fc-simtool a38 command: use generalized hex string parsing function
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 07 Feb 2021 00:23:06 +0000 |
parents | f0b0970fbe2e |
children | df4bf4e06221 |
rev | line source |
---|---|
78
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 The EEPROM on the DUART28 adapter board has two valid configurations: DUART28C |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 and DUART28S. As of this writing the S configuration is the default shipping |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 one, but this situation may change in the future. The difference between the |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
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 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 difference has the following practical impact: |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 * The C configuration presents a custom USB ID and requires a custom patch to |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 the Linux kernel ftdi_sio driver in order to work - without this ftdi_sio |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
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 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 applying the needed patch to your Linux kernel ftdi_sio driver, the reward |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 is that you get not only the two Calypso UARTs, but also working boot control |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 outputs. |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 * The S configuration presents the default FT2232x USB ID and is therefore |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 supported out of the box by the standard Linux ftdi_sio driver without needing |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 any patches. However, the adapter's CTL1 and CTL2 outputs cannot be used in |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 this configuration (they will be bogusly asserted whenever Channel B ttyUSB |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 device is opened), and thus they must be left unconnected, and you don't get |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 to play with the remote boot control feature. |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 The physical hardware is identical between the two configurations, only the |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 EEPROM programming changes, thus end users need to be able to switch freely |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 between the two EEPROM configs as they wish. This article explains how to |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 program the EEPROM back and forth between the two configs. |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 Determining your current DUART28 config |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 ======================================= |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 Connect the USB cable between your DUART28 board and your Linux host, and |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 observe dmesg output. If your DUART28 board is in the C configuration, it will |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
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 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
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 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 string is also programmed as "DUART28C" or "DUART28S". |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 Converting from DUART28S to DUART28C |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 ==================================== |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 If your DUART28 board is currently in the S config, its USB ID will be |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 0403:6010, which is the default ID for FTDI's two-channel FT2232x family. |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 Because it is the standard default, there are plenty of other gadgets using the |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
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 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 same ID connected to your system during the reprogramming operation. Run lsusb |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
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 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 one device really is your DUART28 board: unplug that USB cable and make sure |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 that the device disappears, plug it back in and make sure that it reappears. |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 One you have confirmed that you won't inadvertently hit some other FT2232x |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 device, execute the actual programming command as follows (from the top |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 directory of this code repository): |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 ftee-gen2232c eeproms/duart28c $Serial | fteeprom-prog i:0x0403:0x6010 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 (See FTDI-EEPROM-tools article for other ways to specify the target device to |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 fteeprom-prog.) |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 Replace the $Serial metavariable with the 3-digit serial number of your DUART28 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 adapter board as it appears on the factory serial number sticker. |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 After this operation completes successfully, unplug and replug the USB cable |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 between the DUART28 board and your host - the adapter should now show up with |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 USB ID 0403:7152. |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 Converting from DUART28C to DUART28S |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 ==================================== |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 If your DUART28 board is currently in the C config, its USB ID will be |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
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 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 other parties. The reverse conversion command is as follows: |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 |
f0b0970fbe2e
doc/DUART28-EEPROM-config article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 ftee-gen2232c eeproms/duart28s $Serial | fteeprom-prog i:0x0403:0x7152 |