bcm27xx: 6.1: add kernel patches
[openwrt/staging/stintel.git] / target / linux / bcm27xx / patches-6.1 / 950-0564-dtoverlays-Add-IMX519-support-to-camera-mux-overlays.patch
1 From 5e2246c5ac556309546fc603fd7a17f8b143b566 Mon Sep 17 00:00:00 2001
2 From: Lee Jackson <info@arducam.com>
3 Date: Fri, 24 Feb 2023 08:33:34 +0800
4 Subject: [PATCH] dtoverlays: Add IMX519 support to camera mux overlays
5
6 Signed-off-by: Lee Jackson <lee.jackson@arducam.com>
7 ---
8 arch/arm/boot/dts/overlays/README | 6 ++
9 .../dts/overlays/camera-mux-2port-overlay.dts | 32 ++++++++++
10 .../dts/overlays/camera-mux-4port-overlay.dts | 64 +++++++++++++++++++
11 3 files changed, 102 insertions(+)
12
13 --- a/arch/arm/boot/dts/overlays/README
14 +++ b/arch/arm/boot/dts/overlays/README
15 @@ -716,6 +716,7 @@ Params: cam0-imx219 Select I
16 cam0-imx258 Select IMX258 for camera on port 0
17 cam0-imx290 Select IMX290 for camera on port 0
18 cam0-imx477 Select IMX477 for camera on port 0
19 + cam0-imx519 Select IMX519 for camera on port 0
20 cam0-imx708 Select IMX708 for camera on port 0
21 cam0-ov2311 Select OV2311 for camera on port 0
22 cam0-ov5647 Select OV5647 for camera on port 0
23 @@ -726,6 +727,7 @@ Params: cam0-imx219 Select I
24 cam1-imx258 Select IMX258 for camera on port 1
25 cam1-imx290 Select IMX290 for camera on port 1
26 cam1-imx477 Select IMX477 for camera on port 1
27 + cam1-imx519 Select IMX519 for camera on port 1
28 cam1-imx708 Select IMX708 for camera on port 1
29 cam1-ov2311 Select OV2311 for camera on port 1
30 cam1-ov5647 Select OV5647 for camera on port 1
31 @@ -743,6 +745,7 @@ Params: cam0-imx219 Select I
32 cam0-imx258 Select IMX258 for camera on port 0
33 cam0-imx290 Select IMX290 for camera on port 0
34 cam0-imx477 Select IMX477 for camera on port 0
35 + cam0-imx519 Select IMX519 for camera on port 0
36 cam0-imx708 Select IMX708 for camera on port 0
37 cam0-ov2311 Select OV2311 for camera on port 0
38 cam0-ov5647 Select OV5647 for camera on port 0
39 @@ -753,6 +756,7 @@ Params: cam0-imx219 Select I
40 cam1-imx258 Select IMX258 for camera on port 1
41 cam1-imx290 Select IMX290 for camera on port 1
42 cam1-imx477 Select IMX477 for camera on port 1
43 + cam1-imx519 Select IMX519 for camera on port 1
44 cam1-imx708 Select IMX708 for camera on port 1
45 cam1-ov2311 Select OV2311 for camera on port 1
46 cam1-ov5647 Select OV5647 for camera on port 1
47 @@ -763,6 +767,7 @@ Params: cam0-imx219 Select I
48 cam2-imx258 Select IMX258 for camera on port 2
49 cam2-imx290 Select IMX290 for camera on port 2
50 cam2-imx477 Select IMX477 for camera on port 2
51 + cam2-imx519 Select IMX519 for camera on port 2
52 cam2-imx708 Select IMX708 for camera on port 2
53 cam2-ov2311 Select OV2311 for camera on port 2
54 cam2-ov5647 Select OV5647 for camera on port 2
55 @@ -773,6 +778,7 @@ Params: cam0-imx219 Select I
56 cam3-imx258 Select IMX258 for camera on port 3
57 cam3-imx290 Select IMX290 for camera on port 3
58 cam3-imx477 Select IMX477 for camera on port 3
59 + cam3-imx519 Select IMX519 for camera on port 3
60 cam3-imx708 Select IMX708 for camera on port 3
61 cam3-ov2311 Select OV2311 for camera on port 3
62 cam3-ov5647 Select OV5647 for camera on port 3
63 --- a/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
64 +++ b/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
65 @@ -112,6 +112,16 @@
66 #undef cam_endpoint
67 #undef cam1_clk
68
69 + #define cam_node imx519_0
70 + #define cam_endpoint imx519_0_ep
71 + #define vcm_node imx519_0_vcm
72 + #define cam1_clk clk_24mhz
73 + #include "imx519.dtsi"
74 + #undef cam_node
75 + #undef cam_endpoint
76 + #undef vcm_node
77 + #undef cam1_clk
78 +
79 #define cam_node imx708_0
80 #define cam_endpoint imx708_0_ep
81 #define vcm_node imx708_0_vcm
82 @@ -192,6 +202,16 @@
83 #undef cam_endpoint
84 #undef cam1_clk
85
86 + #define cam_node imx519_1
87 + #define cam_endpoint imx519_1_ep
88 + #define vcm_node imx519_1_vcm
89 + #define cam1_clk clk_24mhz
90 + #include "imx519.dtsi"
91 + #undef cam_node
92 + #undef cam_endpoint
93 + #undef vcm_node
94 + #undef cam1_clk
95 +
96 #define cam_node imx708_1
97 #define cam_endpoint imx708_1_ep
98 #define vcm_node imx708_1_vcm
99 @@ -373,6 +393,12 @@
100 <&imx477_0_ep>, "remote-endpoint:0=",<&mux_in0>,
101 <&mux_in0>, "clock-noncontinuous?",
102 <&imx477_0>, "status=okay";
103 + cam0-imx519 = <&mux_in0>, "remote-endpoint:0=",<&imx519_0_ep>,
104 + <&imx519_0_ep>, "remote-endpoint:0=",<&mux_in0>,
105 + <&mux_in0>, "clock-noncontinuous?",
106 + <&imx519_0>, "status=okay",
107 + <&imx519_0_vcm>, "status=okay",
108 + <&imx519_0>,"lens-focus:0=", <&imx519_0_vcm>;
109 cam0-imx708 = <&mux_in0>, "remote-endpoint:0=",<&imx708_0_ep>,
110 <&imx708_0_ep>, "remote-endpoint:0=",<&mux_in0>,
111 <&mux_in0>, "clock-noncontinuous?",
112 @@ -407,6 +433,12 @@
113 <&imx477_1_ep>, "remote-endpoint:0=",<&mux_in1>,
114 <&mux_in1>, "clock-noncontinuous?",
115 <&imx477_1>, "status=okay";
116 + cam1-imx519 = <&mux_in1>, "remote-endpoint:0=",<&imx519_1_ep>,
117 + <&imx519_1_ep>, "remote-endpoint:0=",<&mux_in1>,
118 + <&mux_in1>, "clock-noncontinuous?",
119 + <&imx519_1>, "status=okay",
120 + <&imx519_1_vcm>, "status=okay",
121 + <&imx519_1>,"lens-focus:0=", <&imx519_1_vcm>;
122 cam1-imx708 = <&mux_in1>, "remote-endpoint:0=",<&imx708_1_ep>,
123 <&imx708_1_ep>, "remote-endpoint:0=",<&mux_in1>,
124 <&mux_in1>, "clock-noncontinuous?",
125 --- a/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
126 +++ b/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
127 @@ -170,6 +170,16 @@
128 #undef cam_endpoint
129 #undef cam1_clk
130
131 + #define cam_node imx519_0
132 + #define cam_endpoint imx519_0_ep
133 + #define vcm_node imx519_0_vcm
134 + #define cam1_clk clk_24mhz
135 + #include "imx519.dtsi"
136 + #undef cam_node
137 + #undef cam_endpoint
138 + #undef vcm_node
139 + #undef cam1_clk
140 +
141 #define cam_node imx708_0
142 #define cam_endpoint imx708_0_ep
143 #define vcm_node imx708_0_vcm
144 @@ -250,6 +260,16 @@
145 #undef cam_endpoint
146 #undef cam1_clk
147
148 + #define cam_node imx519_1
149 + #define cam_endpoint imx519_1_ep
150 + #define vcm_node imx519_1_vcm
151 + #define cam1_clk clk_24mhz
152 + #include "imx519.dtsi"
153 + #undef cam_node
154 + #undef cam_endpoint
155 + #undef vcm_node
156 + #undef cam1_clk
157 +
158 #define cam_node imx708_1
159 #define cam_endpoint imx708_1_ep
160 #define vcm_node imx708_1_vcm
161 @@ -330,6 +350,16 @@
162 #undef cam_endpoint
163 #undef cam1_clk
164
165 + #define cam_node imx519_2
166 + #define cam_endpoint imx519_2_ep
167 + #define vcm_node imx519_2_vcm
168 + #define cam1_clk clk_24mhz
169 + #include "imx519.dtsi"
170 + #undef cam_node
171 + #undef cam_endpoint
172 + #undef vcm_node
173 + #undef cam1_clk
174 +
175 #define cam_node imx708_2
176 #define cam_endpoint imx708_2_ep
177 #define vcm_node imx708_2_vcm
178 @@ -410,6 +440,16 @@
179 #undef cam_endpoint
180 #undef cam1_clk
181
182 + #define cam_node imx519_3
183 + #define cam_endpoint imx519_3_ep
184 + #define vcm_node imx519_3_vcm
185 + #define cam1_clk clk_24mhz
186 + #include "imx519.dtsi"
187 + #undef cam_node
188 + #undef cam_endpoint
189 + #undef vcm_node
190 + #undef cam1_clk
191 +
192 #define cam_node imx708_3
193 #define cam_endpoint imx708_3_ep
194 #define vcm_node imx708_3_vcm
195 @@ -608,6 +648,12 @@
196 <&imx477_0_ep>, "remote-endpoint:0=",<&mux_in0>,
197 <&mux_in0>, "clock-noncontinuous?",
198 <&imx477_0>, "status=okay";
199 + cam0-imx519 = <&mux_in0>, "remote-endpoint:0=",<&imx519_0_ep>,
200 + <&imx519_0_ep>, "remote-endpoint:0=",<&mux_in0>,
201 + <&mux_in0>, "clock-noncontinuous?",
202 + <&imx519_0>, "status=okay",
203 + <&imx519_0_vcm>, "status=okay",
204 + <&imx519_0>,"lens-focus:0=", <&imx519_0_vcm>;
205 cam0-imx708 = <&mux_in0>, "remote-endpoint:0=",<&imx708_0_ep>,
206 <&imx708_0_ep>, "remote-endpoint:0=",<&mux_in0>,
207 <&mux_in0>, "clock-noncontinuous?",
208 @@ -642,6 +688,12 @@
209 <&imx477_1_ep>, "remote-endpoint:0=",<&mux_in1>,
210 <&mux_in1>, "clock-noncontinuous?",
211 <&imx477_1>, "status=okay";
212 + cam1-imx519 = <&mux_in1>, "remote-endpoint:0=",<&imx519_1_ep>,
213 + <&imx519_1_ep>, "remote-endpoint:0=",<&mux_in1>,
214 + <&mux_in1>, "clock-noncontinuous?",
215 + <&imx519_1>, "status=okay",
216 + <&imx519_1_vcm>, "status=okay",
217 + <&imx519_1>,"lens-focus:0=", <&imx519_1_vcm>;
218 cam1-imx708 = <&mux_in1>, "remote-endpoint:0=",<&imx708_1_ep>,
219 <&imx708_1_ep>, "remote-endpoint:0=",<&mux_in1>,
220 <&mux_in1>, "clock-noncontinuous?",
221 @@ -676,6 +728,12 @@
222 <&imx477_2_ep>, "remote-endpoint:0=",<&mux_in2>,
223 <&mux_in2>, "clock-noncontinuous?",
224 <&imx477_2>, "status=okay";
225 + cam2-imx519 = <&mux_in2>, "remote-endpoint:0=",<&imx519_2_ep>,
226 + <&imx519_2_ep>, "remote-endpoint:0=",<&mux_in2>,
227 + <&mux_in2>, "clock-noncontinuous?",
228 + <&imx519_2>, "status=okay",
229 + <&imx519_2_vcm>, "status=okay",
230 + <&imx519_2>,"lens-focus:0=", <&imx519_2_vcm>;
231 cam2-imx708 = <&mux_in2>, "remote-endpoint:0=",<&imx708_2_ep>,
232 <&imx708_2_ep>, "remote-endpoint:0=",<&mux_in2>,
233 <&mux_in2>, "clock-noncontinuous?",
234 @@ -710,6 +768,12 @@
235 <&imx477_3_ep>, "remote-endpoint:0=",<&mux_in3>,
236 <&mux_in3>, "clock-noncontinuous?",
237 <&imx477_3>, "status=okay";
238 + cam3-imx519 = <&mux_in3>, "remote-endpoint:0=",<&imx519_3_ep>,
239 + <&imx519_3_ep>, "remote-endpoint:0=",<&mux_in3>,
240 + <&mux_in3>, "clock-noncontinuous?",
241 + <&imx519_3>, "status=okay",
242 + <&imx519_3_vcm>, "status=okay",
243 + <&imx519_3>,"lens-focus:0=", <&imx519_3_vcm>;
244 cam3-imx708 = <&mux_in3>, "remote-endpoint:0=",<&imx708_3_ep>,
245 <&imx708_3_ep>, "remote-endpoint:0=",<&mux_in3>,
246 <&mux_in3>, "clock-noncontinuous?",