]> git.ipfire.org Git - thirdparty/linux.git/commit
phy: tegra: xusb: Fix per-pad high-speed termination calibration
authorWayne Chang <waynec@nvidia.com>
Mon, 4 May 2026 03:33:05 +0000 (11:33 +0800)
committerVinod Koul <vkoul@kernel.org>
Sun, 10 May 2026 11:31:18 +0000 (17:01 +0530)
commitda110228b54f2e2143d97ea7151e0dc22e539d67
tree453c86b5f8b71361d0a1e5ad5a25393e966a0f44
parent91ddf6f722084383fb05be731c0107814b055c0c
phy: tegra: xusb: Fix per-pad high-speed termination calibration

The existing code reads a single hs_term_range_adj value from bit field
[10:7] of FUSE_SKU_CALIB_0 and applies it to all USB2 pads uniformly.
However, on SoCs that support per-pad termination, each pad has its own
hs_term_range_adj field: pad 0 in FUSE_SKU_CALIB_0[10:7], and pads 1-3
in FUSE_USB_CALIB_EXT_0 at bit offsets [8:5], [12:9], and [16:13]
respectively.

Fix the calibration by reading per-pad values from the appropriate fuse
registers. For SoCs that do not support per-pad termination, replicate
pad 0's value to all pads to maintain existing behavior.

Add a has_per_pad_term flag to the SoC data to indicate whether per-pad
termination values are available in FUSE_USB_CALIB_EXT_0.

Fixes: 1ef535c6ba8e ("phy: tegra: xusb: Add Tegra194 support")
Cc: stable@vger.kernel.org
Signed-off-by: Wayne Chang <waynec@nvidia.com>
Signed-off-by: Wei-Cheng Chen <weichengc@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://patch.msgid.link/20260504033305.2283145-1-weichengc@nvidia.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/tegra/xusb-tegra186.c
drivers/phy/tegra/xusb.h