aboutsummaryrefslogtreecommitdiff
path: root/drivers/phy/qualcomm/phy-qcom-usb-hs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/phy/qualcomm/phy-qcom-usb-hs.c')
-rw-r--r--drivers/phy/qualcomm/phy-qcom-usb-hs.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/phy/qualcomm/phy-qcom-usb-hs.c b/drivers/phy/qualcomm/phy-qcom-usb-hs.c
index 2d0c70b5589f..81ff6f2b26b6 100644
--- a/drivers/phy/qualcomm/phy-qcom-usb-hs.c
+++ b/drivers/phy/qualcomm/phy-qcom-usb-hs.c
@@ -15,6 +15,7 @@
#include <linux/reset.h>
#include <linux/extcon.h>
#include <linux/notifier.h>
+#include <linux/interconnect.h>
#define ULPI_PWR_CLK_MNG_REG 0x88
# define ULPI_PWR_OTG_COMP_DISABLE BIT(0)
@@ -39,6 +40,7 @@ struct qcom_usb_hs_phy {
struct reset_control *reset;
struct ulpi_seq *init_seq;
struct extcon_dev *vbus_edev;
+ struct icc_path *path;
struct notifier_block vbus_notify;
};
@@ -154,6 +156,8 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy)
goto err_ulpi;
}
+ icc_set(uphy->path, 80000, 6000);
+
if (uphy->vbus_edev) {
state = extcon_get_state(uphy->vbus_edev, EXTCON_USB);
/* setup initial state */
@@ -181,6 +185,8 @@ static int qcom_usb_hs_phy_power_off(struct phy *phy)
{
struct qcom_usb_hs_phy *uphy = phy_get_drvdata(phy);
+ icc_set(uphy->path, 0, 0);
+
regulator_disable(uphy->v3p3);
regulator_disable(uphy->v1p8);
clk_disable_unprepare(uphy->sleep_clk);
@@ -249,6 +255,10 @@ static int qcom_usb_hs_phy_probe(struct ulpi *ulpi)
uphy->reset = NULL;
}
+ uphy->path = of_icc_get(&ulpi->dev, "ddr");
+ if (IS_ERR(uphy->path))
+ return PTR_ERR(uphy->path);
+
uphy->phy = devm_phy_create(&ulpi->dev, ulpi->dev.of_node,
&qcom_usb_hs_phy_ops);
if (IS_ERR(uphy->phy))