77a4746d02cfe02bcccd81b69c8417cecc0a2002
[openwrt/staging/ansuel.git] /
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
5 overlays
6
7 Signed-off-by: Lee Jackson <lee.jackson@arducam.com>
8 ---
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(-)
13
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
70 @@ -96,6 +96,16 @@
71 #address-cells = <1>;
72 #size-cells = <0>;
73
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"
79 + #undef cam_node
80 + #undef cam_endpoint
81 + #undef vcm_node
82 + #undef cam1_clk
83 +
84 #define cam_node imx219_0
85 #define cam_endpoint imx219_0_ep
86 #define cam1_clk clk_24mhz
87 @@ -186,6 +196,16 @@
88 #address-cells = <1>;
89 #size-cells = <0>;
90
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"
96 + #undef cam_node
97 + #undef cam_endpoint
98 + #undef vcm_node
99 + #undef cam1_clk
100 +
101 #define cam_node imx219_1
102 #define cam_endpoint imx219_1_ep
103 #define cam1_clk clk_24mhz
104 @@ -385,6 +405,12 @@
105 };
106
107 __overrides__ {
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?",
117 @@ -425,6 +451,12 @@
118 <&ov2311_0_ep>, "remote-endpoint:0=",<&mux_in0>,
119 <&ov2311_0>, "status=okay";
120
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
132 @@ -154,6 +154,16 @@
133 #address-cells = <1>;
134 #size-cells = <0>;
135
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"
141 + #undef cam_node
142 + #undef cam_endpoint
143 + #undef vcm_node
144 + #undef cam1_clk
145 +
146 #define cam_node imx219_0
147 #define cam_endpoint imx219_0_ep
148 #define cam1_clk clk_24mhz
149 @@ -244,6 +254,16 @@
150 #address-cells = <1>;
151 #size-cells = <0>;
152
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"
158 + #undef cam_node
159 + #undef cam_endpoint
160 + #undef vcm_node
161 + #undef cam1_clk
162 +
163 #define cam_node imx219_1
164 #define cam_endpoint imx219_1_ep
165 #define cam1_clk clk_24mhz
166 @@ -334,6 +354,16 @@
167 #address-cells = <1>;
168 #size-cells = <0>;
169
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"
175 + #undef cam_node
176 + #undef cam_endpoint
177 + #undef vcm_node
178 + #undef cam1_clk
179 +
180 #define cam_node imx219_2
181 #define cam_endpoint imx219_2_ep
182 #define cam1_clk clk_24mhz
183 @@ -424,6 +454,16 @@
184 #address-cells = <1>;
185 #size-cells = <0>;
186
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"
192 + #undef cam_node
193 + #undef cam_endpoint
194 + #undef vcm_node
195 + #undef cam1_clk
196 +
197 #define cam_node imx219_3
198 #define cam_endpoint imx219_3_ep
199 #define cam1_clk clk_24mhz
200 @@ -640,6 +680,12 @@
201 };
202
203 __overrides__ {
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?",
213 @@ -680,6 +726,12 @@
214 <&ov2311_0_ep>, "remote-endpoint:0=",<&mux_in0>,
215 <&ov2311_0>, "status=okay";
216
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?",
226 @@ -720,6 +772,12 @@
227 <&ov2311_1_ep>, "remote-endpoint:0=",<&mux_in1>,
228 <&ov2311_1>, "status=okay";
229
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?",
239 @@ -760,6 +818,12 @@
240 <&ov2311_2_ep>, "remote-endpoint:0=",<&mux_in2>,
241 <&ov2311_2>, "status=okay";
242
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?",