[PATCH RFC 1/4] dt-bindings: clock: qcom,sm8550-tcsr: Add QREF regulator supplies for glymur

Qiang Yu posted 4 patches 16 hours ago
[PATCH RFC 1/4] dt-bindings: clock: qcom,sm8550-tcsr: Add QREF regulator supplies for glymur
Posted by Qiang Yu 16 hours ago
The glymur TCSR PCIe clkref clocks require regulator supplies for the
QREF block and its refgen reference voltage generator. Add the optional
supply properties restricted to qcom,glymur-tcsr via an allOf/if/then
conditional schema.

Switch from additionalProperties to unevaluatedProperties so that
properties defined inside the if/then block are correctly recognised as
evaluated and not rejected by the schema validator.

Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
---
 .../bindings/clock/qcom,sm8550-tcsr.yaml           | 26 +++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8550-tcsr.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8550-tcsr.yaml
index ae9aef0e54e8b8b85bc70e6096d524447091f39e..88db650e69ef2388a5bfb6783a57c1d48c0e780f 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm8550-tcsr.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm8550-tcsr.yaml
@@ -49,11 +49,35 @@ properties:
   '#reset-cells':
     const: 1
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: qcom,glymur-tcsr
+    then:
+      properties:
+        vdda-refgen-0p9-supply: true
+        vdda-refgen-1p2-supply: true
+        vdda-qrefrx0-0p9-supply: true
+        vdda-qrefrx1-0p9-supply: true
+        vdda-qrefrx2-0p9-supply: true
+        vdda-qrefrx4-0p9-supply: true
+        vdda-qrefrx5-0p9-supply: true
+        vdda-qreftx0-0p9-supply: true
+        vdda-qreftx0-1p2-supply: true
+        vdda-qreftx1-0p9-supply: true
+        vdda-qrefrpt0-0p9-supply: true
+        vdda-qrefrpt1-0p9-supply: true
+        vdda-qrefrpt2-0p9-supply: true
+        vdda-qrefrpt3-0p9-supply: true
+        vdda-qrefrpt4-0p9-supply: true
+
 required:
   - compatible
   - clocks
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |

-- 
2.34.1
Re: [PATCH RFC 1/4] dt-bindings: clock: qcom,sm8550-tcsr: Add QREF regulator supplies for glymur
Posted by Krzysztof Kozlowski 15 hours ago
On 01/04/2026 08:35, Qiang Yu wrote:
> The glymur TCSR PCIe clkref clocks require regulator supplies for the
> QREF block and its refgen reference voltage generator. Add the optional
> supply properties restricted to qcom,glymur-tcsr via an allOf/if/then
> conditional schema.
> 
> Switch from additionalProperties to unevaluatedProperties so that
> properties defined inside the if/then block are correctly recognised as
> evaluated and not rejected by the schema validator.

Sorry, but no. There is a reason for that why additionalProperties fail
and writing-bindings explain that.

> 
> Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
> ---
>  .../bindings/clock/qcom,sm8550-tcsr.yaml           | 26 +++++++++++++++++++++-
>  1 file changed, 25 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8550-tcsr.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8550-tcsr.yaml
> index ae9aef0e54e8b8b85bc70e6096d524447091f39e..88db650e69ef2388a5bfb6783a57c1d48c0e780f 100644
> --- a/Documentation/devicetree/bindings/clock/qcom,sm8550-tcsr.yaml
> +++ b/Documentation/devicetree/bindings/clock/qcom,sm8550-tcsr.yaml
> @@ -49,11 +49,35 @@ properties:
>    '#reset-cells':
>      const: 1
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: qcom,glymur-tcsr
> +    then:
> +      properties:
> +        vdda-refgen-0p9-supply: true
> +        vdda-refgen-1p2-supply: true
> +        vdda-qrefrx0-0p9-supply: true
> +        vdda-qrefrx1-0p9-supply: true
> +        vdda-qrefrx2-0p9-supply: true
> +        vdda-qrefrx4-0p9-supply: true
> +        vdda-qrefrx5-0p9-supply: true
> +        vdda-qreftx0-0p9-supply: true
> +        vdda-qreftx0-1p2-supply: true
> +        vdda-qreftx1-0p9-supply: true
> +        vdda-qrefrpt0-0p9-supply: true
> +        vdda-qrefrpt1-0p9-supply: true
> +        vdda-qrefrpt2-0p9-supply: true
> +        vdda-qrefrpt3-0p9-supply: true
> +        vdda-qrefrpt4-0p9-supply: true

I really doubt that TCSR, which is a small, tiny tiny block the in SoC
have this ~15 pin supplies.

Anyway, if it has, then device is quite different and should live in its
own schema.

Best regards,
Krzysztof