09cdcc7928f4ab27b6f222665101dbd5e3287a3d
[openwrt/staging/neocturne.git] /
1 From 08c5904ad00ffc54d37058ead19814f8a85f6f39 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Mon, 27 Nov 2023 14:50:58 +0000
4 Subject: [PATCH] dtoverlays: Add option for cam0 to camera-mux-Nport overlays
5
6 Seeing as the mux can be connected to either CAM/DISP1 or
7 CAM/DISP0 on a Pi5, add a cam0 override to allow configuration
8 of which is used. Default (as with all camera overlays) is CAM/DISP1.
9
10 The overlay does NOT update the camera regulator used by all the
11 sensors as doing so would be a nightmare. The Arducam mulitplexer
12 boards these overlays are initially supporting seem to tie the
13 regulator GPIO for all the sensors high anyway.
14 If it was viewed as necessary, then creating an additional
15 regulator that listed cam[01]_reg as the parent should work.
16
17 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
18 ---
19 arch/arm/boot/dts/overlays/README | 4 ++++
20 arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts | 7 +++++--
21 arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts | 7 +++++--
22 3 files changed, 14 insertions(+), 4 deletions(-)
23
24 --- a/arch/arm/boot/dts/overlays/README
25 +++ b/arch/arm/boot/dts/overlays/README
26 @@ -823,6 +823,8 @@ Params: cam0-arducam-64mp Select A
27 cam1-ov9281 Select OV9281 for camera on port 1
28 cam1-imx290-clk-freq Set clock frequency for an IMX290 on port 1
29
30 + cam0 Connect the mux to CAM0 port (default is CAM1)
31 +
32
33 Name: camera-mux-4port
34 Info: Configures a 4 port camera multiplexer
35 @@ -878,6 +880,8 @@ Params: cam0-arducam-64mp Select A
36 cam3-ov9281 Select OV9281 for camera on port 3
37 cam3-imx290-clk-freq Set clock frequency for an IMX290 on port 3
38
39 + cam0 Connect the mux to CAM0 port (default is CAM1)
40 +
41
42 Name: cap1106
43 Info: Enables the ability to use the cap1106 touch sensor as a keyboard
44 --- a/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
45 +++ b/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
46 @@ -77,7 +77,7 @@
47 };
48
49 /* Mux define */
50 - fragment@200 {
51 + i2c_frag: fragment@200 {
52 target = <&i2c_csi_dsi>;
53 __overlay__ {
54 #address-cells = <1>;
55 @@ -294,7 +294,7 @@
56 };
57 };
58
59 - fragment@201 {
60 + csi_frag: fragment@201 {
61 target = <&csi1>;
62 __overlay__ {
63 status = "okay";
64 @@ -501,5 +501,8 @@
65 <&imx290_0>,"clock-frequency:0";
66 cam1-imx290-clk-freq = <&clk_imx290>,"clock-frequency:0",
67 <&imx290_1>,"clock-frequency:0";
68 +
69 + cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
70 + <&csi_frag>, "target:0=",<&csi0>;
71 };
72 };
73 --- a/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
74 +++ b/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
75 @@ -135,7 +135,7 @@
76 };
77
78 /* Mux define */
79 - fragment@200 {
80 + i2c_frag: fragment@200 {
81 target = <&i2c_csi_dsi>;
82 __overlay__ {
83 #address-cells = <1>;
84 @@ -552,7 +552,7 @@
85 };
86 };
87
88 - fragment@201 {
89 + csi_frag: fragment@201 {
90 target = <&csi1>;
91 __overlay__ {
92 status = "okay";
93 @@ -872,5 +872,8 @@
94 <&imx290_2>,"clock-frequency:0";
95 cam3-imx290-clk-freq = <&clk_imx290>,"clock-frequency:0",
96 <&imx290_3>,"clock-frequency:0";
97 +
98 + cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
99 + <&csi_frag>, "target:0=",<&csi0>;
100 };
101 };