d9df79412bc606ef43352936b4400535db62a741
[openwrt/staging/blocktrron.git] /
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
5 trigger-mode
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 Also create generic overrides in camera-mux-N-port, that can be extended
11 to configure vsync modes for cameras supporting this.
12
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
18
19 Signed-off-by: Erik Botö <erik.boto@gmail.com>
20 ---
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(+)
27
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
38
39 cam0 Connect the mux to CAM0 port (default is CAM1)
40
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
53
54 cam0 Connect the mux to CAM0 port (default is CAM1)
55
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
62
63
64 Name: imx462
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
71
72
73 Name: imx519
74 --- a/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
75 +++ b/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
76 @@ -536,5 +536,10 @@
77
78 cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
79 <&csi_frag>, "target:0=",<&csi0>;
80 +
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";
85 };
86 };
87 --- a/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
88 +++ b/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
89 @@ -939,5 +939,14 @@
90
91 cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
92 <&csi_frag>, "target:0=",<&csi0>;
93 +
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";
102 };
103 };
104 --- a/arch/arm/boot/dts/overlays/imx378-overlay.dts
105 +++ b/arch/arm/boot/dts/overlays/imx378-overlay.dts
106 @@ -8,3 +8,10 @@
107 &cam_node {
108 compatible = "sony,imx378";
109 };
110 +
111 +/{
112 + __overrides__ {
113 + sync-sink = <&cam_node>,"trigger-mode:0=2";
114 + sync-source = <&cam_node>,"trigger-mode:0=1";
115 + };
116 +};
117 --- a/arch/arm/boot/dts/overlays/imx477-overlay.dts
118 +++ b/arch/arm/boot/dts/overlays/imx477-overlay.dts
119 @@ -8,3 +8,10 @@
120 &cam_node {
121 compatible = "sony,imx477";
122 };
123 +
124 +/{
125 + __overrides__ {
126 + sync-sink = <&cam_node>,"trigger-mode:0=2";
127 + sync-source = <&cam_node>,"trigger-mode:0=1";
128 + };
129 +};