Riverdi Touch USB

Hello,

I recently picked up a Riverdi RGB display similar to the Toradex 7” capacitive touch hardware. I am in the midst of creating interface hardware and device tree overlays for this screen, but I came across an issue with the touch driver.

The ILI2132 is used on this device to interface the touchscreen to the module. It appears there are two interfaces available–I2C and USB.

The I2C driver is available from the linux-toradex repo and would be preferable in my application. That being said, I’m using a Colibri iMX8QXP, which only has one I2C port on the SODIMM connection. There is another I2C line which interfaces with the onboard touch controller, but I am unsure if I can use those for this application as there are other devices on the same line. I suppose as long as there is no interference in the addresses, I should be able to just disable the other devices on the same line within the device tree and add my own. There are two onboard I2C lines which go to MIPI DSI/CSI (See page 24) that are available on the SODIMM connector.

In addition to I2C, the screen has a USB interface. Riverdi claims this should be universally workable, but I plugged it in and got the following message:

[ 1411.503382] usb 2-1.2: new low-speed USB device number 4 using xhci-hcd     
[ 1411.591407] usb 2-1.2: device no response, device descriptor read/64, error -32            
[ 1411.783426] usb 2-1.2: device no response, device descriptor read/64, error -32         
[ 1411.975373] usb 2-1.2: new low-speed USB device number 5 using xhci-hcd                           
[ 1412.063395] usb 2-1.2: device no response, device descriptor read/64, error -32                  
[ 1412.255389] usb 2-1.2: device no response, device descriptor read/64, error -32      
[ 1412.367610] usb 2-1-port2: attempt power cycle                                                    
[ 1412.975372] usb 2-1.2: new low-speed USB device number 6 using xhci-hcd                           
[ 1412.982595] usb 2-1.2: Device not responding to setup address.                                    
[ 1413.195973] usb 2-1.2: Device not responding to setup address.                                    
[ 1413.407361] usb 2-1.2: device not accepting address 6, error -71                                  
[ 1413.491391] usb 2-1.2: new low-speed USB device number 7 using xhci-hcd                                
[ 1413.498486] usb 2-1.2: Device not responding to setup address.                                    
[ 1413.711781] usb 2-1.2: Device not responding to setup address.                                    
[ 1413.923380] usb 2-1.2: device not accepting address 7, error -71                                  
[ 1413.929721] usb 2-1-port2: unable to enumerate USB device

It looks like whatever USB driver it needs is not present in my current linux build.

My questions are as follows:

  • Is there a way to mux the I2C pins which go to the existing I2C0 hardware to interface with my new device?
  • Is there a USB driver available somewhere for a touch controller like this, or will I have to make one if I want to use it?

Thank you!

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I2C Configuration for ILI2132 Touch Controller

Based on the Toradex documentation, I can address your questions about using the ILI2132 touch controller with your Colibri iMX8QXP.

I2C Bus Options for Colibri iMX8X

According to the I2C documentation, the Colibri standard provides one I2C bus on the SODIMM pins 194/196 (1). For the Colibri iMX8X specifically, there are additional I2C buses available:

  • Colibri iMX8X has two FFC extension connectors with dedicated I2C buses, also available as alternative pin functions in the SODIMM (1)
  • Pins 15/16 of X2 have a dedicated I2C for the first LVDS/MIPI-DSI (1)
  • Pins 13/14 of X3 have a dedicated I2C for the second LVDS/MIPI-DSI (1)

Device Tree Overlay Approach

You can create a custom device tree overlay to configure the I2C interface for your ILI2132 controller. The documentation provides guidance on writing device tree overlays (2).

To use the existing I2C lines, you would need to:

  1. Disable conflicting devices: As you mentioned, you can disable other devices on the same I2C line within the device tree to avoid address conflicts (2)

  2. Create a pin group: Define the I2C pins for your specific use case (2)

  3. Enable the group: Add your custom I2C configuration to the appropriate I2C controller node (2)

Finding the Correct I2C Controller

The documentation explains how to identify the correct I2C controller using the controller address (1):

# i2cdetect -l

(1)

For Colibri iMX8X, you can use this command to see the available I2C controllers and their addresses (1).

USB Touch Controller Support

Regarding the USB interface, the error messages you’re seeing suggest that the USB touch controller driver is not present in your current kernel configuration. The Toradex documentation focuses on I2C-based touch controllers, and the capacitive touch display documentation shows examples using I2C interfaces with device tree overlays (3).

