[PATCH v3 01/12] usb: dwc3: Handle unknown mode as otg

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


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

> In case dr_mode attribute is not passed via DT,
> USB DRD controllers should default to OTG.
> 
> Signed-off-by: Julien Panis <jpanis at baylibre.com>
> Acked-by: Roger Quadros <rogerq at kernel.org>
> ---
>  drivers/usb/dwc3/dwc3-generic.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
> index 66da5a8d6f8c..857ae806e11d 100644
> --- a/drivers/usb/dwc3/dwc3-generic.c
> +++ b/drivers/usb/dwc3/dwc3-generic.c
> @@ -182,8 +182,8 @@ static int dwc3_generic_of_to_plat(struct udevice *dev)
>  		node = dev_ofnode(dev->parent);
>  		plat->dr_mode = usb_get_dr_mode(node);
>  		if (plat->dr_mode == USB_DR_MODE_UNKNOWN) {
> -			pr_err("Invalid usb mode setup\n");
> -			return -ENODEV;
> +			pr_info("No USB mode specified. Using OTG.\n");
> +			plat->dr_mode = USB_DR_MODE_OTG;
>  		}
>  	}

Is this part OK with you Marek?

-- 
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/03c1b2df/attachment.sig>


More information about the U-Boot mailing list