]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MLK-10179-1 usb: chipidea: add a flag for turn on vbus early for host
authorLi Jun <b47624@freescale.com>
Tue, 3 Feb 2015 05:40:47 +0000 (13:40 +0800)
committerLi Jun <jun.li@freescale.com>
Wed, 11 Feb 2015 07:35:40 +0000 (15:35 +0800)
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)

drivers/usb/chipidea/ci_hdrc_imx.c
include/linux/usb/chipidea.h

index 62dc7990502dc148b0b9edf32cc9b996c45be3f6..708c486b49a249aba2ccf2e66c996be3b80dca40 100644 (file)
@@ -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,
 };
index 6c1acb4b69f69f6b0e1ca9fc9f05e2f2127825e5..97f0b5c61baccbb3aaab0b24d8fff852c5e8a4c0 100644 (file)
@@ -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