Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src



Module Name:    src
Committed By:   brad
Date:           Mon Dec 16 16:37:40 UTC 2024

Modified Files:
        src/distrib/sets/lists/base: mi
        src/distrib/sets/lists/comp: mi
        src/distrib/sets/lists/debug: mi
        src/distrib/sets/lists/man: mi
        src/distrib/sets/lists/manhtml: mi
        src/etc: MAKEDEV.tmpl
        src/share/man/man4: Makefile
        src/sys/conf: majors
        src/sys/dev/usb: Makefile files.usb usbdevices.config
        src/usr.sbin: Makefile
Added Files:
        src/share/man/man4: umcpmio.4
        src/sys/dev/usb: umcpmio.c umcpmio.h umcpmio_hid_reports.h umcpmio_io.h
            umcpmio_subr.c umcpmio_subr.h
        src/usr.sbin/umcpmioctl: Makefile printumcpmio.c printumcpmio.h
            putflash.c putflash.h umcpmioctl.8 umcpmioctl.c umcpmioctl.h
            umcpmioctlconst.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.1354 -r1.1355 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.2483 -r1.2484 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.454 -r1.455 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.1792 -r1.1793 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/manhtml/mi
cvs rdiff -u -r1.234 -r1.235 src/etc/MAKEDEV.tmpl
cvs rdiff -u -r1.737 -r1.738 src/share/man/man4/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/umcpmio.4
cvs rdiff -u -r1.103 -r1.104 src/sys/conf/majors
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/usb/Makefile
cvs rdiff -u -r1.179 -r1.180 src/sys/dev/usb/files.usb
cvs rdiff -u -r0 -r1.1 src/sys/dev/usb/umcpmio.c src/sys/dev/usb/umcpmio.h \
    src/sys/dev/usb/umcpmio_hid_reports.h src/sys/dev/usb/umcpmio_io.h \
    src/sys/dev/usb/umcpmio_subr.c src/sys/dev/usb/umcpmio_subr.h
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/usb/usbdevices.config
cvs rdiff -u -r1.292 -r1.293 src/usr.sbin/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.sbin/umcpmioctl/Makefile \
    src/usr.sbin/umcpmioctl/printumcpmio.c \
    src/usr.sbin/umcpmioctl/printumcpmio.h src/usr.sbin/umcpmioctl/putflash.c \
    src/usr.sbin/umcpmioctl/putflash.h src/usr.sbin/umcpmioctl/umcpmioctl.8 \
    src/usr.sbin/umcpmioctl/umcpmioctl.c src/usr.sbin/umcpmioctl/umcpmioctl.h \
    src/usr.sbin/umcpmioctl/umcpmioctlconst.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index