[PATCH v1 4/7] usb: ci_udc: Convert driver to DM_USB_GADGET

Tom Rini trini at konsulko.com
Tue Dec 16 15:07:18 CET 2025


On Tue, Dec 16, 2025 at 02:38:36PM +0800, alice.guo at oss.nxp.com wrote:

> From: Sherry Sun <sherry.sun at nxp.com>
> 
> Convert the ci_udc driver to driver model by using the uclass
> UCLASS_USB_GADGET_GENERIC. The clk and power of USB controller and USB
> PHY both are initialized by parsing the device tree nodes.
> 
> If CONFIG_DM_USB_GADGET is defined, we use the ci_udc driver in DM way,
> if it does not defined, we can use ci_udc driver in its original Non-DM
> way.
> 
> Signed-off-by: Sherry Sun <sherry.sun at nxp.com>
> Signed-off-by: Alice Guo <alice.guo at nxp.com>
> Reviewed-by: Ye Li <ye.li at nxp.com>
> ---
>  drivers/usb/gadget/ci_udc.c | 352 +++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 348 insertions(+), 4 deletions(-)

Good to get this converted. However, and this addresses some of the
questions in the Kconfig patch (which should be part of this patch too),
the end result should be supporting:
- Full U-Boot is DM only.
- SPL works with SPL_DM and (SPL_CI_UDC && SPL_DM).
- SPL works with SPL_CI_UDC and !SPL_DM.

This does mean adding a new symbol, for SPL, and migrating existing
configs to SPL_CI_UDC. It would also be real nice to know if all of the
imx6 and imx7 platforms that don't use SPL_DM could use SPL_DM, so we
could drop that last case I mentioned above.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20251216/59672579/attachment.sig>


More information about the U-Boot mailing list