Skip to content

Commit 7007788

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 09e0053 commit 7007788

18 files changed

+896
-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+
};
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* ISP configuration for platforms with IMX248 sensor.
4+
*
5+
* Copyright The Asahi Linux Contributors
6+
*/
7+
8+
#include "isp-common.dtsi"
9+
10+
&isp {
11+
apple,temporal-filter = <0>;
12+
13+
sensor-presets {
14+
/* 1280x720 */
15+
preset0 {
16+
apple,config-index = <0>;
17+
apple,input-size = <1296 736>;
18+
apple,output-size = <1280 720>;
19+
apple,crop = <8 8 1280 720>;
20+
};
21+
22+
/* 960x720 (4:3) */
23+
preset1 {
24+
apple,config-index = <0>;
25+
apple,input-size = <1296 736>;
26+
apple,output-size = <960 720>;
27+
apple,crop = <168 8 960 720>;
28+
};
29+
30+
/* 960x540 (16:9) */
31+
preset2 {
32+
apple,config-index = <0>;
33+
apple,input-size = <1296 736>;
34+
apple,output-size = <960 540>;
35+
apple,crop = <8 8 1280 720>;
36+
};
37+
38+
/* 640x480 (4:3) */
39+
preset3 {
40+
apple,config-index = <0>;
41+
apple,input-size = <1296 736>;
42+
apple,output-size = <640 480>;
43+
apple,crop = <168 8 960 720>;
44+
};
45+
46+
/* 640x360 (16:9) */
47+
preset4 {
48+
apple,config-index = <0>;
49+
apple,input-size = <1296 736>;
50+
apple,output-size = <640 360>;
51+
apple,crop = <8 8 1280 720>;
52+
};
53+
54+
/* 320x180 (16:9) */
55+
preset5 {
56+
apple,config-index = <0>;
57+
apple,input-size = <1296 736>;
58+
apple,output-size = <320 180>;
59+
apple,crop = <8 8 1280 720>;
60+
};
61+
};
62+
};
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* ISP configuration for platforms with IMX364 sensor.
4+
*
5+
* Copyright The Asahi Linux Contributors
6+
*/
7+
8+
#include "isp-common.dtsi"
9+
10+
&isp {
11+
apple,temporal-filter = <0>;
12+
13+
sensor-presets {
14+
/* 1920x1080 */
15+
preset0 {
16+
apple,config-index = <0>;
17+
apple,input-size = <1920 1080>;
18+
apple,output-size = <1920 1080>;
19+
apple,crop = <0 0 1920 1080>;
20+
};
21+
22+
/* 1440x720 (4:3) */
23+
preset1 {
24+
apple,config-index = <0>;
25+
apple,input-size = <1920 1080>;
26+
apple,output-size = <1440 1080>;
27+
apple,crop = <240 0 1440 1080>;
28+
};
29+
30+
/* 1280x720 (16:9) */
31+
preset2 {
32+
apple,config-index = <0>;
33+
apple,input-size = <1920 1080>;
34+
apple,output-size = <1280 720>;
35+
apple,crop = <0 0 1920 1080>;
36+
};
37+
38+
/* 960x720 (4:3) */
39+
preset3{
40+
apple,config-index = <0>;
41+
apple,input-size = <1920 1080>;
42+
apple,output-size = <960 720>;
43+
apple,crop = <240 0 1440 1080>;
44+
};
45+
46+
/* 960x540 (16:9) */
47+
preset4 {
48+
apple,config-index = <0>;
49+
apple,input-size = <1920 1080>;
50+
apple,output-size = <960 540>;
51+
apple,crop = <0 0 1920 1080>;
52+
};
53+
54+
/* 640x480 (4:3) */
55+
preset5 {
56+
apple,config-index = <0>;
57+
apple,input-size = <1920 1080>;
58+
apple,output-size = <640 480>;
59+
apple,crop = <240 0 1440 1080>;
60+
};
61+
62+
/* 640x360 (16:9) */
63+
preset6 {
64+
apple,config-index = <0>;
65+
apple,input-size = <1920 1080>;
66+
apple,output-size = <640 360>;
67+
apple,crop = <0 0 1920 1080>;
68+
};
69+
70+
/* 320x180 (16:9) */
71+
preset7 {
72+
apple,config-index = <0>;
73+
apple,input-size = <1920 1080>;
74+
apple,output-size = <320 180>;
75+
apple,crop = <0 0 1920 1080>;
76+
};
77+
};
78+
};
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* ISP configuration for platforms with IMX558 sensor in
4+
* config #0 mode.
5+
*
6+
* These platforms enable MLVNR for all configs except
7+
* #0, which we don't support. Config #0 is an uncropped
8+
* square 1920x1920 sensor, with dark corners.
9+
* Therefore, we synthesize common resolutions by using
10+
* crop/scale while always choosing config #0.
11+
*
12+
* Copyright The Asahi Linux Contributors
13+
*/
14+
15+
#include "isp-common.dtsi"
16+
17+
&isp {
18+
apple,temporal-filter = <0>;
19+
20+
sensor-presets {
21+
/* 1920x1080 */
22+
preset0 {
23+
apple,config-index = <0>;
24+
apple,input-size = <1920 1920>;
25+
apple,output-size = <1920 1080>;
26+
apple,crop = <0 420 1920 1080>;
27+
};
28+
29+
/* 1080x1920 */
30+
preset1 {
31+
apple,config-index = <0>;
32+
apple,input-size = <1920 1920>;
33+
apple,output-size = <1080 1920>;
34+
apple,crop = <420 0 1080 1920>;
35+
};
36+
37+
/* 1920x1440 */
38+
preset2 {
39+
apple,config-index = <0>;
40+
apple,input-size = <1920 1920>;
41+
apple,output-size = <1920 1440>;
42+
apple,crop = <0 240 1920 1440>;
43+
};
44+
45+
/* 1440x1920 */
46+
preset3 {
47+
apple,config-index = <0>;
48+
apple,input-size = <1920 1920>;
49+
apple,output-size = <1440 1920>;
50+
apple,crop = <240 0 1440 1920>;
51+
};
52+
53+
/* 1280x720 */
54+
preset4 {
55+
apple,config-index = <0>;
56+
apple,input-size = <1920 1920>;
57+
apple,output-size = <1280 720>;
58+
apple,crop = <0 420 1920 1080>;
59+
};
60+
61+
/* 720x1280 */
62+
preset5 {
63+
apple,config-index = <0>;
64+
apple,input-size = <1920 1920>;
65+
apple,output-size = <720 1280>;
66+
apple,crop = <420 0 1080 1920>;
67+
};
68+
69+
/* 1280x960 */
70+
preset6 {
71+
apple,config-index = <0>;
72+
apple,input-size = <1920 1920>;
73+
apple,output-size = <1280 960>;
74+
apple,crop = <0 240 1920 1440>;
75+
};
76+
77+
/* 960x1280 */
78+
preset7 {
79+
apple,config-index = <0>;
80+
apple,input-size = <1920 1920>;
81+
apple,output-size = <960 1280>;
82+
apple,crop = <240 0 1440 1920>;
83+
};
84+
85+
/* 640x480 */
86+
preset8 {
87+
apple,config-index = <0>;
88+
apple,input-size = <1920 1920>;
89+
apple,output-size = <640 480>;
90+
apple,crop = <0 240 1920 1440>;
91+
};
92+
93+
/* 480x640 */
94+
preset9 {
95+
apple,config-index = <0>;
96+
apple,input-size = <1920 1920>;
97+
apple,output-size = <480 640>;
98+
apple,crop = <240 0 1440 1920>;
99+
};
100+
};
101+
};
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* ISP configuration for platforms with IMX558 sensor.
4+
*
5+
* Copyright The Asahi Linux Contributors
6+
*/
7+
8+
#include "isp-common.dtsi"
9+
10+
&isp {
11+
apple,temporal-filter = <0>;
12+
13+
sensor-presets {
14+
/* 1920x1080 */
15+
preset0 {
16+
apple,config-index = <1>;
17+
apple,input-size = <1920 1080>;
18+
apple,output-size = <1920 1080>;
19+
apple,crop = <0 0 1920 1080>;
20+
};
21+
22+
/* 1080x1920 */
23+
preset1 {
24+
apple,config-index = <2>;
25+
apple,input-size = <1080 1920>;
26+
apple,output-size = <1080 1920>;
27+
apple,crop = <0 0 1080 1920>;
28+
};
29+
30+
/* 1760x1328 */
31+
preset2 {
32+
apple,config-index = <3>;
33+
apple,input-size = <1760 1328>;
34+
apple,output-size = <1760 1328>;
35+
apple,crop = <0 0 1760 1328>;
36+
};
37+
38+
/* 1328x1760 */
39+
preset3 {
40+
apple,config-index = <4>;
41+
apple,input-size = <1328 1760>;
42+
apple,output-size = < 1328 1760>;
43+
apple,crop = <0 0 1328 1760>;
44+
};
45+
46+
/* 1152x1152 */
47+
preset4 {
48+
apple,config-index = <5>;
49+
apple,input-size = <1152 1152>;
50+
apple,output-size = <1152 1152>;
51+
apple,crop = <0 0 1152 1152>;
52+
};
53+
54+
/* 1280x720 */
55+
preset5 {
56+
apple,config-index = <1>;
57+
apple,input-size = <1920 1080>;
58+
apple,output-size = <1280 720>;
59+
apple,crop = <0 0 1920 1080>;
60+
};
61+
62+
/* 720x1280 */
63+
preset6 {
64+
apple,config-index = <2>;
65+
apple,input-size = <1080 1920>;
66+
apple,output-size = <720 1280>;
67+
apple,crop = <0 0 1080 1920>;
68+
};
69+
70+
/* 1280x960 */
71+
preset7 {
72+
apple,config-index = <3>;
73+
apple,input-size = <1760 1328>;
74+
apple,output-size = <1280 960>;
75+
apple,crop = <0 4 1760 1320>;
76+
};
77+
78+
/* 960x1280 */
79+
preset8 {
80+
apple,config-index = <4>;
81+
apple,input-size = <1328 1760>;
82+
apple,output-size = <960 1280>;
83+
apple,crop = <4 0 1320 1760>;
84+
};
85+
86+
/* 640x480 */
87+
preset9 {
88+
apple,config-index = <3>;
89+
apple,input-size = <1760 1328>;
90+
apple,output-size = <640 480>;
91+
apple,crop = <0 4 1760 1320>;
92+
};
93+
94+
/* 480x640 */
95+
preset10 {
96+
apple,config-index = <4>;
97+
apple,input-size = <1328 1760>;
98+
apple,output-size = <480 640>;
99+
apple,crop = <4 0 1320 1760>;
100+
};
101+
};
102+
};

0 commit comments

Comments
 (0)