1 From 7db83bf5b09ebc07e5e70bc88496a60b9abecdc4 Mon Sep 17 00:00:00 2001
2 From: Lee Jackson <info@arducam.com>
3 Date: Mon, 27 Feb 2023 19:38:05 +0800
4 Subject: [PATCH] dtoverlays: Add Arducam64MP support to camera mux
7 Signed-off-by: Lee Jackson <lee.jackson@arducam.com>
9 arch/arm/boot/dts/overlays/README | 10 ++-
10 .../dts/overlays/camera-mux-2port-overlay.dts | 32 ++++++++++
11 .../dts/overlays/camera-mux-4port-overlay.dts | 64 +++++++++++++++++++
12 3 files changed, 104 insertions(+), 2 deletions(-)
14 --- a/arch/arm/boot/dts/overlays/README
15 +++ b/arch/arm/boot/dts/overlays/README
16 @@ -714,7 +714,8 @@ Info: Configures a 2 port camera multi
17 Note that currently ALL IMX290 modules share a common clock, therefore
18 all modules will need to have the same clock frequency.
19 Load: dtoverlay=camera-mux-2port,<param>=<val>
20 -Params: cam0-imx219 Select IMX219 for camera on port 0
21 +Params: cam0-arducam-64mp Select Arducam64MP for camera on port 0
22 + cam0-imx219 Select IMX219 for camera on port 0
23 cam0-imx258 Select IMX258 for camera on port 0
24 cam0-imx290 Select IMX290 for camera on port 0
25 cam0-imx477 Select IMX477 for camera on port 0
26 @@ -725,6 +726,7 @@ Params: cam0-imx219 Select I
27 cam0-ov7251 Select OV7251 for camera on port 0
28 cam0-ov9281 Select OV9281 for camera on port 0
29 cam0-imx290-clk-freq Set clock frequency for an IMX290 on port 0
30 + cam1-arducam-64mp Select Arducam64MP for camera on port 1
31 cam1-imx219 Select IMX219 for camera on port 1
32 cam1-imx258 Select IMX258 for camera on port 1
33 cam1-imx290 Select IMX290 for camera on port 1
34 @@ -743,7 +745,8 @@ Info: Configures a 4 port camera multi
35 Note that currently ALL IMX290 modules share a common clock, therefore
36 all modules will need to have the same clock frequency.
37 Load: dtoverlay=camera-mux-4port,<param>=<val>
38 -Params: cam0-imx219 Select IMX219 for camera on port 0
39 +Params: cam0-arducam-64mp Select Arducam64MP for camera on port 0
40 + cam0-imx219 Select IMX219 for camera on port 0
41 cam0-imx258 Select IMX258 for camera on port 0
42 cam0-imx290 Select IMX290 for camera on port 0
43 cam0-imx477 Select IMX477 for camera on port 0
44 @@ -754,6 +757,7 @@ Params: cam0-imx219 Select I
45 cam0-ov7251 Select OV7251 for camera on port 0
46 cam0-ov9281 Select OV9281 for camera on port 0
47 cam0-imx290-clk-freq Set clock frequency for an IMX290 on port 0
48 + cam1-arducam-64mp Select Arducam64MP for camera on port 1
49 cam1-imx219 Select IMX219 for camera on port 1
50 cam1-imx258 Select IMX258 for camera on port 1
51 cam1-imx290 Select IMX290 for camera on port 1
52 @@ -765,6 +769,7 @@ Params: cam0-imx219 Select I
53 cam1-ov7251 Select OV7251 for camera on port 1
54 cam1-ov9281 Select OV9281 for camera on port 1
55 cam1-imx290-clk-freq Set clock frequency for an IMX290 on port 1
56 + cam2-arducam-64mp Select Arducam64MP for camera on port 2
57 cam2-imx219 Select IMX219 for camera on port 2
58 cam2-imx258 Select IMX258 for camera on port 2
59 cam2-imx290 Select IMX290 for camera on port 2
60 @@ -776,6 +781,7 @@ Params: cam0-imx219 Select I
61 cam2-ov7251 Select OV7251 for camera on port 2
62 cam2-ov9281 Select OV9281 for camera on port 2
63 cam2-imx290-clk-freq Set clock frequency for an IMX290 on port 2
64 + cam3-arducam-64mp Select Arducam64MP for camera on port 3
65 cam3-imx219 Select IMX219 for camera on port 3
66 cam3-imx258 Select IMX258 for camera on port 3
67 cam3-imx290 Select IMX290 for camera on port 3
68 --- a/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
69 +++ b/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
74 + #define cam_node arducam_64mp_0
75 + #define cam_endpoint arducam_64mp_0_ep
76 + #define vcm_node arducam_64mp_0_vcm
77 + #define cam1_clk clk_24mhz
78 + #include "arducam-64mp.dtsi"
84 #define cam_node imx219_0
85 #define cam_endpoint imx219_0_ep
86 #define cam1_clk clk_24mhz
91 + #define cam_node arducam_64mp_1
92 + #define cam_endpoint arducam_64mp_1_ep
93 + #define vcm_node arducam_64mp_1_vcm
94 + #define cam1_clk clk_24mhz
95 + #include "arducam-64mp.dtsi"
101 #define cam_node imx219_1
102 #define cam_endpoint imx219_1_ep
103 #define cam1_clk clk_24mhz
108 + cam0-arducam-64mp = <&mux_in0>, "remote-endpoint:0=",<&arducam_64mp_0_ep>,
109 + <&arducam_64mp_0_ep>, "remote-endpoint:0=",<&mux_in0>,
110 + <&mux_in0>, "clock-noncontinuous?",
111 + <&arducam_64mp_0>, "status=okay",
112 + <&arducam_64mp_0_vcm>, "status=okay",
113 + <&arducam_64mp_0>,"lens-focus:0=", <&arducam_64mp_0_vcm>;
114 cam0-imx219 = <&mux_in0>, "remote-endpoint:0=",<&imx219_0_ep>,
115 <&imx219_0_ep>, "remote-endpoint:0=",<&mux_in0>,
116 <&mux_in0>, "clock-noncontinuous?",
118 <&ov2311_0_ep>, "remote-endpoint:0=",<&mux_in0>,
119 <&ov2311_0>, "status=okay";
121 + cam1-arducam-64mp = <&mux_in1>, "remote-endpoint:0=",<&arducam_64mp_1_ep>,
122 + <&arducam_64mp_1_ep>, "remote-endpoint:0=",<&mux_in1>,
123 + <&mux_in1>, "clock-noncontinuous?",
124 + <&arducam_64mp_1>, "status=okay",
125 + <&arducam_64mp_1_vcm>, "status=okay",
126 + <&arducam_64mp_1>,"lens-focus:0=", <&arducam_64mp_1_vcm>;
127 cam1-imx219 = <&mux_in1>, "remote-endpoint:0=",<&imx219_1_ep>,
128 <&imx219_1_ep>, "remote-endpoint:0=",<&mux_in1>,
129 <&mux_in1>, "clock-noncontinuous?",
130 --- a/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
131 +++ b/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
133 #address-cells = <1>;
136 + #define cam_node arducam_64mp_0
137 + #define cam_endpoint arducam_64mp_0_ep
138 + #define vcm_node arducam_64mp_0_vcm
139 + #define cam1_clk clk_24mhz
140 + #include "arducam-64mp.dtsi"
142 + #undef cam_endpoint
146 #define cam_node imx219_0
147 #define cam_endpoint imx219_0_ep
148 #define cam1_clk clk_24mhz
150 #address-cells = <1>;
153 + #define cam_node arducam_64mp_1
154 + #define cam_endpoint arducam_64mp_1_ep
155 + #define vcm_node arducam_64mp_1_vcm
156 + #define cam1_clk clk_24mhz
157 + #include "arducam-64mp.dtsi"
159 + #undef cam_endpoint
163 #define cam_node imx219_1
164 #define cam_endpoint imx219_1_ep
165 #define cam1_clk clk_24mhz
167 #address-cells = <1>;
170 + #define cam_node arducam_64mp_2
171 + #define cam_endpoint arducam_64mp_2_ep
172 + #define vcm_node arducam_64mp_2_vcm
173 + #define cam1_clk clk_24mhz
174 + #include "arducam-64mp.dtsi"
176 + #undef cam_endpoint
180 #define cam_node imx219_2
181 #define cam_endpoint imx219_2_ep
182 #define cam1_clk clk_24mhz
184 #address-cells = <1>;
187 + #define cam_node arducam_64mp_3
188 + #define cam_endpoint arducam_64mp_3_ep
189 + #define vcm_node arducam_64mp_3_vcm
190 + #define cam1_clk clk_24mhz
191 + #include "arducam-64mp.dtsi"
193 + #undef cam_endpoint
197 #define cam_node imx219_3
198 #define cam_endpoint imx219_3_ep
199 #define cam1_clk clk_24mhz
204 + cam0-arducam-64mp = <&mux_in0>, "remote-endpoint:0=",<&arducam_64mp_0_ep>,
205 + <&arducam_64mp_0_ep>, "remote-endpoint:0=",<&mux_in0>,
206 + <&mux_in0>, "clock-noncontinuous?",
207 + <&arducam_64mp_0>, "status=okay",
208 + <&arducam_64mp_0_vcm>, "status=okay",
209 + <&arducam_64mp_0>,"lens-focus:0=", <&arducam_64mp_0_vcm>;
210 cam0-imx219 = <&mux_in0>, "remote-endpoint:0=",<&imx219_0_ep>,
211 <&imx219_0_ep>, "remote-endpoint:0=",<&mux_in0>,
212 <&mux_in0>, "clock-noncontinuous?",
214 <&ov2311_0_ep>, "remote-endpoint:0=",<&mux_in0>,
215 <&ov2311_0>, "status=okay";
217 + cam1-arducam-64mp = <&mux_in1>, "remote-endpoint:0=",<&arducam_64mp_1_ep>,
218 + <&arducam_64mp_1_ep>, "remote-endpoint:0=",<&mux_in1>,
219 + <&mux_in1>, "clock-noncontinuous?",
220 + <&arducam_64mp_1>, "status=okay",
221 + <&arducam_64mp_1_vcm>, "status=okay",
222 + <&arducam_64mp_1>,"lens-focus:0=", <&arducam_64mp_1_vcm>;
223 cam1-imx219 = <&mux_in1>, "remote-endpoint:0=",<&imx219_1_ep>,
224 <&imx219_1_ep>, "remote-endpoint:0=",<&mux_in1>,
225 <&mux_in1>, "clock-noncontinuous?",
227 <&ov2311_1_ep>, "remote-endpoint:0=",<&mux_in1>,
228 <&ov2311_1>, "status=okay";
230 + cam2-arducam-64mp = <&mux_in2>, "remote-endpoint:0=",<&arducam_64mp_2_ep>,
231 + <&arducam_64mp_2_ep>, "remote-endpoint:0=",<&mux_in2>,
232 + <&mux_in2>, "clock-noncontinuous?",
233 + <&arducam_64mp_2>, "status=okay",
234 + <&arducam_64mp_2_vcm>, "status=okay",
235 + <&arducam_64mp_2>,"lens-focus:0=", <&arducam_64mp_2_vcm>;
236 cam2-imx219 = <&mux_in2>, "remote-endpoint:0=",<&imx219_2_ep>,
237 <&imx219_2_ep>, "remote-endpoint:0=",<&mux_in2>,
238 <&mux_in2>, "clock-noncontinuous?",
240 <&ov2311_2_ep>, "remote-endpoint:0=",<&mux_in2>,
241 <&ov2311_2>, "status=okay";
243 + cam3-arducam-64mp = <&mux_in3>, "remote-endpoint:0=",<&arducam_64mp_3_ep>,
244 + <&arducam_64mp_3_ep>, "remote-endpoint:0=",<&mux_in3>,
245 + <&mux_in3>, "clock-noncontinuous?",
246 + <&arducam_64mp_3>, "status=okay",
247 + <&arducam_64mp_3_vcm>, "status=okay",
248 + <&arducam_64mp_3>,"lens-focus:0=", <&arducam_64mp_3_vcm>;
249 cam3-imx219 = <&mux_in3>, "remote-endpoint:0=",<&imx219_3_ep>,
250 <&imx219_3_ep>, "remote-endpoint:0=",<&mux_in3>,
251 <&mux_in3>, "clock-noncontinuous?",