imx8mm/imx8mn hang on usb stop / ehci_shutdown
Tim Harvey
tharvey at gateworks.com
Thu Apr 27 20:46:03 CEST 2023
On Thu, Apr 27, 2023 at 11:16 AM Fabio Estevam <festevam at gmail.com> wrote:
>
> 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.
Fabio,
Do you have another board to test with that uses both imx8mm usb host
controllers? With your imx8mm dtsi sync added a simple 'usb start'
hangs on my imx8mm-gw71xx board when the second controller is enabled:
starting USB...
Bus usb at 32e40000: USB EHCI 1.00
Bus usb at 32e50000:
I don't believe the imx8mm-evk even has proper USB support in general
(which is probably why CMD_USB is not enabled). Only one port is
enabled in the dt and If I connect a USB-C to host cable with device
in it to that port a 'usb tree' does not even show the device
enumerated.
Tim
More information about the U-Boot
mailing list