Skip to content

Commit 66193a9

Browse files
arm64: dts: apple: Add PMP nodes and hook up power reporting
Add the PMP device and set it as the power-domain for devices that need to report their power states to it. Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
1 parent 835047d commit 66193a9

15 files changed

Lines changed: 710 additions & 15 deletions

arch/arm64/boot/dts/apple/t6000.dtsi

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@
1818
};
1919

2020
/delete-node/ &pmgr_south;
21+
/delete-node/ &pmp_report_dispext2;
22+
/delete-node/ &pmp_report_dispext3;
23+
/delete-node/ &pmp_report_venc1;
24+
/delete-node/ &pmp_report_msr1;
25+
/delete-node/ &pmp_report_prores;
26+
27+
&pmp {
28+
apple,pio-ranges = <0x2 0x82000000 0x0 0x1000000>,
29+
<0x3 0x4000000 0x0 0x1000000>,
30+
<0x3 0x83000000 0x0 0x1000000>,
31+
<0x4 0x2000000 0x0 0x1000000>,
32+
<0x2 0x10e70000 0x0 0x90000>,
33+
<0x2 0x11e70000 0x0 0x90000>,
34+
<0x2 0x12e70000 0x0 0x90000>;
35+
};
2136

2237
&gpu {
2338
compatible = "apple,agx-t6000", "apple,agx-g13x";

arch/arm64/boot/dts/apple/t6001.dtsi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,18 @@
7070
};
7171
};
7272

73+
&pmp {
74+
apple,pio-ranges = <0x2 0x82000000 0x0 0x1000000>,
75+
<0x3 0x4000000 0x0 0x1000000>,
76+
<0x3 0x83000000 0x0 0x1000000>,
77+
<0x4 0x2000000 0x0 0x1000000>,
78+
<0x2 0x10e70000 0x0 0x90000>,
79+
<0x2 0x11e70000 0x0 0x90000>,
80+
<0x2 0x12e70000 0x0 0x90000>,
81+
<0x4 0x82000000 0x0 0x1000000>,
82+
<0x5 0x2000000 0x0 0x1000000>;
83+
};
84+
7385
&gpu {
7486
compatible = "apple,agx-t6001", "apple,agx-g13c", "apple,agx-g13s";
7587
};

arch/arm64/boot/dts/apple/t6002.dtsi

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,63 @@
320320
power-domains = <&ps_afr>, <&ps_afr_die1>;
321321
};
322322

323+
&pmp {
324+
apple,pio-ranges = <0x2 0x82000000 0x0 0x1000000>,
325+
<0x3 0x4000000 0x0 0x1000000>,
326+
<0x3 0x83000000 0x0 0x1000000>,
327+
<0x4 0x2000000 0x0 0x1000000>,
328+
<0x2 0x10e70000 0x0 0x90000>,
329+
<0x2 0x11e70000 0x0 0x90000>,
330+
<0x2 0x12e70000 0x0 0x90000>,
331+
<0x4 0x82000000 0x0 0x1000000>,
332+
<0x5 0x2000000 0x0 0x1000000>,
333+
<0x22 0x82000000 0x0 0x1000000>,
334+
<0x23 0x4000000 0x0 0x1000000>,
335+
<0x23 0x83000000 0x0 0x1000000>,
336+
<0x24 0x2000000 0x0 0x1000000>,
337+
<0x24 0x82000000 0x0 0x1000000>,
338+
<0x25 0x2000000 0x0 0x1000000>,
339+
<0x22 0x10e70000 0x0 0x90000>,
340+
<0x22 0x11e70000 0x0 0x90000>,
341+
<0x22 0x12e70000 0x0 0x90000>;
342+
};
343+
344+
&pmp_report {
345+
pmp_report_dispext0_die1: report@33 {
346+
compatible = "apple,t6000-pmp-v2-report-entry";
347+
reg = <0x33>;
348+
label = "pmp-dispext0_die1";
349+
#power-domain-cells = <0>;
350+
power-domains = <&ps_dispext0_cpu0_die1>;
351+
};
352+
353+
pmp_report_dispext1_die1: report@34 {
354+
compatible = "apple,t6000-pmp-v2-report-entry";
355+
reg = <0x34>;
356+
label = "pmp-dispext1_die1";
357+
#power-domain-cells = <0>;
358+
power-domains = <&ps_dispext1_cpu0_die1>;
359+
};
360+
361+
pmp_report_dispext2_die1: report@35 {
362+
compatible = "apple,t6000-pmp-v2-report-entry";
363+
reg = <0x35>;
364+
label = "pmp-dispext2_die1";
365+
#power-domain-cells = <0>;
366+
power-domains = <&ps_dispext1_cpu0_die1>;
367+
status = "disabled";
368+
};
369+
370+
pmp_report_dispext3_die1: report@36 {
371+
compatible = "apple,t6000-pmp-v2-report-entry";
372+
reg = <0x36>;
373+
label = "pmp-dispext3_die1";
374+
#power-domain-cells = <0>;
375+
power-domains = <&ps_dispext1_cpu0_die1>;
376+
status = "disabled";
377+
};
378+
};
379+
323380
&gpu {
324381
compatible = "apple,agx-t6002", "apple,agx-g13d", "apple,agx-g13s";
325382
};

