i2c bus via USB adapter

John Kennedy <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <YsuIZS0/[email protected]>
  Along with trying to attach some I2C devices to my RPI4 (which has
GPIO-pin exposure issues due to heatsink-case), I tried attaching this
device from Adafruit:

	Adafruit MCP2221A Breakout - General Purpose USB to GPIO ADC I2C Stemma QT / Qwiic
	https://www.adafruit.com/product/4471

  When I plug it into my box, I see this info:

	kernel: ugen0.4: <Microchip Technology Inc. MCP2221 USB-I2C/UART Combo> at usbus0
	kernel: umodem0 on uhub2
	kernel: umodem0: <Microchip Technology Inc. MCP2221 USB-I2C/UART Combo, class 239/2, rev 2.00/1.00, addr 3> on usbus0
	kernel: umodem0: data interface 1, has no CM over data, has no break
	kernel: uhid0 on uhub2
	kernel: uhid0: <Microchip Technology Inc. MCP2221 USB-I2C/UART Combo, class 239/2, rev 2.00/1.00, addr 3> on usbus0

  I've got a /dev/iic0, but that doesn't seem to be from this device:

	...
	iichb0: <BCM2708/2835 BSC controller> mem 0x7e804000-0x7e804fff irq 26 on simplebus0
	...
	kernel: iicbus0: <OFW I2C bus> on iichb0
	kernel: iic0: <I2C generic I/O> on iicbus0

  Simple recursive grepping didn't get me any hits for MCP2221, and there is
a TON of hits for Microchip, so currently assuming that FreeBSD doesn't have
a driver yet.  Total ignorance at this point, but if there was a driver, would
the expected behavior (assuming right drivers are loaded) would be for the
system to figure out there was an I2C bus hiding behind it and make another
/dev/iic# available, devoted to it?

  A ugen driver (generic USB) seems right.  The umodem driver seems
reasonable (serial device).  The uhid driver seems wrong, at least in
this case, but of course most of the hits I see on the forums are mice
and such, so maybe misidentified in this case.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.