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
247
248
249
250
251
|
From 7db83bf5b09ebc07e5e70bc88496a60b9abecdc4 Mon Sep 17 00:00:00 2001
From: Lee Jackson <info@arducam.com>
Date: Mon, 27 Feb 2023 19:38:05 +0800
Subject: [PATCH] dtoverlays: Add Arducam64MP support to camera mux
overlays
Signed-off-by: Lee Jackson <lee.jackson@arducam.com>
---
arch/arm/boot/dts/overlays/README | 10 ++-
.../dts/overlays/camera-mux-2port-overlay.dts | 32 ++++++++++
.../dts/overlays/camera-mux-4port-overlay.dts | 64 +++++++++++++++++++
3 files changed, 104 insertions(+), 2 deletions(-)
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -714,7 +714,8 @@ Info: Configures a 2 port camera multi
Note that currently ALL IMX290 modules share a common clock, therefore
all modules will need to have the same clock frequency.
Load: dtoverlay=camera-mux-2port,<param>=<val>
-Params: cam0-imx219 Select IMX219 for camera on port 0
+Params: cam0-arducam-64mp Select Arducam64MP for camera on port 0
+ cam0-imx219 Select IMX219 for camera on port 0
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
@@ -725,6 +726,7 @@ Params: cam0-imx219 Select I
cam0-ov7251 Select OV7251 for camera on port 0
cam0-ov9281 Select OV9281 for camera on port 0
cam0-imx290-clk-freq Set clock frequency for an IMX290 on port 0
+ cam1-arducam-64mp Select Arducam64MP for camera on port 1
cam1-imx219 Select IMX219 for camera on port 1
cam1-imx258 Select IMX258 for camera on port 1
cam1-imx290 Select IMX290 for camera on port 1
@@ -743,7 +745,8 @@ Info: Configures a 4 port camera multi
Note that currently ALL IMX290 modules share a common clock, therefore
all modules will need to have the same clock frequency.
Load: dtoverlay=camera-mux-4port,<param>=<val>
-Params: cam0-imx219 Select IMX219 for camera on port 0
+Params: cam0-arducam-64mp Select Arducam64MP for camera on port 0
+ cam0-imx219 Select IMX219 for camera on port 0
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
@@ -754,6 +757,7 @@ Params: cam0-imx219 Select I
cam0-ov7251 Select OV7251 for camera on port 0
cam0-ov9281 Select OV9281 for camera on port 0
cam0-imx290-clk-freq Set clock frequency for an IMX290 on port 0
+ cam1-arducam-64mp Select Arducam64MP for camera on port 1
cam1-imx219 Select IMX219 for camera on port 1
cam1-imx258 Select IMX258 for camera on port 1
cam1-imx290 Select IMX290 for camera on port 1
@@ -765,6 +769,7 @@ Params: cam0-imx219 Select I
cam1-ov7251 Select OV7251 for camera on port 1
cam1-ov9281 Select OV9281 for camera on port 1
cam1-imx290-clk-freq Set clock frequency for an IMX290 on port 1
+ cam2-arducam-64mp Select Arducam64MP for camera on port 2
cam2-imx219 Select IMX219 for camera on port 2
cam2-imx258 Select IMX258 for camera on port 2
cam2-imx290 Select IMX290 for camera on port 2
@@ -776,6 +781,7 @@ Params: cam0-imx219 Select I
cam2-ov7251 Select OV7251 for camera on port 2
cam2-ov9281 Select OV9281 for camera on port 2
cam2-imx290-clk-freq Set clock frequency for an IMX290 on port 2
+ cam3-arducam-64mp Select Arducam64MP for camera on port 3
cam3-imx219 Select IMX219 for camera on port 3
cam3-imx258 Select IMX258 for camera on port 3
cam3-imx290 Select IMX290 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
@@ -96,6 +96,16 @@
#address-cells = <1>;
#size-cells = <0>;
+ #define cam_node arducam_64mp_0
+ #define cam_endpoint arducam_64mp_0_ep
+ #define vcm_node arducam_64mp_0_vcm
+ #define cam1_clk clk_24mhz
+ #include "arducam-64mp.dtsi"
+ #undef cam_node
+ #undef cam_endpoint
+ #undef vcm_node
+ #undef cam1_clk
+
#define cam_node imx219_0
#define cam_endpoint imx219_0_ep
#define cam1_clk clk_24mhz
@@ -186,6 +196,16 @@
#address-cells = <1>;
#size-cells = <0>;
+ #define cam_node arducam_64mp_1
+ #define cam_endpoint arducam_64mp_1_ep
+ #define vcm_node arducam_64mp_1_vcm
+ #define cam1_clk clk_24mhz
+ #include "arducam-64mp.dtsi"
+ #undef cam_node
+ #undef cam_endpoint
+ #undef vcm_node
+ #undef cam1_clk
+
#define cam_node imx219_1
#define cam_endpoint imx219_1_ep
#define cam1_clk clk_24mhz
@@ -385,6 +405,12 @@
};
__overrides__ {
+ cam0-arducam-64mp = <&mux_in0>, "remote-endpoint:0=",<&arducam_64mp_0_ep>,
+ <&arducam_64mp_0_ep>, "remote-endpoint:0=",<&mux_in0>,
+ <&mux_in0>, "clock-noncontinuous?",
+ <&arducam_64mp_0>, "status=okay",
+ <&arducam_64mp_0_vcm>, "status=okay",
+ <&arducam_64mp_0>,"lens-focus:0=", <&arducam_64mp_0_vcm>;
cam0-imx219 = <&mux_in0>, "remote-endpoint:0=",<&imx219_0_ep>,
<&imx219_0_ep>, "remote-endpoint:0=",<&mux_in0>,
<&mux_in0>, "clock-noncontinuous?",
@@ -425,6 +451,12 @@
<&ov2311_0_ep>, "remote-endpoint:0=",<&mux_in0>,
<&ov2311_0>, "status=okay";
+ cam1-arducam-64mp = <&mux_in1>, "remote-endpoint:0=",<&arducam_64mp_1_ep>,
+ <&arducam_64mp_1_ep>, "remote-endpoint:0=",<&mux_in1>,
+ <&mux_in1>, "clock-noncontinuous?",
+ <&arducam_64mp_1>, "status=okay",
+ <&arducam_64mp_1_vcm>, "status=okay",
+ <&arducam_64mp_1>,"lens-focus:0=", <&arducam_64mp_1_vcm>;
cam1-imx219 = <&mux_in1>, "remote-endpoint:0=",<&imx219_1_ep>,
<&imx219_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
@@ -154,6 +154,16 @@
#address-cells = <1>;
#size-cells = <0>;
+ #define cam_node arducam_64mp_0
+ #define cam_endpoint arducam_64mp_0_ep
+ #define vcm_node arducam_64mp_0_vcm
+ #define cam1_clk clk_24mhz
+ #include "arducam-64mp.dtsi"
+ #undef cam_node
+ #undef cam_endpoint
+ #undef vcm_node
+ #undef cam1_clk
+
#define cam_node imx219_0
#define cam_endpoint imx219_0_ep
#define cam1_clk clk_24mhz
@@ -244,6 +254,16 @@
#address-cells = <1>;
#size-cells = <0>;
+ #define cam_node arducam_64mp_1
+ #define cam_endpoint arducam_64mp_1_ep
+ #define vcm_node arducam_64mp_1_vcm
+ #define cam1_clk clk_24mhz
+ #include "arducam-64mp.dtsi"
+ #undef cam_node
+ #undef cam_endpoint
+ #undef vcm_node
+ #undef cam1_clk
+
#define cam_node imx219_1
#define cam_endpoint imx219_1_ep
#define cam1_clk clk_24mhz
@@ -334,6 +354,16 @@
#address-cells = <1>;
#size-cells = <0>;
+ #define cam_node arducam_64mp_2
+ #define cam_endpoint arducam_64mp_2_ep
+ #define vcm_node arducam_64mp_2_vcm
+ #define cam1_clk clk_24mhz
+ #include "arducam-64mp.dtsi"
+ #undef cam_node
+ #undef cam_endpoint
+ #undef vcm_node
+ #undef cam1_clk
+
#define cam_node imx219_2
#define cam_endpoint imx219_2_ep
#define cam1_clk clk_24mhz
@@ -424,6 +454,16 @@
#address-cells = <1>;
#size-cells = <0>;
+ #define cam_node arducam_64mp_3
+ #define cam_endpoint arducam_64mp_3_ep
+ #define vcm_node arducam_64mp_3_vcm
+ #define cam1_clk clk_24mhz
+ #include "arducam-64mp.dtsi"
+ #undef cam_node
+ #undef cam_endpoint
+ #undef vcm_node
+ #undef cam1_clk
+
#define cam_node imx219_3
#define cam_endpoint imx219_3_ep
#define cam1_clk clk_24mhz
@@ -640,6 +680,12 @@
};
__overrides__ {
+ cam0-arducam-64mp = <&mux_in0>, "remote-endpoint:0=",<&arducam_64mp_0_ep>,
+ <&arducam_64mp_0_ep>, "remote-endpoint:0=",<&mux_in0>,
+ <&mux_in0>, "clock-noncontinuous?",
+ <&arducam_64mp_0>, "status=okay",
+ <&arducam_64mp_0_vcm>, "status=okay",
+ <&arducam_64mp_0>,"lens-focus:0=", <&arducam_64mp_0_vcm>;
cam0-imx219 = <&mux_in0>, "remote-endpoint:0=",<&imx219_0_ep>,
<&imx219_0_ep>, "remote-endpoint:0=",<&mux_in0>,
<&mux_in0>, "clock-noncontinuous?",
@@ -680,6 +726,12 @@
<&ov2311_0_ep>, "remote-endpoint:0=",<&mux_in0>,
<&ov2311_0>, "status=okay";
+ cam1-arducam-64mp = <&mux_in1>, "remote-endpoint:0=",<&arducam_64mp_1_ep>,
+ <&arducam_64mp_1_ep>, "remote-endpoint:0=",<&mux_in1>,
+ <&mux_in1>, "clock-noncontinuous?",
+ <&arducam_64mp_1>, "status=okay",
+ <&arducam_64mp_1_vcm>, "status=okay",
+ <&arducam_64mp_1>,"lens-focus:0=", <&arducam_64mp_1_vcm>;
cam1-imx219 = <&mux_in1>, "remote-endpoint:0=",<&imx219_1_ep>,
<&imx219_1_ep>, "remote-endpoint:0=",<&mux_in1>,
<&mux_in1>, "clock-noncontinuous?",
@@ -720,6 +772,12 @@
<&ov2311_1_ep>, "remote-endpoint:0=",<&mux_in1>,
<&ov2311_1>, "status=okay";
+ cam2-arducam-64mp = <&mux_in2>, "remote-endpoint:0=",<&arducam_64mp_2_ep>,
+ <&arducam_64mp_2_ep>, "remote-endpoint:0=",<&mux_in2>,
+ <&mux_in2>, "clock-noncontinuous?",
+ <&arducam_64mp_2>, "status=okay",
+ <&arducam_64mp_2_vcm>, "status=okay",
+ <&arducam_64mp_2>,"lens-focus:0=", <&arducam_64mp_2_vcm>;
cam2-imx219 = <&mux_in2>, "remote-endpoint:0=",<&imx219_2_ep>,
<&imx219_2_ep>, "remote-endpoint:0=",<&mux_in2>,
<&mux_in2>, "clock-noncontinuous?",
@@ -760,6 +818,12 @@
<&ov2311_2_ep>, "remote-endpoint:0=",<&mux_in2>,
<&ov2311_2>, "status=okay";
+ cam3-arducam-64mp = <&mux_in3>, "remote-endpoint:0=",<&arducam_64mp_3_ep>,
+ <&arducam_64mp_3_ep>, "remote-endpoint:0=",<&mux_in3>,
+ <&mux_in3>, "clock-noncontinuous?",
+ <&arducam_64mp_3>, "status=okay",
+ <&arducam_64mp_3_vcm>, "status=okay",
+ <&arducam_64mp_3>,"lens-focus:0=", <&arducam_64mp_3_vcm>;
cam3-imx219 = <&mux_in3>, "remote-endpoint:0=",<&imx219_3_ep>,
<&imx219_3_ep>, "remote-endpoint:0=",<&mux_in3>,
<&mux_in3>, "clock-noncontinuous?",
|