[PATCH v7 10/14] am33xx: Support upstream devicetree USB device

Markus Schneider-Pargmann (TI) msp at baylibre.com
Mon Apr 27 11:01:26 CEST 2026


Support musb being probed by ti,musb-am33xx. The non-upstream DT probing
used a wrapper driver that probed ti-musb-peripheral and ti-musb-host.
This wrapper registered as UCLASS_MISC, which is why it is requested in
this board.c file.

With the new devicetree the wrapper that registers as UCLASS_MISC is
gone, instead the UCLASS_USB and UCLASS_USB_GADGET_GENERIC have to be
requested.

Signed-off-by: Markus Schneider-Pargmann (TI) <msp at baylibre.com>
---
 arch/arm/mach-omap2/am33xx/board.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
index c3931900622957a5499fe6483473c61e3a62fff0..5a006cf309b08d0e035faeb675368da73076e7ed 100644
--- a/arch/arm/mach-omap2/am33xx/board.c
+++ b/arch/arm/mach-omap2/am33xx/board.c
@@ -264,15 +264,19 @@ int arch_misc_init(void)
 int arch_misc_init(void)
 {
 	struct udevice *dev;
-	int ret;
+	int ret = 0;
 
-	/*
-	 * Trigger probe of the UCLASS_MISC device which is a USB wrapper driver
-	 * ti-musb-wrapper that handles all usb host and gadget devices.
-	 */
-	ret = uclass_first_device_err(UCLASS_MISC, &dev);
-	if (ret)
-		printf("Failed probing USB %d, continue without USB\n", ret);
+	if (!IS_ENABLED(CONFIG_OF_UPSTREAM)) {
+		/*
+		 * Trigger probe of the UCLASS_MISC device which is a USB
+		 * wrapper driver ti-musb-wrapper that handles all usb host and
+		 * gadget devices. Note that with OF_UPSTREAM the devices are
+		 * bound directly, no wrapper necessary.
+		 */
+		ret = uclass_first_device_err(UCLASS_MISC, &dev);
+		if (ret)
+			printf("Failed probing USB %d, continue without USB\n", ret);
+	}
 
 #if defined(CONFIG_DM_ETH) && defined(CONFIG_USB_ETHER)
 	if (!ret)

-- 
2.53.0



More information about the U-Boot mailing list