From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Stefano Radaelli <stefano.radaelli21@gmail.com>,
vkoul@kernel.org, neil.armstrong@linaro.org, shawnguo@kernel.org,
s.hauer@pengutronix.de, kernel@pengutronix.de,
festevam@gmail.com, linux-kernel@vger.kernel.org
Cc: imx@lists.linux.dev,
Pierluigi Passaro <pierluigi.p@variscite.com>,
xu.yang_2@nxp.com, Frank.Li@nxp.com, haibo.chen@nxp.com,
linux-phy@lists.infradead.org,
Stefano Radaelli <stefano.r@variscite.com>,
Leonid Segal <leonids@variscite.com>,
jun.li@nxp.com
Subject: Re: [PATCH v3] phy: fsl-imx8mq-usb: Clear the PCS_TX_SWING_FULL field before using it
Date: Fri, 19 Dec 2025 18:55:46 +0100 [thread overview]
Message-ID: <04aea865-693f-454c-9207-c00e67ad74cc@pengutronix.de> (raw)
In-Reply-To: <20251219160912.561431-1-stefano.r@variscite.com>
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@variscite.com>
> Acked-by: Pierluigi Passaro <pierluigi.p@variscite.com>
> Signed-off-by: Stefano Radaelli <stefano.r@variscite.com>
> Reviewed-by: Xu Yang <xu.yang_2@nxp.com>
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.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 |
next prev parent reply other threads:[~2025-12-19 17:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 16:09 Stefano Radaelli
2025-12-19 16:12 ` Fabio Estevam
2025-12-19 17:55 ` Ahmad Fatoum [this message]
2025-12-23 17:33 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=04aea865-693f-454c-9207-c00e67ad74cc@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=Frank.Li@nxp.com \
--cc=festevam@gmail.com \
--cc=haibo.chen@nxp.com \
--cc=imx@lists.linux.dev \
--cc=jun.li@nxp.com \
--cc=kernel@pengutronix.de \
--cc=leonids@variscite.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=pierluigi.p@variscite.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=stefano.r@variscite.com \
--cc=stefano.radaelli21@gmail.com \
--cc=vkoul@kernel.org \
--cc=xu.yang_2@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®