summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2019-03-20 11:03:20 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2020-03-05 19:22:17 +0100
commit7443a6e519eb1743eebff3d69512fb6b71ccd88e (patch)
treeda3aed3f7ccda0c3572c7f8a5bed5dd3bc7927ad /board
parentecb2945a4eb9d2ecb5dadf6e4b792e20de6807c0 (diff)
colibri-imx8qxp: fix usb device/host functionality
Fix USB device aka UMS as well as USB host functionality. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'board')
-rw-r--r--board/toradex/colibri-imx8qxp/colibri-imx8qxp.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/board/toradex/colibri-imx8qxp/colibri-imx8qxp.c b/board/toradex/colibri-imx8qxp/colibri-imx8qxp.c
index f3b8ced8a38..e476f408c9d 100644
--- a/board/toradex/colibri-imx8qxp/colibri-imx8qxp.c
+++ b/board/toradex/colibri-imx8qxp/colibri-imx8qxp.c
@@ -360,6 +360,30 @@ int checkboard(void)
return 0;
}
+/* Only Enable USB3 resources currently */
+int board_usb_init(int index, enum usb_init_type init)
+{
+#ifndef CONFIG_DM_USB
+ struct power_domain pd;
+ int ret;
+
+ /* Power on usb */
+ if (!power_domain_lookup_name("conn_usb2", &pd)) {
+ ret = power_domain_on(&pd);
+ if (ret)
+ printf("conn_usb2 Power up failed! (error = %d)\n", ret);
+ }
+
+ if (!power_domain_lookup_name("conn_usb2_phy", &pd)) {
+ ret = power_domain_on(&pd);
+ if (ret)
+ printf("conn_usb2_phy Power up failed! (error = %d)\n", ret);
+ }
+#endif
+
+ return 0;
+}
+
int board_init(void)
{
#ifdef CONFIG_MXC_GPIO