UMCPMIOCTL(8) NetBSD System Manager's Manual UMCPMIOCTL(8)
NAME
umcpmioctl -- interact with a MCP2210 or MCP2221 / MCP2221A multi-io chip
SYNOPSIS
umcpmioctl [-dh] device status umcpmioctl [-dh] device get sram (MCP2221 / MCP2221A) umcpmioctl [-dh] device get sram gpio (MCP2210) umcpmioctl [-dh] device get sram gpio_values (MCP2210) umcpmioctl [-dh] device get sram gpio_direction (MCP2210) umcpmioctl [-dh] device get sram spi (MCP2210) umcpmioctl [-dh] device get gp umcpmioctl [-dh] device get flash cs umcpmioctl [-dh] device get flash gp umcpmioctl [-dh] device get flash usbman umcpmioctl [-dh] device get flash usbprod umcpmioctl [-dh] device get flash usbsn (MCP2221 / MCP2221A) umcpmioctl [-dh] device get flash chipsn (MCP2221 / MCP2221A) umcpmioctl [-dh] device get flash spi (MCP2210) umcpmioctl [-dh] device get flash usbkeyparams (MCP2210) umcpmioctl [-dh] device put flash gp GPn PIN_FUNCTION ... umcpmioctl [-dh] device put flash spi SPI_PARAMETER VALUE ... (MCP2210) umcpmioctl [-dh] device put flash usbkeyparams USB_PARAMETER VALUE ... (MCP2210)
DESCRIPTION
The umcpmioctl utility interacts with a MCP2210 or MCP2221 / MCP2221A and can be used to pull the status of the chip, get the SRAM values, get the values from the on-board FLASH and can be used to set some of the FLASH values associated with the GPIO pins and SPI. The values from flash are copied into the SRAM when the chip enumerates or powers up. For the put flash gp command, GPn is one of GP0 to GP3 or GP7 depending on the chip and PIN_FUNCTION is one of GPIO_PIN_INPUT, GPIO_PIN_OUTPUT, GPIO_PIN_ALT0, GPIO_PIN_ALT1, GPIO_PIN_ALT2, GPIO_PIN_ALT3, DEFAULT_OUTPUT_ZERO or DEFAULT_OUTPUT_ONE. For the put flash spi command. SPI_PARAMETER is one of CS_TO_DATA_DELAY, LAST_BYTE_TO_CS_DELAY, or DELAY_BETWEEN_BYTES. The VALUE is the number of microseconds for that parameter. For the put flash usbkeyparams command, USB_PARAMETER is one of POWERED or MA. The VALUE is SELF or BUS for POWERED or a number from 1 to 511 for the amount of MA power requested. For the put flash command, the function and value pairs may be repeated.
EXAMPLES
umcpmioctl /dev/umcpmio0ctl status Query the chip for its status. umcpmioctl /dev/umcpmio0ctl get sram Return the values from the SRAM on the chip. umcpmioctl /dev/umcpmio0ctl get flash cs Return the values for the chip settings from the FLASH. umcpmioctl /dev/umcpmio0ctl put flash gp GP0 GPIO_PIN_INPUT This will set the GP0 pin to be an input pin on start up of the chip. umcpmioctl /dev/umcpmio0ctl put flash gp GP2 GPIO_PIN_OUTPUT GP0 GPIO_PIN_ALT0 This will set the GP2 pin to be an output pin and GP0 pin to have the ALT0 function upon chip start up.
SEE ALSO
gpio(4), umcpmio(4)
HISTORY
The umcpmioctl utility first appeared in NetBSD 11.0.
AUTHORS
The umcpmioctl utility was written by Brad Spencer <brad@anduin.eldar.org>.
BUGS
Only a limited number of setting can be changed in FLASH or NVRAM. The output is not very pleasant to use and one will probably need to have the data sheet for the MCP2210 or MCP2221 / MCP2221A on hand to make sense of the output. NetBSD 11.99 November 24, 2024 NetBSD 11.99
Powered by man-cgi (2025-09-08). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.