Skip to content

Commit afb51b2

Browse files
WhatAmISupposedToPutHerejannau
authored andcommitted
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 ad6c0c0 commit afb51b2

14 files changed

Lines changed: 711 additions & 14 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: 188 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,197 @@
3434
apple,dcs-min-ps = <7>;
3535
};
3636

37+
pmp_dart: iommu@28e300000 {
38+
compatible = "apple,t6000-dart";
39+
reg = <0x2 0x8e300000 0x0 0x4000>;
40+
#iommu-cells = <1>;
41+
interrupt-parent = <&aic>;
42+
interrupts = <AIC_IRQ 0 1010 IRQ_TYPE_LEVEL_HIGH>;
43+
power-domains = <&ps_pmp>;
44+
};
45+
46+
pmp_report: pmp_report@28e3c0000 {
47+
compatible = "apple,t6000-pmp-v2-report";
48+
reg = <0x2 0x8e3c0000 0x0 0x20000>;
49+
power-domains = <&ps_pms_sram>;
50+
#address-cells = <1>;
51+
#size-cells = <0>;
52+
53+
pmp_report_gfx: report@9 {
54+
compatible = "apple,t6000-pmp-v2-report-entry";
55+
reg = <0x9>;
56+
label = "pmp-gfx";
57+
#power-domain-cells = <0>;
58+
power-domains = <&ps_gfx>;
59+
};
60+
61+
pmp_report_ane_sys: report@a {
62+
compatible = "apple,t6000-pmp-v2-report-entry";
63+
reg = <0xa>;
64+
label = "pmp-ane-sys";
65+
#power-domain-cells = <0>;
66+
power-domains = <&ps_ane_sys>;
67+
status = "disabled";
68+
};
69+
70+
pmp_report_isp_sys: report@b {
71+
compatible = "apple,t6000-pmp-v2-report-entry";
72+
reg = <0xb>;
73+
label = "pmp-isp-sys";
74+
#power-domain-cells = <0>;
75+
power-domains = <&ps_isp_sys>;
76+
};
77+
78+
pmp_report_disp0: report@c {
79+
compatible = "apple,t6000-pmp-v2-report-entry";
80+
reg = <0xc>;
81+
label = "pmp-disp0";
82+
#power-domain-cells = <0>;
83+
power-domains = <&ps_disp0_cpu0>;
84+
apple,always-on;
85+
};
86+
87+
pmp_report_dispext0: report@d {
88+
compatible = "apple,t6000-pmp-v2-report-entry";
89+
reg = <0xd>;
90+
label = "pmp-dispext0";
91+
#power-domain-cells = <0>;
92+
power-domains = <&ps_dispext0_cpu0>;
93+
};
94+
95+
pmp_report_dispext1: report@e {
96+
compatible = "apple,t6000-pmp-v2-report-entry";
97+
reg = <0xe>;
98+
label = "pmp-dispext1";
99+
#power-domain-cells = <0>;
100+
power-domains = <&ps_dispext1_cpu0>;
101+
};
102+
103+
pmp_report_venc_sys: report@10 {
104+
compatible = "apple,t6000-pmp-v2-report-entry";
105+
reg = <0x10>;
106+
label = "pmp-venc-sys";
107+
#power-domain-cells = <0>;
108+
power-domains = <&ps_venc_sys>;
109+
status = "disabled";
110+
};
111+
112+
pmp_report_avd_sys: report@11 {
113+
compatible = "apple,t6000-pmp-v2-report-entry";
114+
reg = <0x11>;
115+
label = "pmp-avd-sys";
116+
#power-domain-cells = <0>;
117+
power-domains = <&ps_avd_sys>;
118+
status = "disabled";
119+
};
120+
121+
pmp_report_msr0: report@12 {
122+
compatible = "apple,t6000-pmp-v2-report-entry";
123+
reg = <0x12>;
124+
label = "pmp-msr0";
125+
#power-domain-cells = <0>;
126+
power-domains = <&ps_msr0>;
127+
status = "disabled";
128+
};
129+
130+
pmp_report_jpg: report@13 {
131+
compatible = "apple,t6000-pmp-v2-report-entry";
132+
reg = <0x13>;
133+
label = "pmp-jpg";
134+
#power-domain-cells = <0>;
135+
power-domains = <&ps_jpg>;
136+
status = "disabled";
137+
};
138+
139+
pmp_report_scodec: report@14 {
140+
compatible = "apple,t6000-pmp-v2-report-entry";
141+
reg = <0x14>;
142+
label = "pmp-scodec";
143+
#power-domain-cells = <0>;
144+
power-domains = <&ps_scodec>;
145+
status = "disabled";
146+
};
147+
148+
pmp_report_dispext2: report@20 {
149+
compatible = "apple,t6000-pmp-v2-report-entry";
150+
reg = <0x20>;
151+
label = "pmp-dispext2";
152+
#power-domain-cells = <0>;
153+
power-domains = <&ps_dispext2_cpu0>;
154+
status = "disabled";
155+
};
156+
157+
pmp_report_dispext3: report@21 {
158+
compatible = "apple,t6000-pmp-v2-report-entry";
159+
reg = <0x21>;
160+
label = "pmp-dispext3";
161+
#power-domain-cells = <0>;
162+
power-domains = <&ps_dispext3_cpu0>;
163+
status = "disabled";
164+
};
165+
166+
pmp_report_venc1: report@22 {
167+
compatible = "apple,t6000-pmp-v2-report-entry";
168+
reg = <0x22>;
169+
label = "pmp-venc1";
170+
#power-domain-cells = <0>;
171+
power-domains = <&ps_venc1_sys>;
172+
status = "disabled";
173+
};
174+
175+
pmp_report_msr1: report@23 {
176+
compatible = "apple,t6000-pmp-v2-report-entry";
177+
reg = <0x23>;
178+
label = "pmp-msr1";
179+
#power-domain-cells = <0>;
180+
power-domains = <&ps_msr1>;
181+
status = "disabled";
182+
};
183+
184+
pmp_report_prores: report@24 {
185+
compatible = "apple,t6000-pmp-v2-report-entry";
186+
reg = <0x24>;
187+
label = "pmp-prores";
188+
#power-domain-cells = <0>;
189+
power-domains = <&ps_prores>;
190+
status = "disabled";
191+
};
192+
};
193+
37194
pmgr_dcp: power-management@28e3d0000 {
38195
reg = <0x2 0x8e3d0000 0x0 0x4000>;
39196
reg-names = "dcp-fw-pmgr";
40197
#apple,bw-scratch-cells = <3>;
41198
};
42199

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+
status = "disabled";
212+
};
213+
214+
pmp_mbox: mbox@28ec08000 {
215+
compatible = "apple,t6000-asc-mailbox", "apple,asc-mailbox-v4";
216+
reg = <0x2 0x8ec08000 0x0 0x4000>;
217+
interrupt-parent = <&aic>;
218+
interrupts = <AIC_IRQ 0 1006 IRQ_TYPE_LEVEL_HIGH>,
219+
<AIC_IRQ 0 1007 IRQ_TYPE_LEVEL_HIGH>,
220+
<AIC_IRQ 0 1008 IRQ_TYPE_LEVEL_HIGH>,
221+
<AIC_IRQ 0 1009 IRQ_TYPE_LEVEL_HIGH>;
222+
interrupt-names = "send-empty", "send-not-empty",
223+
"recv-empty", "recv-not-empty";
224+
#mbox-cells = <0>;
225+
power-domains = <&ps_pmp>, <&ps_pms_sram>;
226+
};
227+
43228
smc: smc@290400000 {
44229
compatible = "apple,t6000-smc", "apple,smc";
45230
reg = <0x2 0x90400000 0x0 0x4000>,
@@ -333,7 +518,7 @@
333518
<0x3 0x8b344000 0x0 0x4000>,
334519
<0x3 0x8b800000 0x0 0x800000>;
335520
apple,bw-scratch = <&pmgr_dcp 0 4 0x988>;
336-
power-domains = <&ps_disp0_cpu0>;
521+
power-domains = <&pmp_report_disp0>;
337522
resets = <&ps_disp0_cpu0>;
338523
clocks = <&clk_disp0>;
339524
phandle = <&dcp>;
@@ -545,7 +730,7 @@
545730
<0x4 0x4000000 0 0x1000000>;
546731
reg-names = "asc", "sgx";
547732
mboxes = <&agx_mbox>;
548-
power-domains = <&ps_gfx>;
733+
power-domains = <&pmp_report_gfx>;
549734
memory-region = <&uat_ttbs>, <&uat_pagetables>, <&uat_handoff>,
550735
<&gpu_hw_cal_a>, <&gpu_hw_cal_b>, <&gpu_globals>;
551736
memory-region-names = "ttbs", "pagetables", "handoff",
@@ -644,7 +829,7 @@
644829
<0x3 0x861043f0 0x0 0x100>;
645830
interrupt-parent = <&aic>;
646831
interrupts = <AIC_IRQ 0 538 IRQ_TYPE_LEVEL_HIGH>;
647-
power-domains = <&ps_isp_sys>, <&ps_isp_set0>,
832+
power-domains = <&pmp_report_isp_sys>, <&ps_isp_set0>,
648833
<&ps_isp_set1>, <&ps_isp_fe>, <&ps_isp_set3>,
649834
<&ps_isp_set4>, <&ps_isp_set5>, <&ps_isp_set6>,
650835
<&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/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";

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,19 @@
7373
};
7474
};
7575

76+
&pmp {
77+
apple,pio-ranges = <0x2 0x80000000 0x0 0x1000000>,
78+
<0x3 0x0 0x0 0x1000000>,
79+
<0x3 0x80000000 0x0 0x1000000>,
80+
<0x4 0x0 0x0 0x1000000>,
81+
<0x3 0x40000000 0x0 0x1000000>,
82+
<0x2 0x10e70000 0x0 0x90000>,
83+
<0x2 0x11e70000 0x0 0x90000>,
84+
<0x2 0x12e70000 0x0 0x90000>,
85+
<0x4 0x80000000 0x0 0x1000000>,
86+
<0x5 0x0 0x0 0x1000000>;
87+
};
88+
7689
&gpu {
7790
compatible = "apple,agx-t6021", "apple,agx-g14x", "apple,agx-g14c", "apple,agx-g14s";
7891

0 commit comments

Comments
 (0)