imx8mm/imx8mn hang on usb stop / ehci_shutdown

Fabio Estevam festevam at gmail.com
Thu Apr 27 20:16:41 CEST 2023


Hi Tim,

On Thu, Apr 27, 2023 at 2:52 PM Tim Harvey <tharvey at gateworks.com> wrote:

> Fabio,
>
> The original issue I was trying to solve should not be visible on
> imx8mm-evk unless you changed its usbotg1 to dr_mode = "host" in which
> case you should see a hang with a simple 'usb start && usb stop'.

Just did the following change as you suggested:

diff --git a/arch/arm/dts/imx8mm-evk.dtsi b/arch/arm/dts/imx8mm-evk.dtsi
index 7d6317d95b13..0be3ab66ed5f 100644
--- a/arch/arm/dts/imx8mm-evk.dtsi
+++ b/arch/arm/dts/imx8mm-evk.dtsi
@@ -400,7 +400,7 @@
 };

 &usbotg1 {
-       dr_mode = "otg";
+       dr_mode = "host";
        hnp-disable;
        srp-disable;
        adp-disable;
diff --git a/configs/imx8mm_evk_defconfig b/configs/imx8mm_evk_defconfig
index ab9ad41b4548..70c7a21f2d9f 100644
--- a/configs/imx8mm_evk_defconfig
+++ b/configs/imx8mm_evk_defconfig
@@ -119,3 +119,4 @@ CONFIG_CI_UDC=y
 CONFIG_SDP_LOADADDR=0x40400000
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_IMX_WATCHDOG=y
+CONFIG_CMD_USB=y

Tested against my series that syncs imx8mm with Linux 6.3:

u-boot=> usb start && usb stop
starting USB...
Bus usb at 32e40000: USB EHCI 1.00
scanning bus usb at 32e40000 for devices... 1 USB Device(s) found
stopping USB..
u-boot=>

No hang is observed.


More information about the U-Boot mailing list