Skip to content

Commit 59199d0

Browse files
committed
ARM: dts: qcom: msm8974: Start using rpmpd for power domains
Due to historical reasons all msm8974 boards have used the CX power rail as regulator instead of going through the power domain framework. Since rpmpd has gained msm8974 support quite a bit ago, let's start using it and replace all usages of pm8841_s2 (CX), pm8841_s4 (GFX) and for the boards using pma8084 pma8084_s2 (CX), pma8084_s7 (GFX). For reference, downstream is using GFX power rail as parent-supply for mmcc's OXILI_GDSC GDSC which then is used for GPU, but nothing there is modelled upstream. Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
1 parent d822d76 commit 59199d0

11 files changed

+43
-109
lines changed

arch/arm/boot/dts/qcom/qcom-apq8074-dragonboard.dts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,12 @@
198198
};
199199

200200
&remoteproc_adsp {
201-
cx-supply = <&pm8841_s2>;
202-
203201
firmware-name = "qcom/apq8074/adsp.mbn";
204202

205203
status = "okay";
206204
};
207205

208206
&remoteproc_mss {
209-
cx-supply = <&pm8841_s2>;
210207
mss-supply = <&pm8841_s3>;
211208
mx-supply = <&pm8841_s1>;
212209
pll-supply = <&pm8941_l12>;
@@ -225,20 +222,10 @@
225222
regulator-max-microvolt = <1050000>;
226223
};
227224

228-
pm8841_s2: s2 {
229-
regulator-min-microvolt = <500000>;
230-
regulator-max-microvolt = <1050000>;
231-
};
232-
233225
pm8841_s3: s3 {
234226
regulator-min-microvolt = <500000>;
235227
regulator-max-microvolt = <1050000>;
236228
};
237-
238-
pm8841_s4: s4 {
239-
regulator-min-microvolt = <500000>;
240-
regulator-max-microvolt = <1050000>;
241-
};
242229
};
243230

244231
regulators-1 {

arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -373,12 +373,10 @@
373373
};
374374

375375
&remoteproc_adsp {
376-
cx-supply = <&pm8841_s2>;
377376
status = "okay";
378377
};
379378

380379
&remoteproc_mss {
381-
cx-supply = <&pm8841_s2>;
382380
mss-supply = <&pm8841_s3>;
383381
mx-supply = <&pm8841_s1>;
384382
pll-supply = <&pm8941_l12>;
@@ -394,20 +392,10 @@
394392
regulator-max-microvolt = <1050000>;
395393
};
396394

397-
pm8841_s2: s2 {
398-
regulator-min-microvolt = <500000>;
399-
regulator-max-microvolt = <1050000>;
400-
};
401-
402395
pm8841_s3: s3 {
403396
regulator-min-microvolt = <1050000>;
404397
regulator-max-microvolt = <1050000>;
405398
};
406-
407-
pm8841_s4: s4 {
408-
regulator-min-microvolt = <815000>;
409-
regulator-max-microvolt = <900000>;
410-
};
411399
};
412400

413401
regulators-1 {

arch/arm/boot/dts/qcom/qcom-msm8974-samsung-hlte.dts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,10 @@
262262
};
263263

264264
&remoteproc_adsp {
265-
cx-supply = <&pm8841_s2>;
266265
status = "okay";
267266
};
268267

269268
&remoteproc_mss {
270-
cx-supply = <&pm8841_s2>;
271269
mss-supply = <&pm8841_s3>;
272270
mx-supply = <&pm8841_s1>;
273271
pll-supply = <&pm8941_l12>;
@@ -283,20 +281,10 @@
283281
regulator-max-microvolt = <1050000>;
284282
};
285283

286-
pm8841_s2: s2 {
287-
regulator-min-microvolt = <500000>;
288-
regulator-max-microvolt = <1050000>;
289-
};
290-
291284
pm8841_s3: s3 {
292285
regulator-min-microvolt = <1050000>;
293286
regulator-max-microvolt = <1050000>;
294287
};
295-
296-
pm8841_s4: s4 {
297-
regulator-min-microvolt = <815000>;
298-
regulator-max-microvolt = <900000>;
299-
};
300288
};
301289

302290
regulators-1 {

arch/arm/boot/dts/qcom/qcom-msm8974-sony-xperia-rhine.dtsi

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,10 @@
204204
};
205205

206206
&remoteproc_adsp {
207-
cx-supply = <&pm8841_s2>;
208207
status = "okay";
209208
};
210209

211210
&remoteproc_mss {
212-
cx-supply = <&pm8841_s2>;
213211
mss-supply = <&pm8841_s3>;
214212
mx-supply = <&pm8841_s1>;
215213
pll-supply = <&pm8941_l12>;
@@ -225,20 +223,10 @@
225223
regulator-max-microvolt = <1050000>;
226224
};
227225

