Skip to content

Commit e6af0a6

Browse files
eilnWhatAmISupposedToPutHere
authored andcommitted
arm64: dts: apple: Add ISP nodes
Adds device tree entries for the ISP and camera sensors Signed-off-by: Eileen Yoon <[email protected]> Co-developed-by: Janne Grunau <[email protected]> Signed-off-by: Janne Grunau <[email protected]> Co-developed-by: Hector Martin <[email protected]> Signed-off-by: Hector Martin <[email protected]> Co-developed-by: Asahi Lina <[email protected]> Signed-off-by: Asahi Lina <[email protected]> Signed-off-by: Sasha Finkelstein <[email protected]>
1 parent 9cf440c commit e6af0a6

File tree

14 files changed

+565
-0
lines changed

14 files changed

+565
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Common ISP configuration for Apple silicon platforms.
4+
*
5+
* Copyright The Asahi Linux Contributors
6+
*/
7+
8+
/ {
9+
aliases {
10+
isp = &isp;
11+
};
12+
13+
reserved-memory {
14+
#address-cells = <2>;
15+
#size-cells = <2>;
16+
ranges;
17+
18+
isp_heap: isp-heap {
19+
/* Filled in by bootloder */
20+
reg = <0 0 0 0>;
21+
no-map;
22+
};
23+
};
24+
};
25+
26+
&isp {
27+
memory-region = <&isp_heap>;
28+
status = "okay";
29+
};
30+
31+
&isp_dart0 {
32+
status = "okay";
33+
};
34+
35+
&isp_dart1 {
36+
status = "okay";
37+
};
38+
39+
&isp_dart2 {
40+
status = "okay";
41+
};
42+
43+
&ps_isp_sys {
44+
status = "okay";
45+
};

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

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,56 @@
5353
interrupts = <AIC_IRQ 0 631 IRQ_TYPE_LEVEL_HIGH>;
5454
};
5555

56+
isp: isp@384000000 {
57+
compatible = "apple,t6000-isp", "apple,isp";
58+
reg = <0x3 0x84000000 0x0 0x2000000>,
59+
<0x3 0x86104000 0x0 0x100>,
60+
<0x3 0x86104170 0x0 0x100>,
61+
<0x3 0x861043f0 0x0 0x100>;
62+
reg-names = "coproc", "mbox", "gpio", "mbox2";
63+
iommus = <&isp_dart0 0>, <&isp_dart1 0>, <&isp_dart2 0>;
64+
interrupt-parent = <&aic>;
65+
interrupts = <AIC_IRQ 0 538 IRQ_TYPE_LEVEL_HIGH>;
66+
power-domains = <&ps_isp_sys>, <&ps_isp_set0>,
67+
<&ps_isp_set1>, <&ps_isp_fe>, <&ps_isp_set3>,
68+
<&ps_isp_set4>, <&ps_isp_set5>, <&ps_isp_set6>,
69+
<&ps_isp_set7>, <&ps_isp_set8>;
70+
status = "disabled";
71+
};
72+
73+
isp_dart0: iommu@3860e8000 {
74+
compatible = "apple,t6000-dart";
75+
reg = <0x3 0x860e8000 0x0 0x4000>;
76+
interrupt-parent = <&aic>;
77+
interrupts = <AIC_IRQ 0 543 IRQ_TYPE_LEVEL_HIGH>;
78+
#iommu-cells = <1>;
79+
power-domains = <&ps_isp_sys>;
80+
apple,dma-range = <0x0 0x0 0x0 0xa0000000>;
81+
status = "disabled";
82+
};
83+
84+
isp_dart1: iommu@3860f4000 {
85+
compatible = "apple,t6000-dart";
86+
reg = <0x3 0x860f4000 0x0 0x4000>;
87+
interrupt-parent = <&aic>;
88+
interrupts = <AIC_IRQ 0 543 IRQ_TYPE_LEVEL_HIGH>;
89+
#iommu-cells = <1>;
90+
power-domains = <&ps_isp_sys>;
91+
apple,dma-range = <0x0 0x0 0x0 0xa0000000>;
92+
status = "disabled";
93+
};
94+
95+
isp_dart2: iommu@3860fc000 {
96+
compatible = "apple,t6000-dart";
97+
reg = <0x3 0x860fc000 0x0 0x4000>;
98+
interrupt-parent = <&aic>;
99+
interrupts = <AIC_IRQ 0 543 IRQ_TYPE_LEVEL_HIGH>;
100+
#iommu-cells = <1>;
101+
power-domains = <&ps_isp_sys>;
102+
apple,dma-range = <0x0 0x0 0x0 0xa0000000>;
103+
status = "disabled";
104+
};
105+
56106
sio_dart_0: iommu@39b004000 {
57107
compatible = "apple,t6000-dart";
58108
reg = <0x3 0x9b004000 0x0 0x4000>;

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,10 @@
119119
&fpwm0 {
120120
status = "okay";
121121
};
122+
123+
#include "isp-common.dtsi"
124+
125+
&isp {
126+
apple,platform-id = <3>;
127+
apple,temporal-filter = <0>;
128+
};

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

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,6 +1368,7 @@
13681368
#reset-cells = <0>;
13691369
label = DIE_LABEL(isp_sys);
13701370
power-domains = <&DIE_NODE(ps_afnc2_lw1)>;
1371+
status = "disabled";
13711372
};
13721373

