aboutsummaryrefslogtreecommitdiff
path: root/target/linux/bcm27xx/patches-6.1/950-0564-dtoverlays-Add-IMX519-support-to-camera-mux-overlays.patch
blob: 2b551e60a91e98fef98acf42bfa28fcfe20421a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
From 5e2246c5ac556309546fc603fd7a17f8b143b566 Mon Sep 17 00:00:00 2001
From: Lee Jackson <info@arducam.com>
Date: Fri, 24 Feb 2023 08:33:34 +0800
Subject: [PATCH] dtoverlays: Add IMX519 support to camera mux overlays

Signed-off-by: Lee Jackson <lee.jackson@arducam.com>
---
 arch/arm/boot/dts/overlays/README             |  6 ++
 .../dts/overlays/camera-mux-2port-overlay.dts | 32 ++++++++++
 .../dts/overlays/camera-mux-4port-overlay.dts | 64 +++++++++++++++++++
 3 files changed, 102 insertions(+)

--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -716,6 +716,7 @@ Params: cam0-imx219             Select I
         cam0-imx258             Select IMX258 for camera on port 0
         cam0-imx290             Select IMX290 for camera on port 0
         cam0-imx477             Select IMX477 for camera on port 0
+        cam0-imx519             Select IMX519 for camera on port 0
         cam0-imx708             Select IMX708 for camera on port 0
         cam0-ov2311             Select OV2311 for camera on port 0
         cam0-ov5647             Select OV5647 for camera on port 0
@@ -726,6 +727,7 @@ Params: cam0-imx219             Select I
         cam1-imx258             Select IMX258 for camera on port 1
         cam1-imx290             Select IMX290 for camera on port 1
         cam1-imx477             Select IMX477 for camera on port 1
+        cam1-imx519             Select IMX519 for camera on port 1
         cam1-imx708             Select IMX708 for camera on port 1
         cam1-ov2311             Select OV2311 for camera on port 1
         cam1-ov5647             Select OV5647 for camera on port 1
@@ -743,6 +745,7 @@ Params: cam0-imx219             Select I
         cam0-imx258             Select IMX258 for camera on port 0
         cam0-imx290             Select IMX290 for camera on port 0
         cam0-imx477             Select IMX477 for camera on port 0
+        cam0-imx519             Select IMX519 for camera on port 0
         cam0-imx708             Select IMX708 for camera on port 0
         cam0-ov2311             Select OV2311 for camera on port 0
         cam0-ov5647             Select OV5647 for camera on port 0
@@ -753,6 +756,7 @@ Params: cam0-imx219             Select I
         cam1-imx258             Select IMX258 for camera on port 1
         cam1-imx290             Select IMX290 for camera on port 1
         cam1-imx477             Select IMX477 for camera on port 1
+        cam1-imx519             Select IMX519 for camera on port 1
         cam1-imx708             Select IMX708 for camera on port 1
         cam1-ov2311             Select OV2311 for camera on port 1
         cam1-ov5647             Select OV5647 for camera on port 1
@@ -763,6 +767,7 @@ Params: cam0-imx219             Select I
         cam2-imx258             Select IMX258 for camera on port 2
         cam2-imx290             Select IMX290 for camera on port 2
         cam2-imx477             Select IMX477 for camera on port 2
+        cam2-imx519             Select IMX519 for camera on port 2
         cam2-imx708             Select IMX708 for camera on port 2
         cam2-ov2311             Select OV2311 for camera on port 2
         cam2-ov5647             Select OV5647 for camera on port 2
@@ -773,6 +778,7 @@ Params: cam0-imx219             Select I
         cam3-imx258             Select IMX258 for camera on port 3
         cam3-imx290             Select IMX290 for camera on port 3
         cam3-imx477             Select IMX477 for camera on port 3
+        cam3-imx519             Select IMX519 for camera on port 3
         cam3-imx708             Select IMX708 for camera on port 3
         cam3-ov2311             Select OV2311 for camera on port 3
         cam3-ov5647             Select OV5647 for camera on port 3
--- a/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
+++ b/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
@@ -112,6 +112,16 @@
 					#undef cam_endpoint
 					#undef cam1_clk
 
+					#define cam_node imx519_0
+					#define cam_endpoint imx519_0_ep
+					#define vcm_node imx519_0_vcm
+					#define cam1_clk clk_24mhz
+					#include "imx519.dtsi"
+					#undef cam_node
+					#undef cam_endpoint
+					#undef vcm_node
+					#undef cam1_clk
+
 					#define cam_node imx708_0
 					#define cam_endpoint imx708_0_ep
 					#define vcm_node imx708_0_vcm
