[PATCH] usb: gadget: udc: Fix duplicate uclass name

Mattijs Korpershoek mkorpershoek at baylibre.com
Tue Aug 13 10:28:41 CEST 2024


Hi Zixun,

On mer., août 07, 2024 at 14:36, Zixun LI <admin at hifiphile.com> wrote:

> Hi Mattijs,
>
> On Wed, Aug 7, 2024 at 9:07 AM Mattijs Korpershoek
> <mkorpershoek at baylibre.com> wrote:
>>
>>
>> Have you identified boards which use the DT alias that will break
>> with this patch?
>>
>> Maybe we can detail the required fix in the commit message a bit as well?
>> Or, if you know of a board that uses "usb" as DT alias sequence number,
>> we can submit a fix alongside with this one to document the fix.
>
> I did a search and it affects mostly i.MX devices and Nuvoton npcm845 where
> host and device controller use the same alias.
>
> like imx6qdl.dtsi:
> aliases {
> ...
>     usb0 = &usbotg;
>     usb1 = &usbh1;
>     usb2 = &usbh2;
>     usb3 = &usbh3;
> };
>
> nuvoton-npcm845-evb.dts:
> aliases {
> ...
>     usb0 = &udc0;
>     usb1 = &ehci1;
>     usb2 = &ehci2;
> };
>
> But I got lost in EHCI's code, like in ehci_register() when ctrl->init ==
> USB_INIT_DEVICE the function returns without the actual device init ?
> I'm not sure how their gadget mode works and if it's really broken or not.

Thank you for giving some board examples. I am still a bit unclear on
the meaning of:

"""
This breaks the capacity of using "usb" as DT alias sequence numbering
which needs a fix afterwards.
"""

I have added Jagan, Stefano, Fabio and the NXP team in CC. Does anyone
of you have any concerns with this patch ?

If someone could test it, that would be helpful.


More information about the U-Boot mailing list