228-
pm8841_s2: s2 {
229-
regulator-min-microvolt = <500000>;
230-
regulator-max-microvolt = <1050000>;
231-
};
232-
233226
pm8841_s3: s3 {
234227
regulator-min-microvolt = <500000>;
235228
regulator-max-microvolt = <1050000>;
236229
};
237-
238-
pm8841_s4: s4 {
239-
regulator-min-microvolt = <500000>;
240-
regulator-max-microvolt = <1050000>;
241-
};
242230
};
243231

244232
regulators-1 {

arch/arm/boot/dts/qcom/qcom-msm8974-sony-xperia-sirius.dts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,10 @@
274274
};
275275

276276
&remoteproc_adsp {
277-
cx-supply = <&pm8841_s2>;
278277
status = "okay";
279278
};
280279

281280
&remoteproc_mss {
282-
cx-supply = <&pm8841_s2>;
283281
mss-supply = <&pm8841_s3>;
284282
mx-supply = <&pm8841_s1>;
285283
pll-supply = <&pm8941_l12>;
@@ -295,20 +293,10 @@
295293
regulator-max-microvolt = <1050000>;
296294
};
297295

298-
pm8841_s2: s2 {
299-
regulator-min-microvolt = <500000>;
300-
regulator-max-microvolt = <1050000>;
301-
};
302-
303296
pm8841_s3: s3 {
304297
regulator-min-microvolt = <1050000>;
305298
regulator-max-microvolt = <1050000>;
306299
};
307-
308-
pm8841_s4: s4 {
309-
regulator-min-microvolt = <815000>;
310-
regulator-max-microvolt = <900000>;
311-
};
312300
};
313301

314302
regulators-1 {

arch/arm/boot/dts/qcom/qcom-msm8974.dtsi

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <dt-bindings/gpio/gpio.h>
88
#include <dt-bindings/interconnect/qcom,msm8974.h>
99
#include <dt-bindings/interrupt-controller/arm-gic.h>
10+
#include <dt-bindings/power/qcom-rpmpd.h>
1011
#include <dt-bindings/reset/qcom,gcc-msm8974.h>
1112

1213
/ {
@@ -145,6 +146,35 @@
145146
clocks = <&xo_board>;
146147
clock-names = "xo";
147148
};
149+
150+
rpmpd: power-controller {
151+
compatible = "qcom,msm8974-rpmpd";
152+
#power-domain-cells = <1>;
153+
operating-points-v2 = <&rpmpd_opp_table>;
154+
155+
rpmpd_opp_table: opp-table {
156+
compatible = "operating-points-v2";
157+
158+
rpmpd_opp_ret: opp1 {
159+
opp-level = <1>;
160+
};
161+
rpmpd_opp_svs_krait: opp2 {
162+
opp-level = <2>;
163+
};
164+
rpmpd_opp_svs_soc: opp3 {
165+
opp-level = <3>;
166+
};
167+
rpmpd_opp_nom: opp4 {
168+
opp-level = <4>;
169+
};
170+
rpmpd_opp_turbo: opp5 {
171+
opp-level = <5>;
172+
};
173+
rpmpd_opp_super_turbo: opp6 {
174+
opp-level = <6>;
175+
};
176+
};
177+
};
148178
};
149179
};
150180
};
@@ -742,6 +772,9 @@
742772
<&wcnss_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
743773
interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";
744774

775+
power-domains = <&rpmpd MSM8974_VDDCX>;
776+
power-domain-names = "cx";
777+
745778
qcom,smem-states = <&wcnss_smp2p_out 0>;
746779
qcom,smem-state-names = "stop";
747780

@@ -1544,6 +1577,9 @@
15441577
resets = <&gcc GCC_MSS_RESTART>;
15451578
reset-names = "mss_restart";
15461579

1580+
power-domains = <&rpmpd MSM8974_VDDCX>;
1581+
power-domain-names = "cx";
1582+
15471583
qcom,halt-regs = <&tcsr_mutex 0x1180 0x1200 0x1280>;
15481584

15491585
qcom,smem-states = <&modem_smp2p_out 0>;
@@ -2203,6 +2239,9 @@
22032239
clocks = <&xo_board>;
22042240
clock-names = "xo";
22052241

2242+
power-domains = <&rpmpd MSM8974_VDDCX>;
2243+
power-domain-names = "cx";
2244+
22062245
memory-region = <&adsp_region>;
22072246

22082247
qcom,smem-states = <&adsp_smp2p_out 0>;

arch/arm/boot/dts/qcom/qcom-msm8974pro-fairphone-fp2.dts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@
232232
status = "okay";
233233

