From c4b5c4cf6cedeca72c0a627df19ada59ec664a80 Mon Sep 17 00:00:00 2001 From: Peter Chen Date: Wed, 22 Aug 2018 16:44:21 +0800 Subject: [PATCH] MLK-19442-2 phy: phy-fsl-imx8mq-usb: change ssc_range value According to IC engineer suggestion, set ssc_range as -4003 ppm will have more tolerence for EMI, and suitable for more boards. Besides, one customer board needs to set this value to pass TX SSC test. Signed-off-by: Peter Chen Signed-off-by: Li Jun (cherry picked from commit a48a65a40113b9b5d40114d02a5877d089f523a9) --- drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c index 2861e6dfd14a..e31ecfb4c901 100644 --- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c +++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c @@ -15,6 +15,8 @@ #define PHY_CTRL0_FSEL_MASK GENMASK(5, 10) #define PHY_CTRL0_FSEL_24M 0x2a #define PHY_CTRL0_FSEL_100M 0x27 +#define PHY_CTRL0_SSC_RANGE_MASK GENMASK(21, 23) +#define PHY_CTRL0_SSC_RANGE_4003PPM (0x2 << 21) #define PHY_CTRL1 0x4 #define PHY_CTRL1_RESET BIT(0) @@ -51,6 +53,8 @@ static int imx8mq_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 |= PHY_CTRL0_SSC_RANGE_4003PPM; writel(value, imx_phy->base + PHY_CTRL0); value = readl(imx_phy->base + PHY_CTRL2);