arch/arm64/boot/dts/apple/t600x-common.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
aliases {
1515
gpu = &gpu;
16+
pmp = &pmp;
1617
};
1718

1819
cpus {

arch/arm64/boot/dts/apple/t600x-die0.dtsi

Lines changed: 187 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,190 @@
4040
#apple,bw-scratch-cells = <3>;
4141
};
4242

43+
pmp_dart: iommu@28e300000 {
44+
compatible = "apple,t6000-dart";
45+
reg = <0x2 0x8e300000 0x0 0x4000>;
46+
#iommu-cells = <1>;
47+
interrupt-parent = <&aic>;
48+
interrupts = <AIC_IRQ 0 1010 IRQ_TYPE_LEVEL_HIGH>;
49+
power-domains = <&ps_pmp>;
50+
};
51+
52+
pmp_report: pmp_report@28e3c0000 {
53+
compatible = "apple,t6000-pmp-v2-report";
54+
reg = <0x2 0x8e3c0000 0x0 0x20000>;
55+
power-domains = <&ps_pms_sram>;
56+
#address-cells = <1>;
57+
#size-cells = <0>;
58+
59+
pmp_report_gfx: report@9 {
60+
compatible = "apple,t6000-pmp-v2-report-entry";
61+
reg = <0x9>;
62+
label = "pmp-gfx";
63+
#power-domain-cells = <0>;
64+
power-domains = <&ps_gfx>;
65+
};
66+
67+
pmp_report_ane_sys: report@a {
68+
compatible = "apple,t6000-pmp-v2-report-entry";
69+
reg = <0xa>;
70+
label = "pmp-ane-sys";
71+
#power-domain-cells = <0>;
72+
power-domains = <&ps_ane_sys>;
73+
status = "disabled";
74+
};
75+
76+
pmp_report_isp_sys: report@b {
77+
compatible = "apple,t6000-pmp-v2-report-entry";
78+
reg = <0xb>;
79+
label = "pmp-isp-sys";
80+
#power-domain-cells = <0>;
81+
power-domains = <&ps_isp_sys>;
82+
};
83+
84+
pmp_report_disp0: report@c {
85+
compatible = "apple,t6000-pmp-v2-report-entry";
86+
reg = <0xc>;
87+
label = "pmp-disp0";
88+
#power-domain-cells = <0>;
89+
power-domains = <&ps_disp0_cpu0>;
90+
apple,always-on;
91+
};
92+
93+
pmp_report_dispext0: report@d {
94+
compatible = "apple,t6000-pmp-v2-report-entry";
95+
reg = <0xd>;
96+
label = "pmp-dispext0";
97+
#power-domain-cells = <0>;
98+
power-domains = <&ps_dispext0_cpu0>;
99+
};
100+
101+
pmp_report_dispext1: report@e {
102+
compatible = "apple,t6000-pmp-v2-report-entry";
103+
reg = <0xe>;
104+
label = "pmp-dispext1";
105+
#power-domain-cells = <0>;
106+
power-domains = <&ps_dispext1_cpu0>;
107+
};
108+
109+
pmp_report_venc_sys: report@10 {
110+
compatible = "apple,t6000-pmp-v2-report-entry";
111+
reg = <0x10>;
112+
label = "pmp-venc-sys";
113+
#power-domain-cells = <0>;
114+
power-domains = <&ps_venc_sys>;
115+
status = "disabled";
116+
};
117+
118+
pmp_report_avd_sys: report@11 {
119+
compatible = "apple,t6000-pmp-v2-report-entry";
120+
reg = <0x11>;
121+
label = "pmp-avd-sys";
122+
#power-domain-cells = <0>;
123+
power-domains = <&ps_avd_sys>;
124+
status = "disabled";
125+
};
126+
127+
pmp_report_msr0: report@12 {
128+
compatible = "apple,t6000-pmp-v2-report-entry";
129+
reg = <0x12>;
130+
label = "pmp-msr0";
131+
#power-domain-cells = <0>;
132+
power-domains = <&ps_msr0>;
133+
status = "disabled";
134+
};
135+
136+
pmp_report_jpg: report@13 {
137+
compatible = "apple,t6000-pmp-v2-report-entry";
138+
reg = <0x13>;
139+
label = "pmp-jpg";
140+
#power-domain-cells = <0>;
141+
power-domains = <&ps_jpg>;
142+
status = "disabled";
143+
};
144+
145+
pmp_report_scodec: report@14 {
146+
compatible = "apple,t6000-pmp-v2-report-entry";
147+
reg = <0x14>;
148+
label = "pmp-scodec";
149+
#power-domain-cells = <0>;
150+
power-domains = <&ps_scodec>;
151+
status = "disabled";
152+
};
153+
154+
pmp_report_dispext2: report@20 {
155+
compatible = "apple,t6000-pmp-v2-report-entry";
156+
reg = <0x20>;
157+
label = "pmp-dispext2";
158+
#power-domain-cells = <0>;
159+
power-domains = <&ps_dispext2_cpu0>;
160+
status = "disabled";
161+
};
162+
163+
pmp_report_dispext3: report@21 {
164+
compatible = "apple,t6000-pmp-v2-report-entry";
165+
reg = <0x21>;
166+
label = "pmp-dispext3";
167+
#power-domain-cells = <0>;
168+
power-domains = <&ps_dispext3_cpu0>;
169+
status = "disabled";
170+
};
171+
172+
pmp_report_venc1: report@22 {
173+
compatible = "apple,t6000-pmp-v2-report-entry";
174+
reg = <0x22>;
175+
label = "pmp-venc1";
176+
#power-domain-cells = <0>;
177+
power-domains = <&ps_venc1_sys>;
178+
status = "disabled";
179+
};
180+
181+
pmp_report_msr1: report@23 {
182+
compatible = "apple,t6000-pmp-v2-report-entry";
183+
reg = <0x23>;
184+
label = "pmp-msr1";
185+
#power-domain-cells = <0>;
186+
power-domains = <&ps_msr1>;
187+
status = "disabled";
188+
};
189+
190+
pmp_report_prores: report@24 {
191+
compatible = "apple,t6000-pmp-v2-report-entry";
192+
reg = <0x24>;
193+
label = "pmp-prores";
194+
#power-domain-cells = <0>;
195+
power-domains = <&ps_prores>;
196+
status = "disabled";
197+
};
198+
};
199+
200+
pmp: pmp@28e700000 {
201+
compatible = "apple,t6000-pmp-v2";
202+
reg = <0x2 0x8e700000 0x0 0x100000>,
203+
<0x2 0x8ec00000 0x0 0x4000>;
204+
reg-names = "pmp", "asc";
205+
mboxes = <&pmp_mbox>;
206+
mbox-names = "mbox";
207+
iommus = <&pmp_dart 0>;
208+
power-domains = <&ps_pmp>;
209+
tunables {
210+
};
211+
};
212+
213+
pmp_mbox: mbox@28ec08000 {
214+
compatible = "apple,t6000-asc-mailbox", "apple,asc-mailbox-v4";
215+
reg = <0x2 0x8ec08000 0x0 0x4000>;
216+
interrupt-parent = <&aic>;
217+
interrupts = <AIC_IRQ 0 1006 IRQ_TYPE_LEVEL_HIGH>,
218+
<AIC_IRQ 0 1007 IRQ_TYPE_LEVEL_HIGH>,
219+
<AIC_IRQ 0 1008 IRQ_TYPE_LEVEL_HIGH>,
220+
<AIC_IRQ 0 1009 IRQ_TYPE_LEVEL_HIGH>;
221+
interrupt-names = "send-empty", "send-not-empty",
222+
"recv-empty", "recv-not-empty";
223+
#mbox-cells = <0>;
224+
power-domains = <&ps_pmp>, <&ps_pms_sram>;
225+
};
226+
43227
smc: smc@290400000 {
44228
compatible = "apple,t6000-smc", "apple,smc";
45229
reg = <0x2 0x90400000 0x0 0x4000>,
@@ -333,7 +517,7 @@
333517
<0x3 0x8b344000 0x0 0x4000>,
334518
<0x3 0x8b800000 0x0 0x800000>;
335519
apple,bw-scratch = <&pmgr_dcp 0 4 0x988>;
336-
power-domains = <&ps_disp0_cpu0>;
520+
power-domains = <&pmp_report_disp0>;
337521
resets = <&ps_disp0_cpu0>;
338522
clocks = <&clk_disp0>;
339523
phandle = <&dcp>;
@@ -545,7 +729,7 @@
545729
<0x4 0x4000000 0 0x1000000>;
546730
reg-names = "asc", "sgx";
547731
mboxes = <&agx_mbox>;
548-
power-domains = <&ps_gfx>;
732+
power-domains = <&pmp_report_gfx>;
549733
memory-region = <&uat_ttbs>, <&uat_pagetables>, <&uat_handoff>,
550734
<&gpu_hw_cal_a>, <&gpu_hw_cal_b>, <&gpu_globals>;
551735
memory-region-names = "ttbs", "pagetables", "handoff",
@@ -644,7 +828,7 @@
644828
<0x3 0x861043f0 0x0 0x100>;
645829
interrupt-parent = <&aic>;
646830
interrupts = <AIC_IRQ 0 538 IRQ_TYPE_LEVEL_HIGH>;
647-
power-domains = <&ps_isp_sys>, <&ps_isp_set0>,
831+
power-domains = <&pmp_report_isp_sys>, <&ps_isp_set0>,
648832
<&ps_isp_set1>, <&ps_isp_fe>, <&ps_isp_set3>,
649833
<&ps_isp_set4>, <&ps_isp_set5>, <&ps_isp_set6>,
650834
<&ps_isp_set7>, <&ps_isp_set8>;

arch/arm64/boot/dts/apple/t600x-dieX.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
<0x2 0x89344000 0x0 0x4000>,
7676
<0x2 0x89800000 0x0 0x800000>;
7777
apple,bw-scratch = <&pmgr_dcp 0 4 0x990>;
78-
power-domains = <&DIE_NODE(ps_dispext0_cpu0)>;
78+
power-domains = <&DIE_NODE(pmp_report_dispext0)>;
7979
resets = <&DIE_NODE(ps_dispext0_cpu0)>;
8080
clocks = <&DIE_NODE(clk_dispext0)>;
8181
phandle = <&DIE_NODE(dcpext0)>;
@@ -152,7 +152,7 @@
152152
<0x2 0x8c344000 0x0 0x4000>,
153153
<0x2 0x8c800000 0x0 0x800000>;
154154
apple,bw-scratch = <&pmgr_dcp 0 4 0x998>;
155-
power-domains = <&DIE_NODE(ps_dispext1_cpu0)>;
155+
power-domains = <&DIE_NODE(pmp_report_dispext1)>;
156156
resets = <&DIE_NODE(ps_dispext1_cpu0)>;
157157
clocks = <&DIE_NODE(clk_dispext1)>;
158158
phandle = <&DIE_NODE(dcpext1)>;

arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124

125125
/* remove once m1n1 enables sio nodes after setup */
126126
&sio {
127-
status = "okay";
127+
status = "okay";
128128
};
129129

130130
&dpaudio1 {

arch/arm64/boot/dts/apple/t6020.dtsi

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@
1818
};
1919

2020
/delete-node/ &pmgr_south;
21+
/delete-node/ &pmp_report_dispext2;
22+
/delete-node/ &pmp_report_dispext3;
23+
/delete-node/ &pmp_report_venc1;
24+
/delete-node/ &pmp_report_msr1;
25+
/delete-node/ &pmp_report_prores;
26+
27+
&pmp {
28+
apple,pio-ranges = <0x2 0x80000000 0x0 0x1000000>,
29+
<0x3 0x0 0x0 0x1000000>,
30+
<0x3 0x80000000 0x0 0x1000000>,
31+
<0x4 0x0 0x0 0x1000000>,
32+
<0x3 0x40000000 0x0 0x1000000>,
33+
<0x2 0x10e70000 0x0 0x90000>,
34+
<0x2 0x11e70000 0x0 0x90000>,
35+
<0x2 0x12e70000 0x0 0x90000>;
36+
};
2137

2238
&gpu {
2339
compatible = "apple,agx-t6020", "apple,agx-g14x", "apple,agx-g14s";

0 commit comments

Comments
 (0)