1 // SPDX-License-Identifier: GPL-2.0-only
2 // Overlay to configure a 2 port camera multiplexer
4 // Configuration is based on the Arducam Doubleplexer
5 // which uses a PCA9543 I2C multiplexer to handle the
6 // I2C, and GPIO 4 to control the MIPI mux, and GPIO 17
7 // to enable the CSI-2 mux output (gpio-hog).
12 #include <dt-bindings/gpio/gpio.h>
15 compatible = "brcm,bcm2835";
17 /* Fragments that complete the individual sensor fragments */
20 target = <&imx290_0_ep>;
24 /bits/ 64 <445500000 297000000>;
29 target = <&imx290_1_ep>;
33 /bits/ 64 <445500000 297000000>;
41 compatible = "sony,imx477";
48 compatible = "sony,imx477";
52 /* Additional fragments affecting the mux nodes */
80 i2c_frag: fragment@200 {
81 target = <&i2c_csi_dsi>;
89 compatible = "nxp,pca9543";
99 #define cam_node arducam_64mp_0
100 #define cam_endpoint arducam_64mp_0_ep
101 #define vcm_node arducam_64mp_0_vcm
102 #define cam1_clk clk_24mhz
103 #include "arducam-64mp.dtsi"
109 #define cam_node imx219_0
110 #define cam_endpoint imx219_0_ep
111 #define cam1_clk clk_24mhz
112 #include "imx219.dtsi"
117 #define cam_node imx477_0
118 #define cam_endpoint imx477_0_ep
119 #define cam1_clk clk_24mhz
120 #include "imx477_378.dtsi"
125 #define cam_node imx519_0
126 #define cam_endpoint imx519_0_ep
127 #define vcm_node imx519_0_vcm
128 #define cam1_clk clk_24mhz
129 #include "imx519.dtsi"
135 #define cam_node imx708_0
136 #define cam_endpoint imx708_0_ep
137 #define vcm_node imx708_0_vcm
138 #define cam1_clk clk_24mhz
139 #include "imx708.dtsi"
145 #define cam_node ov5647_0
146 #define cam_endpoint ov5647_0_ep
147 #define cam1_clk clk_25mhz
148 #include "ov5647.dtsi"
153 #define cam_node ov7251_0
154 #define cam_endpoint ov7251_0_ep
155 #define cam1_clk clk_24mhz
156 #include "ov7251.dtsi"
161 #define cam_node ov9281_0
162 #define cam_endpoint ov9281_0_ep
163 #define cam1_clk clk_24mhz
164 #include "ov9281.dtsi"
169 #define cam_node imx258_0
170 #define cam_endpoint imx258_0_ep
171 #define cam1_clk clk_24mhz
172 #include "imx258.dtsi"
177 #define cam_node imx290_0
178 #define cam_endpoint imx290_0_ep
179 #define cam1_clk clk_imx290
180 #include "imx290_327.dtsi"
185 #define cam_node ov2311_0
186 #define cam_endpoint ov2311_0_ep
187 #define cam1_clk clk_24mhz
188 #include "ov2311.dtsi"
196 #address-cells = <1>;
199 #define cam_node arducam_64mp_1
200 #define cam_endpoint arducam_64mp_1_ep
201 #define vcm_node arducam_64mp_1_vcm
202 #define cam1_clk clk_24mhz
203 #include "arducam-64mp.dtsi"
209 #define cam_node imx219_1
210 #define cam_endpoint imx219_1_ep
211 #define cam1_clk clk_24mhz
212 #include "imx219.dtsi"
217 #define cam_node imx477_1
218 #define cam_endpoint imx477_1_ep
219 #define cam1_clk clk_24mhz
220 #include "imx477_378.dtsi"
225 #define cam_node imx519_1
226 #define cam_endpoint imx519_1_ep
227 #define vcm_node imx519_1_vcm
228 #define cam1_clk clk_24mhz
229 #include "imx519.dtsi"
235 #define cam_node imx708_1
236 #define cam_endpoint imx708_1_ep
237 #define vcm_node imx708_1_vcm
238 #define cam1_clk clk_24mhz
239 #include "imx708.dtsi"
245 #define cam_node ov5647_1
246 #define cam_endpoint ov5647_1_ep
247 #define cam1_clk clk_25mhz
248 #include "ov5647.dtsi"
253 #define cam_node ov7251_1
254 #define cam_endpoint ov7251_1_ep
255 #define cam1_clk clk_24mhz
256 #include "ov7251.dtsi"
261 #define cam_node ov9281_1
262 #define cam_endpoint ov9281_1_ep
263 #define cam1_clk clk_24mhz
264 #include "ov9281.dtsi"
269 #define cam_node imx258_1
270 #define cam_endpoint imx258_1_ep
271 #define cam1_clk clk_24mhz
272 #include "imx258.dtsi"
277 #define cam_node imx290_1
278 #define cam_endpoint imx290_1_ep
279 #define cam1_clk clk_imx290
280 #include "imx290_327.dtsi"
285 #define cam_node ov2311_1
286 #define cam_endpoint ov2311_1_ep
287 #define cam1_clk clk_24mhz
288 #include "ov2311.dtsi"
297 csi_frag: fragment@201 {
302 brcm,media-controller;
306 remote-endpoint = <&mux_out>;
324 mux: mux-controller {
325 compatible = "gpio-mux";
326 #mux-control-cells = <0>;
328 mux-gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
332 compatible = "video-mux";
333 mux-controls = <&mux>;
334 #address-cells = <1>;
357 remote-endpoint = <&csi1_ep>;
363 clk_24mhz: clk_24mhz {
364 compatible = "fixed-clock";
367 clock-frequency = <24000000>;
371 clk_25mhz: clk_25mhz {
372 compatible = "fixed-clock";
375 clock-frequency = <25000000>;
379 clk_imx290: clk_imx290 {
380 compatible = "fixed-clock";
383 clock-frequency = <37125000>;
401 gpios = <17 GPIO_ACTIVE_LOW>;
408 cam0-arducam-64mp = <&mux_in0>, "remote-endpoint:0=",<&arducam_64mp_0_ep>,
409 <&arducam_64mp_0_ep>, "remote-endpoint:0=",<&mux_in0>,
410 <&mux_in0>, "clock-noncontinuous?",
411 <&arducam_64mp_0>, "status=okay",
412 <&arducam_64mp_0_vcm>, "status=okay",
413 <&arducam_64mp_0>,"lens-focus:0=", <&arducam_64mp_0_vcm>;
414 cam0-imx219 = <&mux_in0>, "remote-endpoint:0=",<&imx219_0_ep>,
415 <&imx219_0_ep>, "remote-endpoint:0=",<&mux_in0>,
416 <&mux_in0>, "clock-noncontinuous?",
417 <&imx219_0>, "status=okay";
418 cam0-imx477 = <&mux_in0>, "remote-endpoint:0=",<&imx477_0_ep>,
419 <&imx477_0_ep>, "remote-endpoint:0=",<&mux_in0>,
420 <&mux_in0>, "clock-noncontinuous?",
421 <&imx477_0>, "status=okay";
422 cam0-imx519 = <&mux_in0>, "remote-endpoint:0=",<&imx519_0_ep>,
423 <&imx519_0_ep>, "remote-endpoint:0=",<&mux_in0>,
424 <&mux_in0>, "clock-noncontinuous?",
425 <&imx519_0>, "status=okay",
426 <&imx519_0_vcm>, "status=okay",
427 <&imx519_0>,"lens-focus:0=", <&imx519_0_vcm>;
428 cam0-imx708 = <&mux_in0>, "remote-endpoint:0=",<&imx708_0_ep>,
429 <&imx708_0_ep>, "remote-endpoint:0=",<&mux_in0>,
430 <&mux_in0>, "clock-noncontinuous?",
431 <&imx708_0>, "status=okay",
432 <&imx708_0_vcm>, "status=okay",
433 <&imx708_0>,"lens-focus:0=", <&imx708_0_vcm>;
434 cam0-ov5647 = <&mux_in0>, "remote-endpoint:0=",<&ov5647_0_ep>,
435 <&ov5647_0_ep>, "remote-endpoint:0=",<&mux_in0>,
436 <&ov5647_0>, "status=okay";
437 cam0-ov7251 = <&mux_in0>, "remote-endpoint:0=",<&ov7251_0_ep>,
438 <&ov7251_0_ep>, "remote-endpoint:0=",<&mux_in0>,
439 <&ov7251_0>, "status=okay",
441 cam0-ov9281 = <&mux_in0>, "remote-endpoint:0=",<&ov9281_0_ep>,
442 <&ov9281_0_ep>, "remote-endpoint:0=",<&mux_in0>,
443 <&ov9281_0>, "status=okay";
444 cam0-imx258 = <&mux_in0>, "remote-endpoint:0=",<&imx258_0_ep>,
445 <&imx258_0_ep>, "remote-endpoint:0=",<&mux_in0>,
446 <&imx258_0>, "status=okay";
447 cam0-imx290 = <&mux_in0>, "remote-endpoint:0=",<&imx290_0_ep>,
448 <&imx290_0_ep>, "remote-endpoint:0=",<&mux_in0>,
449 <&imx290_0>, "status=okay";
450 cam0-ov2311 = <&mux_in0>, "remote-endpoint:0=",<&ov2311_0_ep>,
451 <&ov2311_0_ep>, "remote-endpoint:0=",<&mux_in0>,
452 <&ov2311_0>, "status=okay";
454 cam1-arducam-64mp = <&mux_in1>, "remote-endpoint:0=",<&arducam_64mp_1_ep>,
455 <&arducam_64mp_1_ep>, "remote-endpoint:0=",<&mux_in1>,
456 <&mux_in1>, "clock-noncontinuous?",
457 <&arducam_64mp_1>, "status=okay",
458 <&arducam_64mp_1_vcm>, "status=okay",
459 <&arducam_64mp_1>,"lens-focus:0=", <&arducam_64mp_1_vcm>;
460 cam1-imx219 = <&mux_in1>, "remote-endpoint:0=",<&imx219_1_ep>,
461 <&imx219_1_ep>, "remote-endpoint:0=",<&mux_in1>,
462 <&mux_in1>, "clock-noncontinuous?",
463 <&imx219_1>, "status=okay";
464 cam1-imx477 = <&mux_in1>, "remote-endpoint:0=",<&imx477_1_ep>,
465 <&imx477_1_ep>, "remote-endpoint:0=",<&mux_in1>,
466 <&mux_in1>, "clock-noncontinuous?",
467 <&imx477_1>, "status=okay";
468 cam1-imx519 = <&mux_in1>, "remote-endpoint:0=",<&imx519_1_ep>,
469 <&imx519_1_ep>, "remote-endpoint:0=",<&mux_in1>,
470 <&mux_in1>, "clock-noncontinuous?",
471 <&imx519_1>, "status=okay",
472 <&imx519_1_vcm>, "status=okay",
473 <&imx519_1>,"lens-focus:0=", <&imx519_1_vcm>;
474 cam1-imx708 = <&mux_in1>, "remote-endpoint:0=",<&imx708_1_ep>,
475 <&imx708_1_ep>, "remote-endpoint:0=",<&mux_in1>,
476 <&mux_in1>, "clock-noncontinuous?",
477 <&imx708_1>, "status=okay",
478 <&imx708_1_vcm>, "status=okay",
479 <&imx708_1>,"lens-focus:0=", <&imx708_1_vcm>;
480 cam1-ov5647 = <&mux_in1>, "remote-endpoint:0=",<&ov5647_1_ep>,
481 <&ov5647_1_ep>, "remote-endpoint:0=",<&mux_in1>,
482 <&ov5647_1>, "status=okay";
483 cam1-ov7251 = <&mux_in1>, "remote-endpoint:0=",<&ov7251_1_ep>,
484 <&ov7251_1_ep>, "remote-endpoint:0=",<&mux_in1>,
485 <&ov7251_1>, "status=okay",
487 cam1-ov9281 = <&mux_in1>, "remote-endpoint:0=",<&ov9281_1_ep>,
488 <&ov9281_1_ep>, "remote-endpoint:0=",<&mux_in1>,
489 <&ov9281_1>, "status=okay";
490 cam1-imx258 = <&mux_in1>, "remote-endpoint:0=",<&imx258_1_ep>,
491 <&imx258_1_ep>, "remote-endpoint:0=",<&mux_in1>,
492 <&imx258_1>, "status=okay";
493 cam1-imx290 = <&mux_in1>, "remote-endpoint:0=",<&imx290_1_ep>,
494 <&imx290_1_ep>, "remote-endpoint:0=",<&mux_in1>,
495 <&imx290_1>, "status=okay";
496 cam1-ov2311 = <&mux_in1>, "remote-endpoint:0=",<&ov2311_1_ep>,
497 <&ov2311_1_ep>, "remote-endpoint:0=",<&mux_in1>,
498 <&ov2311_1>, "status=okay";
500 cam0-imx290-clk-freq = <&clk_imx290>,"clock-frequency:0",
501 <&imx290_0>,"clock-frequency:0";
502 cam1-imx290-clk-freq = <&clk_imx290>,"clock-frequency:0",
503 <&imx290_1>,"clock-frequency:0";
505 cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
506 <&csi_frag>, "target:0=",<&csi0>;