|
@@ -730,6 +730,7 @@ static int dwc3_probe(struct platform_device *pdev)
|
|
struct dwc3 *dwc;
|
|
struct dwc3 *dwc;
|
|
u8 lpm_nyet_threshold;
|
|
u8 lpm_nyet_threshold;
|
|
u8 tx_de_emphasis;
|
|
u8 tx_de_emphasis;
|
|
|
|
+ u8 hird_threshold;
|
|
|
|
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
@@ -791,12 +792,22 @@ static int dwc3_probe(struct platform_device *pdev)
|
|
/* default to -3.5dB de-emphasis */
|
|
/* default to -3.5dB de-emphasis */
|
|
tx_de_emphasis = 1;
|
|
tx_de_emphasis = 1;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * default to assert utmi_sleep_n and use maximum allowed HIRD
|
|
|
|
+ * threshold value of 0b1100
|
|
|
|
+ */
|
|
|
|
+ hird_threshold = 12;
|
|
|
|
+
|
|
if (node) {
|
|
if (node) {
|
|
dwc->maximum_speed = of_usb_get_maximum_speed(node);
|
|
dwc->maximum_speed = of_usb_get_maximum_speed(node);
|
|
dwc->has_lpm_erratum = of_property_read_bool(node,
|
|
dwc->has_lpm_erratum = of_property_read_bool(node,
|
|
"snps,has-lpm-erratum");
|
|
"snps,has-lpm-erratum");
|
|
of_property_read_u8(node, "snps,lpm-nyet-threshold",
|
|
of_property_read_u8(node, "snps,lpm-nyet-threshold",
|
|
&lpm_nyet_threshold);
|
|
&lpm_nyet_threshold);
|
|
|
|
+ dwc->is_utmi_l1_suspend = of_property_read_bool(node,
|
|
|
|
+ "snps,is-utmi-l1-suspend");
|
|
|
|
+ of_property_read_u8(node, "snps,hird-threshold",
|
|
|
|
+ &hird_threshold);
|
|
|
|
|
|
dwc->needs_fifo_resize = of_property_read_bool(node,
|
|
dwc->needs_fifo_resize = of_property_read_bool(node,
|
|
"tx-fifo-resize");
|
|
"tx-fifo-resize");
|
|
@@ -832,6 +843,9 @@ static int dwc3_probe(struct platform_device *pdev)
|
|
dwc->has_lpm_erratum = pdata->has_lpm_erratum;
|
|
dwc->has_lpm_erratum = pdata->has_lpm_erratum;
|
|
if (pdata->lpm_nyet_threshold)
|
|
if (pdata->lpm_nyet_threshold)
|
|
lpm_nyet_threshold = pdata->lpm_nyet_threshold;
|
|
lpm_nyet_threshold = pdata->lpm_nyet_threshold;
|
|
|
|
+ dwc->is_utmi_l1_suspend = pdata->is_utmi_l1_suspend;
|
|
|
|
+ if (pdata->hird_threshold)
|
|
|
|
+ hird_threshold = pdata->hird_threshold;
|
|
|
|
|
|
dwc->needs_fifo_resize = pdata->tx_fifo_resize;
|
|
dwc->needs_fifo_resize = pdata->tx_fifo_resize;
|
|
dwc->dr_mode = pdata->dr_mode;
|
|
dwc->dr_mode = pdata->dr_mode;
|
|
@@ -859,6 +873,9 @@ static int dwc3_probe(struct platform_device *pdev)
|
|
dwc->lpm_nyet_threshold = lpm_nyet_threshold;
|
|
dwc->lpm_nyet_threshold = lpm_nyet_threshold;
|
|
dwc->tx_de_emphasis = tx_de_emphasis;
|
|
dwc->tx_de_emphasis = tx_de_emphasis;
|
|
|
|
|
|
|
|
+ dwc->hird_threshold = hird_threshold
|
|
|
|
+ | (dwc->is_utmi_l1_suspend << 4);
|
|
|
|
+
|
|
ret = dwc3_core_get_phy(dwc);
|
|
ret = dwc3_core_get_phy(dwc);
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|