[PATCH 2/3] usb: host: ehci-msm: Register ChipIdea UDC from glue wrapper

Sam Day me at samcday.com
Sat Apr 12 21:40:03 CEST 2025


When CONFIG_DM_USB_GADGET is enabled, the CI UDC driver needs to be
explicitly bound. So we do this from the newly introduced glue driver.

Signed-off-by: Sam Day <me at samcday.com>
---
 drivers/usb/host/ehci-msm.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 8aeb6a915563453ad2a02721d4828fd1b300a4e4..ae40e96e6349b1a352608e6350ce950a3cff95af 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -161,6 +161,13 @@ static int qcom_ci_hdrc_bind(struct udevice *dev)
 	if (ret)
 		return ret;
 
+	if (IS_ENABLED(CONFIG_DM_USB_GADGET) && IS_ENABLED(CONFIG_CI_UDC)) {
+		ret = device_bind_driver_to_node(dev, "ci-udc", "ci-udc",
+				dev_ofnode(dev), NULL);
+		if (ret)
+			return ret;
+	}
+
 	if (!ofnode_valid(ulpi_node))
 		return 0;
 

-- 
2.49.0




More information about the U-Boot mailing list