]> git.hungrycats.org Git - linux/commitdiff
usb: dwc3: Add dis_enblslpm_quirk
authorJohn Youn <John.Youn@synopsys.com>
Sat, 3 Oct 2015 03:30:57 +0000 (20:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Dec 2015 19:34:37 +0000 (14:34 -0500)
commit ec791d149bca4511e7d3a6a92bb3b030c5a443f9 upstream.

Add a quirk to clear the GUSB2PHYCFG.ENBLSLPM bit, which controls
whether the PHY receives the suspend signal from the controller.

Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/usb/dwc3.txt
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h
drivers/usb/dwc3/platform_data.h

index 0815eac5b18511152135f87defe856595de2889c..e12f3448846a2e35a8363283e6563a54e3b31d68 100644 (file)
@@ -35,6 +35,8 @@ Optional properties:
                        LTSSM during USB3 Compliance mode.
  - snps,dis_u3_susphy_quirk: when set core will disable USB3 suspend phy.
  - snps,dis_u2_susphy_quirk: when set core will disable USB2 suspend phy.
+ - snps,dis_enblslpm_quirk: when set clears the enblslpm in GUSB2PHYCFG,
+                       disabling the suspend signal to the PHY.
  - snps,is-utmi-l1-suspend: true when DWC3 asserts output signal
                        utmi_l1_suspend_n, false when asserts utmi_sleep_n
  - snps,hird-threshold: HIRD threshold
index 386ea764d8b2c23418785a569006491dde3756ae..51156ec91c78c6f8e2f2f361033a4b665896a4f5 100644 (file)
@@ -488,6 +488,9 @@ static int dwc3_phy_setup(struct dwc3 *dwc)
        if (dwc->dis_u2_susphy_quirk)
                reg &= ~DWC3_GUSB2PHYCFG_SUSPHY;
 
+       if (dwc->dis_enblslpm_quirk)
+               reg &= ~DWC3_GUSB2PHYCFG_ENBLSLPM;
+
        dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
 
        return 0;
@@ -885,6 +888,8 @@ static int dwc3_probe(struct platform_device *pdev)
                                "snps,dis_u3_susphy_quirk");
                dwc->dis_u2_susphy_quirk = of_property_read_bool(node,
                                "snps,dis_u2_susphy_quirk");
+       dwc->dis_enblslpm_quirk = device_property_read_bool(dev,
+                               "snps,dis_enblslpm_quirk");
 
                dwc->tx_de_emphasis_quirk = of_property_read_bool(node,
                                "snps,tx_de_emphasis_quirk");
@@ -915,6 +920,7 @@ static int dwc3_probe(struct platform_device *pdev)
                dwc->rx_detect_poll_quirk = pdata->rx_detect_poll_quirk;
                dwc->dis_u3_susphy_quirk = pdata->dis_u3_susphy_quirk;
                dwc->dis_u2_susphy_quirk = pdata->dis_u2_susphy_quirk;
+               dwc->dis_enblslpm_quirk = pdata->dis_enblslpm_quirk;
 
                dwc->tx_de_emphasis_quirk = pdata->tx_de_emphasis_quirk;
                if (pdata->tx_de_emphasis)
index 1841dd025ea7a5e24535dcff823a9b8c89f7857c..6e53ce9ce3207078416c27524fc64a5bb55477ab 100644 (file)
 #define DWC3_GUSB2PHYCFG_PHYSOFTRST    (1 << 31)
 #define DWC3_GUSB2PHYCFG_SUSPHY                (1 << 6)
 #define DWC3_GUSB2PHYCFG_ULPI_UTMI     (1 << 4)
+#define DWC3_GUSB2PHYCFG_ENBLSLPM      (1 << 8)
 
 /* Global USB2 PHY Vendor Control Register */
 #define DWC3_GUSB2PHYACC_NEWREGREQ     (1 << 25)
@@ -715,6 +716,8 @@ struct dwc3_scratchpad_array {
  * @rx_detect_poll_quirk: set if we enable rx_detect to polling lfps quirk
  * @dis_u3_susphy_quirk: set if we disable usb3 suspend phy
  * @dis_u2_susphy_quirk: set if we disable usb2 suspend phy
+ * @dis_enblslpm_quirk: set if we clear enblslpm in GUSB2PHYCFG,
+ *                      disabling the suspend signal to the PHY.
  * @tx_de_emphasis_quirk: set if we enable Tx de-emphasis quirk
  * @tx_de_emphasis: Tx de-emphasis value
  *     0       - -6dB de-emphasis
@@ -859,6 +862,7 @@ struct dwc3 {
        unsigned                rx_detect_poll_quirk:1;
        unsigned                dis_u3_susphy_quirk:1;
        unsigned                dis_u2_susphy_quirk:1;
+       unsigned                dis_enblslpm_quirk:1;
 
        unsigned                tx_de_emphasis_quirk:1;
        unsigned                tx_de_emphasis:2;
index d3614ecbb9ca284cf6304eee2291ec3ce03a7990..db29380022604ed907d6b155118d25225bc5a0a0 100644 (file)
@@ -42,6 +42,7 @@ struct dwc3_platform_data {
        unsigned rx_detect_poll_quirk:1;
        unsigned dis_u3_susphy_quirk:1;
        unsigned dis_u2_susphy_quirk:1;
+       unsigned dis_enblslpm_quirk:1;
 
        unsigned tx_de_emphasis_quirk:1;
        unsigned tx_de_emphasis:2;