From: sashiko-bot@kernel.org
To: "Varadarajan Narayanan" <varadarajan.narayanan@oss.qualcomm.com>
Cc: vkoul@kernel.org, devicetree@vger.kernel.org,
neil.armstrong@linaro.org, olteanv@gmail.com, robh@kernel.org,
linux-phy@lists.infradead.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 6/6] phy: qcom: snps-femto-v2: Add IPQ9650 support
Date: Tue, 06 Oct 2026 05:39:53 +0000 [thread overview]
Message-ID: <20261006053954.5D9581F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261006-phy-v5-6-cbe9330a6449@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] phy: qcom: missing SIDDQ clear in 6nm PHY post-tuning
- [Low] build: missing <linux/bitfield.h> for FIELD_PREP_CONST
--
commit bd845c9b97c7b3b1c9ec07fec6daa12f9b0766d5
Author: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
phy: qcom: snps-femto-v2: Add IPQ9650 support
Add the 6 nm SNPS femto USB2 PHY configuration needed by IPQ9650.
The PHYs on this SoC require a dedicated init sequence and override
parameters before they can be enabled.
> diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
> index 2e37b39dabbaa..3ed4292fc8c30 100644
> --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
> +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
> @@ -29,12 +29,15 @@
>
> #define USB2_PHY_USB_PHY_UTMI_CTRL5 (0x50)
> #define POR BIT(1)
> +#define ATERESET BIT(0)
>
> #define USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0 (0x54)
> #define SIDDQ BIT(2)
> #define RETENABLEN BIT(3)
> #define FSEL_MASK GENMASK(6, 4)
> #define FSEL_DEFAULT (0x3 << 4)
> +#define FSEL_24MHZ FIELD_PREP_CONST(FSEL_MASK, 2)
[Severity: Low]
Is it possible this could cause build failures on architectures where
linux/bitfield.h is not transitively included? Relying on transitive
header inclusions might break when implicit include chains differ.
[ ... ]
> @@ -418,6 +442,32 @@ static const struct phy_reg_config hs_5nm_phy_post_tuning[] = {
> { USB2_PHY_USB_PHY_CFG0, UTMI_PHY_CMN_CTRL_OVERRIDE_EN, 0 },
> };
>
> +static const struct phy_reg_config hs_6nm_phy_pre_tuning[] = {
> + { USB2_PHY_USB_PHY_CFG0, UTMI_PHY_CMN_CTRL_OVERRIDE_EN, UTMI_PHY_CMN_CTRL_OVERRIDE_EN },
> + { USB2_PHY_USB_PHY_UTMI_CTRL5, POR, POR },
> + { USB2_PHY_USB_PHY_FSEL_SEL, FSEL_SEL, FSEL_SEL },
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0, FSEL_MASK, FSEL_24MHZ },
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON1, PLLBTUNE, PLLBTUNE },
> + { USB2_PHY_USB_PHY_REFCLK_CTRL, REFCLK_SEL_MASK, REFCLK_SEL_DEFAULT },
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON1, VBUSVLDEXTSEL0, VBUSVLDEXTSEL0 },
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL1, VBUSVLDEXT0, VBUSVLDEXT0 },
> +};
> +
> +static const struct phy_reg_config hs_6nm_phy_post_tuning[] = {
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON2, VREGBYPASS, VREGBYPASS },
> + { USB2_PHY_USB_PHY_UTMI_CTRL5, ATERESET, 0 },
> + { USB2_PHY_USB_PHY_HS_PHY_TEST1, TESTDATAOUTSEL, 0 },
> + { USB2_PHY_USB_PHY_HS_PHY_TEST1, TESTCLK, 0 },
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0, VATESTENB_MASK, 0 },
[Severity: Medium]
Does this sequence intentionally omit clearing the SIDDQ deep sleep bit?
If the analog PHY defaults to deep sleep (SIDDQ=1), omitting the clear
operation could leave the PHY powered down and non-functional during boot
or interface initialization.
Looking at hs_5nm_phy_post_tuning(), it explicitly clears the SIDDQ bit:
{ USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0, SIDDQ, 0 }
Could the 6nm hardware behavior identically match the 5nm/7nm and other
Synopsys PHYs where SIDDQ defaults to 1, requiring it to be cleared here?
> + { USB2_PHY_USB_PHY_HS_PHY_TEST0, TESTDATAIN_MASK, 0 },
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL2, USB2_SUSPEND_N_SEL | USB2_SUSPEND_N,
> + USB2_SUSPEND_N_SEL | USB2_SUSPEND_N },
> + { USB2_PHY_USB_PHY_UTMI_CTRL0, SLEEPM, SLEEPM },
> + { USB2_PHY_USB_PHY_UTMI_CTRL5, POR, 0 },
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL2, USB2_SUSPEND_N_SEL, 0 },
> + { USB2_PHY_USB_PHY_CFG0, UTMI_PHY_CMN_CTRL_OVERRIDE_EN, 0 },
> +};
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261006-phy-v5-0-cbe9330a6449@oss.qualcomm.com?part=6
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
WARNING: multiple messages have this Message-ID (diff)
From: sashiko-bot@kernel.org
To: "Varadarajan Narayanan" <varadarajan.narayanan@oss.qualcomm.com>
Cc: vkoul@kernel.org, devicetree@vger.kernel.org,
neil.armstrong@linaro.org, olteanv@gmail.com, robh@kernel.org,
linux-phy@lists.infradead.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 6/6] phy: qcom: snps-femto-v2: Add IPQ9650 support
Date: Tue, 06 Oct 2026 05:39:53 +0000 [thread overview]
Message-ID: <20261006053954.5D9581F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261006-phy-v5-6-cbe9330a6449@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] phy: qcom: missing SIDDQ clear in 6nm PHY post-tuning
- [Low] build: missing <linux/bitfield.h> for FIELD_PREP_CONST
--
commit bd845c9b97c7b3b1c9ec07fec6daa12f9b0766d5
Author: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
phy: qcom: snps-femto-v2: Add IPQ9650 support
Add the 6 nm SNPS femto USB2 PHY configuration needed by IPQ9650.
The PHYs on this SoC require a dedicated init sequence and override
parameters before they can be enabled.
> diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
> index 2e37b39dabbaa..3ed4292fc8c30 100644
> --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
> +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
> @@ -29,12 +29,15 @@
>
> #define USB2_PHY_USB_PHY_UTMI_CTRL5 (0x50)
> #define POR BIT(1)
> +#define ATERESET BIT(0)
>
> #define USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0 (0x54)
> #define SIDDQ BIT(2)
> #define RETENABLEN BIT(3)
> #define FSEL_MASK GENMASK(6, 4)
> #define FSEL_DEFAULT (0x3 << 4)
> +#define FSEL_24MHZ FIELD_PREP_CONST(FSEL_MASK, 2)
[Severity: Low]
Is it possible this could cause build failures on architectures where
linux/bitfield.h is not transitively included? Relying on transitive
header inclusions might break when implicit include chains differ.
[ ... ]
> @@ -418,6 +442,32 @@ static const struct phy_reg_config hs_5nm_phy_post_tuning[] = {
> { USB2_PHY_USB_PHY_CFG0, UTMI_PHY_CMN_CTRL_OVERRIDE_EN, 0 },
> };
>
> +static const struct phy_reg_config hs_6nm_phy_pre_tuning[] = {
> + { USB2_PHY_USB_PHY_CFG0, UTMI_PHY_CMN_CTRL_OVERRIDE_EN, UTMI_PHY_CMN_CTRL_OVERRIDE_EN },
> + { USB2_PHY_USB_PHY_UTMI_CTRL5, POR, POR },
> + { USB2_PHY_USB_PHY_FSEL_SEL, FSEL_SEL, FSEL_SEL },
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0, FSEL_MASK, FSEL_24MHZ },
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON1, PLLBTUNE, PLLBTUNE },
> + { USB2_PHY_USB_PHY_REFCLK_CTRL, REFCLK_SEL_MASK, REFCLK_SEL_DEFAULT },
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON1, VBUSVLDEXTSEL0, VBUSVLDEXTSEL0 },
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL1, VBUSVLDEXT0, VBUSVLDEXT0 },
> +};
> +
> +static const struct phy_reg_config hs_6nm_phy_post_tuning[] = {
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON2, VREGBYPASS, VREGBYPASS },
> + { USB2_PHY_USB_PHY_UTMI_CTRL5, ATERESET, 0 },
> + { USB2_PHY_USB_PHY_HS_PHY_TEST1, TESTDATAOUTSEL, 0 },
> + { USB2_PHY_USB_PHY_HS_PHY_TEST1, TESTCLK, 0 },
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0, VATESTENB_MASK, 0 },
[Severity: Medium]
Does this sequence intentionally omit clearing the SIDDQ deep sleep bit?
If the analog PHY defaults to deep sleep (SIDDQ=1), omitting the clear
operation could leave the PHY powered down and non-functional during boot
or interface initialization.
Looking at hs_5nm_phy_post_tuning(), it explicitly clears the SIDDQ bit:
{ USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0, SIDDQ, 0 }
Could the 6nm hardware behavior identically match the 5nm/7nm and other
Synopsys PHYs where SIDDQ defaults to 1, requiring it to be cleared here?
> + { USB2_PHY_USB_PHY_HS_PHY_TEST0, TESTDATAIN_MASK, 0 },
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL2, USB2_SUSPEND_N_SEL | USB2_SUSPEND_N,
> + USB2_SUSPEND_N_SEL | USB2_SUSPEND_N },
> + { USB2_PHY_USB_PHY_UTMI_CTRL0, SLEEPM, SLEEPM },
> + { USB2_PHY_USB_PHY_UTMI_CTRL5, POR, 0 },
> + { USB2_PHY_USB_PHY_HS_PHY_CTRL2, USB2_SUSPEND_N_SEL, 0 },
> + { USB2_PHY_USB_PHY_CFG0, UTMI_PHY_CMN_CTRL_OVERRIDE_EN, 0 },
> +};
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261006-phy-v5-0-cbe9330a6449@oss.qualcomm.com?part=6
next prev parent reply other threads:[~2026-10-06 5:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 5:29 [PATCH v5 0/6] Add support for USB phys in IPQ9650 Varadarajan Narayanan
2026-10-06 5:29 ` Varadarajan Narayanan
2026-10-06 5:29 ` [PATCH v5 1/6] dt-bindings: phy: qcom,qmp-usb: Add IPQ9650 USB3 PHY Varadarajan Narayanan
2026-10-06 5:29 ` Varadarajan Narayanan
2026-10-06 5:29 ` [PATCH v5 2/6] dt-bindings: phy: qcom,usb-snps-femto-v2: Add IPQ9650 compatible Varadarajan Narayanan
2026-10-06 5:29 ` Varadarajan Narayanan
2026-10-06 5:29 ` [PATCH v5 3/6] phy: qcom: qmp-usb: Add IPQ9650 USB3 PHY configuration Varadarajan Narayanan
2026-10-06 5:29 ` Varadarajan Narayanan
2026-10-06 5:29 ` [PATCH v5 4/6] phy: qcom: snps-femto-v2: Fix order of arguments to qcom_snps_hsphy_write_mask Varadarajan Narayanan
2026-10-06 5:29 ` Varadarajan Narayanan
2026-10-06 5:29 ` [PATCH v5 5/6] phy: qcom: snps-femto-v2: Move PHY init registers to config tables Varadarajan Narayanan
2026-10-06 5:29 ` Varadarajan Narayanan
2026-10-06 5:29 ` [PATCH v5 6/6] phy: qcom: snps-femto-v2: Add IPQ9650 support Varadarajan Narayanan
2026-10-06 5:29 ` Varadarajan Narayanan
2026-10-06 5:39 ` sashiko-bot [this message]
2026-10-06 5:39 ` sashiko-bot
2026-10-07 11:00 ` kernel test robot
2026-10-07 11:00 ` kernel test robot
2026-10-07 11:32 ` kernel test robot
2026-10-07 11:32 ` kernel test robot
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=20261006053954.5D9581F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=olteanv@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=varadarajan.narayanan@oss.qualcomm.com \
--cc=vkoul@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.