Skip to content

Commit

Permalink
imx477: Update device tree overlays to support trigger-mode
Browse files Browse the repository at this point in the history
Also create generic overrides in camera-mux-N-port, that can be extended
to configure vsync modes for cameras supporting this.

Example usages (to be combined with camera_auto_detect=0):
dtoverlay=imx477,cam0,sync-source
dtoverlay=imx477,sync-sink
dtoverlay=camera-mux-2port,cam1-imx477,cam1-sync-sink
dtoverlay=camera-mux-4port,cam3-imx477,cam3-sync-sink

Signed-off-by: Erik Botö <erik.boto@gmail.com>
  • Loading branch information
erikboto authored and njhollinghurst committed Mar 15, 2024
1 parent 074f41b commit 5b432b8
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 0 deletions.
16 changes: 16 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,10 @@ Params: cam0-arducam-64mp Select Arducam64MP for camera on port 0
cam1-ov7251 Select OV7251 for camera on port 1
cam1-ov9281 Select OV9281 for camera on port 1
cam1-imx290-clk-freq Set clock frequency for an IMX290 on port 1
cam0-sync-source Set camera on port 0 as vsync source
cam0-sync-sink Set camera on port 0 as vsync sink
cam1-sync-source Set camera on port 1 as vsync source
cam1-sync-sink Set camera on port 1 as vsync sink

cam0 Connect the mux to CAM0 port (default is CAM1)

Expand Down Expand Up @@ -929,6 +933,14 @@ Params: cam0-arducam-64mp Select Arducam64MP for camera on port 0
cam3-ov7251 Select OV7251 for camera on port 3
cam3-ov9281 Select OV9281 for camera on port 3
cam3-imx290-clk-freq Set clock frequency for an IMX290 on port 3
cam0-sync-source Set camera on port 0 as vsync source
cam0-sync-sink Set camera on port 0 as vsync sink
cam1-sync-source Set camera on port 1 as vsync source
cam1-sync-sink Set camera on port 1 as vsync sink
cam2-sync-source Set camera on port 2 as vsync source
cam2-sync-sink Set camera on port 2 as vsync sink
cam3-sync-source Set camera on port 3 as vsync source
cam3-sync-sink Set camera on port 3 as vsync sink

cam0 Connect the mux to CAM0 port (default is CAM1)

Expand Down Expand Up @@ -2648,6 +2660,8 @@ Params: rotation Mounting rotation of the camera sensor (0 or
Compute Module (CSI0, i2c_vc, and cam0_reg).
always-on Leave the regulator powered up, to stop the
camera clamping I/Os such as XVS to 0V.
sync-source Configure as vsync source
sync-sink Configure as vsync sink


Name: imx462
Expand Down Expand Up @@ -2688,6 +2702,8 @@ Params: rotation Mounting rotation of the camera sensor (0 or
Compute Module (CSI0, i2c_vc, and cam0_reg).
always-on Leave the regulator powered up, to stop the
camera clamping I/Os such as XVS to 0V.
sync-source Configure as vsync source
sync-sink Configure as vsync sink


Name: imx519
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -536,5 +536,10 @@

cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
<&csi_frag>, "target:0=",<&csi0>;

cam0-sync-source = <&imx477_0>, "trigger-mode:0=1";
cam0-sync-sink = <&imx477_0>, "trigger-mode:0=2";
cam1-sync-source = <&imx477_1>, "trigger-mode:0=1";
cam1-sync-sink = <&imx477_1>, "trigger-mode:0=2";
};
};
9 changes: 9 additions & 0 deletions arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -939,5 +939,14 @@

cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
<&csi_frag>, "target:0=",<&csi0>;

cam0-sync-source = <&imx477_0>, "trigger-mode:0=1";
cam0-sync-sink = <&imx477_0>, "trigger-mode:0=2";
cam1-sync-source = <&imx477_1>, "trigger-mode:0=1";
cam1-sync-sink = <&imx477_1>, "trigger-mode:0=2";
cam2-sync-source = <&imx477_2>, "trigger-mode:0=1";
cam2-sync-sink = <&imx477_2>, "trigger-mode:0=2";
cam3-sync-source = <&imx477_3>, "trigger-mode:0=1";
cam3-sync-sink = <&imx477_3>, "trigger-mode:0=2";
};
};
7 changes: 7 additions & 0 deletions arch/arm/boot/dts/overlays/imx378-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@
&cam_node {
compatible = "sony,imx378";
};

/{
__overrides__ {
sync-sink = <&cam_node>,"trigger-mode:0=2";
sync-source = <&cam_node>,"trigger-mode:0=1";
};
};
7 changes: 7 additions & 0 deletions arch/arm/boot/dts/overlays/imx477-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@
&cam_node {
compatible = "sony,imx477";
};

/{
__overrides__ {
sync-sink = <&cam_node>,"trigger-mode:0=2";
sync-source = <&cam_node>,"trigger-mode:0=1";
};
};

0 comments on commit 5b432b8

Please sign in to comment.