4dcbd7fb5dcb7453500b05bf2ce02eeb2c193611
[openwrt/staging/robimarko.git] /
1 From 74b6a90ba073ae853640432f824b6308c5a003b5 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 21 Oct 2021 15:06:02 +0100
4 Subject: [PATCH] dtoverlays: Update all image sensor overlays for
5 Media Controller option
6
7 Add an option to enable configuration via the Media Controller API
8 (rather than the video-node-centric /dev/videoN) as about to
9 be used by libcamera as it enables more complex pipelines to be
10 handled.
11
12 Any source that has a libcamera tuning merged has MC enabled by
13 default.
14 Sources with no libcamera tuning merged have it disabled by
15 default.
16 In either case it can be overridden with the overlay parameter
17 "media-controller".
18
19 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
20 ---
21 arch/arm/boot/dts/overlays/README | 27 +++++++++++++++++--
22 .../boot/dts/overlays/adv7282m-overlay.dts | 8 ++++++
23 arch/arm/boot/dts/overlays/imx219-overlay.dts | 8 ++++++
24 .../boot/dts/overlays/imx290_327-overlay.dtsi | 8 ++++++
25 .../boot/dts/overlays/imx477_378-overlay.dtsi | 8 ++++++
26 arch/arm/boot/dts/overlays/imx519-overlay.dts | 8 ++++++
27 .../arm/boot/dts/overlays/irs1125-overlay.dts | 11 ++++++++
28 arch/arm/boot/dts/overlays/ov5647-overlay.dts | 8 ++++++
29 arch/arm/boot/dts/overlays/ov7251-overlay.dts | 8 ++++++
30 arch/arm/boot/dts/overlays/ov9281-overlay.dts | 8 ++++++
31 .../boot/dts/overlays/tc358743-overlay.dts | 8 ++++++
32 11 files changed, 108 insertions(+), 2 deletions(-)
33
34 --- a/arch/arm/boot/dts/overlays/README
35 +++ b/arch/arm/boot/dts/overlays/README
36 @@ -416,6 +416,8 @@ Info: Analog Devices ADV7282M analogue
37 variants.
38 Load: dtoverlay=adv7282m,<param>=<val>
39 Params: addr Overrides the I2C address (default 0x21)
40 + media-controller Configure use of Media Controller API for
41 + configuring the sensor (default off)
42
43
44 Name: adv728x-m
45 @@ -426,6 +428,8 @@ Params: addr Override
46 adv7280m Select ADV7280-M.
47 adv7281m Select ADV7281-M.
48 adv7281ma Select ADV7281-MA.
49 + media-controller Configure use of Media Controller API for
50 + configuring the sensor (default off)
51
52
53 Name: akkordion-iqdacplus
54 @@ -1708,6 +1712,8 @@ Params: rotation Mounting
55 180, default 180)
56 orientation Sensor orientation (0 = front, 1 = rear,
57 2 = external, default external)
58 + media-controller Configure use of Media Controller API for
59 + configuring the sensor (default on)
60
61
62 Name: imx290
63 @@ -1728,6 +1734,8 @@ Params: 4lane Enable 4
64 2 = external, default external)
65 rotation Mounting rotation of the camera sensor (0 or
66 180, default 0)
67 + media-controller Configure use of Media Controller API for
68 + configuring the sensor (default on)
69
70
71 Name: imx378
72 @@ -1739,6 +1747,8 @@ Params: rotation Mounting
73 180, default 180)
74 orientation Sensor orientation (0 = front, 1 = rear,
75 2 = external, default external)
76 + media-controller Configure use of Media Controller API for
77 + configuring the sensor (default on)
78
79
80 Name: imx477
81 @@ -1750,6 +1760,8 @@ Params: rotation Mounting
82 180, default 180)
83 orientation Sensor orientation (0 = front, 1 = rear,
84 2 = external, default external)
85 + media-controller Configure use of Media Controller API for
86 + configuring the sensor (default on)
87
88
89 Name: imx519
90 @@ -1761,6 +1773,8 @@ Params: rotation Mounting
91 180, default 0)
92 orientation Sensor orientation (0 = front, 1 = rear,
93 2 = external, default external)
94 + media-controller Configure use of Media Controller API for
95 + configuring the sensor (default on)
96
97
98 Name: iqaudio-codec
99 @@ -1824,8 +1838,9 @@ Name: irs1125
100 Info: Infineon irs1125 TOF camera module.
101 Uses Unicam 1, which is the standard camera connector on most Pi
102 variants.
103 -Load: dtoverlay=irs1125
104 -Params: <None>
105 +Load: dtoverlay=irs1125,<param>=<val>
106 +Params: media-controller Configure use of Media Controller API for
107 + configuring the sensor (default off)
108
109
110 Name: jedec-spi-nor
111 @@ -2237,6 +2252,8 @@ Params: rotation Mounting
112 180, default 0)
113 orientation Sensor orientation (0 = front, 1 = rear,
114 2 = external, default external)
115 + media-controller Configure use of Media Controller API for
116 + configuring the sensor (default on)
117
118
119 Name: ov7251
120 @@ -2248,6 +2265,8 @@ Params: rotation Mounting
121 180, default 0)
122 orientation Sensor orientation (0 = front, 1 = rear,
123 2 = external, default external)
124 + media-controller Configure use of Media Controller API for
125 + configuring the sensor (default off)
126
127
128 Name: ov9281
129 @@ -2259,6 +2278,8 @@ Params: rotation Mounting
130 180, default 0)
131 orientation Sensor orientation (0 = front, 1 = rear,
132 2 = external, default external)
133 + media-controller Configure use of Media Controller API for
134 + configuring the sensor (default on)
135
136
137 Name: papirus
138 @@ -3239,6 +3260,8 @@ Params: 4lane Use 4 la
139 link-frequency Set the link frequency. Only values of 297000000
140 (574Mbit/s) and 486000000 (972Mbit/s - default)
141 are supported by the driver.
142 + media-controller Configure use of Media Controller API for
143 + configuring the sensor (default off)
144
145
146 Name: tc358743-audio
147 --- a/arch/arm/boot/dts/overlays/adv7282m-overlay.dts
148 +++ b/arch/arm/boot/dts/overlays/adv7282m-overlay.dts
149 @@ -59,7 +59,15 @@
150 };
151 };
152
153 + fragment@4 {
154 + target = <&csi1>;
155 + __dormant__ {
156 + brcm,media-controller;
157 + };
158 + };
159 +
160 __overrides__ {
161 addr = <&adv728x>,"reg:0";
162 + media-controller = <0>,"=4";
163 };
164 };
165 --- a/arch/arm/boot/dts/overlays/imx219-overlay.dts
166 +++ b/arch/arm/boot/dts/overlays/imx219-overlay.dts
167 @@ -108,8 +108,16 @@
168 };
169 };
170
171 + fragment@6 {
172 + target = <&csi1>;
173 + __overlay__ {
174 + brcm,media-controller;
175 + };
176 + };
177 +
178 __overrides__ {
179 rotation = <&imx219>,"rotation:0";
180 orientation = <&imx219>,"orientation:0";
181 + media-controller = <0>,"=6";
182 };
183 };
184 --- a/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi
185 +++ b/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi
186 @@ -134,11 +134,19 @@
187 };
188 };
189
190 + fragment@10 {
191 + target = <&csi1>;
192 + __overlay__ {
193 + brcm,media-controller;
194 + };
195 + };
196 +
197 __overrides__ {
198 4lane = <0>, "-6+7-8+9";
199 clock-frequency = <&imx290_clk>,"clock-frequency:0",
200 <&imx290>,"clock-frequency:0";
201 rotation = <&imx290>,"rotation:0";
202 orientation = <&imx290>,"orientation:0";
203 + media-controller = <0>,"=10";
204 };
205 };
206 --- a/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi
207 +++ b/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi
208 @@ -103,8 +103,16 @@
209 };
210 };
211
212 + fragment@6 {
213 + target = <&csi1>;
214 + __overlay__ {
215 + brcm,media-controller;
216 + };
217 + };
218 +
219 __overrides__ {
220 rotation = <&imx477>,"rotation:0";
221 orientation = <&imx477>,"orientation:0";
222 + media-controller = <0>,"=6";
223 };
224 };
225 --- a/arch/arm/boot/dts/overlays/imx519-overlay.dts
226 +++ b/arch/arm/boot/dts/overlays/imx519-overlay.dts
227 @@ -108,8 +108,16 @@
228 };
229 };
230
231 + fragment@6 {
232 + target = <&csi1>;
233 + __overlay__ {
234 + brcm,media-controller;
235 + };
236 + };
237 +
238 __overrides__ {
239 rotation = <&imx519>,"rotation:0";
240 orientation = <&imx519>,"orientation:0";
241 + media-controller = <0>,"=6";
242 };
243 };
244 --- a/arch/arm/boot/dts/overlays/irs1125-overlay.dts
245 +++ b/arch/arm/boot/dts/overlays/irs1125-overlay.dts
246 @@ -82,4 +82,15 @@
247 };
248 };
249 };
250 +
251 + fragment@6 {
252 + target = <&csi1>;
253 + __dormant__ {
254 + brcm,media-controller;
255 + };
256 + };
257 +
258 + __overrides__ {
259 + media-controller = <0>,"=6";
260 + };
261 };
262 --- a/arch/arm/boot/dts/overlays/ov5647-overlay.dts
263 +++ b/arch/arm/boot/dts/overlays/ov5647-overlay.dts
264 @@ -87,8 +87,16 @@
265 };
266 };
267
268 + fragment@6 {
269 + target = <&csi1>;
270 + __overlay__ {
271 + brcm,media-controller;
272 + };
273 + };
274 +
275 __overrides__ {
276 rotation = <&ov5647>,"rotation:0";
277 orientation = <&ov5647>,"orientation:0";
278 + media-controller = <0>,"=6";
279 };
280 };
281 --- a/arch/arm/boot/dts/overlays/ov7251-overlay.dts
282 +++ b/arch/arm/boot/dts/overlays/ov7251-overlay.dts
283 @@ -106,8 +106,16 @@
284 };
285 };
286
287 + fragment@6 {
288 + target = <&csi1>;
289 + __dormant__ {
290 + brcm,media-controller;
291 + };
292 + };
293 +
294 __overrides__ {
295 rotation = <&ov7251>,"rotation:0";
296 orientation = <&ov7251>,"orientation:0";
297 + media-controller = <0>,"=6";
298 };
299 };
300 --- a/arch/arm/boot/dts/overlays/ov9281-overlay.dts
301 +++ b/arch/arm/boot/dts/overlays/ov9281-overlay.dts
302 @@ -106,8 +106,16 @@
303 };
304 };
305
306 + fragment@6 {
307 + target = <&csi1>;
308 + __overlay__ {
309 + brcm,media-controller;
310 + };
311 + };
312 +
313 __overrides__ {
314 rotation = <&ov9281>,"rotation:0";
315 orientation = <&ov9281>,"orientation:0";
316 + media-controller = <0>,"=6";
317 };
318 };
319 --- a/arch/arm/boot/dts/overlays/tc358743-overlay.dts
320 +++ b/arch/arm/boot/dts/overlays/tc358743-overlay.dts
321 @@ -100,8 +100,16 @@
322 };
323 };
324
325 + fragment@9 {
326 + target = <&csi1>;
327 + __dormant__ {
328 + brcm,media-controller;
329 + };
330 + };
331 +
332 __overrides__ {
333 4lane = <0>, "-2+3-7+8";
334 link-frequency = <&tc358743>,"link-frequencies#0";
335 + media-controller = <0>,"=9";
336 };
337 };