[net-next,v15,2/9] dt-bindings: phy: document the serdes PHY on sa8255p

Message ID 20260923-qcom-sa8255p-emac-v15-2-e82f33720737@oss.qualcomm.com (mailing list archive)
State New
Headers
Series net: stmmac: qcom-ethqos: add support for SCMI power domains |

Commit Message

Bartosz Golaszewski Sept. 23, 2026, 3:14 p.m. UTC
Describe the SGMII/SerDes PHY present on the Qualcomm sa8255p platforms.
This is essentially the same hardware as sa8775p rev3 but the PHY is
managed by firmware over SCMI.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
 .../bindings/phy/qcom,sa8255p-dwmac-sgmii-phy.yaml | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)
  

Comments

netdev-bot+sashiko@kernel.org Sept. 27, 2026, 4:29 p.m. UTC | #1
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] In the new binding
  Documentation/devicetree/bindings/phy/qcom,sa8255p-dwmac-sgmii-…

--

dt-bindings: phy: document the serdes PHY on sa8255p

This commit adds a new binding for the SGMII/SerDes PHY on Qualcomm sa8255p
platforms. The hardware is the same as sa8775p rev3, but here firmware
manages the PHY over SCMI.

> diff --git a/Documentation/devicetree/bindings/phy/qcom,sa8255p-dwmac-sgmii-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sa8255p-dwmac-sgmii-phy.yaml
> new file mode 100644
> index 0000000000000..9e846e3815555
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/qcom,sa8255p-dwmac-sgmii-phy.yaml

[ ... ]

> +  power-domains:
> +    maxItems: 1
> +
> +  power-domain-names:
> +    maxItems: 1

[Severity: Low]
This isn't a bug, but should power-domain-names pin its value here?

The property is listed under required, and the example uses "serdes".
However, the only constraint is maxItems: 1. A node with
power-domain-names = "foo" would still pass dt_binding_check, so the value
of a required property is left undefined in the ABI.

The other firmware-managed sa8255p bindings fix their names with const
entries. For example, qcom,sa8255p-geni-i2c.yaml has:

  power-domain-names:
    items:
      - const: power
      - const: perf

qcom,sa8255p-ethqos.yaml, added later in this series, does the same with
core and mdio.

power-domains also has no description, so the binding doesn't say what the
single domain represents.

Could this use items: - const: serdes for power-domain-names, and add an
items: - description: entry for power-domains? Another option is to drop
power-domain-names, since there is only one entry.

The driver added later in the series (phy-qcom-sgmii-eth-scmi.c) doesn't
look the domain up by name. The driver core attaches the single domain
automatically, so an unexpected name causes no runtime failure. The concern
is limited to the schema and the ABI definition.

> +
> +  "#phy-cells":
> +    const: 0
> +
> +required:
> +  - compatible
> +  - reg
> +  - "#phy-cells"
> +  - power-domains
> +  - power-domain-names

[ ... ]

> +        power-domains = <&scmi7_dvfs 0>;
> +        power-domain-names = "serdes";
> +    };
  

Patch

diff --git a/Documentation/devicetree/bindings/phy/qcom,sa8255p-dwmac-sgmii-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sa8255p-dwmac-sgmii-phy.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..9e846e381555514bb32177f884abf0cf2c942948
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom,sa8255p-dwmac-sgmii-phy.yaml
@@ -0,0 +1,50 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/qcom,sa8255p-dwmac-sgmii-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SerDes/SGMII ethernet PHY controller (firmware managed)
+
+maintainers:
+  - Bartosz Golaszewski <brgl@kernel.org>
+
+description:
+  The SerDes PHY sits between the MAC and the external PHY and provides
+  separate Rx Tx lines.
+
+properties:
+  compatible:
+    const: qcom,sa8255p-dwmac-sgmii-phy
+
+  reg:
+    items:
+      - description: serdes
+
+  power-domains:
+    maxItems: 1
+
+  power-domain-names:
+    maxItems: 1
+
+  "#phy-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - "#phy-cells"
+  - power-domains
+  - power-domain-names
+
+additionalProperties: false
+
+examples:
+  - |
+    phy@8901000 {
+        compatible = "qcom,sa8255p-dwmac-sgmii-phy";
+        reg = <0x08901000 0xe10>;
+        #phy-cells = <0>;
+        power-domains = <&scmi7_dvfs 0>;
+        power-domain-names = "serdes";
+    };