Recommendation

Based on the available documentation, I recommend proceeding with the I2C approach since:

  1. The ILI2132 I2C driver is already available in the linux-toradex repository
  2. Toradex provides comprehensive documentation and examples for I2C touch controller integration (3)
  3. You have multiple I2C options available on the Colibri iMX8X, including the dedicated MIPI DSI/CSI I2C lines (1)

You can create a device tree overlay similar to the examples shown in the capacitive touch display documentation (3), adapting it for your ILI2132 controller’s I2C address and pin requirements.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hey @camstillo ,

For I2C0, no this one isn’t available on the modules edge connector:
… From the datasheet on I2C.
4x general-purpose I2C. Three of them are available on the module edge
connector, one as standard Colibri I2C. The fourth is used on the module for the
audio codec, the GPIO expander, and USB hub (if assembled).

For Pin muxing, each pin will have pre–defined pin functions. You can see these in the datasheet for the module. Starting at page 28, You can use which ever i2c is available (not all are), and then route the pins accordingly. For reference, here is the controller dts for the 7” cap touch.

I was just able to modprobe usbtouchscreen,. You would need to make sure the controller is compatible with the linux default driver. Most likely by trying, but also the manufacture of your touch screen should know.

-Eric

Hey @camstillo,

How are you doing with this topic?

-Eric

Hello,

I took your suggestion for using the USB touch driver. I had been waiting for my interface board to come back from fab, and am working through bring-up today. The default toradex image (I think it’s the multimedia reference) did not include this driver, so I needed to compile it and add it to the kernel. I compiled the usbtouchscreen driver using a method similar to embear’s instructions. I tried to import the usbtouchscreen driver using insmod, but I’m getting an error:

On Toradex hardware…..

> insmod usbtouchscreen.ko
insmod: ERROR: could not insert module usbtouchscreen.ko: Invalid parameters
> dmesg | grep usb
...
[ 3945.068307] usbtouchscreen: loading out-of-tree module taints kernel.
[ 3945.075345] usbtouchscreen: disagrees about version of symbol memcpy
[ 3945.081963] usbtouchscreen: Unknown symbol memcpy (err -22)
[ 3945.089473] usbtouchscreen: disagrees about version of symbol memset
[ 3945.097619] usbtouchscreen: Unknown symbol memset (err -22)
[ 3981.548830] usbtouchscreen: disagrees about version of symbol memcpy
[ 3981.557251] usbtouchscreen: Unknown symbol memcpy (err -22)
[ 3981.564677] usbtouchscreen: disagrees about version of symbol memset
[ 3981.572846] usbtouchscreen: Unknown symbol memset (err -22)
[ 5070.367223] usbtouchscreen: disagrees about version of symbol memcpy
[ 5070.376199] usbtouchscreen: Unknown symbol memcpy (err -22)
[ 5070.383576] usbtouchscreen: disagrees about version of symbol memset
[ 5070.391701] usbtouchscreen: Unknown symbol memset (err -22)

I know I didn’t have any compile issues, as I can compile a different custom driver (for a mipi device, see this post) and insmod/modprobe successfully. As far as I can tell, there isn’t any version information in the driver that might be doing this unsuccessfully.

Any ideas on how to proceed? I also tried pulling up the menuconfig for my yocto build and adding the same driver that way. I get a strange error that looks related:

WARNING: /home/USER/yocto/build/../layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_6.6-2.2.x.bb:do_compile is tainted from a forced run

That would suggest an issue with the usbtouchscreen.c file.

driver location in linux-toradex….

Hey @camstillo,

Can you attempt to try your touch screen on a default Torizon OS image and the overlays?

Also, can you link the overlays you are using and what modifications you have done?

-Eric

Hey

Eric Singer
Toradex

Hi Eric,

Thanks for getting back to me. I decided to go back to I2C to get the screen working. I actually was able to rebuild the kernel after I did a cleansstate on the linux-toradex recipe, and that seemed to add the usbtouchscreen driver.

I found this post online which I copied the touchscreen driver for. I copied that overlay into my board and got the touchscreen working. I’m using I2C-1 on the colibri with plans to update it in the future to a different set of pins. The I2C device that I have on the line seems to work just fine with the touchscreen interference, so I’m leaving it for now. The only inconvenience was soldering wires for the reset and interrupt pins onto my viola carrier (no SODIMM 106 or 107 broken out to pins).

Thanks!