[PATCH 12/15] am33xx: Support upstream devicetree binding
Markus Schneider-Pargmann (TI.com)
msp at baylibre.com
Tue Nov 18 11:40:32 CET 2025
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.
Also don't fail if the USB devices are not available.
Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp at baylibre.com>
---
arch/arm/mach-omap2/am33xx/board.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
index d7db260513308257f142ea70d5d5c643afc920c9..4bfdb55b2dd5c66cd58bce360cf1c69fb7a00cd6 100644
--- a/arch/arm/mach-omap2/am33xx/board.c
+++ b/arch/arm/mach-omap2/am33xx/board.c
@@ -266,12 +266,16 @@ int arch_misc_init(void)
struct udevice *dev;
int ret;
- ret = uclass_first_device_err(UCLASS_MISC, &dev);
- if (ret)
- return ret;
+ if (IS_ENABLED(CONFIG_OF_UPSTREAM)) {
+ uclass_first_device_err(UCLASS_USB, &dev);
+ ret = uclass_first_device_err(UCLASS_USB_GADGET_GENERIC, &dev);
+ } else {
+ ret = uclass_first_device_err(UCLASS_MISC, &dev);
+ }
#if defined(CONFIG_DM_ETH) && defined(CONFIG_USB_ETHER)
- usb_ether_init();
+ if (!ret)
+ usb_ether_init();
#endif
return 0;
--
2.51.0
More information about the U-Boot
mailing list