diff options
author | JC Kuo <jckuo@nvidia.com> | 2021-01-20 15:34:05 +0800 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2021-06-03 14:49:33 +0200 |
commit | c339605cb0f6d33c9dc8ca73033c665573149f29 (patch) | |
tree | 779ce126c51cddec64bacb6367b54550ddfee2d3 /drivers/phy/tegra/xusb.c | |
parent | 2352fdb0d35e030089bf473b6e21b3f08895b33b (diff) | |
download | lwn-c339605cb0f6d33c9dc8ca73033c665573149f29.tar.gz lwn-c339605cb0f6d33c9dc8ca73033c665573149f29.zip |
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.c | 6 |
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) |