[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <04aea865-693f-454c-9207-c00e67ad74cc@pengutronix.de>
Date: Fri, 19 Dec 2025 18:55:46 +0100
From: Ahmad Fatoum <a.fatoum@...gutronix.de>
To: Stefano Radaelli <stefano.radaelli21@...il.com>, vkoul@...nel.org,
neil.armstrong@...aro.org, shawnguo@...nel.org, s.hauer@...gutronix.de,
kernel@...gutronix.de, festevam@...il.com, linux-kernel@...r.kernel.org
Cc: imx@...ts.linux.dev, Pierluigi Passaro <pierluigi.p@...iscite.com>,
xu.yang_2@....com, Frank.Li@....com, haibo.chen@....com,
linux-phy@...ts.infradead.org, Stefano Radaelli <stefano.r@...iscite.com>,
Leonid Segal <leonids@...iscite.com>, jun.li@....com
Subject: Re: [PATCH v3] phy: fsl-imx8mq-usb: Clear the PCS_TX_SWING_FULL field
before using it
On 12/19/25 5:09 PM, Stefano Radaelli wrote:
> Clear the PCS_TX_SWING_FULL field mask before setting the new value
> in PHY_CTRL5 register. Without clearing the mask first, the OR operation
> could leave previously set bits, resulting in incorrect register
> configuration.
>
> Fixes: 63c85ad0cd81 ("phy: fsl-imx8mp-usb: add support for phy tuning")
> Suggested-by: Leonid Segal <leonids@...iscite.com>
> Acked-by: Pierluigi Passaro <pierluigi.p@...iscite.com>
> Signed-off-by: Stefano Radaelli <stefano.r@...iscite.com>
> Reviewed-by: Xu Yang <xu.yang_2@....com>
> Reviewed-by: Frank Li <Frank.Li@....com>
Reviewed-by: Ahmad Fatoum <a.fatoum@...gutronix.de>
> ---
> v3:
> - Fixed commit message line wrapping (75 chars)
> v2:
> - Improved commit subject as suggested by Fabio Estevam
>
> drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> index ad8a55012e42..9458b6e5fcf4 100644
> --- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> +++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> @@ -504,6 +504,7 @@ static void imx8m_phy_tune(struct imx8mq_usb_phy *imx_phy)
>
> if (imx_phy->pcs_tx_swing_full != PHY_TUNE_DEFAULT) {
> value = readl(imx_phy->base + PHY_CTRL5);
> + value &= ~PHY_CTRL5_PCS_TX_SWING_FULL_MASK;
> value |= FIELD_PREP(PHY_CTRL5_PCS_TX_SWING_FULL_MASK,
> imx_phy->pcs_tx_swing_full);
> writel(value, imx_phy->base + PHY_CTRL5);
>
> base-commit: ea1013c1539270e372fc99854bc6e4d94eaeff66
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists