* [PATCH 0/2] Add support for SA8255P in the phy-qcom-snps-femto-v2 phy driver
@ 2026-07-30 13:58 Mattijs Korpershoek
2026-07-30 13:58 ` [PATCH 1/2] dt-bindings: phy: Add sa8255p high-speed USB PHY Mattijs Korpershoek
2026-07-30 13:58 ` [PATCH 2/2] phy: qcom-snps-femto-v2: Add support for SA8255P Mattijs Korpershoek
0 siblings, 2 replies; 6+ messages in thread
From: Mattijs Korpershoek @ 2026-07-30 13:58 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Philipp Zabel
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel,
Mattijs Korpershoek, Sriram Dash
The Qualcomm automotive SA8255p SoC relies on firmware to configure
platform resources, including clocks, interconnects and TLMM.
The driver requests resources operations over SCMI using power protocols.
The SCMI power protocol enables or disables resources like clocks,
interconnect paths, and TLMM (GPIOs) using runtime PM framework APIs,
such as resume/suspend, to control power on/off.
Power domain "core" controls the GDSC, resets, and TLMM (GPIOs)
whereas power domain "transfer" controls clocks and interconnects.
Patch 1 adds the binding for sa8255p. Similarly to what has been done
for I2C [1], this is a separate binding.
Patch 2 adds the driver change, which is based on a public vendor
patch from qualcomm [2].
I did the following changes on top of that:
* Use devm_add_action_or_reset() for dev_pm_domain_detach_list() instead
of implementing a driver .remove()
* Changed power domain names to drop 'usb_' prefix
* Fixed various error handling paths
* Added suspend/resume support
This has been tested on next-20260728 with a Ride4 SA8775P board that
has SCMI firmware (which is compatible).
[1] https://lore.kernel.org/all/20260617-enable-i2c-on-sa8255p-v7-1-ad736dbeab57@oss.qualcomm.com/
[2] https://git.codelinaro.org/clo/le/meta-qti-auto-kernel/-/blob/LY.AU.0.1.0.r1-16800-gen4meta.0/recipes-kernel/linux/files/usb/0014-PENDING-phy-qcom-snps-femto-v2-Add-support-for-SA825.patch
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
---
Mattijs Korpershoek (1):
dt-bindings: phy: Add sa8255p high-speed USB PHY
Sriram Dash (1):
phy: qcom-snps-femto-v2: Add support for SA8255P
.../bindings/phy/qcom,sa8255p-usb-hs-phy.yaml | 52 +++++++++
drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 126 +++++++++++++++++++--
2 files changed, 169 insertions(+), 9 deletions(-)
---
base-commit: 3652b49adac266a3d27cb41cdfdb7d8790fc3633
change-id: 20260729-phy-qcom-snps-femto-v2-8255-90ffe7674001
Best regards,
--
Mattijs Korpershoek <mkorpershoek@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] dt-bindings: phy: Add sa8255p high-speed USB PHY
2026-07-30 13:58 [PATCH 0/2] Add support for SA8255P in the phy-qcom-snps-femto-v2 phy driver Mattijs Korpershoek
@ 2026-07-30 13:58 ` Mattijs Korpershoek
2026-07-30 14:06 ` sashiko-bot
2026-07-30 13:58 ` [PATCH 2/2] phy: qcom-snps-femto-v2: Add support for SA8255P Mattijs Korpershoek
1 sibling, 1 reply; 6+ messages in thread
From: Mattijs Korpershoek @ 2026-07-30 13:58 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Philipp Zabel
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel,
Mattijs Korpershoek
SA8255p platform abstracts resources such as clocks, interconnect and
GPIO pins configuration in Firmware. SCMI power protocol is used to
request resource configurations.
Two power domains can be requested: transfer and core.
transfer controls clocks and interconnects and core controls
the GDSC, resets and TLMM (GPIOs).
Add a new binding for the Qualcomm SA8255p Synopsys Femto High-Speed
USB PHY V2 found in SA8255P.
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
---
.../bindings/phy/qcom,sa8255p-usb-hs-phy.yaml | 52 ++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/qcom,sa8255p-usb-hs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sa8255p-usb-hs-phy.yaml
new file mode 100644
index 000000000000..09f7ca6e7f72
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom,sa8255p-usb-hs-phy.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/qcom,sa8255p-usb-hs-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SA8255p Synopsys Femto High-Speed USB PHY V2
+
+maintainers:
+ - Mattijs Korpershoek <mkorpershoek@kernel.org>
+
+properties:
+ compatible:
+ const: qcom,sa8255p-usb-hs-phy
+
+ reg:
+ maxItems: 1
+
+ "#phy-cells":
+ const: 0
+
+ power-domains:
+ maxItems: 2
+
+ power-domain-names:
+ items:
+ - const: transfer
+ - const: core
+
+required:
+ - compatible
+ - reg
+ - "#phy-cells"
+ - power-domains
+ - power-domain-names
+
+additionalProperties: false
+
+examples:
+ - |
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ phy@88e4000 {
+ compatible = "qcom,sa8255p-usb-hs-phy";
+ reg = <0x0 0x088e4000 0x0 0x120>;
+ #phy-cells = <0>;
+ power-domains = <&scmi12_pd 0>, <&scmi12_pd 1>;
+ power-domain-names = "transfer", "core";
+ };
+ };
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] phy: qcom-snps-femto-v2: Add support for SA8255P
2026-07-30 13:58 [PATCH 0/2] Add support for SA8255P in the phy-qcom-snps-femto-v2 phy driver Mattijs Korpershoek
2026-07-30 13:58 ` [PATCH 1/2] dt-bindings: phy: Add sa8255p high-speed USB PHY Mattijs Korpershoek
@ 2026-07-30 13:58 ` Mattijs Korpershoek
2026-07-30 14:13 ` sashiko-bot
1 sibling, 1 reply; 6+ messages in thread
From: Mattijs Korpershoek @ 2026-07-30 13:58 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Philipp Zabel
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel,
Mattijs Korpershoek, Sriram Dash
From: Sriram Dash <quic_sriramd@quicinc.com>
The Qualcomm automotive SA8255p SoC relies on firmware to configure
platform resources, including clocks, interconnects and TLMM.
The driver requests resources operations over SCMI using power protocols.
The SCMI power protocol enables or disables resources like clocks,
interconnect paths, and TLMM (GPIOs) using runtime PM framework APIs,
such as resume/suspend, to control power on/off.
Power domain "core" controls the GDSC, resets, and TLMM (GPIOs)
whereas power domain "transfer" controls clocks and interconnects.
In this variant, two disjoint sets of resources are modeled against
the power domain suppliers which can be turned on/off to achieve modeled
device states. Two modeled low power states d1 and d3 are supported.
transition: d0 <--> d3 :: both core and transfer suppliers
transition: d0 <--> d1 :: only transfer supplier
Signed-off-by: Sriram Dash <quic_sriramd@quicinc.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
---
drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 126 ++++++++++++++++++++++++--
1 file changed, 117 insertions(+), 9 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
index eb0b0f61d98e..4a9bd3ae0e53 100644
--- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
+++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
@@ -12,6 +12,7 @@
#include <linux/of.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
+#include <linux/pm_domain.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/reset.h>
@@ -95,6 +96,7 @@ struct override_param_map {
u8 table_size;
u8 reg_offset;
u8 param_mask;
+ bool fw_managed;
};
struct phy_override_seq {
@@ -121,6 +123,7 @@ struct phy_override_seq {
* @phy_initialized: if PHY has been initialized correctly
* @mode: contains the current mode the PHY is in
* @update_seq_cfg: tuning parameters for phy init
+ * @pd_list: list of power domains associated with the device
*/
struct qcom_snps_hsphy {
struct device *dev;
@@ -136,8 +139,81 @@ struct qcom_snps_hsphy {
bool phy_initialized;
enum phy_mode mode;
struct phy_override_seq update_seq_cfg[NUM_HSPHY_TUNING_PARAMS];
+
+ struct dev_pm_domain_list *pd_list;
};
+static void qcom_snps_domain_detach(void *data)
+{
+ struct qcom_snps_hsphy *hsphy = data;
+
+ dev_pm_domain_detach_list(hsphy->pd_list);
+}
+
+static int qcom_snps_domain_attach(struct qcom_snps_hsphy *hsphy)
+{
+ struct dev_pm_domain_attach_data pd_data = {
+ .pd_flags = PD_FLAG_NO_DEV_LINK,
+ .pd_names = (const char*[]) { "transfer", "core" },
+ .num_pd_names = 2,
+ };
+ struct device *dev = hsphy->dev;
+ int ret;
+
+ ret = dev_pm_domain_attach_list(dev, &pd_data, &hsphy->pd_list);
+ if (ret < 0)
+ return dev_err_probe(dev, ret, "domain attach failed\n");
+
+ return 0;
+}
+
+/* d3_to_d0 transition by turning on all the suppliers */
+static int qcom_snps_d3_to_d0(struct qcom_snps_hsphy *hsphy)
+{
+ int ret;
+
+ if (!hsphy->pd_list)
+ return 0;
+
+ ret = pm_runtime_resume_and_get(hsphy->pd_list->pd_devs[0]);
+ if (ret)
+ return ret;
+
+ ret = pm_runtime_resume_and_get(hsphy->pd_list->pd_devs[1]);
+ if (ret)
+ pm_runtime_put_sync(hsphy->pd_list->pd_devs[0]);
+
+ return ret;
+}
+
+/* d0_to_d3 transition by turning off all the suppliers */
+static void qcom_snps_d0_to_d3(struct qcom_snps_hsphy *hsphy)
+{
+ if (!hsphy->pd_list)
+ return;
+
+ pm_runtime_put_sync(hsphy->pd_list->pd_devs[1]);
+ pm_runtime_put_sync(hsphy->pd_list->pd_devs[0]);
+}
+
+/* d1_to_d0 transition by turning on the 'transfer' supplier */
+static int qcom_snps_d1_to_d0(struct qcom_snps_hsphy *hsphy)
+{
+ if (!hsphy->pd_list)
+ return 0;
+
+ return pm_runtime_resume_and_get(hsphy->pd_list->pd_devs[0]);
+}
+
+/* d0_to_d1 transition by turning off the 'transfer' supplier */
+static void qcom_snps_d0_to_d1(struct qcom_snps_hsphy *hsphy)
+{
+ if (!hsphy->pd_list)
+ return;
+
+ pm_runtime_put_sync(hsphy->pd_list->pd_devs[0]);
+}
+
static int qcom_snps_hsphy_clk_init(struct qcom_snps_hsphy *hsphy)
{
struct device *dev = hsphy->dev;
@@ -196,6 +272,8 @@ static int qcom_snps_hsphy_suspend(struct qcom_snps_hsphy *hsphy)
0, USB2_AUTO_RESUME);
}
+ qcom_snps_d0_to_d1(hsphy);
+
return 0;
}
@@ -203,7 +281,7 @@ static int qcom_snps_hsphy_resume(struct qcom_snps_hsphy *hsphy)
{
dev_dbg(&hsphy->phy->dev, "Resume QCOM SNPS PHY, mode\n");
- return 0;
+ return qcom_snps_d1_to_d0(hsphy);
}
static int __maybe_unused qcom_snps_hsphy_runtime_suspend(struct device *dev)
@@ -316,6 +394,10 @@ static const struct override_param ls_fs_output_impedance_sc7280[] = {
{ 1310, 0 },
};
+static const struct override_param_map sa8255p_snps_hs_phy = {
+ .fw_managed = true,
+};
+
static const struct override_param_map sc7280_snps_7nm_phy[] = {
{
"qcom,hs-disconnect-bp",
@@ -390,9 +472,15 @@ static int qcom_snps_hsphy_init(struct phy *phy)
dev_vdbg(&phy->dev, "%s(): Initializing SNPS HS phy\n", __func__);
+ ret = qcom_snps_d3_to_d0(hsphy);
+ if (ret < 0) {
+ dev_err(hsphy->dev, "Failed to transition to d0 state\n");
+ return ret;
+ }
+
ret = regulator_bulk_enable(ARRAY_SIZE(hsphy->vregs), hsphy->vregs);
if (ret)
- return ret;
+ goto transition_to_d3;
ret = clk_bulk_prepare_enable(hsphy->num_clks, hsphy->clks);
if (ret) {
@@ -472,6 +560,8 @@ static int qcom_snps_hsphy_init(struct phy *phy)
clk_bulk_disable_unprepare(hsphy->num_clks, hsphy->clks);
poweroff_phy:
regulator_bulk_disable(ARRAY_SIZE(hsphy->vregs), hsphy->vregs);
+transition_to_d3:
+ qcom_snps_d0_to_d3(hsphy);
return ret;
}
@@ -485,6 +575,8 @@ static int qcom_snps_hsphy_exit(struct phy *phy)
regulator_bulk_disable(ARRAY_SIZE(hsphy->vregs), hsphy->vregs);
hsphy->phy_initialized = false;
+ qcom_snps_d0_to_d3(hsphy);
+
return 0;
}
@@ -496,6 +588,10 @@ static const struct phy_ops qcom_snps_hsphy_gen_ops = {
};
static const struct of_device_id qcom_snps_hsphy_of_match_table[] = {
+ {
+ .compatible = "qcom,sa8255p-usb-hs-phy",
+ .data = &sa8255p_snps_hs_phy,
+ },
{ .compatible = "qcom,sm8150-usb-hs-phy", },
{ .compatible = "qcom,usb-snps-hs-5nm-phy", },
{
@@ -565,6 +661,7 @@ static int qcom_snps_hsphy_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct qcom_snps_hsphy *hsphy;
+ const struct override_param_map *cfg;
struct phy_provider *phy_provider;
struct phy *generic_phy;
int ret, i;
@@ -580,14 +677,25 @@ static int qcom_snps_hsphy_probe(struct platform_device *pdev)
if (IS_ERR(hsphy->base))
return PTR_ERR(hsphy->base);
- ret = qcom_snps_hsphy_clk_init(hsphy);
- if (ret)
- return dev_err_probe(dev, ret, "failed to initialize clocks\n");
+ cfg = of_device_get_match_data(dev);
+ if (cfg && cfg->fw_managed) {
+ ret = qcom_snps_domain_attach(hsphy);
+ if (ret)
+ return ret;
+
+ ret = devm_add_action_or_reset(dev, qcom_snps_domain_detach, hsphy);
+ if (ret)
+ return ret;
+ } else {
+ ret = qcom_snps_hsphy_clk_init(hsphy);
+ if (ret)
+ return dev_err_probe(dev, ret, "failed to initialize clocks\n");
- hsphy->phy_reset = devm_reset_control_get_exclusive(&pdev->dev, NULL);
- if (IS_ERR(hsphy->phy_reset)) {
- dev_err(dev, "failed to get phy core reset\n");
- return PTR_ERR(hsphy->phy_reset);
+ hsphy->phy_reset = devm_reset_control_get_exclusive(&pdev->dev, NULL);
+ if (IS_ERR(hsphy->phy_reset)) {
+ dev_err(dev, "failed to get phy core reset\n");
+ return PTR_ERR(hsphy->phy_reset);
+ }
}
num = ARRAY_SIZE(hsphy->vregs);
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] dt-bindings: phy: Add sa8255p high-speed USB PHY
2026-07-30 13:58 ` [PATCH 1/2] dt-bindings: phy: Add sa8255p high-speed USB PHY Mattijs Korpershoek
@ 2026-07-30 14:06 ` sashiko-bot
2026-07-30 14:13 ` Mattijs Korpershoek
0 siblings, 1 reply; 6+ messages in thread
From: sashiko-bot @ 2026-07-30 14:06 UTC (permalink / raw)
To: Mattijs Korpershoek
Cc: conor+dt, devicetree, robh, neil.armstrong, olteanv, linux-phy,
vkoul
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing hardware-specific PHY tuning parameters for the Synopsys Femto High-Speed USB PHY V2.
--
--- Patch [1]: [PATCH 1/2] dt-bindings: phy: Add sa8255p high-speed USB PHY ---
commit 04bc91a6fe06261e099ae8fda1bb90e34d0f28fc
Author: Mattijs Korpershoek <mkorpershoek@kernel.org>
dt-bindings: phy: Add sa8255p high-speed USB PHY
This commit introduces a new device tree binding for the Qualcomm SA8255p
Synopsys Femto High-Speed USB PHY V2. It specifies that the hardware uses
SCMI power domains to manage resources like clocks, interconnects, and
resets, rather than defining them individually.
> diff --git a/Documentation/devicetree/bindings/phy/qcom,sa8255p-usb-hs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sa8255p-usb-hs-phy.yaml
> new file mode 100644
> index 0000000000000..09f7ca6e7f727
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/qcom,sa8255p-usb-hs-phy.yaml
[ ... ]
> +required:
> + - compatible
> + - reg
> + - "#phy-cells"
> + - power-domains
> + - power-domain-names
> +
> +additionalProperties: false
[Severity: Medium]
Since this IP block is still the Synopsys Femto High-Speed USB PHY V2,
would board configurations for this platform still need to apply standard
hardware tuning parameters (such as qcom,squelch-detector-bp)?
While clocks and resets are abstracted into SCMI power domains here, the
memory-mapped reg space is still provided and typically used to program
these signal characteristics. With additionalProperties set to false,
schema validation will fail for any board device tree that attempts to
override these valid PHY tuning properties.
Might it be necessary to include these tuning properties, perhaps by
referencing a common schema, so that boards can safely tune squelch
detection and pre-emphasis without triggering validation errors?
> +
> +examples:
> + - |
> + soc {
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-phy-qcom-snps-femto-v2-8255-v1-0-8b8bf5105a68@kernel.org?part=1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] phy: qcom-snps-femto-v2: Add support for SA8255P
2026-07-30 13:58 ` [PATCH 2/2] phy: qcom-snps-femto-v2: Add support for SA8255P Mattijs Korpershoek
@ 2026-07-30 14:13 ` sashiko-bot
0 siblings, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-07-30 14:13 UTC (permalink / raw)
To: Mattijs Korpershoek
Cc: robh, conor+dt, vkoul, linux-phy, olteanv, neil.armstrong,
devicetree
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Incorrect power domain enablement and teardown ordering in d3 <--> d0 transitions.
- [Medium] The `sa8255p_snps_hs_phy` match data is defined as a scalar struct but iterated over as an array, risking out-of-bounds memory access.
--
--- Patch [2]: [PATCH 2/2] phy: qcom-snps-femto-v2: Add support for SA8255P ---
commit 337a4b6fa46b42e255f6aa6b19e2b52e65e59f7d
Author: Sriram Dash <quic_sriramd@quicinc.com>
phy: qcom-snps-femto-v2: Add support for SA8255P
The Qualcomm automotive SA8255p SoC relies on firmware to configure
platform resources, including clocks, interconnects and TLMM.
The driver requests resources operations over SCMI using power protocols.
> diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
> index eb0b0f61d98e0..4a9bd3ae0e535 100644
> --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
> +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
[ ... ]
> @@ -136,8 +139,81 @@ struct qcom_snps_hsphy {
> +/* d3_to_d0 transition by turning on all the suppliers */
> +static int qcom_snps_d3_to_d0(struct qcom_snps_hsphy *hsphy)
> +{
> + int ret;
> +
> + if (!hsphy->pd_list)
> + return 0;
> +
> + ret = pm_runtime_resume_and_get(hsphy->pd_list->pd_devs[0]);
> + if (ret)
> + return ret;
> +
> + ret = pm_runtime_resume_and_get(hsphy->pd_list->pd_devs[1]);
> + if (ret)
> + pm_runtime_put_sync(hsphy->pd_list->pd_devs[0]);
> +
> + return ret;
> +}
[Severity: High]
Does this resume the power domains in the correct order?
The commit message states that the power domain 'core' (pd_devs[1]) controls
the GDSC, and 'transfer' (pd_devs[0]) controls clocks and interconnects.
Resuming 'transfer' before 'core' means clocks are enabled without their
powering GDSC, which could cause bus hangs on Qualcomm SoCs.
Additionally, since state d1 has 'transfer' OFF and 'core' ON, shouldn't 'core'
always be enabled first and disabled last?
> +
> +/* d0_to_d3 transition by turning off all the suppliers */
> +static void qcom_snps_d0_to_d3(struct qcom_snps_hsphy *hsphy)
> +{
> + if (!hsphy->pd_list)
> + return;
> +
> + pm_runtime_put_sync(hsphy->pd_list->pd_devs[1]);
> + pm_runtime_put_sync(hsphy->pd_list->pd_devs[0]);
> +}
[Severity: High]
Should the 'transfer' domain (pd_devs[0]) be put before the 'core'
domain (pd_devs[1])?
Putting 'core' before 'transfer' disables the GDSC while the clocks are
still active.
[ ... ]
> @@ -316,6 +394,10 @@ static const struct override_param ls_fs_output_impedance_sc7280[] = {
> { 1310, 0 },
> };
>
> +static const struct override_param_map sa8255p_snps_hs_phy = {
> + .fw_managed = true,
> +};
> +
[Severity: Medium]
Will this scalar struct cause an out-of-bounds read in
qcom_snps_hsphy_read_override_param_seq()?
The match data is defined here as a single scalar struct, but
qcom_snps_hsphy_read_override_param_seq() casts the match data to an array and
iterates over it until cfg[i].prop_name != NULL:
drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c:qcom_snps_hsphy_read_override_param_seq() {
...
cfg = of_device_get_match_data(dev);
if (!cfg)
return;
for (i = 0; cfg[i].prop_name != NULL; i++) {
...
}
Currently this terminates on the first iteration because the uninitialized
.prop_name field is implicitly NULL, but if a property is ever added to this
struct in the future, it will read past the end of the struct into adjacent
memory.
Should this be defined as an array with an empty sentinel element like the
other param maps?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-phy-qcom-snps-femto-v2-8255-v1-0-8b8bf5105a68@kernel.org?part=2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] dt-bindings: phy: Add sa8255p high-speed USB PHY
2026-07-30 14:06 ` sashiko-bot
@ 2026-07-30 14:13 ` Mattijs Korpershoek
0 siblings, 0 replies; 6+ messages in thread
From: Mattijs Korpershoek @ 2026-07-30 14:13 UTC (permalink / raw)
To: sashiko-reviews, Mattijs Korpershoek
Cc: conor+dt, devicetree, robh, neil.armstrong, olteanv, linux-phy,
vkoul
On Thu, Jul 30, 2026 at 14:06, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] Missing hardware-specific PHY tuning parameters for the Synopsys Femto High-Speed USB PHY V2.
> --
>
> --- Patch [1]: [PATCH 1/2] dt-bindings: phy: Add sa8255p high-speed USB PHY ---
> commit 04bc91a6fe06261e099ae8fda1bb90e34d0f28fc
> Author: Mattijs Korpershoek <mkorpershoek@kernel.org>
>
> dt-bindings: phy: Add sa8255p high-speed USB PHY
>
> This commit introduces a new device tree binding for the Qualcomm SA8255p
> Synopsys Femto High-Speed USB PHY V2. It specifies that the hardware uses
> SCMI power domains to manage resources like clocks, interconnects, and
> resets, rather than defining them individually.
>
>> diff --git a/Documentation/devicetree/bindings/phy/qcom,sa8255p-usb-hs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sa8255p-usb-hs-phy.yaml
>> new file mode 100644
>> index 0000000000000..09f7ca6e7f727
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/phy/qcom,sa8255p-usb-hs-phy.yaml
>
> [ ... ]
>
>> +required:
>> + - compatible
>> + - reg
>> + - "#phy-cells"
>> + - power-domains
>> + - power-domain-names
>> +
>> +additionalProperties: false
>
> [Severity: Medium]
> Since this IP block is still the Synopsys Femto High-Speed USB PHY V2,
> would board configurations for this platform still need to apply standard
> hardware tuning parameters (such as qcom,squelch-detector-bp)?
>
> While clocks and resets are abstracted into SCMI power domains here, the
> memory-mapped reg space is still provided and typically used to program
> these signal characteristics. With additionalProperties set to false,
> schema validation will fail for any board device tree that attempts to
> override these valid PHY tuning properties.
>
> Might it be necessary to include these tuning properties, perhaps by
> referencing a common schema, so that boards can safely tune squelch
> detection and pre-emphasis without triggering validation errors?
No, from the testing I've done it's not needed to add any PHY tuning properties.
>
>> +
>> +examples:
>> + - |
>> + soc {
>
> [ ... ]
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20260730-phy-qcom-snps-femto-v2-8255-v1-0-8b8bf5105a68@kernel.org?part=1
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-07-30 14:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30 13:58 [PATCH 0/2] Add support for SA8255P in the phy-qcom-snps-femto-v2 phy driver Mattijs Korpershoek
2026-07-30 13:58 ` [PATCH 1/2] dt-bindings: phy: Add sa8255p high-speed USB PHY Mattijs Korpershoek
2026-07-30 14:06 ` sashiko-bot
2026-07-30 14:13 ` Mattijs Korpershoek
2026-07-30 13:58 ` [PATCH 2/2] phy: qcom-snps-femto-v2: Add support for SA8255P Mattijs Korpershoek
2026-07-30 14:13 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox