summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Jun <b47624@freescale.com>2015-02-03 13:40:47 +0800
committerLi Jun <jun.li@freescale.com>2015-02-11 15:35:40 +0800
commit83f839d2e5d4783c51abce433f177c82b1a3ec9c (patch)
tree05c2ea6cb0503d80418a13a98e4c859deb2cf4ee
parentf07791882d531c0033b85f4f5437839dc173aae8 (diff)
MLK-10179-1 usb: chipidea: add a flag for turn on vbus early for host
Some PHY of imx usb need power supply from vbus to make it work, if there is no vbus, USB PHY will not in correct state when the controller starts to work, for host, this requires vbus should be turned on before setting port power(PP) of ehci, to work with this kind of USB PHY design, this patch adds a flag CI_HDRC_IMX_VBUS_EARLY_ON, can be checked by host driver to turn on vbus while start host. Signed-off-by: Li Jun <jun.li@freescale.com> (cherry picked from commit 1d4c054323817b49897fd7a59bc57b4d36f09491)
-rw-r--r--drivers/usb/chipidea/ci_hdrc_imx.c9
-rw-r--r--include/linux/usb/chipidea.h1
2 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index 62dc7990502d..708c486b49a2 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -50,7 +50,8 @@ static const struct ci_hdrc_imx_platform_flag imx6q_usb_data = {
CI_HDRC_IMX_EHCI_QUIRK |
CI_HDRC_DISABLE_STREAMING |
CI_HDRC_OVERRIDE_AHB_BURST |
- CI_HDRC_OVERRIDE_BURST_LENGTH,
+ CI_HDRC_OVERRIDE_BURST_LENGTH |
+ CI_HDRC_IMX_VBUS_EARLY_ON,
.ahbburst_config = 0, /*bit0 - bit2 at $BASE + 0x90 */
.burst_length = 0x1010, /*bit0 - bit15 at $BASE + 0x160 */
};
@@ -60,7 +61,8 @@ static const struct ci_hdrc_imx_platform_flag imx6sl_usb_data = {
CI_HDRC_IMX_EHCI_QUIRK |
CI_HDRC_DISABLE_HOST_STREAMING |
CI_HDRC_OVERRIDE_AHB_BURST |
- CI_HDRC_OVERRIDE_BURST_LENGTH,
+ CI_HDRC_OVERRIDE_BURST_LENGTH |
+ CI_HDRC_IMX_VBUS_EARLY_ON,
.ahbburst_config = 0,
.burst_length = 0x1010,
};
@@ -70,7 +72,8 @@ static const struct ci_hdrc_imx_platform_flag imx6sx_usb_data = {
CI_HDRC_IMX_EHCI_QUIRK |
CI_HDRC_DISABLE_HOST_STREAMING |
CI_HDRC_OVERRIDE_AHB_BURST |
- CI_HDRC_OVERRIDE_BURST_LENGTH,
+ CI_HDRC_OVERRIDE_BURST_LENGTH |
+ CI_HDRC_IMX_VBUS_EARLY_ON,
.ahbburst_config = 0,
.burst_length = 0x1010,
};
diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
index 6c1acb4b69f6..97f0b5c61bac 100644
--- a/include/linux/usb/chipidea.h
+++ b/include/linux/usb/chipidea.h
@@ -35,6 +35,7 @@ struct ci_hdrc_platform_data {
CI_HDRC_DISABLE_HOST_STREAMING)
#define CI_HDRC_OVERRIDE_AHB_BURST BIT(11)
#define CI_HDRC_OVERRIDE_BURST_LENGTH BIT(12)
+#define CI_HDRC_IMX_VBUS_EARLY_ON BIT(13)
enum usb_dr_mode dr_mode;
#define CI_HDRC_CONTROLLER_RESET_EVENT 0
#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1