mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
usb: dwc3: add delay phy power change quirk
This patch adds delay PHY power change from P0 to P1/P2/P3 when link state changing from U0 to U1/U2/U3 respectively, and some special platforms can configure that if it is needed. [ balbi@ti.com : added DeviceTree binding documentation ] Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
@@ -383,6 +383,9 @@ static void dwc3_phy_setup(struct dwc3 *dwc)
|
||||
if (dwc->del_p1p2p3_quirk)
|
||||
reg |= DWC3_GUSB3PIPECTL_DEP1P2P3_EN;
|
||||
|
||||
if (dwc->del_phy_power_chg_quirk)
|
||||
reg |= DWC3_GUSB3PIPECTL_DEPOCHANGE;
|
||||
|
||||
dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg);
|
||||
|
||||
mdelay(100);
|
||||
@@ -766,6 +769,8 @@ static int dwc3_probe(struct platform_device *pdev)
|
||||
"snps,req_p1p2p3_quirk");
|
||||
dwc->del_p1p2p3_quirk = of_property_read_bool(node,
|
||||
"snps,del_p1p2p3_quirk");
|
||||
dwc->del_phy_power_chg_quirk = of_property_read_bool(node,
|
||||
"snps,del_phy_power_chg_quirk");
|
||||
} else if (pdata) {
|
||||
dwc->maximum_speed = pdata->maximum_speed;
|
||||
dwc->has_lpm_erratum = pdata->has_lpm_erratum;
|
||||
@@ -780,6 +785,7 @@ static int dwc3_probe(struct platform_device *pdev)
|
||||
dwc->u2ss_inp3_quirk = pdata->u2ss_inp3_quirk;
|
||||
dwc->req_p1p2p3_quirk = pdata->req_p1p2p3_quirk;
|
||||
dwc->del_p1p2p3_quirk = pdata->del_p1p2p3_quirk;
|
||||
dwc->del_phy_power_chg_quirk = pdata->del_phy_power_chg_quirk;
|
||||
}
|
||||
|
||||
/* default to superspeed if no maximum_speed passed */
|
||||
|
||||
Reference in New Issue
Block a user