Skip to content

Commit 389de9c

Browse files
Ansuelvireshk
authored andcommitted
dt-bindings: cpufreq: qcom-cpufreq-nvmem: make cpr bindings optional
The qcom-cpufreq-nvmem driver supports 2 kind of devices: - pre-cpr that doesn't have power-domains and base everything on nvmem cells and multiple named microvolt bindings. Doesn't need required-opp binding in the opp nodes as they are only used for genpd based devices. - cpr-based that require power-domain in the cpu nodes and use various source to decide the correct voltage and freq Require required-opp binding since they need to be linked to the related opp-level. When the schema was introduced, it was wrongly set to always require these binding but this is not the case for pre-cpr devices. Make the power-domain and the required-opp optional and set them required only for qcs404 based devices. Signed-off-by: Christian Marangi <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
1 parent 26e27f4 commit 389de9c

File tree

1 file changed

+44
-30
lines changed

1 file changed

+44
-30
lines changed

Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml

Lines changed: 44 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ description: |
1717
on the CPU OPP in use. The CPUFreq driver sets the CPR power domain level
1818
according to the required OPPs defined in the CPU OPP tables.
1919
20+
For old implementation efuses are parsed to select the correct opp table and
21+
voltage and CPR is not supported/used.
22+
2023
select:
2124
properties:
2225
compatible:
@@ -33,26 +36,6 @@ select:
3336
required:
3437
- compatible
3538

36-
properties:
37-
cpus:
38-
type: object
39-
40-
patternProperties:
41-
'^cpu@[0-9a-f]+$':
42-
type: object
43-
44-
properties:
45-
power-domains:
46-
maxItems: 1
47-
48-
power-domain-names:
49-
items:
50-
- const: cpr
51-
52-
required:
53-
- power-domains
54-
- power-domain-names
55-
5639
patternProperties:
5740
'^opp-table(-[a-z0-9]+)?$':
5841
allOf:
@@ -63,16 +46,6 @@ patternProperties:
6346
then:
6447
$ref: /schemas/opp/opp-v2-kryo-cpu.yaml#
6548

66-
- if:
67-
properties:
68-
compatible:
69-
const: operating-points-v2-kryo-cpu
70-
then:
71-
patternProperties:
72-
'^opp-?[0-9]+$':
73-
required:
74-
- required-opps
75-
7649
- if:
7750
properties:
7851
compatible:
@@ -82,6 +55,47 @@ patternProperties:
8255

8356
unevaluatedProperties: false
8457

58+
allOf:
59+
- if:
60+
properties:
61+
compatible:
62+
contains:
63+
enum:
64+
- qcom,qcs404
65+
66+
then:
67+
properties:
68+
cpus:
69+
type: object
70+
71+
patternProperties:
72+
'^cpu@[0-9a-f]+$':
73+
type: object
74+
75+
properties:
76+
power-domains:
77+
maxItems: 1
78+
79+
power-domain-names:
80+
items:
81+
- const: cpr
82+
83+
required:
84+
- power-domains
85+
- power-domain-names
86+
87+
patternProperties:
88+
'^opp-table(-[a-z0-9]+)?$':
89+
if:
90+
properties:
91+
compatible:
92+
const: operating-points-v2-kryo-cpu
93+
then:
94+
patternProperties:
95+
'^opp-?[0-9]+$':
96+
required:
97+
- required-opps
98+
8599
additionalProperties: true
86100

87101
examples:

0 commit comments

Comments
 (0)