summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2017-08-16 00:58:29 -0500
committerYe Li <ye.li@nxp.com>2017-08-17 01:34:33 -0500
commitd70fd8e7784347ccba9ec95858637c026a78acee (patch)
treeb6ab569cf7d088f79998ebebc6808e983c0cd4b6 /board
parent3d9fea525c303ca55f4e2185df8a1c4443cd5253 (diff)
MLK-16198-4 imx8qm/qxp: Update ARM2 boards to support xhci and ehci at same time
When using DM xhci and ehci drivers, we can support both two controllers (OTG and USB3) at same time. Refactor the QM and QXP ARM2 board codes and configurations to enable them. Because the xhci-imx8 driver will initialize the clock, and DM framework will enable power domains, so only keep the power up in board level codes for non-DM driver. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng@nxp.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/imx8qm_arm2/imx8qm_arm2.c22
-rw-r--r--board/freescale/imx8qxp_arm2/imx8qxp_arm2.c24
2 files changed, 26 insertions, 20 deletions
diff --git a/board/freescale/imx8qm_arm2/imx8qm_arm2.c b/board/freescale/imx8qm_arm2/imx8qm_arm2.c
index 113bf71a52..18736a01c4 100644
--- a/board/freescale/imx8qm_arm2/imx8qm_arm2.c
+++ b/board/freescale/imx8qm_arm2/imx8qm_arm2.c
@@ -585,14 +585,10 @@ int is_recovery_key_pressing(void)
/* Only Enable USB3 resources currently */
int board_usb_init(int index, enum usb_init_type init)
{
- sc_err_t err;
- sc_ipc_t ipc;
- sc_rsrc_t usbs[2] = {SC_R_USB_2, SC_R_USB_2_PHY};
+#ifndef CONFIG_DM_USB
struct power_domain pd;
int ret;
- ipc = gd->arch.ipc_channel_handle;
-
/* Power on usb */
if (!power_domain_lookup_name("conn_usb2", &pd)) {
ret = power_domain_on(&pd);
@@ -605,21 +601,7 @@ int board_usb_init(int index, enum usb_init_type init)
if (ret)
printf("conn_usb2_phy Power up failed! (error = %d)\n", ret);
}
-
- err = sc_pm_clock_enable(ipc, usbs[0], SC_PM_CLK_MISC, true, false);
- if (err != SC_ERR_NONE)
- printf("USB3 set clock failed!, line=%d (error = %d)\n",
- __LINE__, err);
-
- err = sc_pm_clock_enable(ipc, usbs[0], SC_PM_CLK_MST_BUS, true, false);
- if (err != SC_ERR_NONE)
- printf("USB3 set clock failed!, line=%d (error = %d)\n",
- __LINE__, err);
-
- err = sc_pm_clock_enable(ipc, usbs[0], SC_PM_CLK_PER, true, false);
- if (err != SC_ERR_NONE)
- printf("USB3 set clock failed!, line=%d (error = %d)\n",
- __LINE__, err);
+#endif
return 0;
}
diff --git a/board/freescale/imx8qxp_arm2/imx8qxp_arm2.c b/board/freescale/imx8qxp_arm2/imx8qxp_arm2.c
index 3d171ee998..e5843746a8 100644
--- a/board/freescale/imx8qxp_arm2/imx8qxp_arm2.c
+++ b/board/freescale/imx8qxp_arm2/imx8qxp_arm2.c
@@ -571,6 +571,30 @@ int is_recovery_key_pressing(void)
#endif /*CONFIG_ANDROID_RECOVERY*/
#endif /*CONFIG_FSL_FASTBOOT*/
+/* 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;
+}
+
#if defined(CONFIG_VIDEO_IMXDPUV1)
static void enable_lvds(struct display_info_t const *dev)
{