Hey everyone,
Does anyone have some experience working with the USB 1 port on the imx8m mini?
We’ve used it before in peripheral mode when running Toradex Easy Installer, but we wanted to configure it to use it as a host for some interface tests. Unfortunately our carrier board cannot detect the 5th ‘sense’ pin that would be used in a USB-OTG cable to let the USB port know that it should operate in host mode.
Is there any way that we can manually tell Linux that it should treat the USB 1 port as a host port by default?
Or is there any way to easily access this USB port if it is connected in peripheral mode so that it could send some basic messages to the PC for the sake of interface testing (ie via /dev or something like this)? Or send messages from the PC to the SOM which the SOM could then read while still running in Linux and not in recovery mode?
We’ve already written tests for a host USB port, so using USB 1 as a host would be ideal, but if anyone has any suggestion about how to easily communicate with the PC through this USB port as a peripheral, that would be very helpful as well!
Thanks,
Chris
What carrier baoard you are using? Is it a custom one?
The ID pin (X1 161) should be grounded to make USB1 work as a host. Is it accessible somewhere on your board? If not you can try modify Device Tree by setting “dr_mode” property of USB1 to “host”.
To test USB1 in a deice mode please refer to this article.
Please always specify:
- module HW revision,
- Carrier board and its HW revision if it’s a Toradex one.
- OS image version you are rubbing on Toradex module.
Hey Alex,
Thanks for the info. Yeah, it is custom carrier board so we needed to find a way to work around the fact that it doesn’t support recognizing a USB OTG cable automatically.
We found that we could easily change the USB from peripheral to host by modifying the device tree as long as we wanted it to be either one or the other only, but it was not so easy to do it on the fly without the ‘ID’ or ‘sense’ pin connected properly on our carrier board.
In the end, the easiest way to test was by making the device into a mass storage device which could be written to or read from the PC (as suggested in the link that you referred to). In case anyone is looking to do the same thing, we found the following article to be quite helpful:
http://www.linux-usb.org/gadget/file_storage.html
Thanks for the support.
Thank you for the update. Could you please tag this ticked as “solved”?