dtoverlays: Add option for cam0 to camera-mux-Nport overlays
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Mon, 27 Nov 2023 14:50:58 +0000 (14:50 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:17 +0000 (11:35 +0000)
Seeing as the mux can be connected to either CAM/DISP1 or
CAM/DISP0 on a Pi5, add a cam0 override to allow configuration
of which is used. Default (as with all camera overlays) is CAM/DISP1.

The overlay does NOT update the camera regulator used by all the
sensors as doing so would be a nightmare. The Arducam mulitplexer
boards these overlays are initially supporting seem to tie the
regulator GPIO for all the sensors high anyway.
If it was viewed as necessary, then creating an additional
regulator that listed cam[01]_reg as the parent should work.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
arch/arm/boot/dts/overlays/README
arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts

index 20a5501..1b5b936 100644 (file)
@@ -823,6 +823,8 @@ Params: cam0-arducam-64mp       Select Arducam64MP for camera on port 0
         cam1-ov9281             Select OV9281 for camera on port 1
         cam1-imx290-clk-freq    Set clock frequency for an IMX290 on port 1
 
+        cam0                    Connect the mux to CAM0 port (default is CAM1)
+
 
 Name:   camera-mux-4port
 Info:   Configures a 4 port camera multiplexer
@@ -878,6 +880,8 @@ Params: cam0-arducam-64mp       Select Arducam64MP for camera on port 0
         cam3-ov9281             Select OV9281 for camera on port 3
         cam3-imx290-clk-freq    Set clock frequency for an IMX290 on port 3
 
+        cam0                    Connect the mux to CAM0 port (default is CAM1)
+
 
 Name:   cap1106
 Info:   Enables the ability to use the cap1106 touch sensor as a keyboard
index f8fca79..8471ad0 100644 (file)
@@ -77,7 +77,7 @@
        };
 
        /* Mux define */
-       fragment@200 {
+       i2c_frag: fragment@200 {
                target = <&i2c_csi_dsi>;
                __overlay__ {
                        #address-cells = <1>;
                };
        };
 
-       fragment@201 {
+       csi_frag: fragment@201 {
                target = <&csi1>;
                __overlay__ {
                        status = "okay";
                                       <&imx290_0>,"clock-frequency:0";
                cam1-imx290-clk-freq = <&clk_imx290>,"clock-frequency:0",
                                       <&imx290_1>,"clock-frequency:0";
+
+               cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
+                      <&csi_frag>, "target:0=",<&csi0>;
        };
 };
index 841ac2c..bdb1aeb 100644 (file)
        };
 
        /* Mux define */
-       fragment@200 {
+       i2c_frag: fragment@200 {
                target = <&i2c_csi_dsi>;
                __overlay__ {
                        #address-cells = <1>;
                };
        };
 
-       fragment@201 {
+       csi_frag: fragment@201 {
                target = <&csi1>;
                __overlay__ {
                        status = "okay";
                                       <&imx290_2>,"clock-frequency:0";
                cam3-imx290-clk-freq = <&clk_imx290>,"clock-frequency:0",
                                       <&imx290_3>,"clock-frequency:0";
+
+               cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
+                      <&csi_frag>, "target:0=",<&csi0>;
        };
 };