Home | History | Annotate | Download | only in man4
History log of /src/share/man/man4/umcpmio.4
RevisionDateAuthorComments
 1.6  11-Jul-2025  andvar branches: 1.6.4;
umcpmio(4): s/detact/detect/ and s/reponse/response/.
 1.5  23-Jan-2025  brad Mention the fact that the MCP2221 / MCP2221A automatically deals with
end devices that do I2C clock stretching.
 1.4  16-Dec-2024  uwe umcpmio(4): use .Ql for sysctl values
 1.3  16-Dec-2024  rillig umcpmio.4: travel backwards in time, fix markup, grammar and typos
 1.2  16-Dec-2024  uwe umcpmio(4): fix markup

New sentence - new line. Misc formatting make up. Fix a typo in
sysctl variable name.
 1.1  16-Dec-2024  brad A driver for the MCP-2221 / 2221A multi-io chip. This is a USB to
UART / GPIO / I2C multi-io chip probably based upon a programmed PIC.
The end result is that simple gpio and i2c can exist on any system
that provides a USB port. This is everything from a RPI to a
Virtualbox VM.


o The UART presents itself as a umodem(4) device and pretty much works
as one would expect.

o There are 4 simple GPIO pins with multiple functions that attach to
gpio(4). Support for basic GPIO input and output exists with gpioctl,
the ADC, DAC and clock pulse functions exist as ALT functions. For
the ADC and DAC /dev/ devices are provided such that simple reads and
writes interact with the ADC and DAC. The IRQ function on pin GP1 and
bit banging the GPIO with gpiopps(4) and gpioow(4) are not really
supported. The short answer is that a spin lock is held while trying
to do USB transfers and that isn't allowed.

o There is a simple I2C engine that attaches to iic(4). This mostly
works as expected, except that a READ without STOP is not supported by
the engine which causes problems for some drivers. Most drivers do
not seem to use READ without STOP and seem to work as expected.
Support for changing the I2C speed is not supported, but nothing much
really does that.

o A userland utility called umcpmioctl(8) is provided that allows the
query of the status of the chip and allows for the query of the flash
memory and the setting of some of the flash memory parameters mostly
related to gpio. This utility interacts with a control device in
/dev/. The flash memory contents is copied to the sram on boot up of
the chip and can be used to adjust how the chip sets up the gpio pins,
among other things. Support for setting or entering the chip password
is not provided.

o A number of sysctls are provided to mess with various settings.
These are detailed in the man page.


While not perfect, the chip is reasonable, cheap, and has at least one
vendor making a breakout board. It is also one of the only ones in
this space that has enough documentation to write a driver.

Support for a related chip, the MCP-2210, which provides SPI and GPIO
may exist some day as the programming interface is very simular.
 1.6.4.2  02-Aug-2025  perseant Sync with HEAD
 1.6.4.1  11-Jul-2025  perseant file umcpmio.4 was added on branch perseant-exfatfs on 2025-08-02 05:55:12 +0000

RSS XML Feed