@@ -192,6 +202,16 @@
 					#undef cam_endpoint
 					#undef cam1_clk
 
+					#define cam_node imx519_1
+					#define cam_endpoint imx519_1_ep
+					#define vcm_node imx519_1_vcm
+					#define cam1_clk clk_24mhz
+					#include "imx519.dtsi"
+					#undef cam_node
+					#undef cam_endpoint
+					#undef vcm_node
+					#undef cam1_clk
+
 					#define cam_node imx708_1
 					#define cam_endpoint imx708_1_ep
 					#define vcm_node imx708_1_vcm
@@ -373,6 +393,12 @@
 			      <&imx477_0_ep>, "remote-endpoint:0=",<&mux_in0>,
 			      <&mux_in0>, "clock-noncontinuous?",
 			      <&imx477_0>, "status=okay";
+		cam0-imx519 = <&mux_in0>, "remote-endpoint:0=",<&imx519_0_ep>,
+			      <&imx519_0_ep>, "remote-endpoint:0=",<&mux_in0>,
+			      <&mux_in0>, "clock-noncontinuous?",
+			      <&imx519_0>, "status=okay",
+				  <&imx519_0_vcm>, "status=okay",
+			      <&imx519_0>,"lens-focus:0=", <&imx519_0_vcm>;
 		cam0-imx708 = <&mux_in0>, "remote-endpoint:0=",<&imx708_0_ep>,
 			      <&imx708_0_ep>, "remote-endpoint:0=",<&mux_in0>,
 			      <&mux_in0>, "clock-noncontinuous?",
@@ -407,6 +433,12 @@
 			      <&imx477_1_ep>, "remote-endpoint:0=",<&mux_in1>,
 			      <&mux_in1>, "clock-noncontinuous?",
 			      <&imx477_1>, "status=okay";
+		cam1-imx519 = <&mux_in1>, "remote-endpoint:0=",<&imx519_1_ep>,
+			      <&imx519_1_ep>, "remote-endpoint:0=",<&mux_in1>,
+			      <&mux_in1>, "clock-noncontinuous?",
+			      <&imx519_1>, "status=okay",
+			      <&imx519_1_vcm>, "status=okay",
+			      <&imx519_1>,"lens-focus:0=", <&imx519_1_vcm>;
 		cam1-imx708 = <&mux_in1>, "remote-endpoint:0=",<&imx708_1_ep>,
 			      <&imx708_1_ep>, "remote-endpoint:0=",<&mux_in1>,
 			      <&mux_in1>, "clock-noncontinuous?",
--- a/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
+++ b/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
@@ -170,6 +170,16 @@
 					#undef cam_endpoint
 					#undef cam1_clk
 
+					#define cam_node imx519_0
+					#define cam_endpoint imx519_0_ep
+					#define vcm_node imx519_0_vcm
+					#define cam1_clk clk_24mhz
+					#include "imx519.dtsi"
+					#undef cam_node
+					#undef cam_endpoint
+					#undef vcm_node
+					#undef cam1_clk
+
 					#define cam_node imx708_0
 					#define cam_endpoint imx708_0_ep
 					#define vcm_node imx708_0_vcm
@@ -250,6 +260,16 @@
 					#undef cam_endpoint
 					#undef cam1_clk
 
+					#define cam_node imx519_1
+					#define cam_endpoint imx519_1_ep
+					#define vcm_node imx519_1_vcm
+					#define cam1_clk clk_24mhz
+					#include "imx519.dtsi"
+					#undef cam_node
+					#undef cam_endpoint
+					#undef vcm_node
+					#undef cam1_clk
+
 					#define cam_node imx708_1
 					#define cam_endpoint imx708_1_ep
 					#define vcm_node imx708_1_vcm
@@ -330,6 +350,16 @@
 					#undef cam_endpoint
 					#undef cam1_clk
 
+					#define cam_node imx519_2
+					#define cam_endpoint imx519_2_ep
+					#define vcm_node imx519_2_vcm
+					#define cam1_clk clk_24mhz
+					#include "imx519.dtsi"
+					#undef cam_node
+					#undef cam_endpoint
+					#undef vcm_node
+					#undef cam1_clk
+
 					#define cam_node imx708_2
 					#define cam_endpoint imx708_2_ep
 					#define vcm_node imx708_2_vcm
