To summarize, I want to use a mainline kernel on the colibri imx6ull.
I have all the basics functions working, but the USB host hotplug does not work,
due to the fact that the roothub suspends itself when no device is plugged, and
does not wakeup when one is inserted again.
The hotplug works when disabling CONFIG_PM.
That works like a charm with Toradex kernel, and I am in the process of bisecting
to find out what is missing to mainline.
Which carrier board are you using?
We did some tests with Colibri imx6ull 1.0A 1.1A with aster carrier board 1.1b and as well as the mainline kernel on BSP 5.5 and we were able to access files from a USB stick (no other device connected) hot-plugging it.
Which USB port have you been using and on which carrier board.
Dear Guilherme,
Many thanks for the links.
Has I said, I am pretty sure that the issue I have does not come from the DTS (since it works with
Toradex’s kernel)
I finally found out.
On toradex kernel, there is this patch:
git log --pretty=oneline | grep usb | grep runtime | grep imx
5c557731e747e96db9174eccb5d3d3afde83c332 usb: chipidea: imx: disable runtime pm for imx6ull
e14db48dfcf3ab6ebea212e82dc56036a00b0d6b usb: chipidea: imx: add runtime power management support
$ git show 5c557731e747e96db9174eccb5d3d3afde83c332
commit 5c557731e747e96db9174eccb5d3d3afde83c332
Author: Philippe Schenker <philippe.schenker@toradex.com>
Date: Fri Jun 26 13:28:07 2020 +0200
usb: chipidea: imx: disable runtime pm for imx6ull
Runtime power management causes different problems around iMX6ULL usb. Disable
it.
Related-to: TEI-558
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index df8812c30640..b0444e839cc2 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -56,8 +56,7 @@ static const struct ci_hdrc_imx_platform_flag imx6sx_usb_data = {
};
static const struct ci_hdrc_imx_platform_flag imx6ul_usb_data = {
- .flags = CI_HDRC_SUPPORTS_RUNTIME_PM |
- CI_HDRC_TURN_VBUS_EARLY_ON,
+ .flags = CI_HDRC_TURN_VBUS_EARLY_ON,
};
static const struct ci_hdrc_imx_platform_flag imx7d_usb_data = {
An indeed, this a workaround that works.
However, if you do not mind, I would like to not mark this thread as closed, for the following reasons:
There no mention of this in the documentation
The patch seems specific to Toradex hardware, unless I am missing something, but I guess
that there would have been more people complaining about that if it was not the case.
My customer chose the imx6ull due to its very low power needs. And we are chasing microamps,
so it is quite a shame that both USB controllers keep on, even when there is nothing plugged (which is true most of the time on the application we are developing).
So : Is there a chance that it is fixed differently ? I mean, on an updated hardware design at a time,
or with a smarter patch ?
Do you mean that there is no proper mention of this specific patch or no mention of the problem at all?
Did you have the opportunity to check, for instance, the NXP Downstream Kernels to see if any patches like these are applied? At the moment, we also don’t have many customers that reported this issue but I’ll check it in better detail.
We don’t think that keeping the USB interface on would increase much to the power consumption especially since it will not be used most of the time. This should not be a significant problem on a first glance.
If an issue is present on our issue tracker and is not marked as a fixed or a new feature in one of the releases, we plan to work on it and even find other solutions. However, I can’t provide you with any timeframe for that at the moment.