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 */
81 target = <&i2c_csi_dsi>;
89 compatible = "nxp,pca9543";
99 #define cam_node imx219_0
100 #define cam_endpoint imx219_0_ep
101 #define cam1_clk clk_24mhz
102 #include "imx219.dtsi"
107 #define cam_node imx477_0
108 #define cam_endpoint imx477_0_ep
109 #define cam1_clk clk_24mhz
110 #include "imx477_378.dtsi"
115 #define cam_node ov5647_0
116 #define cam_endpoint ov5647_0_ep
117 #define cam1_clk clk_25mhz
118 #include "ov5647.dtsi"
123 #define cam_node ov7251_0
124 #define cam_endpoint ov7251_0_ep
125 #define cam1_clk clk_24mhz
126 #include "ov7251.dtsi"
131 #define cam_node ov9281_0
132 #define cam_endpoint ov9281_0_ep
133 #define cam1_clk clk_24mhz
134 #include "ov9281.dtsi"
139 #define cam_node imx258_0
140 #define cam_endpoint imx258_0_ep
141 #define cam1_clk clk_24mhz
142 #include "imx258.dtsi"
147 #define cam_node imx290_0
148 #define cam_endpoint imx290_0_ep
149 #define cam1_clk clk_imx290
150 #include "imx290_327.dtsi"
155 #define cam_node ov2311_0
156 #define cam_endpoint ov2311_0_ep
157 #define cam1_clk clk_24mhz
158 #include "ov2311.dtsi"
166 #address-cells = <1>;
169 #define cam_node imx219_1
170 #define cam_endpoint imx219_1_ep
171 #define cam1_clk clk_24mhz
172 #include "imx219.dtsi"
177 #define cam_node imx477_1
178 #define cam_endpoint imx477_1_ep
179 #define cam1_clk clk_24mhz
180 #include "imx477_378.dtsi"
185 #define cam_node ov5647_1
186 #define cam_endpoint ov5647_1_ep
187 #define cam1_clk clk_25mhz
188 #include "ov5647.dtsi"
193 #define cam_node ov7251_1
194 #define cam_endpoint ov7251_1_ep
195 #define cam1_clk clk_24mhz
196 #include "ov7251.dtsi"
201 #define cam_node ov9281_1
202 #define cam_endpoint ov9281_1_ep
203 #define cam1_clk clk_24mhz
204 #include "ov9281.dtsi"
209 #define cam_node imx258_1
210 #define cam_endpoint imx258_1_ep
211 #define cam1_clk clk_24mhz
212 #include "imx258.dtsi"
217 #define cam_node imx290_1
218 #define cam_endpoint imx290_1_ep
219 #define cam1_clk clk_imx290
220 #include "imx290_327.dtsi"
225 #define cam_node ov2311_1
226 #define cam_endpoint ov2311_1_ep
227 #define cam1_clk clk_24mhz
228 #include "ov2311.dtsi"
242 brcm,media-controller;
246 remote-endpoint = <&mux_out>;
264 mux: mux-controller {
265 compatible = "gpio-mux";
266 #mux-control-cells = <0>;
268 mux-gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
272 compatible = "video-mux";
273 mux-controls = <&mux>;
274 #address-cells = <1>;
297 remote-endpoint = <&csi1_ep>;
303 clk_24mhz: clk_24mhz {
304 compatible = "fixed-clock";
307 clock-frequency = <24000000>;
311 clk_25mhz: clk_25mhz {
312 compatible = "fixed-clock";
315 clock-frequency = <25000000>;
319 clk_imx290: clk_imx290 {
320 compatible = "fixed-clock";
323 clock-frequency = <37125000>;
341 gpios = <17 GPIO_ACTIVE_LOW>;
348 cam0-imx219 = <&mux_in0>, "remote-endpoint:0=",<&imx219_0_ep>,
349 <&imx219_0_ep>, "remote-endpoint:0=",<&mux_in0>,
350 <&mux_in0>, "clock-noncontinuous?",
351 <&imx219_0>, "status=okay";
352 cam0-imx477 = <&mux_in0>, "remote-endpoint:0=",<&imx477_0_ep>,
353 <&imx477_0_ep>, "remote-endpoint:0=",<&mux_in0>,
354 <&mux_in0>, "clock-noncontinuous?",
355 <&imx477_0>, "status=okay";
356 cam0-ov5647 = <&mux_in0>, "remote-endpoint:0=",<&ov5647_0_ep>,
357 <&ov5647_0_ep>, "remote-endpoint:0=",<&mux_in0>,
358 <&ov5647_0>, "status=okay";
359 cam0-ov7251 = <&mux_in0>, "remote-endpoint:0=",<&ov7251_0_ep>,
360 <&ov7251_0_ep>, "remote-endpoint:0=",<&mux_in0>,
361 <&ov7251_0>, "status=okay",
363 cam0-ov9281 = <&mux_in0>, "remote-endpoint:0=",<&ov9281_0_ep>,
364 <&ov9281_0_ep>, "remote-endpoint:0=",<&mux_in0>,
365 <&ov9281_0>, "status=okay";
366 cam0-imx258 = <&mux_in0>, "remote-endpoint:0=",<&imx258_0_ep>,
367 <&imx258_0_ep>, "remote-endpoint:0=",<&mux_in0>,
368 <&imx258_0>, "status=okay";
369 cam0-imx290 = <&mux_in0>, "remote-endpoint:0=",<&imx290_0_ep>,
370 <&imx290_0_ep>, "remote-endpoint:0=",<&mux_in0>,
371 <&imx290_0>, "status=okay";
372 cam0-ov2311 = <&mux_in0>, "remote-endpoint:0=",<&ov2311_0_ep>,
373 <&ov2311_0_ep>, "remote-endpoint:0=",<&mux_in0>,
374 <&ov2311_0>, "status=okay";
376 cam1-imx219 = <&mux_in1>, "remote-endpoint:0=",<&imx219_1_ep>,
377 <&imx219_1_ep>, "remote-endpoint:0=",<&mux_in1>,
378 <&mux_in1>, "clock-noncontinuous?",
379 <&imx219_1>, "status=okay";
380 cam1-imx477 = <&mux_in1>, "remote-endpoint:0=",<&imx477_1_ep>,
381 <&imx477_1_ep>, "remote-endpoint:0=",<&mux_in1>,
382 <&mux_in1>, "clock-noncontinuous?",
383 <&imx477_1>, "status=okay";
384 cam1-ov5647 = <&mux_in1>, "remote-endpoint:0=",<&ov5647_1_ep>,
385 <&ov5647_1_ep>, "remote-endpoint:0=",<&mux_in1>,
386 <&ov5647_1>, "status=okay";
387 cam1-ov7251 = <&mux_in1>, "remote-endpoint:0=",<&ov7251_1_ep>,
388 <&ov7251_1_ep>, "remote-endpoint:0=",<&mux_in1>,
389 <&ov7251_1>, "status=okay",
391 cam1-ov9281 = <&mux_in1>, "remote-endpoint:0=",<&ov9281_1_ep>,
392 <&ov9281_1_ep>, "remote-endpoint:0=",<&mux_in1>,
393 <&ov9281_1>, "status=okay";
394 cam1-imx258 = <&mux_in1>, "remote-endpoint:0=",<&imx258_1_ep>,
395 <&imx258_1_ep>, "remote-endpoint:0=",<&mux_in1>,
396 <&imx258_1>, "status=okay";
397 cam1-imx290 = <&mux_in1>, "remote-endpoint:0=",<&imx290_1_ep>,
398 <&imx290_1_ep>, "remote-endpoint:0=",<&mux_in1>,
399 <&imx290_1>, "status=okay";
400 cam1-ov2311 = <&mux_in1>, "remote-endpoint:0=",<&ov2311_1_ep>,
401 <&ov2311_1_ep>, "remote-endpoint:0=",<&mux_in1>,
402 <&ov2311_1>, "status=okay";
404 cam0-imx290-clk-freq = <&clk_imx290>,"clock-frequency:0",
405 <&imx290_0>,"clock-frequency:0";
406 cam1-imx290-clk-freq = <&clk_imx290>,"clock-frequency:0",
407 <&imx290_1>,"clock-frequency:0";