bcm27xx: update patches from RPi foundation
[oweals/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0668-dtoverlays-Update-CSI-overlays-to-use-i2c_csi_dsi.patch
1 From bd24924fea541c114c7761f4698f3fe29d7257e1 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 9 Apr 2020 15:04:14 +0100
4 Subject: [PATCH] dtoverlays: Update CSI overlays to use i2c_csi_dsi
5
6 Update all overlays that were using i2c_vc for talking to CSI
7 source devices to use the new i2c_csi_dsi node via i2c_mux_pinctrl.
8 Remove the pins overrides as well.
9
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
11 ---
12  arch/arm/boot/dts/overlays/README             | 42 ++++---------------
13  .../boot/dts/overlays/adv7282m-overlay.dts    | 29 +++----------
14  arch/arm/boot/dts/overlays/imx219-overlay.dts | 41 +++++-------------
15  .../arm/boot/dts/overlays/irs1125-overlay.dts | 33 ++++-----------
16  arch/arm/boot/dts/overlays/ov5647-overlay.dts | 33 ++++-----------
17  .../boot/dts/overlays/tc358743-overlay.dts    | 32 ++++----------
18  6 files changed, 47 insertions(+), 163 deletions(-)
19
20 --- a/arch/arm/boot/dts/overlays/README
21 +++ b/arch/arm/boot/dts/overlays/README
22 @@ -331,22 +331,14 @@ Info:   Analog Devices ADV7282M analogue
23          Uses Unicam1, which is the standard camera connector on most Pi
24          variants.
25  Load:   dtoverlay=adv7282m,<param>=<val>
26 -Params: i2c_pins_0_1            Use pins 0&1 for the I2C instead of 44&45.
27 -                                Useful on Compute Modules.
28 -        i2c_pins_28_29          Use pins 28&29 for the I2C instead of 44&45.
29 -                                This is required for Pi B+, 2, 0, and 0W.
30 -        addr                    Overrides the I2C address (default 0x21)
31 +Params: addr                    Overrides the I2C address (default 0x21)
32  
33  
34  Name:   adv728x-m
35  Info:   Analog Devices ADV728[0|1|2]-M analogue video to CSI2 bridges.
36          This is a wrapper for adv7282m, and defaults to ADV7282M.
37  Load:   dtoverlay=adv728x-m,<param>=<val>
38 -Params: i2c_pins_0_1            Use pins 0&1 for the I2C instead of 44&45.
39 -                                Useful on Compute Modules.
40 -        i2c_pins_28_29          Use pins 28&29 for the I2C instead of 44&45.
41 -                                This is required for Pi B+, 2, 0, and 0W.
42 -        addr                    Overrides the I2C address (default 0x21)
43 +Params: addr                    Overrides the I2C address (default 0x21)
44          adv7280m                Select ADV7280-M.
45          adv7281m                Select ADV7281-M.
46          adv7281ma               Select ADV7281-MA.
47 @@ -1384,12 +1376,8 @@ Name:   imx219
48  Info:   Sony IMX219 camera module.
49          Uses Unicam 1, which is the standard camera connector on most Pi
50          variants.
51 -Load:   dtoverlay=imx219,<param>=<val>
52 -Params: i2c_pins_0_1            Use pins 0&1 for the I2C instead of 44&45.
53 -                                Useful on Compute Modules.
54 -
55 -        i2c_pins_28_29          Use pins 28&29 for the I2C instead of 44&45.
56 -                                This is required for Pi B+, 2, 0, and 0W.
57 +Load:   dtoverlay=imx219
58 +Params: <None>
59  
60  
61  Name:   iqaudio-codec
62 @@ -1453,12 +1441,8 @@ Name:   irs1125
63  Info:   Infineon irs1125 TOF camera module.
64          Uses Unicam 1, which is the standard camera connector on most Pi
65          variants.
66 -Load:   dtoverlay=irs1125,<param>=<val>
67 -Params: i2c_pins_0_1            Use pins 0&1 for the I2C instead of 44&45.
68 -                                Useful on Compute Modules.
69 -
70 -        i2c_pins_28_29          Use pins 28&29 for the I2C instead of 44&45.
71 -                                This is required for Pi B+, 2, 0, and 0W.
72 +Load:   dtoverlay=irs1125
73 +Params: <None>
74  
75  
76  Name:   jedec-spi-nor
77 @@ -1743,12 +1727,8 @@ Name:   ov5647
78  Info:   Omnivision OV5647 camera module.
79          Uses Unicam 1, which is the standard camera connector on most Pi
80          variants.
81 -Load:   dtoverlay=ov5647,<param>=<val>
82 -Params: i2c_pins_0_1            Use pins 0&1 for the I2C instead of 44&45.
83 -                                Useful on Compute Modules.
84 -
85 -        i2c_pins_28_29          Use pins 28&29 for the I2C instead of 44&45.
86 -                                This is required for Pi B+, 2, 0, and 0W.
87 +Load:   dtoverlay=ov5647
88 +Params: <None>
89  
90  
91  Name:   papirus
92 @@ -2555,12 +2535,6 @@ Params: 4lane                   Use 4 la
93                                  (574Mbit/s) and 486000000 (972Mbit/s - default)
94                                  are supported by the driver.
95  
96 -        i2c_pins_0_1            Use pins 0&1 for the I2C instead of 44&45.
97 -                                Useful on Compute Modules.
98 -
99 -        i2c_pins_28_29          Use pins 28&29 for the I2C instead of 44&45.
100 -                                This is required for Pi B+, 2, 0, and 0W.
101 -
102  
103  Name:   tc358743-audio
104  Info:   Used in combination with the tc358743-fast overlay to route the audio
105 --- a/arch/arm/boot/dts/overlays/adv7282m-overlay.dts
106 +++ b/arch/arm/boot/dts/overlays/adv7282m-overlay.dts
107 @@ -7,7 +7,7 @@
108         compatible = "brcm,bcm2835";
109  
110         fragment@0 {
111 -               target = <&i2c_vc>;
112 +               target = <&i2c_csi_dsi>;
113                 __overlay__ {
114                         #address-cells = <1>;
115                         #size-cells = <0>;
116 @@ -45,37 +45,20 @@
117                 };
118         };
119         fragment@2 {
120 -               target = <&i2c0_pins>;
121 -               __dormant__ {
122 -                       brcm,pins = <28 29>;
123 -                       brcm,function = <4>; /* alt0 */
124 -               };
125 -
126 -       };
127 -       fragment@3 {
128 -               target = <&i2c0_pins>;
129 +               target = <&i2c0if>;
130                 __overlay__ {
131 -                       brcm,pins = <44 45>;
132 -                       brcm,function = <5>; /* alt1 */
133 -               };
134 -       };
135 -       fragment@4 {
136 -               target = <&i2c0_pins>;
137 -               __dormant__ {
138 -                       brcm,pins = <0 1>;
139 -                       brcm,function = <4>; /* alt0 */
140 +                       status = "okay";
141                 };
142         };
143 -       fragment@5 {
144 -               target = <&i2c_vc>;
145 +
146 +       fragment@3 {
147 +               target = <&i2c0mux>;
148                 __overlay__ {
149                         status = "okay";
150                 };
151         };
152  
153         __overrides__ {
154 -               i2c_pins_0_1 =          <0>,"-2-3+4";
155 -               i2c_pins_28_29 =        <0>,"+2-3-4";
156                 addr =                  <&adv728x>,"reg:0";
157         };
158  };
159 --- a/arch/arm/boot/dts/overlays/imx219-overlay.dts
160 +++ b/arch/arm/boot/dts/overlays/imx219-overlay.dts
161 @@ -9,7 +9,7 @@
162         compatible = "brcm,bcm2835";
163  
164         fragment@0 {
165 -               target = <&i2c_vc>;
166 +               target = <&i2c_csi_dsi>;
167                 __overlay__ {
168                         #address-cells = <1>;
169                         #size-cells = <0>;
170 @@ -61,34 +61,13 @@
171         };
172  
173         fragment@2 {
174 -               target = <&i2c0_pins>;
175 -               __dormant__ {
176 -                       brcm,pins = <28 29>;
177 -                       brcm,function = <4>; /* alt0 */
178 -               };
179 -       };
180 -       fragment@3 {
181 -               target = <&i2c0_pins>;
182 -               __overlay__ {
183 -                       brcm,pins = <44 45>;
184 -                       brcm,function = <5>; /* alt1 */
185 -               };
186 -       };
187 -       fragment@4 {
188 -               target = <&i2c0_pins>;
189 -               __dormant__ {
190 -                       brcm,pins = <0 1>;
191 -                       brcm,function = <4>; /* alt0 */
192 -               };
193 -       };
194 -       fragment@5 {
195 -               target = <&i2c_vc>;
196 +               target = <&i2c0if>;
197                 __overlay__ {
198                         status = "okay";
199                 };
200         };
201  
202 -       fragment@6 {
203 +       fragment@3 {
204                 target-path="/";
205                 __overlay__ {
206                         imx219_vana: fixedregulator@0 {
207 @@ -114,16 +93,18 @@
208                 };
209         };
210  
211 -       fragment@7 {
212 +       fragment@4 {
213 +               target = <&i2c0mux>;
214 +               __overlay__ {
215 +                       status = "okay";
216 +               };
217 +       };
218 +
219 +       fragment@5 {
220                 target-path="/__overrides__";
221                 __overlay__ {
222                         cam0-pwdn-ctrl = <&imx219_vana>,"gpio:0";
223                         cam0-pwdn      = <&imx219_vana>,"gpio:4";
224                 };
225         };
226 -
227 -       __overrides__ {
228 -               i2c_pins_0_1 = <0>,"-2-3+4";
229 -               i2c_pins_28_29 = <0>,"+2-3-4";
230 -       };
231  };
232 --- a/arch/arm/boot/dts/overlays/irs1125-overlay.dts
233 +++ b/arch/arm/boot/dts/overlays/irs1125-overlay.dts
234 @@ -7,7 +7,7 @@
235         compatible = "brcm,bcm2835";
236  
237         fragment@0 {
238 -               target = <&i2c_vc>;
239 +               target = <&i2c_csi_dsi>;
240                 __overlay__ {
241                         #address-cells = <1>;
242                         #size-cells = <0>;
243 @@ -55,43 +55,24 @@
244         };
245  
246         fragment@2 {
247 -               target = <&i2c0_pins>;
248 -               __dormant__ {
249 -                       brcm,pins = <28 29>;
250 -                       brcm,function = <4>; /* alt0 */
251 -               };
252 -       };
253 -       fragment@3 {
254 -               target = <&i2c0_pins>;
255 +               target = <&i2c0if>;
256                 __overlay__ {
257 -                       brcm,pins = <44 45>;
258 -                       brcm,function = <5>; /* alt1 */
259 -               };
260 -       };
261 -       fragment@4 {
262 -               target = <&i2c0_pins>;
263 -               __dormant__ {
264 -                       brcm,pins = <0 1>;
265 -                       brcm,function = <4>; /* alt0 */
266 +                       status = "okay";
267                 };
268         };
269 -       fragment@5 {
270 -               target = <&i2c_vc>;
271 +
272 +       fragment@3 {
273 +               target = <&i2c0mux>;
274                 __overlay__ {
275                         status = "okay";
276                 };
277         };
278  
279 -       fragment@6 {
280 +       fragment@4 {
281                 target-path="/__overrides__";
282                 __overlay__ {
283                         cam0-pwdn-ctrl = <&irs1125>,"pwdn-gpios:0";
284                         cam0-pwdn      = <&irs1125>,"pwdn-gpios:4";
285                 };
286         };
287 -
288 -       __overrides__ {
289 -               i2c_pins_0_1 = <0>,"-2-3+4";
290 -               i2c_pins_28_29 = <0>,"+2-3-4";
291 -       };
292  };
293 --- a/arch/arm/boot/dts/overlays/ov5647-overlay.dts
294 +++ b/arch/arm/boot/dts/overlays/ov5647-overlay.dts
295 @@ -7,7 +7,7 @@
296         compatible = "brcm,bcm2835";
297  
298         fragment@0 {
299 -               target = <&i2c_vc>;
300 +               target = <&i2c_csi_dsi>;
301                 __overlay__ {
302                         #address-cells = <1>;
303                         #size-cells = <0>;
304 @@ -55,34 +55,20 @@
305         };
306  
307         fragment@2 {
308 -               target = <&i2c0_pins>;
309 -               __dormant__ {
310 -                       brcm,pins = <28 29>;
311 -                       brcm,function = <4>; /* alt0 */
312 -               };
313 -       };
314 -       fragment@3 {
315 -               target = <&i2c0_pins>;
316 +               target = <&i2c0if>;
317                 __overlay__ {
318 -                       brcm,pins = <44 45>;
319 -                       brcm,function = <5>; /* alt1 */
320 -               };
321 -       };
322 -       fragment@4 {
323 -               target = <&i2c0_pins>;
324 -               __dormant__ {
325 -                       brcm,pins = <0 1>;
326 -                       brcm,function = <4>; /* alt0 */
327 +                       status = "okay";
328                 };
329         };
330 -       fragment@5 {
331 -               target = <&i2c_vc>;
332 +
333 +       fragment@3 {
334 +               target = <&i2c0mux>;
335                 __overlay__ {
336                         status = "okay";
337                 };
338         };
339  
340 -       fragment@6 {
341 +       fragment@4 {
342                 target-path="/__overrides__";
343                 __overlay__ {
344                         cam0-pwdn-ctrl = <&ov5647>,"pwdn-gpios:0";
345 @@ -91,9 +77,4 @@
346                         cam0-led       = <&ov5647>,"pwdn-gpios:16";
347                 };
348         };
349 -
350 -       __overrides__ {
351 -               i2c_pins_0_1 = <0>,"-2-3+4";
352 -               i2c_pins_28_29 = <0>,"+2-3-4";
353 -       };
354  };
355 --- a/arch/arm/boot/dts/overlays/tc358743-overlay.dts
356 +++ b/arch/arm/boot/dts/overlays/tc358743-overlay.dts
357 @@ -7,7 +7,7 @@
358         compatible = "brcm,bcm2835";
359  
360         fragment@0 {
361 -               target = <&i2c_vc>;
362 +               target = <&i2c_csi_dsi>;
363                 __overlay__ {
364                         #address-cells = <1>;
365                         #size-cells = <0>;
366 @@ -54,7 +54,7 @@
367         };
368  
369         fragment@2 {
370 -               target = <&i2c_vc>;
371 +               target = <&i2c_csi_dsi>;
372                 __overlay__ {
373                         tc358743@0f {
374                                 port {
375 @@ -67,7 +67,7 @@
376         };
377  
378         fragment@3 {
379 -               target = <&i2c_vc>;
380 +               target = <&i2c_csi_dsi>;
381                 __dormant__ {
382                         tc358743@0f {
383                                 port {
384 @@ -80,36 +80,20 @@
385         };
386  
387         fragment@4 {
388 -               target = <&i2c0_pins>;
389 -               __dormant__ {
390 -                       brcm,pins = <28 29>;
391 -                       brcm,function = <4>; /* alt0 */
392 -               };
393 -       };
394 -       fragment@5 {
395 -               target = <&i2c0_pins>;
396 +               target = <&i2c0if>;
397                 __overlay__ {
398 -                       brcm,pins = <44 45>;
399 -                       brcm,function = <5>; /* alt1 */
400 -               };
401 -       };
402 -       fragment@6 {
403 -               target = <&i2c0_pins>;
404 -               __dormant__ {
405 -                       brcm,pins = <0 1>;
406 -                       brcm,function = <4>; /* alt0 */
407 +                       status = "okay";
408                 };
409         };
410 -       fragment@7 {
411 -               target = <&i2c_vc>;
412 +
413 +       fragment@5 {
414 +               target = <&i2c0mux>;
415                 __overlay__ {
416                         status = "okay";
417                 };
418         };
419  
420         __overrides__ {
421 -               i2c_pins_0_1 = <0>,"-4-5+6";
422 -               i2c_pins_28_29 = <0>,"+4-5-6";
423                 4lane = <0>, "-2+3";
424                 link-frequency = <&tc358743>,"link-frequencies#0";
425         };