[PATCH v4 7/7] usb: musb-new: Add compatibles for ti,musb-am33xx
Markus Schneider-Pargmann
msp at baylibre.com
Fri Jan 30 10:05:35 CET 2026
Hi Marek,
On Tue Jan 27, 2026 at 10:15 PM CET, Marek Vasut wrote:
> On 1/27/26 12:03 PM, Markus Schneider-Pargmann (TI.com) wrote:
>
> [...]
>
>> +static int ti_musb_host_bind(struct udevice *dev)
>> +{
>> + enum usb_dr_mode dr_mode = usb_get_dr_mode(dev_ofnode(dev));
>> +
>> + if (dr_mode != USB_DR_MODE_HOST && dr_mode != USB_DR_MODE_OTG)
>> + return -ENODEV;
>> +
>> + return 0;
>> +}
>
> [...]
>
>> #if CONFIG_IS_ENABLED(OF_CONTROL)
>> +static int ti_musb_peripheral_bind(struct udevice *dev)
>> +{
>> + enum usb_dr_mode dr_mode = usb_get_dr_mode(dev_ofnode(dev));
>> +
>> + if (dr_mode != USB_DR_MODE_PERIPHERAL)
>> + return -ENODEV;
> How do you handle USB_DR_MODE_UNKNOWN , host or peripheral ?
Thanks for seeing this, I checked, USB_DR_MODE_UNKNOWN will result in
none of the drivers binding. That's the same behavior as the previous
wrapper:
static int ti_musb_wrapper_bind(struct udevice *parent)
{
[...]
switch (dr_mode) {
case USB_DR_MODE_PERIPHERAL:
[...]
break;
case USB_DR_MODE_HOST:
[...]
break;
default:
break;
};
}
return 0;
}
Thanks for reviewing the patches.
Best
Markus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 289 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260130/40370a15/attachment.sig>
More information about the U-Boot
mailing list