I would like to use a mainline, long term kernel branch, thus I am aiming linux-5.17.y.
The target board is a Toradex imx6ull. It has an OTG port and a USB host port. I have a working version (fscl-5.4-2.3.x.imx), with the device tree from Toradex.
Porting the device tree to the mainline kernel was no a big deal, but I found out that due to power management, the roothub gets suspended when the plugged USB device in the host port is unplugged.
When connecting back the device, it is not detected at all. Of course, if the device is not connected at boot time, it is not detected either.
Removing CONFIG_PM, or modifying the code to prevent roothub to autosuspend, works around the issue.
I have tried to understand why that makes a difference with the fsl kernel, and found out that the ci_irq_handler is not called.
That puzzles me a little bit; considering that the bug is not in the device tree (it is the same in both cases), does that mean that this is a bug in mainline ?
Any comments or advice would be appreciated !
You may check/report this issue in mainline kernel. Also, this commit from NXP source code may be of help: