aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2014-10-30 23:11:13 -0400
committerFelipe Balbi <balbi@ti.com>2014-11-03 11:03:39 -0500
commit59acfa208164205f94a11f454d08cd88f06b9908 (patch)
tree3c4e0402c1f833a8b9a2a510ee6acbd001f9d38d /drivers/usb/dwc3
parent6b6a0c9a3ffa3107994d92d5758cbe274c5a97b6 (diff)
usb: dwc3: add disable usb3 suspend phy quirk
This patch adds disable usb3 suspend phy quirk, and some special platforms can configure that if it is needed. Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/core.c6
-rw-r--r--drivers/usb/dwc3/core.h2
-rw-r--r--drivers/usb/dwc3/platform_data.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index c3dfb195f79c..87ffb86bc2f2 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -404,6 +404,9 @@ static void dwc3_phy_setup(struct dwc3 *dwc)
404 if (dwc->tx_de_emphasis_quirk) 404 if (dwc->tx_de_emphasis_quirk)
405 reg |= DWC3_GUSB3PIPECTL_TX_DEEPH(dwc->tx_de_emphasis); 405 reg |= DWC3_GUSB3PIPECTL_TX_DEEPH(dwc->tx_de_emphasis);
406 406
407 if (dwc->dis_u3_susphy_quirk && dwc->is_fpga)
408 reg &= ~DWC3_GUSB3PIPECTL_SUSPHY;
409
407 dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg); 410 dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg);
408 411
409 mdelay(100); 412 mdelay(100);
@@ -812,6 +815,8 @@ static int dwc3_probe(struct platform_device *pdev)
812 "snps,lfps_filter_quirk"); 815 "snps,lfps_filter_quirk");
813 dwc->rx_detect_poll_quirk = of_property_read_bool(node, 816 dwc->rx_detect_poll_quirk = of_property_read_bool(node,
814 "snps,rx_detect_poll_quirk"); 817 "snps,rx_detect_poll_quirk");
818 dwc->dis_u3_susphy_quirk = of_property_read_bool(node,
819 "snps,dis_u3_susphy_quirk");
815 820
816 dwc->tx_de_emphasis_quirk = of_property_read_bool(node, 821 dwc->tx_de_emphasis_quirk = of_property_read_bool(node,
817 "snps,tx_de_emphasis_quirk"); 822 "snps,tx_de_emphasis_quirk");
@@ -834,6 +839,7 @@ static int dwc3_probe(struct platform_device *pdev)
834 dwc->del_phy_power_chg_quirk = pdata->del_phy_power_chg_quirk; 839 dwc->del_phy_power_chg_quirk = pdata->del_phy_power_chg_quirk;
835 dwc->lfps_filter_quirk = pdata->lfps_filter_quirk; 840 dwc->lfps_filter_quirk = pdata->lfps_filter_quirk;
836 dwc->rx_detect_poll_quirk = pdata->rx_detect_poll_quirk; 841 dwc->rx_detect_poll_quirk = pdata->rx_detect_poll_quirk;
842 dwc->dis_u3_susphy_quirk = pdata->dis_u3_susphy_quirk;
837 843
838 dwc->tx_de_emphasis_quirk = pdata->tx_de_emphasis_quirk; 844 dwc->tx_de_emphasis_quirk = pdata->tx_de_emphasis_quirk;
839 if (pdata->tx_de_emphasis) 845 if (pdata->tx_de_emphasis)
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index cf9aaca6add0..fa778b0a5ab7 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -697,6 +697,7 @@ struct dwc3_scratchpad_array {
697 * @del_phy_power_chg_quirk: set if we enable delay phy power change quirk 697 * @del_phy_power_chg_quirk: set if we enable delay phy power change quirk
698 * @lfps_filter_quirk: set if we enable LFPS filter quirk 698 * @lfps_filter_quirk: set if we enable LFPS filter quirk
699 * @rx_detect_poll_quirk: set if we enable rx_detect to polling lfps quirk 699 * @rx_detect_poll_quirk: set if we enable rx_detect to polling lfps quirk
700 * @dis_u3_susphy_quirk: set if we disable usb3 suspend phy
700 * @tx_de_emphasis_quirk: set if we enable Tx de-emphasis quirk 701 * @tx_de_emphasis_quirk: set if we enable Tx de-emphasis quirk
701 * @tx_de_emphasis: Tx de-emphasis value 702 * @tx_de_emphasis: Tx de-emphasis value
702 * 0 - -6dB de-emphasis 703 * 0 - -6dB de-emphasis
@@ -818,6 +819,7 @@ struct dwc3 {
818 unsigned del_phy_power_chg_quirk:1; 819 unsigned del_phy_power_chg_quirk:1;
819 unsigned lfps_filter_quirk:1; 820 unsigned lfps_filter_quirk:1;
820 unsigned rx_detect_poll_quirk:1; 821 unsigned rx_detect_poll_quirk:1;
822 unsigned dis_u3_susphy_quirk:1;
821 823
822 unsigned tx_de_emphasis_quirk:1; 824 unsigned tx_de_emphasis_quirk:1;
823 unsigned tx_de_emphasis:2; 825 unsigned tx_de_emphasis:2;
diff --git a/drivers/usb/dwc3/platform_data.h b/drivers/usb/dwc3/platform_data.h
index e1ab900a8623..0f1d5adc657d 100644
--- a/drivers/usb/dwc3/platform_data.h
+++ b/drivers/usb/dwc3/platform_data.h
@@ -36,6 +36,7 @@ struct dwc3_platform_data {
36 unsigned del_phy_power_chg_quirk:1; 36 unsigned del_phy_power_chg_quirk:1;
37 unsigned lfps_filter_quirk:1; 37 unsigned lfps_filter_quirk:1;
38 unsigned rx_detect_poll_quirk:1; 38 unsigned rx_detect_poll_quirk:1;
39 unsigned dis_u3_susphy_quirk:1;
39 40
40 unsigned tx_de_emphasis_quirk:1; 41 unsigned tx_de_emphasis_quirk:1;
41 unsigned tx_de_emphasis:2; 42 unsigned tx_de_emphasis:2;