1

I am trying to get a SiLabs CP2112 USB to I2C bridge working with my Pi. At some point in recent history I had it working just fine. I could plug in a CP2112 evaluation board and a new entry /dev/i2c-2 was created for a new I2C bus. For some reason this doesn't seem to work anymore. I've gone back to a stock Raspbian image and still can't get the device to appear as an I2C bus.

If I connect my CP2112 then lsusb gives me:

Bus 001 Device 006: ID 10c4:ea90 Cygnal Integrated Products, Inc.

dmesg shows nothing bad:

[ 87.010707] usb 1-1.5: Product: CP2112 HID USB-to-SMBus Bridge [ 87.010724] usb 1-1.5: Manufacturer: Silicon Laboratories [ 87.010740] usb 1-1.5: SerialNumber: 0043FFF3 [ 107.147142] usb 1-1.5: USB disconnect, device number 5 [ 1438.756308] usb 1-1.3: new full-speed USB device number 6 using dwc_otg [ 1438.864004] usb 1-1.3: New USB device found, idVendor=10c4, idProduct=ea90 [ 1438.864030] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1438.864049] usb 1-1.3: Product: CP2112 HID USB-to-SMBus Bridge [ 1438.864066] usb 1-1.3: Manufacturer: Silicon Laboratories [ 1438.864082] usb 1-1.3: SerialNumber: 0043FFF3

And /var/log/syslog again shows nothing that looks bad:

Mar 11 12:40:58 raspberrypi kernel: [ 1438.756308] usb 1-1.3: new full-speed USB device number 6 using dwc_otg Mar 11 12:40:58 raspberrypi kernel: [ 1438.864004] usb 1-1.3: New USB device found, idVendor=10c4, idProduct=ea90 Mar 11 12:40:58 raspberrypi kernel: [ 1438.864030] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Mar 11 12:40:58 raspberrypi kernel: [ 1438.864049] usb 1-1.3: Product: CP2112 HID USB-to-SMBus Bridge Mar 11 12:40:58 raspberrypi kernel: [ 1438.864066] usb 1-1.3: Manufacturer: Silicon Laboratories Mar 11 12:40:58 raspberrypi kernel: [ 1438.864082] usb 1-1.3: SerialNumber: 0043FFF3 Mar 11 12:40:58 raspberrypi mtp-probe: checking bus 1, device 6: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3" Mar 11 12:40:58 raspberrypi mtp-probe: bus: 1, device: 6 was not an MTP device

The i2c-dev module is loaded. I see there has been fairly recent work on the hid-cp2112 driver in the kernel, and others appear to be able to use the device with no problems.

Can anyone offer any help or advice? Thank you.

  • How often do you update the kernel and firmware? – goldilocks Mar 11 '16 at 13:51
  • All testing of this problem has been performed with 2015-11-21-raspbian-jessie. Although I am convinced I saw the bridge enumerate as i2c-2 in /dev/ I'm now checking that the Kernel was built with the driver enabled. I think I would expect to see hid-cp2112.ko in /lib/modules/4.1.19-v7+/kernel/drivers/hid but it's not there. – RDW Mar 11 '16 at 14:13
1

Answering my own questions to help others who may have the same problem.

The Kernel for the Pi is not compiled with the driver for the CP2112 selected as either a builtin or a loadable module. For the CP2112 to operate correctly as a USB->I2C bridge follow the guide here to rebuild the kernel, with the exception that before compiling/building you should modify the .config to allow the hid-cp2112 driver to be included as a builtin driver.

With the Kernel and modules built deploy them to your Pi/Pi2 by copying the built Kernel Image over the top of kernel.img/kernel7.img and copying the built lib folder to /lib of the Pi SD Card.

When connecting a CP2112 you should now see the I2C bus appear under /dev

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.