|
|
@@ -401,6 +401,9 @@ static void dwc3_phy_setup(struct dwc3 *dwc)
|
|
|
if (dwc->rx_detect_poll_quirk)
|
|
|
reg |= DWC3_GUSB3PIPECTL_RX_DETOPOLL;
|
|
|
|
|
|
+ if (dwc->tx_de_emphasis_quirk)
|
|
|
+ reg |= DWC3_GUSB3PIPECTL_TX_DEEPH(dwc->tx_de_emphasis);
|
|
|
+
|
|
|
dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg);
|
|
|
|
|
|
mdelay(100);
|
|
|
@@ -720,6 +723,7 @@ static int dwc3_probe(struct platform_device *pdev)
|
|
|
struct resource *res;
|
|
|
struct dwc3 *dwc;
|
|
|
u8 lpm_nyet_threshold;
|
|
|
+ u8 tx_de_emphasis;
|
|
|
|
|
|
int ret;
|
|
|
|
|
|
@@ -778,6 +782,9 @@ static int dwc3_probe(struct platform_device *pdev)
|
|
|
/* default to highest possible threshold */
|
|
|
lpm_nyet_threshold = 0xff;
|
|
|
|
|
|
+ /* default to -3.5dB de-emphasis */
|
|
|
+ tx_de_emphasis = 1;
|
|
|
+
|
|
|
if (node) {
|
|
|
dwc->maximum_speed = of_usb_get_maximum_speed(node);
|
|
|
dwc->has_lpm_erratum = of_property_read_bool(node,
|
|
|
@@ -805,6 +812,11 @@ static int dwc3_probe(struct platform_device *pdev)
|
|
|
"snps,lfps_filter_quirk");
|
|
|
dwc->rx_detect_poll_quirk = of_property_read_bool(node,
|
|
|
"snps,rx_detect_poll_quirk");
|
|
|
+
|
|
|
+ dwc->tx_de_emphasis_quirk = of_property_read_bool(node,
|
|
|
+ "snps,tx_de_emphasis_quirk");
|
|
|
+ of_property_read_u8(node, "snps,tx_de_emphasis",
|
|
|
+ &tx_de_emphasis);
|
|
|
} else if (pdata) {
|
|
|
dwc->maximum_speed = pdata->maximum_speed;
|
|
|
dwc->has_lpm_erratum = pdata->has_lpm_erratum;
|
|
|
@@ -822,6 +834,10 @@ static int dwc3_probe(struct platform_device *pdev)
|
|
|
dwc->del_phy_power_chg_quirk = pdata->del_phy_power_chg_quirk;
|
|
|
dwc->lfps_filter_quirk = pdata->lfps_filter_quirk;
|
|
|
dwc->rx_detect_poll_quirk = pdata->rx_detect_poll_quirk;
|
|
|
+
|
|
|
+ dwc->tx_de_emphasis_quirk = pdata->tx_de_emphasis_quirk;
|
|
|
+ if (pdata->tx_de_emphasis)
|
|
|
+ tx_de_emphasis = pdata->tx_de_emphasis;
|
|
|
}
|
|
|
|
|
|
/* default to superspeed if no maximum_speed passed */
|
|
|
@@ -829,6 +845,7 @@ static int dwc3_probe(struct platform_device *pdev)
|
|
|
dwc->maximum_speed = USB_SPEED_SUPER;
|
|
|
|
|
|
dwc->lpm_nyet_threshold = lpm_nyet_threshold;
|
|
|
+ dwc->tx_de_emphasis = tx_de_emphasis;
|
|
|
|
|
|
ret = dwc3_core_get_phy(dwc);
|
|
|
if (ret)
|