From: sashiko-bot@kernel.org
To: "Xu Yang" <xu.yang_2@oss.nxp.com>
Cc: neil.armstrong@linaro.org, linux-phy@lists.infradead.org,
Frank.Li@kernel.org, olteanv@gmail.com, vkoul@kernel.org,
imx@lists.linux.dev
Subject: Re: [PATCH] phy: phy-snps-eusb2: fix FSEL_48_MHZ_VAL definition
Date: Tue, 08 Sep 2026 09:04:06 +0000 [thread overview]
Message-ID: <20260908090406.A0F241F00A3F@smtp.kernel.org> (raw)
In-Reply-To: <20260908085953.3315953-1-xu.yang_2@oss.nxp.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Missing FIELD_PREP() for EXYNOS_PHY_CFG_PLL_FB_DIV_11_8_MASK causes bits 11:8 to always evaluate to 0, breaking the 48MHz PLL configuration.
--
commit 8f10cea005e7c30e78e3855b1b3db039eba68023
Author: Xu Yang <xu.yang_2@nxp.com>
phy: phy-snps-eusb2: fix FSEL_48_MHZ_VAL definition
According to Synopsys eUSB2 PHY Databook, FSEL_48_MHZ_VAL should be 0x6
for supported 48 MHz reference clock.
> diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c
> index af4fa17ac6cbc..3cb18d6ebc1d2 100644
> --- a/drivers/phy/phy-snps-eusb2.c
> +++ b/drivers/phy/phy-snps-eusb2.c
> @@ -21,7 +21,7 @@
> #define FSEL_20_MHZ_VAL (0x1)
> #define FSEL_24_MHZ_VAL (0x2)
> #define FSEL_26_MHZ_VAL (0x3)
> -#define FSEL_48_MHZ_VAL (0x2)
> +#define FSEL_48_MHZ_VAL (0x6)
[Severity: High]
This is a pre-existing issue, but does the missing FIELD_PREP() prevent the
48MHz configuration from working on Exynos devices?
When using the 48MHz reference clock, EXYNOS_DIV_11_8_48_MHZ_VAL is 0x1.
However, in exynos_eusb2_ref_clk_init(), the PLL config is written without
shifting:
drivers/phy/phy-snps-eusb2.c:exynos_eusb2_ref_clk_init() {
snps_eusb2_hsphy_write_mask(phy->base, EXYNOS_USB_PHY_CFG_PLLCFG1,
EXYNOS_PHY_CFG_PLL_FB_DIV_11_8_MASK,
config->div_11_8_val);
}
Because snps_eusb2_hsphy_write_mask() applies the mask bitwise:
drivers/phy/phy-snps-eusb2.c:snps_eusb2_hsphy_write_mask() {
reg &= ~mask;
reg |= val & mask;
}
Since val is 0x1 and mask is EXYNOS_PHY_CFG_PLL_FB_DIV_11_8_MASK (0x0F00),
the bitwise AND evaluates to 0, leaving bits 11:8 zeroed.
Should FIELD_PREP() be used here to ensure the 48MHz configuration applies
properly?
>
> #define EXYNOS_USB_PHY_CFG_PLLCFG0 (0x8)
> #define PHY_CFG_PLL_FB_DIV_19_8_MASK GENMASK(19, 8)
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908085953.3315953-1-xu.yang_2@oss.nxp.com?part=1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2026-09-08 9:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 8:59 [PATCH] phy: phy-snps-eusb2: fix FSEL_48_MHZ_VAL definition Xu Yang
2026-09-08 9:04 ` sashiko-bot [this message]
2026-09-08 12:17 ` ivaylo
2026-09-09 2:49 ` Xu Yang
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=20260908090406.A0F241F00A3F@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=imx@lists.linux.dev \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=olteanv@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vkoul@kernel.org \
--cc=xu.yang_2@oss.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