imx8mm/imx8mn hang on usb stop / ehci_shutdown

Tim Harvey tharvey at gateworks.com
Thu Apr 27 20:18:50 CEST 2023


On Thu, Apr 27, 2023 at 10:54 AM Adam Ford <aford173 at gmail.com> wrote:
>
> On Thu, Apr 27, 2023 at 12:52 PM Tim Harvey <tharvey at gateworks.com> wrote:
> >
> > On Thu, Apr 27, 2023 at 10:49 AM Fabio Estevam <festevam at gmail.com> wrote:
> > >
> > > Hi Adam,
> > >
> > > On Thu, Apr 27, 2023 at 2:42 PM Adam Ford <aford173 at gmail.com> wrote:
> > >
> > > > There was some re-organization of the power domains in Linux in the
> > > > device tree [1].  Do you know if those propagated to U-Boot?
> > >
> > > Excellent, I just synced the kernel imx8mm.dtsi with U-Boot and it
> > > does fix the "ums 0 mmc 1" issue I just described.
> > >
> > > I will submit the dtsi sync patch. Thanks!
> >
> > 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'.
>
> If you leave it without the "host" but connect a device to the port
> with a host adapter, do you get the same behavior?
>

Adam,

Yes, simply adding a USB OTG (or USB-C) to host cable (even without a
device attached) will cause the hang.

The issue here is that ehci-mx6.c:ehci_usb_remove calls
ehci_deregister which calls ehci_shutdown which accesses the EHCI
registers to suspend the ports (after the imx8m power domains are
disabled) which causes the hang. This is not called if the controller
is not in host mode.

Tim


More information about the U-Boot mailing list