Skip to content

Commit 7ae24e0

Browse files
konradybciovireshk
authored andcommitted
dt-bindings: cpufreq: cpufreq-qcom-hw: Sanitize data per compatible
Introduce per-SoC compatibles for OSM targets (read: pre-sm8250) and sanitize the number of interrupt{s,-names} and reg/-names per-compatible. Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent 287143d commit 7ae24e0

1 file changed

Lines changed: 89 additions & 1 deletion

File tree

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

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ properties:
2020
oneOf:
2121
- description: v1 of CPUFREQ HW
2222
items:
23+
- enum:
24+
- qcom,sc7180-cpufreq-hw
25+
- qcom,sdm845-cpufreq-hw
26+
- qcom,sm6115-cpufreq-hw
27+
- qcom,sm6350-cpufreq-hw
28+
- qcom,sm8150-cpufreq-hw
2329
- const: qcom,cpufreq-hw
2430

2531
- description: v2 of CPUFREQ HW (EPSS)
@@ -86,6 +92,88 @@ required:
8692

8793
additionalProperties: false
8894

95+
allOf:
96+
- if:
97+
properties:
98+
compatible:
99+
contains:
100+
enum:
101+
- qcom,qdu1000-cpufreq-epss
102+
- qcom,sc7180-cpufreq-hw
103+
- qcom,sc8280xp-cpufreq-epss
104+
- qcom,sdm845-cpufreq-hw
105+
- qcom,sm6115-cpufreq-hw
106+
- qcom,sm6350-cpufreq-hw
107+
- qcom,sm6375-cpufreq-epss
108+
then:
109+
properties:
110+
reg:
111+
minItems: 2
112+
maxItems: 2
113+
114+
reg-names:
115+
minItems: 2
116+
maxItems: 2
117+
118+
interrupts:
119+
minItems: 2
120+
maxItems: 2
121+
122+
interrupt-names:
123+
minItems: 2
124+
125+
- if:
126+
properties:
127+
compatible:
128+
contains:
129+
enum:
130+
- qcom,sc7280-cpufreq-epss
131+
- qcom,sm8250-cpufreq-epss
132+
- qcom,sm8350-cpufreq-epss
133+
- qcom,sm8450-cpufreq-epss
134+
- qcom,sm8550-cpufreq-epss
135+
then:
136+
properties:
137+
reg:
138+
minItems: 3
139+
maxItems: 3
140+
141+
reg-names:
142+
minItems: 3
143+
maxItems: 3
144+
145+
interrupts:
146+
minItems: 3
147+
maxItems: 3
148+
149+
interrupt-names:
150+
minItems: 3
151+
152+
- if:
153+
properties:
154+
compatible:
155+
contains:
156+
enum:
157+
- qcom,sm8150-cpufreq-hw
158+
then:
159+
properties:
160+
reg:
161+
minItems: 3
162+
maxItems: 3
163+
164+
reg-names:
165+
minItems: 3
166+
maxItems: 3
167+
168+
# On some SoCs the Prime core shares the LMH irq with Big cores
169+
interrupts:
170+
minItems: 2
171+
maxItems: 2
172+
173+
interrupt-names:
174+
minItems: 2
175+
176+
89177
examples:
90178
- |
91179
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
@@ -236,7 +324,7 @@ examples:
236324
#size-cells = <1>;
237325
238326
cpufreq@17d43000 {
239-
compatible = "qcom,cpufreq-hw";
327+
compatible = "qcom,sdm845-cpufreq-hw", "qcom,cpufreq-hw";
240328
reg = <0x17d43000 0x1400>, <0x17d45800 0x1400>;
241329
reg-names = "freq-domain0", "freq-domain1";
242330

0 commit comments

Comments
 (0)