FreeCalypso > hg > fc-usbser-tools
view doc/DUART28-EEPROM-config @ 81:8b0a01b19fb9
doc/FTDI-EEPROM-format: update for the discovery of
FTDI chips enforcing the requirement of using upper addresses for strings
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 26 Sep 2023 21:56:26 +0000 |
parents | dbaf239436cf |
children |
line wrap: on
line source
The EEPROM on the DUART28 adapter board has two valid configurations: DUART28C and DUART28S. As of this writing the S configuration is the default shipping one, but this situation may change in the future. The difference between the two configs is in the USB VID:PID presented by the USB device, and this USB ID difference has the following practical impact: * The C configuration presents a custom USB ID and requires a custom patch to the Linux kernel ftdi_sio driver in order to work - without this ftdi_sio driver patch it won't work at all. But if you do go through the pain of applying the needed patch to your Linux kernel ftdi_sio driver, the reward is that you get not only the two Calypso UARTs, but also working boot control outputs. * The S configuration presents the default FT2232x USB ID and is therefore supported out of the box by the standard Linux ftdi_sio driver without needing any patches. However, the adapter's CTL1 and CTL2 outputs cannot be used in this configuration (they will be bogusly asserted whenever Channel B ttyUSB device is opened), and thus they must be left unconnected, and you don't get to play with the remote boot control feature. The physical hardware is identical between the two configurations, only the EEPROM programming changes, thus end users need to be able to switch freely between the two EEPROM configs as they wish. This article explains how to program the EEPROM back and forth between the two configs. Using fc-duart28-conf utility ============================= The present fc-usbser-tools package includes a specialized high-level utility for examining and changing DUART28 adapter configuration. This utility has two operation modes: fc-duart28-conf show -- check and show current configuration fc-duart28-conf set C|S -- set new config by programming the EEPROM The show command is completely non-invasive: it looks through the system tree of connected USB devices, looking for a DUART28 adapter (as identified not only by USB VID:PID, but also by manufacturer and product ID strings), and if it finds a DUART28 device, the tool reports its current configuration. The set command is invasive by necessity, as the fundamental identity of the connected USB device is being changed: the tool commands the Linux kernel to unbind the ftdi_sio driver from both interfaces (both ttyUSB devices disappear), checks the current EEPROM configuration, and then reprograms it for the new desired config. Once the operation completes, the DUART28 adapter needs to be unplugged and replugged for the EEPROM change to take effect and for the ftdi_sio driver to rebind. Unless you intentionally fool it by programming DUART28C or DUART28S EEPROM config into some other FTDI device, fc-duart28-conf cannot hit a non-DUART28 USB device by mistake: VID:PID, manufacturer ID string and product ID string all have to match either DUART28C or DUART28S. If you have multiple DUART28 adapters plugged in, the tool will hit the first one it finds - not a recommended arrangement, but also one which is not expected to arise by accident. Manual programming with ftee-gen2232c and fteeprom-prog ======================================================= In order to be safe in terms of not accidentally hitting some other FTDI-based USB device, fc-duart28-conf requires the current state of the DUART28 adapter to be either valid DUART28C or valid DUART28S. Under ordinary expected usage this requirement is not a problem, but if you somehow manage to totally hose your adapter's EEPROM, then fc-duart28-conf won't be able to recover it. If you find yourself in the latter situation, see DUART28-EEPROM-manual article for the older manual method which is always possible.