On Tue, Dec 16, 2025 at 02:38:36PM +0800, [email protected] wrote:

> From: Sherry Sun <[email protected]>
> 
> 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 <[email protected]>
> Signed-off-by: Alice Guo <[email protected]>
> Reviewed-by: Ye Li <[email protected]>
> ---
>  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

Attachment: signature.asc
Description: PGP signature

Reply via email to