]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
phy: tegra: xusb: Explicitly configure HS_DISCON_LEVEL to 0x7
authorWayne Chang <waynec@nvidia.com>
Fri, 12 Dec 2025 03:21:16 +0000 (11:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Feb 2026 15:43:58 +0000 (16:43 +0100)
commit b246caa68037aa495390a60d080acaeb84f45fff upstream.

The USB2 Bias Pad Control register manages analog parameters for signal
detection. Previously, the HS_DISCON_LEVEL relied on hardware reset
values, which may lead to the detection failure.

Explicitly configure HS_DISCON_LEVEL to 0x7. This ensures the disconnect
threshold is sufficient to guarantee reliable detection.

Fixes: bbf711682cd5 ("phy: tegra: xusb: Add Tegra186 support")
Cc: stable@vger.kernel.org
Signed-off-by: Wayne Chang <waynec@nvidia.com>
Link: https://patch.msgid.link/20251212032116.768307-1-waynec@nvidia.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/phy/tegra/xusb-tegra186.c

index 1dac290e5457047e4683ee843b47002911a3781e..b36c1e954f3182d9fe3b2af3d8940c7341886bc5 100644 (file)
@@ -84,6 +84,7 @@
 #define XUSB_PADCTL_USB2_BIAS_PAD_CTL0         0x284
 #define  BIAS_PAD_PD                           BIT(11)
 #define  HS_SQUELCH_LEVEL(x)                   (((x) & 0x7) << 0)
+#define  HS_DISCON_LEVEL(x)                    (((x) & 0x7) << 3)
 
 #define XUSB_PADCTL_USB2_BIAS_PAD_CTL1         0x288
 #define  USB2_TRK_START_TIMER(x)               (((x) & 0x7f) << 12)
@@ -601,6 +602,8 @@ static void tegra186_utmi_bias_pad_power_on(struct tegra_xusb_padctl *padctl)
        value &= ~BIAS_PAD_PD;
        value &= ~HS_SQUELCH_LEVEL(~0);
        value |= HS_SQUELCH_LEVEL(priv->calib.hs_squelch);
+       value &= ~HS_DISCON_LEVEL(~0);
+       value |= HS_DISCON_LEVEL(0x7);
        padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL0);
 
        udelay(1);