Enable USBH2 and USBH3 in uboot environment on custom carrier board

Hello, we try to use the USBH2 and the USBH3 for usb update of the Apalis iMX8QM.
But we can’t find these USB ports in the device tree in uboot.
We know that both USB ports are connected via the Microchip USB3503A.

This is the output of usb reset/start:

resetting USB...
Bus usb@5b0d0000: USB EHCI 1.00
Bus usbh3: XHCI-imx8 init hccr 0x000000005b130000 and hcor 0x000000005b130080 hc_length 128
Register 2000820 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb@5b0d0000 for devices... 1 USB Device(s) found
scanning bus usbh3 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

But these two ports are already connected on our custom carrier board and can’t be used for a usb update.

Now we are looking for a solution to use the USBH2 and/or the USBH3 for the usb update.
The usb ports are powered on (Voltage of 5V can be measured) via PIN 84.

Additional information:

U-Boot 2022.04-6.6.0+git.d262075124dc (Mar 08 2024 - 14:27:40 +0000)

CPU:   NXP i.MX8QM RevB A53 at 1200 MHz at 38C

DRAM:  4 GiB
Core:  194 devices, 20 uclasses, devicetree: separate
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
Model: Toradex 0047 Apalis iMX8QM 4GB IT V1.1B
Serial#: 06738708

 BuildInfo: 
  - SCFW 6638c032, SECO-FW c9de51c0, IMX-MKIMAGE 3bfcfccb, ATF 3c1583b
  - U-Boot 2022.04-6.6.0+git.d262075124dc 

Under linux all usb ports are working.

Do we have to adjust the uboot devicetree or compile configuration?

Thank you in advance.

Best regards
Alex

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

Thank you for reaching out with your question about the USB configuration on the Apalis iMX8X. Based on the available documentation, USBH2 and USBH3 are connected through a Microchip USB5744T USB 3.1 Gen 1 hub. Here are the specific pin assignments for these interfaces:

For USBH2:

  • USB data pins (D+/D-) are on X1 pins 80/82.
  • SuperSpeed signals are on pins 85/83 (RX) and 91/89 (TX).

For USBH3:

  • USB data pins (D+/D-) are on X1 pins 86/88.
  • SuperSpeed signals are on pins 62/64 (RX) and 68/70 (TX).

While I don’t have specific information about modifying the U-Boot device tree or compile configuration to enable these ports, since you mentioned that all ports are working under Linux, you might consider the following steps:

  1. Use the printenv command in U-Boot to check the environment variables related to USB configurations.
  2. Compare the working Linux device tree configuration with your U-Boot device tree to identify any discrepancies.

If you need further guidance on U-Boot configuration or have other questions, feel free to ask!

Best regards,
Toradex AI Assistant

Hello @abest,

As you mentioned, on the Apalis iMX8, the USBH2 and USBH3 ports go through an on-module USB hub.
This USB hub is not configured on u-boot and this is the reason that the devices are not seen via these USB ports on u-boot.

It is likely that adding its configuration to the u-boot device tree is enough to get it to work, but additional changes may be needed.
You can see how we configure this for Linux on the following file: https://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi?h=toradex_5.15-2.2.x-imx#n898
Please note that this is not just done in the linked line, but throughout this file when we have USB HSIC mentioned.

Best Regards,
Bruno