Skip to content

Commit b899989

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 750c3e3 commit b899989

File tree

15 files changed

+413
-15
lines changed

15 files changed

+413
-15
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@
1919

2020
/delete-node/ &pmgr_south;
2121

22+
&pmp {
23+
apple,pio-ranges = <0x2 0x82000000 0x0 0x1000000>,
24+
<0x3 0x4000000 0x0 0x1000000>,
25+
<0x3 0x83000000 0x0 0x1000000>,
26+
<0x4 0x2000000 0x0 0x1000000>,
27+
<0x2 0x10e70000 0x0 0x90000>,
28+
<0x2 0x11e70000 0x0 0x90000>,
29+
<0x2 0x12e70000 0x0 0x90000>;
30+
};
31+
2232
&gpu {
2333
compatible = "apple,agx-t6000", "apple,agx-g13x";
2434
};

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: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,45 @@
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@20 {
346+
compatible = "apple,t6000-pmp-v2-report-entry";
347+
reg = <0x20>;
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@21 {
354+
compatible = "apple,t6000-pmp-v2-report-entry";
355+
reg = <0x21>;
356+
label = "pmp-dispext1_die1";
357+
#power-domain-cells = <0>;
358+
power-domains = <&ps_dispext1_cpu0_die1>;
359+
};
360+
};
361+
323362
&gpu {
324363
compatible = "apple,agx-t6002", "apple,agx-g13d", "apple,agx-g13s";
325364
};

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: 88 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,91 @@
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_isp_sys: report@b {
68+
compatible = "apple,t6000-pmp-v2-report-entry";
69+
reg = <0xb>;
70+
label = "pmp-isp-sys";
71+
#power-domain-cells = <0>;
72+
power-domains = <&ps_isp_sys>;
73+
};
74+
75+
pmp_report_disp0: report@c {
76+
compatible = "apple,t6000-pmp-v2-report-entry";
77+
reg = <0xc>;
78+
label = "pmp-disp0";
79+
#power-domain-cells = <0>;
80+
power-domains = <&ps_disp0_cpu0>;
81+
apple,always-on;
82+
};
83+
84+
pmp_report_dispext0: report@d {
85+
compatible = "apple,t6000-pmp-v2-report-entry";
86+
reg = <0xd>;
87+
label = "pmp-dispext0";
88+
#power-domain-cells = <0>;
89+
power-domains = <&ps_dispext0_cpu0>;
90+
};
91+
92+
pmp_report_dispext1: report@e {
93+
compatible = "apple,t6000-pmp-v2-report-entry";
94+
reg = <0xe>;
95+
label = "pmp-dispext1";
96+
#power-domain-cells = <0>;
97+
power-domains = <&ps_dispext1_cpu0>;
98+
};
99+
};
100+
101+
pmp: pmp@28e700000 {
102+
compatible = "apple,t6000-pmp-v2";
103+
reg = <0x2 0x8e700000 0x0 0x100000>,
104+
<0x2 0x8ec00000 0x0 0x4000>;
105+
reg-names = "pmp", "asc";
106+
mboxes = <&pmp_mbox>;
107+
mbox-names = "mbox";
108+
iommus = <&pmp_dart 0>;
109+
power-domains = <&ps_pmp>;
110+
tunables {
111+
};
112+
};
113+
114+
pmp_mbox: mbox@28ec08000 {
115+
compatible = "apple,t6000-asc-mailbox", "apple,asc-mailbox-v4";
116+
reg = <0x2 0x8ec08000 0x0 0x4000>;
117+
interrupt-parent = <&aic>;
118+
interrupts = <AIC_IRQ 0 1006 IRQ_TYPE_LEVEL_HIGH>,
119+
<AIC_IRQ 0 1007 IRQ_TYPE_LEVEL_HIGH>,
120+
<AIC_IRQ 0 1008 IRQ_TYPE_LEVEL_HIGH>,
121+
<AIC_IRQ 0 1009 IRQ_TYPE_LEVEL_HIGH>;
122+
interrupt-names = "send-empty", "send-not-empty",
123+
"recv-empty", "recv-not-empty";
124+
#mbox-cells = <0>;
125+
power-domains = <&ps_pmp>, <&ps_pms_sram>;
126+
};
127+
43128
smc: smc@290400000 {
44129
compatible = "apple,t6000-smc", "apple,smc";
45130
reg = <0x2 0x90400000 0x0 0x4000>,
@@ -333,7 +418,7 @@
333418
<0x3 0x8b344000 0x0 0x4000>,
334419
<0x3 0x8b800000 0x0 0x800000>;
335420
apple,bw-scratch = <&pmgr_dcp 0 4 0x988>;
336-
power-domains = <&ps_disp0_cpu0>;
421+
power-domains = <&pmp_report_disp0>;
337422
resets = <&ps_disp0_cpu0>;
338423
clocks = <&clk_disp0>;
339424
phandle = <&dcp>;
@@ -545,7 +630,7 @@
545630
<0x4 0x4000000 0 0x1000000>;
546631
reg-names = "asc", "sgx";
547632
mboxes = <&agx_mbox>;
548-
power-domains = <&ps_gfx>;
633+
power-domains = <&pmp_report_gfx>;
549634
memory-region = <&uat_ttbs>, <&uat_pagetables>, <&uat_handoff>,
550635
<&gpu_hw_cal_a>, <&gpu_hw_cal_b>, <&gpu_globals>;
551636
memory-region-names = "ttbs", "pagetables", "handoff",
@@ -644,7 +729,7 @@
644729
<0x3 0x861043f0 0x0 0x100>;
645730
interrupt-parent = <&aic>;
646731
interrupts = <AIC_IRQ 0 538 IRQ_TYPE_LEVEL_HIGH>;
647-
power-domains = <&ps_isp_sys>, <&ps_isp_set0>,
732+
power-domains = <&pmp_report_isp_sys>, <&ps_isp_set0>,
648733
<&ps_isp_set1>, <&ps_isp_fe>, <&ps_isp_set3>,
649734
<&ps_isp_set4>, <&ps_isp_set5>, <&ps_isp_set6>,
650735
<&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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@
1919

2020
/delete-node/ &pmgr_south;
2121

22+
&pmp {
23+
apple,pio-ranges = <0x2 0x80000000 0x0 0x1000000>,
24+
<0x3 0x0 0x0 0x1000000>,
25+
<0x3 0x80000000 0x0 0x1000000>,
26+
<0x4 0x0 0x0 0x1000000>,
27+
<0x3 0x40000000 0x0 0x1000000>,
28+
<0x2 0x10e70000 0x0 0x90000>,
29+
<0x2 0x11e70000 0x0 0x90000>,
30+
<0x2 0x12e70000 0x0 0x90000>;
31+
};
32+
2233
&gpu {
2334
compatible = "apple,agx-t6020", "apple,agx-g14x", "apple,agx-g14s";
2435

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

arch/arm64/boot/dts/apple/t6022-jxxxd.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
/* delete power-domains for missing disp0 / disp0_die1 */
6969
/delete-node/ &ps_disp0_cpu0;
7070
/delete-node/ &ps_disp0_fe;
71+
/delete-node/ &pmp_report_disp0;
7172

7273
/delete-node/ &ps_disp0_cpu0_die1;
7374
/delete-node/ &ps_disp0_fe_die1;

0 commit comments

Comments
 (0)