summaryrefslogtreecommitdiff
path: root/include/usb.h
diff options
context:
space:
mode:
authorAdam Ford <aford173@gmail.com>2022-02-03 15:20:11 -0600
committerMarek Vasut <marex@denx.de>2022-02-11 00:03:48 +0100
commit078dfef931523b64c1904517a1a6f04511fe42a2 (patch)
tree45188fa5e775a175eda0d7193df8d728a4bcf185 /include/usb.h
parent2ccd2bc8c3580e00c51094c5cc2b3e2ead8d35c3 (diff)
downloadu-boot-078dfef931523b64c1904517a1a6f04511fe42a2.tar.gz
u-boot-078dfef931523b64c1904517a1a6f04511fe42a2.tar.bz2
u-boot-078dfef931523b64c1904517a1a6f04511fe42a2.zip
usb: ehci-mx6: Enable OTG detection on imx8mm and imx8mn
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@gmail.com> Tested-by: Tim Harvey <tharvey@gateworks.com>
Diffstat (limited to 'include/usb.h')
-rw-r--r--include/usb.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/usb.h b/include/usb.h
index f032de8af9..7e3796bd5b 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -163,7 +163,8 @@ struct int_queue;
*/
enum usb_init_type {
USB_INIT_HOST,
- USB_INIT_DEVICE
+ USB_INIT_DEVICE,
+ USB_INIT_UNKNOWN,
};
/**********************************************************************