summaryrefslogtreecommitdiff
path: root/drivers/phy/tegra/xusb.c
diff options
context:
space:
mode:
authorJC Kuo <jckuo@nvidia.com>2021-01-20 10:34:05 +0300
committerThierry Reding <treding@nvidia.com>2021-06-03 15:49:33 +0300
commitc339605cb0f6d33c9dc8ca73033c665573149f29 (patch)
tree779ce126c51cddec64bacb6367b54550ddfee2d3 /drivers/phy/tegra/xusb.c
parent2352fdb0d35e030089bf473b6e21b3f08895b33b (diff)
downloadlinux-c339605cb0f6d33c9dc8ca73033c665573149f29.tar.xz
phy: tegra: xusb: Add Tegra210 lane_iddq operation
As per Tegra210 TRM, before changing lane assignments, driver should keep lanes in IDDQ and sleep state; after changing lane assignments, driver should bring lanes out of IDDQ. This commit implements the required operations. Signed-off-by: JC Kuo <jckuo@nvidia.com> Acked-By: Vinod Koul <vkoul@kernel.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/phy/tegra/xusb.c')
-rw-r--r--drivers/phy/tegra/xusb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index 3110aafa8cf6..a34d304677bb 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -321,11 +321,17 @@ static void tegra_xusb_lane_program(struct tegra_xusb_lane *lane)
if (soc->num_funcs < 2)
return;
+ if (lane->pad->ops->iddq_enable)
+ lane->pad->ops->iddq_enable(lane);
+
/* choose function */
value = padctl_readl(padctl, soc->offset);
value &= ~(soc->mask << soc->shift);
value |= lane->function << soc->shift;
padctl_writel(padctl, value, soc->offset);
+
+ if (lane->pad->ops->iddq_disable)
+ lane->pad->ops->iddq_disable(lane);
}
static void tegra_xusb_pad_program(struct tegra_xusb_pad *pad)