]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
phy: qcom: phy-qcom-m31: Update IPQ5332 M31 USB phy initialization sequence
authorKathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
Mon, 30 Jun 2025 08:18:13 +0000 (13:48 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:34:25 +0000 (16:34 +0200)
commit 4a3556b81b99f0c8c0358f7cc6801a62b4538fe2 upstream.

The current configuration used for the IPQ5332 M31 USB PHY fails the
Near End High Speed Signal Quality compliance test. To resolve this,
update the initialization sequence as specified in the Hardware Design
Document.

Fixes: 08e49af50701 ("phy: qcom: Introduce M31 USB PHY driver")
Cc: stable@kernel.org
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250630-ipq5332_hsphy_complaince-v2-1-63621439ebdb@oss.qualcomm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/phy/qualcomm/phy-qcom-m31.c

index 20d4c020a83c1f7566533e0e8de5b7cd796415ad..8b0f8a3a059c21743c9024c49f76b5d52ac6ab1e 100644 (file)
  #define USB2_0_TX_ENABLE              BIT(2)
 
 #define USB2PHY_USB_PHY_M31_XCFGI_4    0xc8
- #define HSTX_SLEW_RATE_565PS          GENMASK(1, 0)
+ #define HSTX_SLEW_RATE_400PS          GENMASK(2, 0)
  #define PLL_CHARGING_PUMP_CURRENT_35UA        GENMASK(4, 3)
  #define ODT_VALUE_38_02_OHM           GENMASK(7, 6)
 
 #define USB2PHY_USB_PHY_M31_XCFGI_5    0xcc
- #define ODT_VALUE_45_02_OHM           BIT(2)
  #define HSTX_PRE_EMPHASIS_LEVEL_0_55MA        BIT(0)
 
+#define USB2PHY_USB_PHY_M31_XCFGI_9    0xdc
+ #define HSTX_CURRENT_17_1MA_385MV     BIT(1)
+
 #define USB2PHY_USB_PHY_M31_XCFGI_11   0xe4
  #define XCFG_COARSE_TUNE_NUM          BIT(1)
  #define XCFG_FINE_TUNE_NUM            BIT(3)
@@ -164,7 +166,7 @@ static struct m31_phy_regs m31_ipq5332_regs[] = {
        },
        {
                USB2PHY_USB_PHY_M31_XCFGI_4,
-               HSTX_SLEW_RATE_565PS | PLL_CHARGING_PUMP_CURRENT_35UA | ODT_VALUE_38_02_OHM,
+               HSTX_SLEW_RATE_400PS | PLL_CHARGING_PUMP_CURRENT_35UA | ODT_VALUE_38_02_OHM,
                0
        },
        {
@@ -174,9 +176,13 @@ static struct m31_phy_regs m31_ipq5332_regs[] = {
        },
        {
                USB2PHY_USB_PHY_M31_XCFGI_5,
-               ODT_VALUE_45_02_OHM | HSTX_PRE_EMPHASIS_LEVEL_0_55MA,
+               HSTX_PRE_EMPHASIS_LEVEL_0_55MA,
                4
        },
+       {
+               USB2PHY_USB_PHY_M31_XCFGI_9,
+               HSTX_CURRENT_17_1MA_385MV,
+       },
        {
                USB_PHY_UTMI_CTRL5,
                0x0,