USB Host problem when atmel_mxt overlay loaded with torizoncore-builder

Hi,
I have:

  • Aster carrier board (V1.1B)
  • Colibri iMX8 DualX 1GB V1.0D
  • Capacitive Touch Display 7" Parallel V1.0B.
  • torizon-core-docker-colibri-imx8x-Tezi_5.7.0+build.17.tar
  • host: Windows 10pro with docker, VSCode and torizoncore-builder

If I apply the device overlays (fdt_overlays=colibri-imx8x_parallel-rgb_overlay.dtbo colibri-imx8x_atmel-mxt-connector_overlay.dtbo display-lt161010_overlay.dtbo) on the image directly on the device, the USB Host ports work without problem, but if I put the overlays in a tcbuild.yaml configuration file to build a production image, the USB Host ports don’t work, power is not available to the connected devices.

I tried several overlay combinations but when I add colibri-imx8x_atmel-mxt-connector_overlay.dtbo or colibri-imx8x_atmel-mxt-adapter_overlay.dtbo, the USB Host ports don’t work.

With my image and atmel_mxt overlay, the USB Host does not work, dmesg | grep -i USB:

[    0.116342] usbcore: registered new interface driver usbfs
[    0.116387] usbcore: registered new interface driver hub
[    0.116422] usbcore: registered new device driver usb
[    1.754294] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.755719] usbcore: registered new interface driver usb-storage
[    1.755823] usbcore: registered new interface driver usbserial_generic
[    1.755846] usbserial: USB Serial support registered for generic
[    1.849940] usbcore: registered new interface driver usbhid
[    1.849944] usbhid: USB HID core driver
[    1.875551] usbcore: registered new interface driver snd-usb-audio
[    1.990565] usb3503 16-0008: switched to HUB mode
[    1.990579] usb3503 16-0008: usb3503_probe: probed in hub mode

With my image without atmel_mxt overlay, the USB Host works, dmesg | grep -i USB:

[    0.119189] usbcore: registered new interface driver usbfs
[    0.119235] usbcore: registered new interface driver hub
[    0.119267] usbcore: registered new device driver usb
[    1.763215] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.764763] usbcore: registered new interface driver usb-storage
[    1.764860] usbcore: registered new interface driver usbserial_generic
[    1.764883] usbserial: USB Serial support registered for generic
[    1.872752] usbcore: registered new interface driver usbhid
[    1.872755] usbhid: USB HID core driver
[    1.905692] usbcore: registered new interface driver snd-usb-audio
[    1.960865] mxs_phy 5b100000.usbphy: 5b100000.usbphy supply phy-3p0 not found, using dummy regulator
[    1.974194] regulator-usbh-vbus GPIO handle specifies active low - ignored
[    1.974649] usb_phy_generic bus@5b000000:usb3-phy: bus@5b000000:usb3-phy supply vcc not found, using dummy regulator
[    2.014912] usb3503 16-0008: switched to HUB mode
[    2.014925] usb3503 16-0008: usb3503_probe: probed in hub mode
[    2.049168]  xhci-cdns3: new USB bus registered, assigned bus number 1
[    2.051311] hub 1-0:1.0: USB hub found
[    2.051663]  xhci-cdns3: new USB bus registered, assigned bus number 2
[    2.051677]  xhci-cdns3: Host supports USB 3.0 SuperSpeed
[    2.051747] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.052299] hub 2-0:1.0: USB hub found
[    2.211863] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 3
[    2.232220] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
[    2.233139] hub 3-0:1.0: USB hub found
[    2.532324] usb 1-1: new high-speed USB device number 2 using cdns-usb3
[    2.715172] hub 1-1:1.0: USB hub found
[    3.032323] usb 1-1.2: new full-speed USB device number 3 using cdns-usb3
[    8.664423] usbcore: registered new interface driver ftdi_sio
[    8.664478] usbserial: USB Serial support registered for FTDI USB Serial Device
[    8.664695] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected
[    8.664837] usb 1-1.2: Detected FT-X
[    8.680383] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0

Recap:

  • overlay applied from command line, everything is ok
  • image without atmel overlay, screen not working, USB fine
  • image with atmel overlay, screen ok, USB not working

What am I doing wrong?

giulio

Greetings @gipo,

I attempted to reproduce your observations.

  • Overlays applied in overlays.txt via command line, USB is working fine as you said.
  • Overlays not applied, USB is working fine but screen is not of course, as expected.
  • Created an image using TorizonCore Builder, the only modifications made were applying the 3 overlay files. After flashing the image that was produced, the display works and USB still works.

In summary I can’t seem to reproduce the issue you are observing. Let’s see perhaps if there’s a detail that we’re missing.

When you created the production image with TorizonCore Builder did you do any other changes or just applying the overlays? Perhaps sharing your tcbuild.yaml would help.

On the Aster carrier board which of the USB ports were you testing? Or do none of them work?

Best Regards,
Jeremias

Dear Jeremias,
Thank you for the swift feedback!

This is the tcbuild.yaml content:

input:
  easy-installer:
    local: images/torizon-core-docker-colibri-imx8x-Tezi_5.7.0+build.17.tar

customization:
  device-tree:
    include-dirs:
      - device-trees/include/
    custom: device-trees/dts-arm64/imx8dx-colibri-aster.dts
    overlays:
      add:
        - device-trees/overlays/colibri-imx8x_parallel-rgb_overlay.dts
        - device-trees/overlays/colibri-imx8x_atmel-mxt-adapter_overlay.dts
          # colibri-imx8x_atmel-mxt-connector_overlay.dts
          # colibri-imx8x_atmel-mxt-adapter_overlay.dts
        - device-trees/overlays/display-lt161010_overlay.dts
output:
  easy-installer:
    local: torizon-core-docker-colibri-imx8dx-Tezi_5.7.0.CUSTOM-2

The Aster is powered thru the USB micro port (X4).

The peripheral is connected to the USB (connector X9), it is a simple sensor with an FTDI USB chip.

No changes on Aster or the SOM. I added only a jumper on JP1.

Is there a command that I can use to check the functionality of the USB Host ports (X9)?

Thank you and best regards,
Giulio

There’s the detail I was missing.

You’re using the imx8dx-colibri-aster.dts device tree. I was using the default imx8qxp-colibri-eval-v3.dts device tree. I did another test where I used the same device tree as you and now I’m seeing what you’re seeing. My USB is no longer working, which is strange.

I did some digging and I noticed the device trees for the Aster and Eval differ in terms of USB configuration.

As you can see the Eval device tree has a lot of settings and configurations related to USB that the Aster just doesn’t for some reason. I’ll need to ask our team internally as to why that is.

The reason USB was working when you set the overlays via command line was because the default device tree for all our Colibri i.MX8X images is imx8qxp-colibri-eval-v3.dts. But when you used TorizonCore Builder you overwrote this with that Aster based device tree.

For the time being could you please use the imx8qxp-colibri-eval-v3.dts device tree. It should be compatible with the DualX and the Aster board for the most part.

Best Regards,
Jeremias

1 Like

This works perfectly.

Thank you very much Jeremias.

No problem, for now just use the eval device tree until something is done with the Aster tree in terms of USB.