]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
phy: fsl-imx8mq-usb: change ssc_range value for i.MX8MQ
authorXu Yang <xu.yang_2@nxp.com>
Fri, 19 Dec 2025 08:13:54 +0000 (16:13 +0800)
committerVinod Koul <vkoul@kernel.org>
Tue, 23 Dec 2025 17:41:03 +0000 (23:11 +0530)
According to IC engineer suggestion, set ssc_range as -4003 ppm
will have more tolerance for EMI, and suitable for more boards.
Besides, it's confirmed that with this setting the TX SSC test
will pass on one customer board.

Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20251219081354.3806806-1-xu.yang_2@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/freescale/phy-fsl-imx8mq-usb.c

index ad8a55012e42f2c15496955d00c6d5fd85c5beb2..64efa49945e334bc2ebb8d248d93c6c3713a3f22 100644 (file)
 #define PHY_CTRL0_FSEL_MASK            GENMASK(10, 5)
 #define PHY_CTRL0_FSEL_24M             0x2a
 #define PHY_CTRL0_FSEL_100M            0x27
+#define PHY_CTRL0_SSC_RANGE_MASK       GENMASK(23, 21)
+#define PHY_CTRL0_SSC_RANGE_4003PPM    0x2
+#define PHY_CTRL0_SSC_RANGE_4492PPM    0x1
+#define PHY_CTRL0_SSC_RANGE_4980PPM    0x0
 
 #define PHY_CTRL1                      0x4
 #define PHY_CTRL1_RESET                        BIT(0)
@@ -600,6 +604,9 @@ static int imx8mp_usb_phy_init(struct phy *phy)
 
        value = readl(imx_phy->base + PHY_CTRL0);
        value |= PHY_CTRL0_REF_SSP_EN;
+       value &= ~PHY_CTRL0_SSC_RANGE_MASK;
+       value |= FIELD_PREP(PHY_CTRL0_SSC_RANGE_MASK,
+                           PHY_CTRL0_SSC_RANGE_4003PPM);
        writel(value, imx_phy->base + PHY_CTRL0);
 
        value = readl(imx_phy->base + PHY_CTRL2);