[PATCH 1/8] dt-bindings: soc: qcom,rpmh-rsc: Limit power-domains requirement

Konrad Dybcio posted 8 patches 9 months ago
There is a newer version of this series
[PATCH 1/8] dt-bindings: soc: qcom,rpmh-rsc: Limit power-domains requirement
Posted by Konrad Dybcio 9 months ago
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Certain platforms (such as Chrome SDM845 and SC7180 with a TF-A running
as secure firmware) do not have a OSI-mode capable PSCI implementation.

That in turn means the PSCI-associated power domain which represents the
system's power state can't provide enough feedback to the RSC device.

Don't require power-domains on platforms where this may be the case.

Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 .../bindings/soc/qcom/qcom,rpmh-rsc.yaml           | 24 ++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml
index af632d0e0355c56748ecac24f528dc2eec7d1193..f8b7428df6bc3caef2917b300ce47a91bb3f0fd0 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml
@@ -44,7 +44,13 @@ description: |
 
 properties:
   compatible:
-    const: qcom,rpmh-rsc
+    oneOf:
+      - items:
+        - enum:
+          - qcom,sc7180-rpmh-apps-rsc
+          - qcom,sdm845-rpmh-apps-rsc
+        - const: qcom,rpmh-rsc
+      - const: qcom,rpmh-rsc
 
   interrupts:
     minItems: 1
@@ -124,7 +130,21 @@ required:
   - qcom,tcs-offset
   - reg
   - reg-names
-  - power-domains
+
+allOf:
+  # Some platforms may lack a OSI-mode PSCI implementation, which implies the
+  # system power domain can't provide feedback about entering power collapse
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - qcom,sc7180-rpmh-apps-rsc
+                - qcom,sdm845-rpmh-apps-rsc
+    then:
+      required:
+        - power-domains
 
 additionalProperties: false
 

-- 
2.48.1
Re: [PATCH 1/8] dt-bindings: soc: qcom,rpmh-rsc: Limit power-domains requirement
Posted by Rob Herring (Arm) 9 months ago
On Tue, 18 Mar 2025 19:35:14 +0100, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> Certain platforms (such as Chrome SDM845 and SC7180 with a TF-A running
> as secure firmware) do not have a OSI-mode capable PSCI implementation.
> 
> That in turn means the PSCI-associated power domain which represents the
> system's power state can't provide enough feedback to the RSC device.
> 
> Don't require power-domains on platforms where this may be the case.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> ---
>  .../bindings/soc/qcom/qcom,rpmh-rsc.yaml           | 24 ++++++++++++++++++++--
>  1 file changed, 22 insertions(+), 2 deletions(-)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:
./Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml:49:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
./Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml:50:11: [warning] wrong indentation: expected 12 but found 10 (indentation)

dtschema/dtc warnings/errors:

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250318-topic-more_dt_bindings_fixes-v1-1-cb36882ea9cc@oss.qualcomm.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.