13731374
DIE_NODE(ps_venc_sys): power-controller@3b0 {
@@ -1456,6 +1457,86 @@
14561457
label = DIE_LABEL(venc_me1);
14571458
power-domains = <&DIE_NODE(ps_venc_me0)>;
14581459
};
1460+
1461+
/* There is a dependency tree involved with these PDs,
1462+
* but we do not express it here since the ISP driver
1463+
* is supposed to sequence them in the right order anyway
1464+
* (and we do not know the exact tree structure).
1465+
*
1466+
* This also works around spurious parent PD activation
1467+
* on machines with ISP disabled (desktops).
1468+
*/
1469+
DIE_NODE(ps_isp_set0): power-controller@4000 {
1470+
compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
1471+
reg = <0x4000 4>;
1472+
#power-domain-cells = <0>;
1473+
#reset-cells = <0>;
1474+
label = "isp_set0";
1475+
};
1476+
1477+
DIE_NODE(ps_isp_set1): power-controller@4010 {
1478+
compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
1479+
reg = <0x4010 4>;
1480+
#power-domain-cells = <0>;
1481+
#reset-cells = <0>;
1482+
label = "isp_set1";
1483+
};
1484+
1485+
DIE_NODE(ps_isp_fe): power-controller@4008 {
1486+
compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
1487+
reg = <0x4008 4>;
1488+
#power-domain-cells = <0>;
1489+
#reset-cells = <0>;
1490+
label = "isp_set2";
1491+
};
1492+
1493+
DIE_NODE(ps_isp_set3): power-controller@4028 {
1494+
compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
1495+
reg = <0x4028 4>;
1496+
#power-domain-cells = <0>;
1497+
#reset-cells = <0>;
1498+
label = "isp_set3";
1499+
};
1500+
1501+
DIE_NODE(ps_isp_set4): power-controller@4020 {
1502+
compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
1503+
reg = <0x4020 4>;
1504+
#power-domain-cells = <0>;
1505+
#reset-cells = <0>;
1506+
label = "isp_set4";
1507+
};
1508+
1509+
DIE_NODE(ps_isp_set5): power-controller@4030 {
1510+
compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
1511+
reg = <0x4030 4>;
1512+
#power-domain-cells = <0>;
1513+
#reset-cells = <0>;
1514+
label = "isp_set5";
1515+
};
1516+
1517+
DIE_NODE(ps_isp_set6): power-controller@4018 {
1518+
compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
1519+
reg = <0x4018 4>;
1520+
#power-domain-cells = <0>;
1521+
#reset-cells = <0>;
1522+
label = "isp_set6";
1523+
};
1524+
1525+
DIE_NODE(ps_isp_set7): power-controller@4038 {
1526+
compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
1527+
reg = <0x4038 4>;
1528+
#power-domain-cells = <0>;
1529+
#reset-cells = <0>;
1530+
label = "isp_set7";
1531+
};
1532+
1533+
DIE_NODE(ps_isp_set8): power-controller@4040 {
1534+
compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
1535+
reg = <0x4040 4>;
1536+
#power-domain-cells = <0>;
1537+
#reset-cells = <0>;
1538+
label = "isp_set8";
1539+
};
14591540
};
14601541

14611542
&DIE_NODE(pmgr_south) {

arch/arm64/boot/dts/apple/t8103-j293.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,10 @@
4949
&fpwm1 {
5050
status = "okay";
5151
};
52+
53+
#include "isp-common.dtsi"
54+
55+
&isp {
56+
apple,temporal-filter = <0>;
57+
apple,platform-id = <1>;
58+
};

arch/arm64/boot/dts/apple/t8103-j313.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,10 @@
4141
&fpwm1 {
4242
status = "okay";
4343
};
44+
45+
#include "isp-common.dtsi"
46+
47+
&isp {
48+
apple,platform-id = <1>;
49+
apple,temporal-filter = <0>;
50+
};

arch/arm64/boot/dts/apple/t8103-j456.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,10 @@
7575
&pcie0_dart_2 {
7676
status = "okay";
7777
};
78+
79+
#include "isp-common.dtsi"
80+
81+
&isp {
82+
apple,platform-id = <2>;
83+
apple,temporal-filter = <0>;
84+
};

arch/arm64/boot/dts/apple/t8103-j457.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,10 @@
4848
&pcie0_dart_2 {
4949
status = "okay";
5050
};
51+
52+
#include "isp-common.dtsi"
53+
54+
&isp {
55+
apple,platform-id = <2>;
56+
apple,temporal-filter = <0>;
57+
};

arch/arm64/boot/dts/apple/t8103-pmgr.dtsi

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,7 @@
805805
#reset-cells = <0>;
806806
label = "isp_sys";
807807
power-domains = <&ps_rmx>;
808+
status = "disabled";
808809
};
809810

