Commit 6eeb0efc authored by make shi's avatar make shi Committed by Jason Liu

ENGR00161518 [MX6] USB: Add USB OC(Over Current) code

Add config USB OC setting code for mx6q, and make the OC default off.
After adding it, fixing the loop less code during kernel boot in mx6qLite.
Signed-off-by: default avatarmake shi <b15407@freescale.com>
parent 0034a278
......@@ -276,6 +276,10 @@ static iomux_v3_cfg_t mx6q_sabrelite_pads[] = {
/* USBOTG ID pin */
MX6Q_PAD_GPIO_1__USBOTG_ID,
/* USB OC pin */
MX6Q_PAD_KEY_COL4__USBOH3_USBOTG_OC,
MX6Q_PAD_EIM_D30__USBOH3_USBH1_OC,
/* USDHC3 */
MX6Q_PAD_SD3_CLK__USDHC3_CLK_50MHZ,
MX6Q_PAD_SD3_CMD__USDHC3_CMD_50MHZ,
......
......@@ -520,6 +520,14 @@ int fsl_usb_host_init(struct platform_device *pdev)
} else if (xops->xcvr_type == PORTSC_PTS_UTMI) {
usbh1_set_utmi_xcvr();
}
} else {
if (!strcmp("Host 1", pdata->name)) {
if (machine_is_mx6q_arm2())
USB_H1_CTRL &= ~UCTRL_OVER_CUR_POL;
else if (machine_is_mx6q_sabrelite())
USB_H1_CTRL |= UCTRL_OVER_CUR_POL;
USB_H1_CTRL |= UCTRL_OVER_CUR_DIS;
}
}
pr_debug("%s: %s success\n", __func__, pdata->name);
......@@ -827,6 +835,12 @@ int usbotg_init(struct platform_device *pdev)
} else if (xops->xcvr_type == PORTSC_PTS_UTMI) {
otg_set_utmi_xcvr();
}
} else {
if (machine_is_mx6q_arm2())
USB_OTG_CTRL &= ~UCTRL_OVER_CUR_POL;
else if (machine_is_mx6q_sabrelite())
USB_OTG_CTRL |= UCTRL_OVER_CUR_POL;
USB_OTG_CTRL |= UCTRL_OVER_CUR_DIS;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment