1 From d02bd251d7f85e3aec02e5752df2f44a35961360 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Erik=20Bot=C3=B6?= <erik.boto@gmail.com>
3 Date: Fri, 9 Feb 2024 18:41:24 +0100
4 Subject: [PATCH 1295/1295] imx477: Update device tree overlays to support
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 Also create generic overrides in camera-mux-N-port, that can be extended
11 to configure vsync modes for cameras supporting this.
13 Example usages (to be combined with camera_auto_detect=0):
14 dtoverlay=imx477,cam0,sync-source
15 dtoverlay=imx477,sync-sink
16 dtoverlay=camera-mux-2port,cam1-imx477,cam1-sync-sink
17 dtoverlay=camera-mux-4port,cam3-imx477,cam3-sync-sink
19 Signed-off-by: Erik Botö <erik.boto@gmail.com>
21 arch/arm/boot/dts/overlays/README | 16 ++++++++++++++++
22 .../dts/overlays/camera-mux-2port-overlay.dts | 5 +++++
23 .../dts/overlays/camera-mux-4port-overlay.dts | 9 +++++++++
24 arch/arm/boot/dts/overlays/imx378-overlay.dts | 7 +++++++
25 arch/arm/boot/dts/overlays/imx477-overlay.dts | 7 +++++++
26 5 files changed, 44 insertions(+)
28 --- a/arch/arm/boot/dts/overlays/README
29 +++ b/arch/arm/boot/dts/overlays/README
30 @@ -862,6 +862,10 @@ Params: cam0-arducam-64mp Select A
31 cam1-ov7251 Select OV7251 for camera on port 1
32 cam1-ov9281 Select OV9281 for camera on port 1
33 cam1-imx290-clk-freq Set clock frequency for an IMX290 on port 1
34 + cam0-sync-source Set camera on port 0 as vsync source
35 + cam0-sync-sink Set camera on port 0 as vsync sink
36 + cam1-sync-source Set camera on port 1 as vsync source
37 + cam1-sync-sink Set camera on port 1 as vsync sink
39 cam0 Connect the mux to CAM0 port (default is CAM1)
41 @@ -923,6 +927,14 @@ Params: cam0-arducam-64mp Select A
42 cam3-ov7251 Select OV7251 for camera on port 3
43 cam3-ov9281 Select OV9281 for camera on port 3
44 cam3-imx290-clk-freq Set clock frequency for an IMX290 on port 3
45 + cam0-sync-source Set camera on port 0 as vsync source
46 + cam0-sync-sink Set camera on port 0 as vsync sink
47 + cam1-sync-source Set camera on port 1 as vsync source
48 + cam1-sync-sink Set camera on port 1 as vsync sink
49 + cam2-sync-source Set camera on port 2 as vsync source
50 + cam2-sync-sink Set camera on port 2 as vsync sink
51 + cam3-sync-source Set camera on port 3 as vsync source
52 + cam3-sync-sink Set camera on port 3 as vsync sink
54 cam0 Connect the mux to CAM0 port (default is CAM1)
56 @@ -2676,6 +2688,8 @@ Params: rotation Mounting
57 Compute Module (CSI0, i2c_vc, and cam0_reg).
58 always-on Leave the regulator powered up, to stop the
59 camera clamping I/Os such as XVS to 0V.
60 + sync-source Configure as vsync source
61 + sync-sink Configure as vsync sink
65 @@ -2716,6 +2730,8 @@ Params: rotation Mounting
66 Compute Module (CSI0, i2c_vc, and cam0_reg).
67 always-on Leave the regulator powered up, to stop the
68 camera clamping I/Os such as XVS to 0V.
69 + sync-source Configure as vsync source
70 + sync-sink Configure as vsync sink
74 --- a/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
75 +++ b/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
78 cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
79 <&csi_frag>, "target:0=",<&csi0>;
81 + cam0-sync-source = <&imx477_0>, "trigger-mode:0=1";
82 + cam0-sync-sink = <&imx477_0>, "trigger-mode:0=2";
83 + cam1-sync-source = <&imx477_1>, "trigger-mode:0=1";
84 + cam1-sync-sink = <&imx477_1>, "trigger-mode:0=2";
87 --- a/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
88 +++ b/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
91 cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
92 <&csi_frag>, "target:0=",<&csi0>;
94 + cam0-sync-source = <&imx477_0>, "trigger-mode:0=1";
95 + cam0-sync-sink = <&imx477_0>, "trigger-mode:0=2";
96 + cam1-sync-source = <&imx477_1>, "trigger-mode:0=1";
97 + cam1-sync-sink = <&imx477_1>, "trigger-mode:0=2";
98 + cam2-sync-source = <&imx477_2>, "trigger-mode:0=1";
99 + cam2-sync-sink = <&imx477_2>, "trigger-mode:0=2";
100 + cam3-sync-source = <&imx477_3>, "trigger-mode:0=1";
101 + cam3-sync-sink = <&imx477_3>, "trigger-mode:0=2";
104 --- a/arch/arm/boot/dts/overlays/imx378-overlay.dts
105 +++ b/arch/arm/boot/dts/overlays/imx378-overlay.dts
108 compatible = "sony,imx378";
113 + sync-sink = <&cam_node>,"trigger-mode:0=2";
114 + sync-source = <&cam_node>,"trigger-mode:0=1";
117 --- a/arch/arm/boot/dts/overlays/imx477-overlay.dts
118 +++ b/arch/arm/boot/dts/overlays/imx477-overlay.dts
121 compatible = "sony,imx477";
126 + sync-sink = <&cam_node>,"trigger-mode:0=2";
127 + sync-source = <&cam_node>,"trigger-mode:0=1";