Commit 72d996fc authored by Vivek Gautam's avatar Vivek Gautam Committed by Felipe Balbi

usb: dwc3: exynos: Add provision for suspend clock

DWC3 controller on Exynos SoC series have separate control for
suspend clock which replaces pipe3_rx_pclk as clock source to
a small part of DWC3 core that operates when SS PHY is in its
lowest power state (P3) in states SS.disabled and U3.
Suggested-by: default avatarAnton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: default avatarVivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent c1a3acaa
...@@ -34,6 +34,8 @@ struct dwc3_exynos { ...@@ -34,6 +34,8 @@ struct dwc3_exynos {
struct device *dev; struct device *dev;
struct clk *clk; struct clk *clk;
struct clk *susp_clk;
struct regulator *vdd33; struct regulator *vdd33;
struct regulator *vdd10; struct regulator *vdd10;
}; };
...@@ -140,6 +142,13 @@ static int dwc3_exynos_probe(struct platform_device *pdev) ...@@ -140,6 +142,13 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
} }
clk_prepare_enable(exynos->clk); clk_prepare_enable(exynos->clk);
exynos->susp_clk = devm_clk_get(dev, "usbdrd30_susp_clk");
if (IS_ERR(exynos->susp_clk)) {
dev_dbg(dev, "no suspend clk specified\n");
exynos->susp_clk = NULL;
}
clk_prepare_enable(exynos->susp_clk);
exynos->vdd33 = devm_regulator_get(dev, "vdd33"); exynos->vdd33 = devm_regulator_get(dev, "vdd33");
if (IS_ERR(exynos->vdd33)) { if (IS_ERR(exynos->vdd33)) {
ret = PTR_ERR(exynos->vdd33); ret = PTR_ERR(exynos->vdd33);
...@@ -181,6 +190,7 @@ static int dwc3_exynos_probe(struct platform_device *pdev) ...@@ -181,6 +190,7 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
err3: err3:
regulator_disable(exynos->vdd33); regulator_disable(exynos->vdd33);
err2: err2:
clk_disable_unprepare(exynos->susp_clk);
clk_disable_unprepare(exynos->clk); clk_disable_unprepare(exynos->clk);
return ret; return ret;
} }
...@@ -193,6 +203,7 @@ static int dwc3_exynos_remove(struct platform_device *pdev) ...@@ -193,6 +203,7 @@ static int dwc3_exynos_remove(struct platform_device *pdev)
platform_device_unregister(exynos->usb2_phy); platform_device_unregister(exynos->usb2_phy);
platform_device_unregister(exynos->usb3_phy); platform_device_unregister(exynos->usb3_phy);
clk_disable_unprepare(exynos->susp_clk);
clk_disable_unprepare(exynos->clk); clk_disable_unprepare(exynos->clk);
regulator_disable(exynos->vdd33); regulator_disable(exynos->vdd33);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment