[PATCH v2] imx8mp-evk: Add USB0 OTG support

Marek Vasut marex at denx.de
Sun Oct 15 19:47:38 CEST 2023


On 10/14/23 23:12, Fabio Estevam wrote:
> From: Fabio Estevam <festevam at denx.de>
> 
> Add USB0 OTG support.
> 
> Currently, the USB0 OTG nodes are not enabled in the Linux kernel
> devicetree.
> 
> For this reason, enable the USB0 OTG nodes inside imx8mp-evk-u-boot.dtsi
> for now.
> 
> Also select several useful options such as USB gadget and fastboot.
> 
> Tested by running "ums 0 mmc 2".
> 
> Signed-off-by: Fabio Estevam <festevam at denx.de>
> ---
> Changes since v1:
> - Selected CONFIG_PHY=y and CONFIG_PHY_IMX8MQ_USB=y. Previously the ums
> command was working only after booting via USB serial download mode.
> Now it also works after booting from SD card.
> 
>   arch/arm/dts/imx8mp-evk-u-boot.dtsi | 14 +++++++++++++
>   configs/imx8mp_evk_defconfig        | 31 +++++++++++++++++++++++++++++
>   2 files changed, 45 insertions(+)
> 
> diff --git a/arch/arm/dts/imx8mp-evk-u-boot.dtsi b/arch/arm/dts/imx8mp-evk-u-boot.dtsi
> index 6784ed2e7c92..43f13a9c22f7 100644
> --- a/arch/arm/dts/imx8mp-evk-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mp-evk-u-boot.dtsi
> @@ -111,6 +111,20 @@
>   	bootph-pre-ram;
>   };
>   
> +&usb3_phy0 {
> +	status = "okay";
> +};

Keep the list sorted, _0 goes before _phy0, doesn't it ?

> +&usb3_0 {
> +	status = "okay";
> +};
> +
> +&usb_dwc3_0 {
> +	pinctrl-names = "default";

Is this ^ pinctrl-names without pinctrl-0 property needed ?

> +	dr_mode = "peripheral";
> +	status = "okay";
> +};
> +
>   &usdhc1 {
>   	bootph-pre-ram;
>   };

With that fixed:

Reviewed-by: Marek Vasut <marex at denx.de>


More information about the U-Boot mailing list