[PATCH] dt-bindings: cpufreq: qcom-cpufreq-nvmem: Simplify bindings
From: Krzysztof Kozlowski
Date: Thu Nov 05 2026 - 15:11:52 EST
This binding selects a few top-level compatible machines, but since
commit 389de9c5a677 ("dt-bindings: cpufreq: qcom-cpufreq-nvmem: make cpr
bindings optional") only qcom,qcs404 is present in "if:then:" clause
which enforces specific OPP properties.
For all other machines, this is a no-op, because there is no schema here
enforcing a specific compatible for OPP nodes or any of OPP table
properties: one can switch to standard OPP table (operating-points-v2)
and this binding will not complain.
OTOH, this binding has complicated "if:then:" blocks so is not easy to
maintain and causes false positives when regular OPP table is
encountered in matched machines.
Drop all machines except QCS404 and move the subschema to top-level.
Cc: Varadarajan Narayanan <varadarajan.narayanan@xxxxxxxxxxxxxxxx>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>
---
.../bindings/cpufreq/qcom-cpufreq-nvmem.yaml | 78 ++++++-------------
1 file changed, 24 insertions(+), 54 deletions(-)
diff --git a/Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml b/Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml
index 547265b8b118..dfc7a27a7bdd 100644
--- a/Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml
+++ b/Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml
@@ -25,22 +25,30 @@ select:
compatible:
contains:
enum:
- - qcom,apq8064
- - qcom,apq8096
- - qcom,ipq5332
- - qcom,ipq6018
- - qcom,ipq8064
- - qcom,ipq8074
- - qcom,ipq9574
- - qcom,msm8909
- - qcom,msm8939
- - qcom,msm8960
- - qcom,msm8974
- - qcom,msm8996
- qcom,qcs404
required:
- compatible
+properties:
+ cpus:
+ type: object
+
+ patternProperties:
+ '^cpu@[0-9a-f]+$':
+ type: object
+
+ properties:
+ power-domains:
+ maxItems: 1
+
+ power-domain-names:
+ items:
+ - const: cpr
+
+ required:
+ - power-domains
+ - power-domain-names
+
patternProperties:
'^opp-table(-[a-z0-9]+)?$':
allOf:
@@ -48,10 +56,13 @@ patternProperties:
properties:
compatible:
enum:
- - operating-points-v2-krait-cpu
- operating-points-v2-kryo-cpu
then:
$ref: /schemas/opp/opp-v2-kryo-cpu.yaml#
+ patternProperties:
+ '^opp-?[0-9]+$':
+ required:
+ - required-opps
- if:
properties:
@@ -62,47 +73,6 @@ patternProperties:
unevaluatedProperties: false
-allOf:
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,qcs404
-
- then:
- properties:
- cpus:
- type: object
-
- patternProperties:
- '^cpu@[0-9a-f]+$':
- type: object
-
- properties:
- power-domains:
- maxItems: 1
-
- power-domain-names:
- items:
- - const: cpr
-
- required:
- - power-domains
- - power-domain-names
-
- patternProperties:
- '^opp-table(-[a-z0-9]+)?$':
- if:
- properties:
- compatible:
- const: operating-points-v2-kryo-cpu
- then:
- patternProperties:
- '^opp-?[0-9]+$':
- required:
- - required-opps
-
additionalProperties: true
examples:
--
2.53.0