Re: Accessing I2C-Bus via ELV USB-I2C
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 03 Oct 2022 15:26:07 UTC
From time to time the I2C layer on top of the uart locks up and can’t be recovered via its built in reset command. Initialialization at [1]:2564 is missing the greeting message. looking at the traffic with usbdump -d ugen1.3 -v -v -v -s 1024 > usb.txt I’m missing some response data from the I2C controller. Questions: 1. On usbdump, why is the hexdump mssing on some lines like frame[0] WRITE <n> bytes ? 2. Do we have a tool to dump traffic directly on the uart layer? Any help appreciated, Axel [1]: https://github.com/mc3/home2l/blob/master/brownies/brownies.C > Am 27.04.2022 um 23:08 schrieb Axel Rau <Axel.Rau@chaos1.de>: > > Next journey starts: > > For the home2l project, I need a supported I2C interface via USB. > I got this one: > https://de.elv.com/elv-usb-ic-interface-usb-i2c-092255?fs=1805459039 > Unfortunately it shows up as a serial device on FreeBSD: > > ugen0.2: <Silicon Labs ELV USB-I2C-Interface> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA) > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0110 > bDeviceClass = 0x0000 <Probed by interface class> > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0040 > idVendor = 0x10c4 > idProduct = 0xea60 > bcdDevice = 0x0100 > iManufacturer = 0x0001 <Silicon Labs> > iProduct = 0x0002 <ELV USB-I2C-Interface> > iSerialNumber = 0x0003 <B5AAP0EEUK6A3CIZ> > bNumConfigurations = 0x0001 > > In loader.conf, I have: > uslcom_load="YES" > iic_load="YES" > iicbus_loa > > But the i2c utility does not show a new bus. > > From dmesg: > root@axels-bsdbox:~ # dmesg | grep iic > ig4iic0: <Intel Sunrise Point-H I2C Controller-0> mem 0xdf230000-0xdf230fff irq 16 at device 21.0 on pci0 > ig4iic0: Using MSI > iicbus0: <Philips I2C bus (ACPI-hinted)> on ig4iic0 > iic0: <I2C generic I/O> on iicbus0 > ig4iic1: <Intel Sunrise Point-H I2C Controller-1> mem 0xdf22f000-0xdf22ffff irq 17 at device 21.1 on pci0 > ig4iic1: Using MSI > iicbus1: <Philips I2C bus (ACPI-hinted)> on ig4iic1 > iic1: <I2C generic I/O> on iicbus1 > root@axels-bsdbox:~ # dmesg | grep I2C > ig4iic0: <Intel Sunrise Point-H I2C Controller-0> mem 0xdf230000-0xdf230fff irq 16 at device 21.0 on pci0 > iicbus0: <Philips I2C bus (ACPI-hinted)> on ig4iic0 > iic0: <I2C generic I/O> on iicbus0 > ig4iic1: <Intel Sunrise Point-H I2C Controller-1> mem 0xdf22f000-0xdf22ffff irq 17 at device 21.1 on pci0 > iicbus1: <Philips I2C bus (ACPI-hinted)> on ig4iic1 > iic1: <I2C generic I/O> on iicbus1 > ugen0.2: <Silicon Labs ELV USB-I2C-Interface> at usbus0 > uslcom0: <ELV USB-I2C-Interface> on usbus0 > > They provide a (linux) driver ("Treiber") which seems to implement the I2C protocoll on top of the serial interface. > Do we have such a driver on FreeBSD, or exist other supported I2C devices to be plugged into USB? > > Any help appreciated, > Axel --- PGP-Key: CDE74120 ☀ computing @ chaos claudius