810811
ps_venc_sys: power-controller@408 {
@@ -1003,6 +1004,123 @@
10031004
apple,always-on; /* TODO: figure out if we can enable PM here */
10041005
apple,min-state = <4>;
10051006
};
1007+
1008+
/* There is a dependency tree involved with these PDs,
1009+
* but we do not express it here since the ISP driver
1010+
* is supposed to sequence them in the right order anyway
1011+
* (and we do not know the exact tree structure).
1012+
*
1013+
* This also works around spurious parent PD activation
1014+
* on machines with ISP disabled (desktops).
1015+
*/
1016+
ps_isp_set0: power-controller@4000 {
1017+
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
1018+
reg = <0x4000 4>;
1019+
#power-domain-cells = <0>;
1020+
#reset-cells = <0>;
1021+
label = "isp_set0";
1022+
apple,force-disable;
1023+
};
1024+
1025+
ps_isp_set1: power-controller@4008 {
1026+
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
1027+
reg = <0x4008 4>;
1028+
#power-domain-cells = <0>;
1029+
#reset-cells = <0>;
1030+
label = "isp_set1";
1031+
apple,force-disable;
1032+
apple,force-reset;
1033+
};
1034+
1035+
ps_isp_set2: power-controller@4010 {
1036+
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
1037+
reg = <0x4010 4>;
1038+
#power-domain-cells = <0>;
1039+
#reset-cells = <0>;
1040+
label = "isp_set2";
1041+
apple,force-disable;
1042+
apple,force-reset;
1043+
};
1044+
1045+
ps_isp_fe: power-controller@4018 {
1046+
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
1047+
reg = <0x4018 4>;
1048+
#power-domain-cells = <0>;
1049+
#reset-cells = <0>;
1050+
label = "isp_fe";
1051+
};
1052+
1053+
ps_isp_set4: power-controller@4020 {
1054+
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
1055+
reg = <0x4020 4>;
1056+
#power-domain-cells = <0>;
1057+
#reset-cells = <0>;
1058+
label = "isp_set4";
1059+
};
1060+
1061+
ps_isp_set5: power-controller@4028 {
1062+
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
1063+
reg = <0x4028 4>;
1064+
#power-domain-cells = <0>;
1065+
#reset-cells = <0>;
1066+
label = "isp_set5";
1067+
};
1068+
1069+
ps_isp_set6: power-controller@4030 {
1070+
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
1071+
reg = <0x4030 4>;
1072+
#power-domain-cells = <0>;
1073+
#reset-cells = <0>;
1074+
label = "isp_set6";
1075+
};
1076+
1077+
ps_isp_set7: power-controller@4038 {
1078+
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
1079+
reg = <0x4038 4>;
1080+
#power-domain-cells = <0>;
1081+
#reset-cells = <0>;
1082+
label = "isp_set7";
1083+
};
1084+
1085+
ps_isp_set8: power-controller@4040 {
1086+
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
1087+
reg = <0x4040 4>;
1088+
#power-domain-cells = <0>;
1089+
#reset-cells = <0>;
1090+
label = "isp_set8";
1091+
};
1092+
1093+
ps_isp_set9: power-controller@4048 {
1094+
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
1095+
reg = <0x4048 4>;
1096+
#power-domain-cells = <0>;
1097+
#reset-cells = <0>;
1098+
label = "isp_set9";
1099+
};
1100+
1101+
ps_isp_set10: power-controller@4050 {
1102+
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
1103+
reg = <0x4050 4>;
1104+
#power-domain-cells = <0>;
1105+
#reset-cells = <0>;
1106+
label = "isp_set10";
1107+
};
1108+
1109+
ps_isp_set11: power-controller@4058 {
1110+
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
1111+
reg = <0x4058 4>;
1112+
#power-domain-cells = <0>;
1113+
#reset-cells = <0>;
1114+
label = "isp_set11";
1115+
};
1116+
1117+
ps_isp_set12: power-controller@4060 {
1118+
compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
1119+
reg = <0x4060 4>;
1120+
#power-domain-cells = <0>;
1121+
#reset-cells = <0>;
1122+
label = "isp_set12";
1123+
};
10061124
};
10071125

10081126
&pmgr_mini {

0 commit comments

Comments
 (0)