234234
vddmx-supply = <&pm8841_s1>;
235-
vddcx-supply = <&pm8841_s2>;
236235
vddpx-supply = <&pm8941_s3>;
237236

238237
pinctrl-names = "default";
@@ -257,12 +256,10 @@
257256

258257
&remoteproc_adsp {
259258
status = "okay";
260-
cx-supply = <&pm8841_s2>;
261259
};
262260

263261
&remoteproc_mss {
264262
status = "okay";
265-
cx-supply = <&pm8841_s2>;
266263
mss-supply = <&pm8841_s3>;
267264
mx-supply = <&pm8841_s1>;
268265
pll-supply = <&pm8941_l12>;
@@ -277,11 +274,6 @@
277274
regulator-max-microvolt = <1050000>;
278275
};
279276

280-
pm8841_s2: s2 {
281-
regulator-min-microvolt = <500000>;
282-
regulator-max-microvolt = <1050000>;
283-
};
284-
285277
pm8841_s3: s3 {
286278
regulator-min-microvolt = <1050000>;
287279
regulator-max-microvolt = <1050000>;

arch/arm/boot/dts/qcom/qcom-msm8974pro-htc-m8.dts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070

7171
&pronto {
7272
vddmx-supply = <&pm8841_s1>;
73-
vddcx-supply = <&pm8841_s2>;
7473
vddpx-supply = <&pm8941_s3>;
7574

7675
pinctrl-0 = <&wcnss_pin_a>;
@@ -104,20 +103,10 @@
104103
regulator-max-microvolt = <1050000>;
105104
};
106105

107-
pm8841_s2: s2 {
108-
regulator-min-microvolt = <500000>;
109-
regulator-max-microvolt = <1050000>;
110-
};
111-
112106
pm8841_s3: s3 {
113107
regulator-min-microvolt = <1050000>;
114108
regulator-max-microvolt = <1050000>;
115109
};
116-
117-
pm8841_s4: s4 {
118-
regulator-min-microvolt = <815000>;
119-
regulator-max-microvolt = <900000>;
120-
};
121110
};
122111

123112
regulators-1 {

arch/arm/boot/dts/qcom/qcom-msm8974pro-oneplus-bacon.dts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@
263263

264264
&pronto {
265265
vddmx-supply = <&pm8841_s1>;
266-
vddcx-supply = <&pm8841_s2>;
267266
vddpx-supply = <&pm8941_s3>;
268267

269268
pinctrl-names = "default";
@@ -289,14 +288,11 @@
289288
};
290289

291290
&remoteproc_adsp {
292-
cx-supply = <&pm8841_s2>;
293-
294291
status = "okay";
295292
};
296293

297294
/* Broken
298295
&remoteproc_mss {
299-
cx-supply = <&pm8841_s2>;
300296
mss-supply = <&pm8841_s3>;
301297
mx-supply = <&pm8841_s1>;
302298
pll-supply = <&pm8941_l12>;
@@ -313,12 +309,6 @@
313309
regulator-max-microvolt = <1050000>;
314310
};
315311

316-
pm8841_s2: s2 {
317-
regulator-min-microvolt = <875000>;
318-
regulator-max-microvolt = <1050000>;
319-
regulator-always-on;
320-
};
321-
322312
pm8841_s3: s3 {
323313
regulator-min-microvolt = <1050000>;
324314
regulator-max-microvolt = <1050000>;

arch/arm/boot/dts/qcom/qcom-msm8974pro-samsung-klte-common.dtsi

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -453,12 +453,10 @@
453453

454454
&remoteproc_adsp {
455455
status = "okay";
456-
cx-supply = <&pma8084_s2>;
457456
};
458457

459458
&remoteproc_mss {
460459
status = "okay";
461-
cx-supply = <&pma8084_s2>;
462460
mss-supply = <&pma8084_s6>;
463461
mx-supply = <&pma8084_s1>;
464462
pll-supply = <&pma8084_l12>;
@@ -474,11 +472,6 @@
474472
regulator-always-on;
475473
};
476474

477-
pma8084_s2: s2 {
478-
regulator-min-microvolt = <500000>;
479-
regulator-max-microvolt = <1050000>;
480-
};
481-
482475
pma8084_s3: s3 {
483476
regulator-min-microvolt = <1300000>;
484477
regulator-max-microvolt = <1300000>;
@@ -648,6 +641,10 @@
648641
};
649642
};
650643

644+
&rpmpd {
645+
compatible = "qcom,msm8974pro-pma8084-rpmpd";
646+
};
647+
651648
&sdhc_1 {
652649
status = "okay";
653650

0 commit comments

Comments
 (0)