mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
usb: dwc3: add a quirk xhci_slow_suspend_quirk
On some xHCI controllers (e.g. Rockchip SoCs), which are integrated in DWC3 IP, need an extraordinary delay to wait for xHCI enter the Halted state(i.e. HCH in the USBSTS register is '1'), especially if DWC3 is in DRD mode. Change-Id: I67c84d4768df95f7616d6716a77cf743e4334122 Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
This commit is contained in:
@@ -70,6 +70,9 @@ Optional properties:
|
||||
during HS transmit.
|
||||
- snps,dis_metastability_quirk: when set, disable metastability workaround.
|
||||
CAUTION: use only if you are absolutely sure of it.
|
||||
- snps,xhci-slow-suspend-quirk: when set, need an extraordinary delay to wait
|
||||
for xHC enter the Halted state (i.e. HCH in the USBSTS
|
||||
register is '1').
|
||||
- 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
|
||||
|
||||
@@ -1285,6 +1285,8 @@ static void dwc3_get_properties(struct dwc3 *dwc)
|
||||
"snps,dis-del-phy-power-chg-quirk");
|
||||
dwc->dis_tx_ipgap_linecheck_quirk = device_property_read_bool(dev,
|
||||
"snps,dis-tx-ipgap-linecheck-quirk");
|
||||
dwc->xhci_slow_suspend_quirk = device_property_read_bool(dev,
|
||||
"snps,xhci-slow-suspend-quirk");
|
||||
|
||||
dwc->tx_de_emphasis_quirk = device_property_read_bool(dev,
|
||||
"snps,tx_de_emphasis_quirk");
|
||||
|
||||
@@ -991,6 +991,9 @@ struct dwc3_scratchpad_array {
|
||||
* change quirk.
|
||||
* @dis_tx_ipgap_linecheck_quirk: set if we disable u2mac linestate
|
||||
* check during HS transmit.
|
||||
* @xhci_slow_suspend_quirk: set if need an extraordinary delay to wait
|
||||
* for xHC enter the Halted state after the Run/Stop
|
||||
* (R/S) bit is cleared to '0'.
|
||||
* @tx_de_emphasis_quirk: set if we enable Tx de-emphasis quirk
|
||||
* @tx_de_emphasis: Tx de-emphasis value
|
||||
* 0 - -6dB de-emphasis
|
||||
@@ -1162,6 +1165,7 @@ struct dwc3 {
|
||||
unsigned dis_u2_freeclk_exists_quirk:1;
|
||||
unsigned dis_del_phy_power_chg_quirk:1;
|
||||
unsigned dis_tx_ipgap_linecheck_quirk:1;
|
||||
unsigned xhci_slow_suspend_quirk:1;
|
||||
|
||||
unsigned tx_de_emphasis_quirk:1;
|
||||
unsigned tx_de_emphasis:2;
|
||||
|
||||
@@ -93,6 +93,9 @@ int dwc3_host_init(struct dwc3 *dwc)
|
||||
if (dwc->usb3_lpm_capable)
|
||||
props[prop_idx++].name = "usb3-lpm-capable";
|
||||
|
||||
if (dwc->xhci_slow_suspend_quirk)
|
||||
props[prop_idx++].name = "xhci-slow-suspend";
|
||||
|
||||
/**
|
||||
* WORKAROUND: dwc3 revisions <=3.00a have a limitation
|
||||
* where Port Disable command doesn't work.
|
||||
|
||||
Reference in New Issue
Block a user