[PATCH V4] usb: ehci-mx6: Enable OTG detection on imx8mm and imx8mn
Fabio Estevam
festevam at gmail.com
Thu Feb 3 22:31:03 CET 2022
Hi Adam,
On Thu, Feb 3, 2022 at 6:20 PM Adam Ford <aford173 at gmail.com> wrote:
>
> The imx8mm and imx8mn appear compatible with imx7d-usb
> flags in the OTG driver. If the dr_mode is defined as
> host or peripheral, the device appears to operate correctly,
> however the auto host/peripheral detection results in an error.
>
> The solution isn't just adding checks for imx8mm and imx8mn to
> the check for imx7, because the USB clock needs to be running
> to read from the USBNC_PHY_STATUS_OFFSET register or it will hang.
>
> Marek requested that I not enable the clocks in ehci_usb_of_to_plat,
> so I modified that function to return an unknown state if the
> device tree does not explicitly state whether it is a host
> or a peripheral.
>
> When the driver probes, it looks to see if it's in the unknown
> state, and only then will it read the register to auto-detect.
>
> Signed-off-by: Adam Ford <aford173 at gmail.com>
> Tested-by: Tim Harvey <tharvey at gateworks.com>
The last time I tried to test your previous version I was having an
issue which is solved by Marcel's patch:
https://lists.denx.de/pipermail/u-boot/2022-February/474006.html
With Marcel's patch applied and your updated version, "ums 0 mmc 0"
works fine on a imx7s-warp, thanks:
Tested-by: Fabio Estevam <festevam at gmail.com>
More information about the U-Boot
mailing list