We want to use USB1 as a normal USB 2.0 (= host mode). To achieve this, I’ve writed a custom overlay that I’m using on my module by updating " /sysroot/boot/ostree/torizon-*/dtb/overlays.txt":
/dts-v1/;
/plugin/;
/ {
compatible = "toradex,verdin-imx8mp";
};
// Set USB1 in Host mode instead of OTG mode
&usb3_0 {
status = "okay";
};
&usb3_phy0 {
status = "okay";
};
&usb_dwc3_0 {
status = "okay";
dr_mode = "host";
};
I’m now able to use my USB device when plugged in before boot. But if I disconnect the device, I’m now unable to use USB1. Here is the “dmesg” result after disconnecting the device: usb 1-1: device no response, device descriptor read/64, error -71
Am I missing something in the overlay ? Let me know if I can provide more information.
Sorry, but I am not sure that I fully understood your use case.
Please correct me if I am wrong:
If you boot your module with the USB device connected to the USB1 interface of the module, the USB device works well.
If you boot your module without the USB device connected to the module, then, after the boot, you connect the USB device to the USB1 interface of the module, and the USB device doesn’t work.
Could you please specify which USB device you are trying to use?
This is exactly the encountered behavior.
I am using an audio USB adapter (SL-8850-BK-01, CM108 audio controller). I am also able the reproduce the behavior with a simple FAT32 storage USB key.
USB device connected before boot dmesg.txt (34.0 KB)
# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
USB device connected after boot dmesg.txt (35.7 KB)
# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
USB device connected before boot, then disconnected without shutting down the module dmesg.txt (36.2 KB)
Hello @clem ,
I am trying to reproduce your issue .
How are you connecting your devices to the J7 connector? Are they native USB C devices or are you connecting them through a USB C to USB A adaptor?
Hello, as we are on a custom board, we have mounted a USB A 2.0 connector where we usually have a USB C connector at J7 on Yavia board. We are using USB 2.0 device.
I wonder if the problem would still be there is the device tree modifications were done directly in the device tree when building the image, instead of using an overlay. Unfortunately I don’t have time to test that idea for now.
Hello @matthias.tx , sorry for the late response.
We are not using OC and EN as we are sure we won’t be using too much current.
We looked into the schematic for the ID pin and we didn’t connect it ! It looks like we need to set it to GND for USB host mode so we will test this now.
I’ll update this post when done.
Thanks
We connected ID to GND but it’s not working better.
For now our workaround is to connect a USB hub before boot so that is it well detected, and then connect our USB device whenever we want to the hub.
In your schematic snippet, i can see that you are connecting the Digital signal GND with the SHIELD Ground. This should not be done!!! I have seen many times problems with that.
It is good to follow our ref. design and also our free 30 min hardware design call.
Also we offer design reviews.