Skip to content

Commit 65663be

Browse files
committed
phy: tegra: xusb: Disable trk clk when not in use
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2122414 Upstream Status: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git Tested: Verify USB-A and USB-C are functional on Nvidia Orin board, and no regressions on other platforms. commit e5f9124 Author: Wayne Chang <waynec@nvidia.com> Date: Wed Jan 11 11:04:48 2023 +0000 phy: tegra: xusb: Disable trk clk when not in use Pad tracking is a one-time calibration for Tegra186 and Tegra194. Clk should be disabled after calibration. Disable clk after calibration. While at it add 100us delay for HW recording the calibration value. Signed-off-by: Wayne Chang <waynec@nvidia.com> Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Link: https://lore.kernel.org/r/20230111110450.24617-5-jonathanh@nvidia.com Signed-off-by: Vinod Koul <vkoul@kernel.org> (cherry picked from commit e5f9124) Signed-off-by: David Marlin <dmarlin@redhat.com>
1 parent 4941c49 commit 65663be

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/phy/tegra/xusb-tegra186.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,10 @@ static void tegra186_utmi_bias_pad_power_on(struct tegra_xusb_padctl *padctl)
609609
value &= ~USB2_PD_TRK;
610610
padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL1);
611611

612+
udelay(100);
613+
614+
clk_disable_unprepare(priv->usb2_trk_clk);
615+
612616
mutex_unlock(&padctl->lock);
613617
}
614618

@@ -633,8 +637,6 @@ static void tegra186_utmi_bias_pad_power_off(struct tegra_xusb_padctl *padctl)
633637
value |= USB2_PD_TRK;
634638
padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL1);
635639

636-
clk_disable_unprepare(priv->usb2_trk_clk);
637-
638640
mutex_unlock(&padctl->lock);
639641
}
640642

0 commit comments

Comments
 (0)