MCPGPIO(4) | Device Drivers Manual | MCPGPIO(4) |
mcpgpio
— Driver
for Microchip I/O Expanders on I2C and SPI bus
mcpgpio* at iic? addr ?
gpio* at gpiobus?
mcpgpio0 at spi? slave 0 flags 0
mcpgpio1 at spi? slave 0 flags 1
mcpgpio2 at spi? slave 0 flags 2
mcpgpio3 at spi? slave 0 flags 3
gpio* at gpiobus?
The mcpgpio
driver supports the following
Microchip I/O Expanders:
Access to the pins is provided by the gpio(4) interface.
The SPI version of these devices support multiple chips per chip select signal. On the MCP23S08 and MCP23S17, this is achieved by tying the address select pins to VDD or GND to select an address (0-3 on MCP23S08 or 0-7 on MCP23S17). The MCP23S18 has a similar capability, but uses an analog voltage input on a single address select pin, along with an internal voltage divider ladder and a series of comparators to generate the 3 address bits; see the data sheet for details. The flags argument in the configuration directive for SPI attachments selects the hardware address of the chip instance for that driver instance.
The mcpgpio
driver first appeared in
NetBSD 7.0. It was overhauled in
NetBSD 10.0 to support additional chip types and to
add the I2C attachment.
The mcpgpio
driver was written by
Frank Kardel
<kardel@NetBSD.org>
and Jason R. Thorpe
<thorpej@NetBSD.org>.
SPI instances of the mcpgpio
driver do not
utilize the Device Tree bindings for this device.
The mcpgpio
driver does not currently act
as a GPIO provider for the platform device tree.
January 10, 2022 | NetBSD 10.99 |