Thread (36 messages) 36 messages, 7 authors, 2023-07-21
STALE1080d

[PATCH v2 2/3] usb: chipidea: imx: support disabling runtime-pm

From: Philippe Schenker <hidden>
Date: 2020-07-14 15:18:44
Also in: linux-arm-kernel, linux-usb, lkml
Subsystem: chipidea usb high speed dual role controller, the rest, usb subsystem · Maintainers: Peter Chen, Linus Torvalds, Greg Kroah-Hartman

The Toradex Colibri iMX6ULL board has a special USB hardware design.
With runtime-pm enabled USB reset itself continuously. Furthermore the
OTG port is also not enumerating devices if the Chipidea IP is in
runtime sleep mode and a device or host gets plugged in.

This patch adds the opportunity to disable Runtime Power Management
from devicetree

Signed-off-by: Philippe Schenker <redacted>

---

Changes in v2:
- Change commit message to tell the use case for Colibri iMX6ULL

 drivers/usb/chipidea/ci_hdrc_imx.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index 5ae16368a0c7..5078d0695eb7 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -434,6 +434,9 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
 		usb_phy_init(pdata.usb_phy);
 	}
 
+	if (of_property_read_bool(np, "disable-runtime-pm"))
+		pdata.flags &= ~CI_HDRC_SUPPORTS_RUNTIME_PM;
+
 	if (pdata.flags & CI_HDRC_SUPPORTS_RUNTIME_PM)
 		data->supports_runtime_pm = true;
 
-- 
2.27.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help