thus enabling the workaround in HW to fix the issue where the controller
was not able to generate correct CRC checksum on the very first transfer
packet after sending resume signal.
+ - snps,enable_guctl1_ipd_quirk: Adding this flag sets bit 9 of GUCTL1
+ enabling the workaround in HW to reduce the Inter Packet Delay (IPD)
+ and making controller enumerate FS/LS devices connected behind VIA-LAB.
- <DEPRECATED> tx-fifo-resize: determines if the FIFO *has* to be reallocated.
dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
}
+ /* SNPS controller when configureed in HOST mode maintains Inter Packet
+ * Delay (IPD) of ~380ns which works with most of the super-speed hubs
+ * except VIA-LAB hubs. When IPD is ~380ns HOST controller fails to
+ * enumerate FS/LS devices when connected behind VIA-LAB hubs.
+ * Enabling bit 9 of GUCTL1 enables the workaround in HW to reduce the
+ * ULPI clock latency by 1 cycle, thus reducing the IPD (~360ns) and
+ * making controller enumerate FS/LS devices connected behind VIA-LAB.
+ */
+ if (dwc->enable_guctl1_ipd_quirk) {
+ reg = dwc3_readl(dwc->regs, DWC3_GUCTL1);
+ reg |= DWC3_GUCTL1_IPD_QUIRK;
+ dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
+ }
+
return 0;
err4:
"snps,refclk_fladj");
dwc->enable_guctl1_resume_quirk = device_property_read_bool(dev,
"snps,enable_guctl1_resume_quirk");
+ dwc->enable_guctl1_ipd_quirk = device_property_read_bool(dev,
+ "snps,enable_guctl1_ipd_quirk");
dwc->lpm_nyet_threshold = lpm_nyet_threshold;
dwc->tx_de_emphasis = tx_de_emphasis;
/* Global User Control Register 1 */
#define DWC3_GUCTL1_RESUME_QUIRK (1 << 10)
+#define DWC3_GUCTL1_IPD_QUIRK (1 << 9)
/* Global User Control Register 2 */
#define DWC3_GUCTL2_RST_ACTBITLATER (1 << 14)
* change quirk.
* @enable_guctl1_resume_quirk: Set if we enable quirk for fixing improper crc
* generation after resume from suspend.
+ * @enable_guctl1_ipd_quirk: set if we enable quirk for reducing timing of inter
+ * packet delay(ipd).
* @tx_de_emphasis_quirk: set if we enable Tx de-emphasis quirk
* @tx_de_emphasis: Tx de-emphasis value
* 0 - -6dB de-emphasis
unsigned dis_u2_freeclk_exists_quirk:1;
unsigned dis_del_phy_power_chg_quirk:1;
unsigned enable_guctl1_resume_quirk:1;
+ unsigned enable_guctl1_ipd_quirk:1;
unsigned tx_de_emphasis_quirk:1;
unsigned tx_de_emphasis:2;