@@ -410,6 +440,16 @@
 					#undef cam_endpoint
 					#undef cam1_clk
 
+					#define cam_node imx519_3
+					#define cam_endpoint imx519_3_ep
+					#define vcm_node imx519_3_vcm
+					#define cam1_clk clk_24mhz
+					#include "imx519.dtsi"
+					#undef cam_node
+					#undef cam_endpoint
+					#undef vcm_node
+					#undef cam1_clk
+
 					#define cam_node imx708_3
 					#define cam_endpoint imx708_3_ep
 					#define vcm_node imx708_3_vcm
@@ -608,6 +648,12 @@
 			      <&imx477_0_ep>, "remote-endpoint:0=",<&mux_in0>,
 			      <&mux_in0>, "clock-noncontinuous?",
 			      <&imx477_0>, "status=okay";
+		cam0-imx519 = <&mux_in0>, "remote-endpoint:0=",<&imx519_0_ep>,
+			      <&imx519_0_ep>, "remote-endpoint:0=",<&mux_in0>,
+			      <&mux_in0>, "clock-noncontinuous?",
+			      <&imx519_0>, "status=okay",
+			      <&imx519_0_vcm>, "status=okay",
+			      <&imx519_0>,"lens-focus:0=", <&imx519_0_vcm>;
 		cam0-imx708 = <&mux_in0>, "remote-endpoint:0=",<&imx708_0_ep>,
 			      <&imx708_0_ep>, "remote-endpoint:0=",<&mux_in0>,
 			      <&mux_in0>, "clock-noncontinuous?",
@@ -642,6 +688,12 @@
 			      <&imx477_1_ep>, "remote-endpoint:0=",<&mux_in1>,
 			      <&mux_in1>, "clock-noncontinuous?",
 			      <&imx477_1>, "status=okay";
+		cam1-imx519 = <&mux_in1>, "remote-endpoint:0=",<&imx519_1_ep>,
+			      <&imx519_1_ep>, "remote-endpoint:0=",<&mux_in1>,
+			      <&mux_in1>, "clock-noncontinuous?",
+			      <&imx519_1>, "status=okay",
+			      <&imx519_1_vcm>, "status=okay",
+			      <&imx519_1>,"lens-focus:0=", <&imx519_1_vcm>;
 		cam1-imx708 = <&mux_in1>, "remote-endpoint:0=",<&imx708_1_ep>,
 			      <&imx708_1_ep>, "remote-endpoint:0=",<&mux_in1>,
 			      <&mux_in1>, "clock-noncontinuous?",
@@ -676,6 +728,12 @@
 			      <&imx477_2_ep>, "remote-endpoint:0=",<&mux_in2>,
 			      <&mux_in2>, "clock-noncontinuous?",
 			      <&imx477_2>, "status=okay";
+		cam2-imx519 = <&mux_in2>, "remote-endpoint:0=",<&imx519_2_ep>,
+			      <&imx519_2_ep>, "remote-endpoint:0=",<&mux_in2>,
+			      <&mux_in2>, "clock-noncontinuous?",
+			      <&imx519_2>, "status=okay",
+			      <&imx519_2_vcm>, "status=okay",
+			      <&imx519_2>,"lens-focus:0=", <&imx519_2_vcm>;
 		cam2-imx708 = <&mux_in2>, "remote-endpoint:0=",<&imx708_2_ep>,
 			      <&imx708_2_ep>, "remote-endpoint:0=",<&mux_in2>,
 			      <&mux_in2>, "clock-noncontinuous?",
@@ -710,6 +768,12 @@
 			      <&imx477_3_ep>, "remote-endpoint:0=",<&mux_in3>,
 			      <&mux_in3>, "clock-noncontinuous?",
 			      <&imx477_3>, "status=okay";
+		cam3-imx519 = <&mux_in3>, "remote-endpoint:0=",<&imx519_3_ep>,
+			      <&imx519_3_ep>, "remote-endpoint:0=",<&mux_in3>,
+			      <&mux_in3>, "clock-noncontinuous?",
+			      <&imx519_3>, "status=okay",
+			      <&imx519_3_vcm>, "status=okay",
+			      <&imx519_3>,"lens-focus:0=", <&imx519_3_vcm>;
 		cam3-imx708 = <&mux_in3>, "remote-endpoint:0=",<&imx708_3_ep>,
 			      <&imx708_3_ep>, "remote-endpoint:0=",<&mux_in3>,
 			      <&mux_in3>, "clock-noncontinuous?",