5bc7e7137f3aa1ccfc3cf2eb1a66d7b49c2e48fd
[openwrt/staging/hauke.git] /
1 From 0bda3692e0fa20e793ad3857a6ffde6bca7d49ca Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Mon, 22 Nov 2021 12:44:29 +0000
4 Subject: [PATCH] dtoverlays: Add option to select camera as on CAM0 of
5 CM
6
7 Parameterise the overlays so that they can have an optional
8 cam0 parameter to switch to i2c_vc and csi0.
9
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
11 ---
12 arch/arm/boot/dts/bcm2708-rpi-cm.dts | 1 +
13 arch/arm/boot/dts/bcm2708-rpi-cm.dtsi | 4 +
14 arch/arm/boot/dts/bcm2710-rpi-cm3.dts | 5 ++
15 arch/arm/boot/dts/bcm2711-rpi-cm4s.dts | 25 +++---
16 arch/arm/boot/dts/overlays/README | 30 +++++++
17 arch/arm/boot/dts/overlays/imx219-overlay.dts | 67 ++++++++-------
18 .../boot/dts/overlays/imx290_327-overlay.dtsi | 27 +++---
19 .../boot/dts/overlays/imx477_378-overlay.dtsi | 84 +++++++++----------
20 arch/arm/boot/dts/overlays/imx519-overlay.dts | 23 +++--
21 .../arm/boot/dts/overlays/irs1125-overlay.dts | 35 ++++----
22 arch/arm/boot/dts/overlays/ov5647-overlay.dts | 33 +++-----
23 arch/arm/boot/dts/overlays/ov7251-overlay.dts | 28 +++----
24 arch/arm/boot/dts/overlays/ov9281-overlay.dts | 29 ++++---
25 .../boot/dts/overlays/tc358743-overlay.dts | 43 ++++------
26 14 files changed, 221 insertions(+), 213 deletions(-)
27
28 --- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts
29 +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts
30 @@ -12,6 +12,7 @@
31
32 &cam1_reg {
33 gpio = <&gpio 2 GPIO_ACTIVE_HIGH>;
34 + status = "disabled";
35 };
36
37 cam0_reg: &cam0_regulator {
38 --- a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi
39 +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi
40 @@ -14,5 +14,9 @@
41 act_led_gpio = <&act_led>,"gpios:4";
42 act_led_activelow = <&act_led>,"gpios:8";
43 act_led_trigger = <&act_led>,"linux,default-trigger";
44 + cam0_reg = <&cam0_reg>,"status";
45 + cam0_reg_gpio = <&cam0_reg>,"gpios:4";
46 + cam1_reg = <&cam1_reg>,"status";
47 + cam1_reg_gpio = <&cam1_reg>,"gpios:4";
48 };
49 };
50 --- a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts
51 +++ b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts
52 @@ -12,6 +12,7 @@
53
54 &cam1_reg {
55 gpio = <&gpio 2 GPIO_ACTIVE_HIGH>;
56 + status = "disabled";
57 };
58
59 cam0_reg: &cam0_regulator {
60 @@ -137,5 +138,9 @@ cam0_reg: &cam0_regulator {
61 act_led_gpio = <&act_led>,"gpios:4";
62 act_led_activelow = <&act_led>,"gpios:8";
63 act_led_trigger = <&act_led>,"linux,default-trigger";
64 + cam0_reg = <&cam0_reg>,"status";
65 + cam0_reg_gpio = <&cam0_reg>,"gpios:4";
66 + cam1_reg = <&cam1_reg>,"status";
67 + cam1_reg_gpio = <&cam1_reg>,"gpios:4";
68 };
69 };
70 --- a/arch/arm/boot/dts/bcm2711-rpi-cm4s.dts
71 +++ b/arch/arm/boot/dts/bcm2711-rpi-cm4s.dts
72 @@ -162,21 +162,6 @@
73 bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1";
74 };
75
76 - cam1_reg: cam1_reg {
77 - compatible = "regulator-fixed";
78 - regulator-name = "cam1-regulator";
79 - gpio = <&gpio 2 GPIO_ACTIVE_HIGH>;
80 - enable-active-high;
81 - status = "disabled";
82 - };
83 - cam0_reg: cam0_reg {
84 - compatible = "regulator-fixed";
85 - regulator-name = "cam0-regulator";
86 - gpio = <&gpio 30 GPIO_ACTIVE_HIGH>;
87 - enable-active-high;
88 - status = "disabled";
89 - };
90 -
91 aliases {
92 serial0 = &uart0;
93 mmc0 = &emmc2;
94 @@ -399,6 +384,16 @@
95 brcm,disable-headphones = <1>;
96 };
97
98 +&cam1_reg {
99 + gpio = <&gpio 2 GPIO_ACTIVE_HIGH>;
100 + status = "disabled";
101 +};
102 +
103 +cam0_reg: &cam0_regulator {
104 + gpio = <&gpio 30 GPIO_ACTIVE_HIGH>;
105 + status = "disabled";
106 +};
107 +
108 / {
109 __overrides__ {
110 act_led_gpio = <&act_led>,"gpios:4";
111 --- a/arch/arm/boot/dts/overlays/README
112 +++ b/arch/arm/boot/dts/overlays/README
113 @@ -144,6 +144,16 @@ Params:
114 See /sys/kernel/debug/raspberrypi_axi_monitor
115 for the results.
116
117 + cam0_reg Enables CAM 0 regulator. CM1 & 3 only.
118 +
119 + cam0_reg_gpio Set GPIO for CAM 0 regulator. Default 30.
120 + CM1 & 3 only.
121 +
122 + cam1_reg Enables CAM 1 regulator. CM1 & 3 only.
123 +
124 + cam1_reg_gpio Set GPIO for CAM 1 regulator. Default 2.
125 + CM1 & 3 only.
126 +
127 eee Enable Energy Efficient Ethernet support for
128 compatible devices (default "on"). See also
129 "tx_lpi_timer". Pi3B+ only.
130 @@ -1845,6 +1855,8 @@ Params: rotation Mounting
131 2 = external, default external)
132 media-controller Configure use of Media Controller API for
133 configuring the sensor (default on)
134 + cam0 Adopt the default configuration for CAM0 on a
135 + Compute Module (CSI0, i2c_vc, and cam0_reg).
136
137
138 Name: imx290
139 @@ -1867,6 +1879,8 @@ Params: 4lane Enable 4
140 180, default 0)
141 media-controller Configure use of Media Controller API for
142 configuring the sensor (default on)
143 + cam0 Adopt the default configuration for CAM0 on a
144 + Compute Module (CSI0, i2c_vc, and cam0_reg).
145
146
147 Name: imx378
148 @@ -1880,6 +1894,8 @@ Params: rotation Mounting
149 2 = external, default external)
150 media-controller Configure use of Media Controller API for
151 configuring the sensor (default on)
152 + cam0 Adopt the default configuration for CAM0 on a
153 + Compute Module (CSI0, i2c_vc, and cam0_reg).
154
155
156 Name: imx477
157 @@ -1893,6 +1909,8 @@ Params: rotation Mounting
158 2 = external, default external)
159 media-controller Configure use of Media Controller API for
160 configuring the sensor (default on)
161 + cam0 Adopt the default configuration for CAM0 on a
162 + Compute Module (CSI0, i2c_vc, and cam0_reg).
163
164
165 Name: imx519
166 @@ -1906,6 +1924,8 @@ Params: rotation Mounting
167 2 = external, default external)
168 media-controller Configure use of Media Controller API for
169 configuring the sensor (default on)
170 + cam0 Adopt the default configuration for CAM0 on a
171 + Compute Module (CSI0, i2c_vc, and cam0_reg).
172
173
174 Name: iqaudio-codec
175 @@ -1972,6 +1992,8 @@ Info: Infineon irs1125 TOF camera modu
176 Load: dtoverlay=irs1125,<param>=<val>
177 Params: media-controller Configure use of Media Controller API for
178 configuring the sensor (default off)
179 + cam0 Adopt the default configuration for CAM0 on a
180 + Compute Module (CSI0, i2c_vc, and cam0_reg).
181
182
183 Name: jedec-spi-nor
184 @@ -2385,6 +2407,8 @@ Params: rotation Mounting
185 2 = external, default external)
186 media-controller Configure use of Media Controller API for
187 configuring the sensor (default on)
188 + cam0 Adopt the default configuration for CAM0 on a
189 + Compute Module (CSI0, i2c_vc, and cam0_reg).
190
191
192 Name: ov7251
193 @@ -2398,6 +2422,8 @@ Params: rotation Mounting
194 2 = external, default external)
195 media-controller Configure use of Media Controller API for
196 configuring the sensor (default off)
197 + cam0 Adopt the default configuration for CAM0 on a
198 + Compute Module (CSI0, i2c_vc, and cam0_reg).
199
200
201 Name: ov9281
202 @@ -2411,6 +2437,8 @@ Params: rotation Mounting
203 2 = external, default external)
204 media-controller Configure use of Media Controller API for
205 configuring the sensor (default on)
206 + cam0 Adopt the default configuration for CAM0 on a
207 + Compute Module (CSI0, i2c_vc, and cam0_reg).
208
209
210 Name: papirus
211 @@ -3393,6 +3421,8 @@ Params: 4lane Use 4 la
212 are supported by the driver.
213 media-controller Configure use of Media Controller API for
214 configuring the sensor (default off)
215 + cam0 Adopt the default configuration for CAM0 on a
216 + Compute Module (CSI0, i2c_vc, and cam0_reg).
217
218
219 Name: tc358743-audio
220 --- a/arch/arm/boot/dts/overlays/imx219-overlay.dts
221 +++ b/arch/arm/boot/dts/overlays/imx219-overlay.dts
222 @@ -9,6 +9,28 @@
223 compatible = "brcm,bcm2835";
224
225 fragment@0 {
226 + target = <&i2c0if>;
227 + __overlay__ {
228 + status = "okay";
229 + };
230 + };
231 +
232 + clk_frag: fragment@1 {
233 + target = <&cam1_clk>;
234 + __overlay__ {
235 + status = "okay";
236 + clock-frequency = <24000000>;
237 + };
238 + };
239 +
240 + fragment@2 {
241 + target = <&i2c0mux>;
242 + __overlay__ {
243 + status = "okay";
244 + };
245 + };
246 +
247 + i2c_frag: fragment@100 {
248 target = <&i2c_csi_dsi>;
249 __overlay__ {
250 #address-cells = <1>;
251 @@ -32,7 +54,7 @@
252
253 port {
254 imx219_0: endpoint {
255 - remote-endpoint = <&csi1_ep>;
256 + remote-endpoint = <&csi_ep>;
257 clock-lanes = <0>;
258 data-lanes = <1 2>;
259 clock-noncontinuous;
260 @@ -44,13 +66,14 @@
261 };
262 };
263
264 - fragment@1 {
265 + csi_frag: fragment@101 {
266 target = <&csi1>;
267 - __overlay__ {
268 + csi: __overlay__ {
269 status = "okay";
270 + brcm,media-controller;
271
272 port {
273 - csi1_ep: endpoint {
274 + csi_ep: endpoint {
275 remote-endpoint = <&imx219_0>;
276 clock-lanes = <0>;
277 data-lanes = <1 2>;
278 @@ -60,38 +83,14 @@
279 };
280 };
281
282 - fragment@2 {
283 - target = <&i2c0if>;
284 - __overlay__ {
285 - status = "okay";
286 - };
287 - };
288 -
289 - fragment@3 {
290 - target = <&cam1_clk>;
291 - __overlay__ {
292 - status = "okay";
293 - clock-frequency = <24000000>;
294 - };
295 - };
296 -
297 - fragment@4 {
298 - target = <&i2c0mux>;
299 - __overlay__ {
300 - status = "okay";
301 - };
302 - };
303 -
304 - fragment@5 {
305 - target = <&csi1>;
306 - __overlay__ {
307 - brcm,media-controller;
308 - };
309 - };
310 -
311 __overrides__ {
312 rotation = <&imx219>,"rotation:0";
313 orientation = <&imx219>,"orientation:0";
314 - media-controller = <0>,"=5";
315 + media-controller = <&csi>,"brcm,media-controller?";
316 + cam0 = <&i2c_frag>, "target:0=",<&i2c_vc>,
317 + <&csi_frag>, "target:0=",<&csi0>,
318 + <&clk_frag>, "target:0=",<&cam0_clk>,
319 + <&imx219>, "clocks:0=",<&cam0_clk>,
320 + <&imx219>, "VANA-supply:0=",<&cam0_reg>;
321 };
322 };
323 --- a/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi
324 +++ b/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi
325 @@ -9,7 +9,7 @@
326 /{
327 compatible = "brcm,bcm2835";
328
329 - fragment@0 {
330 + i2c_frag: fragment@0 {
331 target = <&i2c_csi_dsi>;
332 __overlay__ {
333 #address-cells = <1>;
334 @@ -41,10 +41,11 @@
335 };
336 };
337
338 - fragment@1 {
339 + csi_frag: fragment@1 {
340 target = <&csi1>;
341 - __overlay__ {
342 + csi: __overlay__ {
343 status = "okay";
344 + brcm,media-controller;
345
346 port {
347 csi1_ep: endpoint {
348 @@ -61,9 +62,9 @@
349 };
350 };
351
352 - fragment@3 {
353 + clk_frag: fragment@3 {
354 target = <&cam1_clk>;
355 - __overlay__ {
356 + cam_clk: __overlay__ {
357 status = "okay";
358 clock-frequency = <37125000>;
359 };
360 @@ -108,19 +109,17 @@
361 };
362 };
363
364 - fragment@10 {
365 - target = <&csi1>;
366 - __overlay__ {
367 - brcm,media-controller;
368 - };
369 - };
370 -
371 __overrides__ {
372 4lane = <0>, "-6+7-8+9";
373 - clock-frequency = <&cam1_clk>,"clock-frequency:0",
374 + clock-frequency = <&cam_clk>,"clock-frequency:0",
375 <&imx290>,"clock-frequency:0";
376 rotation = <&imx290>,"rotation:0";
377 orientation = <&imx290>,"orientation:0";
378 - media-controller = <0>,"=10";
379 + media-controller = <&csi>,"brcm,media-controller?";
380 + cam0 = <&i2c_frag>, "target:0=",<&i2c_vc>,
381 + <&csi_frag>, "target:0=",<&csi0>,
382 + <&clk_frag>, "target:0=",<&cam0_clk>,
383 + <&imx290>, "clocks:0=",<&cam0_clk>,
384 + <&imx290>, "vdda-supply:0=",<&cam0_reg>;
385 };
386 };
387 --- a/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi
388 +++ b/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi
389 @@ -4,7 +4,36 @@
390 /{
391 compatible = "brcm,bcm2835";
392
393 - fragment@0 {
394 + fragment@2 {
395 + target = <&i2c0if>;
396 + __overlay__ {
397 + status = "okay";
398 + };
399 + };
400 +
401 + clk_frag: fragment@3 {
402 + target = <&cam1_clk>;
403 + cam_clk: __overlay__ {
404 + clock-frequency = <24000000>;
405 + status = "okay";
406 + };
407 + };
408 +
409 + fragment@4 {
410 + target = <&i2c0mux>;
411 + __overlay__ {
412 + status = "okay";
413 + };
414 + };
415 +
416 + reg_frag: fragment@5 {
417 + target = <&cam1_reg>;
418 + cam_reg: __overlay__ {
419 + startup-delay-us = <300000>;
420 + };
421 + };
422 +
423 + i2c_frag: fragment@100 {
424 target = <&i2c_csi_dsi>;
425 __overlay__ {
426 #address-cells = <1>;
427 @@ -27,7 +56,7 @@
428
429 port {
430 imx477_0: endpoint {
431 - remote-endpoint = <&csi1_ep>;
432 + remote-endpoint = <&csi_ep>;
433 clock-lanes = <0>;
434 data-lanes = <1 2>;
435 clock-noncontinuous;
436 @@ -39,13 +68,14 @@
437 };
438 };
439
440 - fragment@1 {
441 + csi_frag: fragment@101 {
442 target = <&csi1>;
443 - __overlay__ {
444 + csi: __overlay__ {
445 status = "okay";
446 + brcm,media-controller;
447
448 port {
449 - csi1_ep: endpoint {
450 + csi_ep: endpoint {
451 remote-endpoint = <&imx477_0>;
452 clock-lanes = <0>;
453 data-lanes = <1 2>;
454 @@ -55,45 +85,15 @@
455 };
456 };
457
458 - fragment@2 {
459 - target = <&i2c0if>;
460 - __overlay__ {
461 - status = "okay";
462 - };
463 - };
464 -
465 - fragment@3 {
466 - target = <&cam1_clk>;
467 - __overlay__ {
468 - clock-frequency = <24000000>;
469 - status = "okay";
470 - };
471 - };
472 -
473 - fragment@4 {
474 - target = <&i2c0mux>;
475 - __overlay__ {
476 - status = "okay";
477 - };
478 - };
479 -
480 - fragment@5 {
481 - target = <&cam1_reg>;
482 - __overlay__ {
483 - startup-delay-us = <300000>;
484 - };
485 - };
486 -
487 - fragment@6 {
488 - target = <&csi1>;
489 - __overlay__ {
490 - brcm,media-controller;
491 - };
492 - };
493 -
494 __overrides__ {
495 rotation = <&imx477>,"rotation:0";
496 orientation = <&imx477>,"orientation:0";
497 - media-controller = <0>,"=6";
498 + media-controller = <&csi>,"brcm,media-controller?";
499 + cam0 = <&i2c_frag>, "target:0=",<&i2c_vc>,
500 + <&csi_frag>, "target:0=",<&csi0>,
501 + <&clk_frag>, "target:0=",<&cam0_clk>,
502 + <&reg_frag>, "target:0=",<&cam0_reg>,
503 + <&imx477>, "clocks:0=",<&cam0_clk>,
504 + <&imx477>, "vdda-supply:0=",<&cam0_reg>;
505 };
506 };
507 --- a/arch/arm/boot/dts/overlays/imx519-overlay.dts
508 +++ b/arch/arm/boot/dts/overlays/imx519-overlay.dts
509 @@ -8,7 +8,7 @@
510 /{
511 compatible = "brcm,bcm2835";
512
513 - fragment@0 {
514 + i2c_frag: fragment@0 {
515 target = <&i2c_csi_dsi>;
516 __overlay__ {
517 #address-cells = <1>;
518 @@ -44,10 +44,11 @@
519 };
520 };
521
522 - fragment@1 {
523 + csi_frag: fragment@1 {
524 target = <&csi1>;
525 - __overlay__ {
526 + csi: __overlay__ {
527 status = "okay";
528 + brcm,media-controller;
529
530 port{
531 csi1_ep: endpoint{
532 @@ -67,7 +68,7 @@
533 };
534 };
535
536 - fragment@3 {
537 + clk_frag: fragment@3 {
538 target = <&cam1_clk>;
539 __overlay__ {
540 clock-frequency = <24000000>;
541 @@ -82,16 +83,14 @@
542 };
543 };
544
545 - fragment@6 {
546 - target = <&csi1>;
547 - __overlay__ {
548 - brcm,media-controller;
549 - };
550 - };
551 -
552 __overrides__ {
553 rotation = <&imx519>,"rotation:0";
554 orientation = <&imx519>,"orientation:0";
555 - media-controller = <0>,"=6";
556 + media-controller = <&csi>,"brcm,media-controller?";
557 + cam0 = <&i2c_frag>, "target:0=",<&i2c_vc>,
558 + <&csi_frag>, "target:0=",<&csi0>,
559 + <&clk_frag>, "target:0=",<&cam0_clk>,
560 + <&imx519>, "clocks:0=",<&cam0_clk>,
561 + <&imx519>, "VANA-supply:0=",<&cam0_reg>;
562 };
563 };
564 --- a/arch/arm/boot/dts/overlays/irs1125-overlay.dts
565 +++ b/arch/arm/boot/dts/overlays/irs1125-overlay.dts
566 @@ -6,20 +6,20 @@
567 /{
568 compatible = "brcm,bcm2835";
569
570 - fragment@0 {
571 + i2c_frag: fragment@0 {
572 target = <&i2c_csi_dsi>;
573 __overlay__ {
574 #address-cells = <1>;
575 #size-cells = <0>;
576 status = "okay";
577
578 - irs1125: irs1125@3D {
579 + irs1125: irs1125@3d {
580 compatible = "infineon,irs1125";
581 - reg = <0x3D>;
582 + reg = <0x3d>;
583 status = "okay";
584
585 pwdn-gpios = <&gpio 5 0>;
586 - clocks = <&irs1125_clk>;
587 + clocks = <&cam1_clk>;
588
589 port {
590 irs1125_0: endpoint {
591 @@ -35,9 +35,9 @@
592 };
593 };
594
595 - fragment@1 {
596 + csi_frag: fragment@1 {
597 target = <&csi1>;
598 - __overlay__ {
599 + csi: __overlay__ {
600 status = "okay";
601
602 port {
603 @@ -72,25 +72,18 @@
604 };
605 };
606
607 - fragment@5 {
608 - target-path = "/";
609 + clk_frag: fragment@5 {
610 + target = <&cam1_clk>;
611 __overlay__ {
612 - irs1125_clk: camera-clk {
613 - compatible = "fixed-clock";
614 - #clock-cells = <0>;
615 - clock-frequency = <26000000>;
616 - };
617 - };
618 - };
619 -
620 - fragment@6 {
621 - target = <&csi1>;
622 - __dormant__ {
623 - brcm,media-controller;
624 + clock-frequency = <26000000>;
625 };
626 };
627
628 __overrides__ {
629 - media-controller = <0>,"=6";
630 + media-controller = <&csi>,"brcm,media-controller?";
631 + cam0 = <&i2c_frag>, "target:0=",<&i2c_vc>,
632 + <&csi_frag>, "target:0=",<&csi0>,
633 + <&clk_frag>, "target:0=",<&cam0_clk>,
634 + <&irs1125>, "clocks:0=",<&cam0_clk>;
635 };
636 };
637 --- a/arch/arm/boot/dts/overlays/ov5647-overlay.dts
638 +++ b/arch/arm/boot/dts/overlays/ov5647-overlay.dts
639 @@ -6,7 +6,7 @@
640 /{
641 compatible = "brcm,bcm2835";
642
643 - fragment@0 {
644 + i2c_frag: fragment@0 {
645 target = <&i2c_csi_dsi>;
646 __overlay__ {
647 #address-cells = <1>;
648 @@ -41,10 +41,11 @@
649 };
650 };
651
652 - fragment@1 {
653 + csi_frag: fragment@1 {
654 target = <&csi1>;
655 - __overlay__ {
656 + csi: __overlay__ {
657 status = "okay";
658 + brcm,media-controller;
659
660 port {
661 csi1_ep: endpoint {
662 @@ -69,14 +70,14 @@
663 };
664 };
665
666 - fragment@4 {
667 + reg_frag: fragment@4 {
668 target = <&cam1_reg>;
669 __overlay__ {
670 startup-delay-us = <20000>;
671 };
672 };
673
674 - fragment@5 {
675 + clk_frag: fragment@5 {
676 target = <&cam1_clk>;
677 __overlay__ {
678 status = "okay";
679 @@ -84,23 +85,15 @@
680 };
681 };
682
683 - fragment@6 {
684 - target = <&csi1>;
685 - __overlay__ {
686 - brcm,media-controller;
687 - };
688 - };
689 -
690 - fragment@7 {
691 - target = <&cam1_reg>;
692 - __overlay__ {
693 - status = "disabled";
694 - };
695 - };
696 -
697 __overrides__ {
698 rotation = <&ov5647>,"rotation:0";
699 orientation = <&ov5647>,"orientation:0";
700 - media-controller = <0>,"=6";
701 + media-controller = <&csi>,"brcm,media-controller?";
702 + cam0 = <&i2c_frag>, "target:0=",<&i2c_vc>,
703 + <&csi_frag>, "target:0=",<&csi0>,
704 + <&reg_frag>, "target:0=",<&cam0_reg>,
705 + <&clk_frag>, "target:0=",<&cam0_clk>,
706 + <&ov5647>, "clocks:0=",<&cam0_clk>,
707 + <&ov5647>, "avdd-supply:0=",<&cam0_reg>;
708 };
709 };
710 --- a/arch/arm/boot/dts/overlays/ov7251-overlay.dts
711 +++ b/arch/arm/boot/dts/overlays/ov7251-overlay.dts
712 @@ -8,7 +8,7 @@
713 /{
714 compatible = "brcm,bcm2835";
715
716 - fragment@0 {
717 + i2c_frag: fragment@0 {
718 target = <&i2c_csi_dsi>;
719 __overlay__ {
720 #address-cells = <1>;
721 @@ -45,9 +45,9 @@
722 };
723 };
724
725 - fragment@1 {
726 + csi_frag: fragment@1 {
727 target = <&csi1>;
728 - __overlay__ {
729 + csi: __overlay__ {
730 status = "okay";
731
732 port {
733 @@ -67,30 +67,28 @@
734 };
735
736 fragment@3 {
737 - target = <&cam1_clk>;
738 + target = <&i2c0mux>;
739 __overlay__ {
740 status = "okay";
741 - clock-frequency = <24000000>;
742 };
743 };
744
745 - fragment@4 {
746 - target = <&i2c0mux>;
747 + clk_frag: fragment@4 {
748 + target = <&cam1_clk>;
749 __overlay__ {
750 status = "okay";
751 - };
752 - };
753 -
754 - fragment@6 {
755 - target = <&csi1>;
756 - __dormant__ {
757 - brcm,media-controller;
758 + clock-frequency = <24000000>;
759 };
760 };
761
762 __overrides__ {
763 rotation = <&ov7251>,"rotation:0";
764 orientation = <&ov7251>,"orientation:0";
765 - media-controller = <0>,"=6";
766 + media-controller = <&csi>,"brcm,media-controller?";
767 + cam0 = <&i2c_frag>, "target:0=",<&i2c_vc>,
768 + <&csi_frag>, "target:0=",<&csi0>,
769 + <&clk_frag>, "target:0=",<&cam0_clk>,
770 + <&ov7251>, "clocks:0=",<&cam0_clk>,
771 + <&ov7251>, "vdda-supply:0=",<&cam0_reg>;
772 };
773 };
774 --- a/arch/arm/boot/dts/overlays/ov9281-overlay.dts
775 +++ b/arch/arm/boot/dts/overlays/ov9281-overlay.dts
776 @@ -8,7 +8,7 @@
777 /{
778 compatible = "brcm,bcm2835";
779
780 - fragment@0 {
781 + i2c_frag: fragment@0 {
782 target = <&i2c_csi_dsi>;
783 __overlay__ {
784 #address-cells = <1>;
785 @@ -44,10 +44,11 @@
786 };
787 };
788
789 - fragment@1 {
790 + csi_frag: fragment@1 {
791 target = <&csi1>;
792 - __overlay__ {
793 + csi: __overlay__ {
794 status = "okay";
795 + brcm,media-controller;
796
797 port {
798 csi1_ep: endpoint {
799 @@ -67,30 +68,28 @@
800 };
801
802 fragment@3 {
803 - target = <&cam1_clk>;
804 - __overlay__ {
805 - status = "okay";
806 - clock-frequency = <24000000>;
807 - };
808 - };
809 -
810 - fragment@4 {
811 target = <&i2c0mux>;
812 __overlay__ {
813 status = "okay";
814 };
815 };
816
817 - fragment@5 {
818 - target = <&csi1>;
819 + clk_frag: fragment@4 {
820 + target = <&cam1_clk>;
821 __overlay__ {
822 - brcm,media-controller;
823 + status = "okay";
824 + clock-frequency = <24000000>;
825 };
826 };
827
828 __overrides__ {
829 rotation = <&ov9281>,"rotation:0";
830 orientation = <&ov9281>,"orientation:0";
831 - media-controller = <0>,"=5";
832 + media-controller = <&csi>,"brcm,media-controller?";
833 + cam0 = <&i2c_frag>, "target:0=",<&i2c_vc>,
834 + <&csi_frag>, "target:0=",<&csi0>,
835 + <&clk_frag>, "target:0=",<&cam0_clk>,
836 + <&ov9281>, "clocks:0=",<&cam0_clk>,
837 + <&ov9281>, "avdd-supply:0=",<&cam0_reg>;
838 };
839 };
840 --- a/arch/arm/boot/dts/overlays/tc358743-overlay.dts
841 +++ b/arch/arm/boot/dts/overlays/tc358743-overlay.dts
842 @@ -6,23 +6,23 @@
843 /{
844 compatible = "brcm,bcm2835";
845
846 - fragment@0 {
847 + i2c_frag: fragment@0 {
848 target = <&i2c_csi_dsi>;
849 __overlay__ {
850 #address-cells = <1>;
851 #size-cells = <0>;
852 status = "okay";
853
854 - tc358743@0f {
855 + tc358743: tc358743@f {
856 compatible = "toshiba,tc358743";
857 reg = <0x0f>;
858 status = "okay";
859
860 - clocks = <&tc358743_clk>;
861 + clocks = <&cam1_clk>;
862 clock-names = "refclk";
863
864 port {
865 - tc358743: endpoint {
866 + tc358743_0: endpoint {
867 remote-endpoint = <&csi1_ep>;
868 clock-lanes = <0>;
869 clock-noncontinuous;
870 @@ -34,28 +34,28 @@
871 };
872 };
873
874 - fragment@1 {
875 + csi_frag: fragment@1 {
876 target = <&csi1>;
877 - __overlay__ {
878 + csi: __overlay__ {
879 status = "okay";
880
881 port {
882 csi1_ep: endpoint {
883 - remote-endpoint = <&tc358743>;
884 + remote-endpoint = <&tc358743_0>;
885 };
886 };
887 };
888 };
889
890 fragment@2 {
891 - target = <&tc358743>;
892 + target = <&tc358743_0>;
893 __overlay__ {
894 data-lanes = <1 2>;
895 };
896 };
897
898 fragment@3 {
899 - target = <&tc358743>;
900 + target = <&tc358743_0>;
901 __dormant__ {
902 data-lanes = <1 2 3 4>;
903 };
904 @@ -75,14 +75,10 @@
905 };
906 };
907
908 - fragment@6 {
909 - target-path = "/";
910 + clk_frag: fragment@6 {
911 + target = <&cam1_clk>;
912 __overlay__ {
913 - tc358743_clk: bridge-clk {
914 - compatible = "fixed-clock";
915 - #clock-cells = <0>;
916 - clock-frequency = <27000000>;
917 - };
918 + clock-frequency = <27000000>;
919 };
920 };
921
922 @@ -100,16 +96,13 @@
923 };
924 };
925
926 - fragment@9 {
927 - target = <&csi1>;
928 - __dormant__ {
929 - brcm,media-controller;
930 - };
931 - };
932 -
933 __overrides__ {
934 4lane = <0>, "-2+3-7+8";
935 - link-frequency = <&tc358743>,"link-frequencies#0";
936 - media-controller = <0>,"=9";
937 + link-frequency = <&tc358743_0>,"link-frequencies#0";
938 + media-controller = <&csi>,"brcm,media-controller?";
939 + cam0 = <&i2c_frag>, "target:0=",<&i2c_vc>,
940 + <&csi_frag>, "target:0=",<&csi0>,
941 + <&clk_frag>, "target:0=",<&cam0_clk>,
942 + <&tc358743>, "clocks:0=",<&cam0_clk>;
943 };
944 };