USB devices not detected in custom board

I have a custom designed base board with the Verdin iMX8M Mini Quad 2GB WB IT V1.1B based. The image used is your Linux Reference Minimal 5.6.0+build.18.

I’m using the USB_2 with a schematic very similar to that in figure 27, where the IC1A has been replaced by the AOZ1353DI-01 (it is the same one used in the Dhalia board). I’m using USB_1 in host mode (USB_1_ID=0) with the same schematic as USB_2.

The USB port seems to work because if I boot the Verdin module with any usb device connected (pen drive, camera, keyboard) is enumerated.

But if I later disconnect the USB device and try to connect another USB device, the OS does not detect it. The same happens if the Verdin module is started without the USB device connected.

That is, the Verdin module only detects connected devices during boot. On the contrary, if I execute the command uhubctl the usb device is detected and works correctly.

I hope someone can help me.

Thanks,
Julián

Hello jbruno,
this is a know errata. And you can find a fix to this issue here.

Best Regards,

Matthias

Hi @matthias.tx ,

Thank you very much for your answer but I think that in this case the imx8m mini and the imx8m plus do not manage USB in the same way. The default configuration for the Verdin module with imx8m mini in the DTS is as follows:

/* Verdin USB_1 */
&usbotg1 {
	dr_mode = "otg";
	hnp-disable;
	srp-disable;
	adp-disable;
	over-current-active-low;
	picophy,dc-vol-level-adjust = <7>;
	picophy,pre-emp-curr-control = <3>;
	vbus-supply = <&reg_usb_otg1_vbus>;
};

/* Verdin USB_2 */
&usbotg2 {
	dr_mode = "host";
	over-current-active-low;
	picophy,dc-vol-level-adjust = <7>;
	picophy,pre-emp-curr-control = <3>;
	vbus-supply = <&reg_usb_otg2_vbus>;
};

We use the same one and I can confirm that the USB_1 port changes its role depending on what is connected to the USB_1_ID input (GND: host / NC:device). The USB_2 port is configured as HOST and has the same error: it only detects a device during boot or if the uhubctl command is executed.

After booting and without any USB device connected, the situation is as follows:

  1. Insert device
  2. Nothing is detected
  3. Run uhubctl (no arguments)
  4. Device is detected, enumerated and works
  5. Remove device
  6. Goto 1

If you have any comments or suggestions, please drop me a line.
Best regards,
Julián

Hi @jbruno !

Sorry for the confusion.

This is the link meant to be shared:

Also, an important comment: the USB_ID pin should be pulled down when in host mode. Could you please check if this is happening?

Best regards,

Hi @henrique.tx !
Thank you very much for the link, we will try to modify the ci_hdrc_imx.c file to try to solve this issue. Out of curiosity, what causes this issue? is it a problem in the SOM?

I confirm that by connecting the USB_1_ID signal to GND the error persists. I have seen that they have not published anything about this issue and it catches my attention. In the Dahlia card the USB_1 is not connected to a HUB and yet the detection of USB devices in the X3A port works correctly, how can this be possible?

Thanks for your attention. I’m looking forward to your reply.

Best regards,

Hi @jbruno!

This issue is related to NXP changing some pins after Toradex released the Verdin iMX8M Mini. So the versions available are affected by this issue. A workaround could also be host-fixing the role on the device tree (instead of OTG).

Were you able to overcome your issue?

Best regards,

Hi @henrique.tx,
I must assume that none of the hardware reviews of the Verdin iMX8M Mini Quad 2GB WB IT module have you fixed this bug. Do you plan to correct it in future revisions?

So far we have solved the problem by disabling the USB suspend and resume functions in the ci_hdrc_imx.c file.

Best regards,

Hello Jbruno,

if there will be a change on the PCB of the module we will also fix this.
But I can not tell when this will be.

Best Regards,

Matthias Gohlke

Hi, @jbruno !

We have a new workaround for this issue.

diff --git a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi
index eb9cf2576bf7..45513d609822 100755
--- a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi
@@ -769,6 +769,7 @@
 
 &usbphynop2 {
        vcc-supply = <&reg_aux_usb>;
+       power-domains = <&usb_otg2_pd>;
 };
 
 /* On-module eMMC */

Could you please test it and let us know if it works for you?

Thanks in advance!

Best regards,

1 Like

Hi @henrique.tx ,
Thank you very much for your contribution but unfortunately we can’t test it now. We have a deadline in 3 weeks, as soon as we can we will try it.
Best regards,

I had some issues similar to this post where the OTG didnt work properly, and this did indeed fix it for me.
I dont know if you can use this confirmation for anything, but hopefully it can help someone in a similar issue

hello J bruno,

did it work? do you have some updates? Do you still need help with this?

Best Regards,

Matthias Gohlke

Hi @matthias.tx,
We have recently tested with your multimedia reference image BSP 6.1.0+build.5 and the usb works correctly. This bug has been fixed.
Best regards,
Julián

hI, that sounds great.