[PATCH] usb: musb-new: sunxi: support usage with DM_USB_GADGET
John Watts
contact at jookia.org
Thu Apr 11 08:46:17 CEST 2024
On Sun, Dec 31, 2023 at 03:38:37PM -0500, Aren Moynihan wrote:
> Add support for building the sunxi-musb driver with DM_USB_GADGET
> including adding a separate IRQ handling function and registering the
> driver with the musb system differently.
Hi there,
Were you aware of this similar patch?
https://lore.kernel.org/u-boot/20230608195631.55364-1-CFSworks@gmail.com/
If not you might want to test it and compare it.
John.
> The implementation of usb_gadget_register_driver from
> musb-new/musb_uboot.c only works when the gadget driver for the device
> has already been probed and has called musb_register. On the pinephone
> (using a allwinner a64 processor) this causes issues when trying to use
> usb gadget mode (such as from the ums command) and CONFIG_USB_ETHER is
> disabled.
>
> The implementation of usb_gadget_register_driver provided when
> DM_USB_GADGET is enabled will probe the necessary drivers when it's
> called.
>
> Without the patch, this is what the error condition looks like:
> => ums 0 mmc 1
> UMS: LUN 0, dev mmc 1, hwpart 0, sector 0x0, count 0x3a3e000
> Controller uninitialized
> g_dnl_register: failed!, error: -6
> g_dnl_register failed
>
> based on:
> commit 2e4865bc6486 ("musb-new: omap2430: fix compiling in DM_USB_GADGET config")
>
> Signed-off-by: Aren Moynihan <aren at peacevolution.org>
More information about the U-Boot
mailing list