[PATCH v3 09/12] usb: cdns3: Handle otg mode as peripheral

Tom Rini trini at konsulko.com
Mon Aug 14 19:17:55 CEST 2023


On Thu, Jul 13, 2023 at 03:45:42PM +0200, Julien Panis wrote:

> Override 'otg' to 'peripheral' mode, since 'otg' mode
> is not yet supported by u-boot.
> 
> Signed-off-by: Julien Panis <jpanis at baylibre.com>
> Suggested-by: Roger Quadros <rogerq at kernel.org>
> ---
>  drivers/usb/cdns3/core.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
> index 644a9791b9c9..bd763fc593e1 100644
> --- a/drivers/usb/cdns3/core.c
> +++ b/drivers/usb/cdns3/core.c
> @@ -149,6 +149,10 @@ static int cdns3_core_init_role(struct cdns3 *cdns)
>  
>  	dr_mode = best_dr_mode;
>  
> +	/* u-boot doesn't yet support OTG so limit to PERIPHERAL */
> +	if (dr_mode == USB_DR_MODE_OTG)
> +		dr_mode = USB_DR_MODE_PERIPHERAL;
> +
>  #if defined(CONFIG_SPL_USB_HOST) || !defined(CONFIG_SPL_BUILD)
>  	if (dr_mode == USB_DR_MODE_OTG || dr_mode == USB_DR_MODE_HOST) {
>  		ret = cdns3_host_init(cdns);

Julien, why don't we support otg mode here?

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


More information about the U-Boot mailing list