1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
|
From ba7e742c925b5a46ac63fe0c6e3d988eb6ea3e79 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
Date: Wed, 31 Oct 2018 15:01:59 +0000
Subject: [PATCH 204/725] arm: dt: Add DT overlays for ADV7282M, OV5647, and
TC358743
DT overlays to setup the above devices via i2c_arm and csi1.
(This currently does not use the i2c-mux-pinctrl driver to
dynamically switch the pinctrl)
tc358743 is tc358743 running at a default link frequency
of 972Mbit/s. This allows up to 1080P50 UYVY on 2 lanes.
There is a parameter to allow changing the link frequency,
but the only values supported by the driver are 297000000
for 594Mbit/s, and 486000000 for 972Mbit/s.
There is also a parameter to enable 4 lane mode (only
relevant to Compute Module (1 or 3) csi1).
tc358743-audio overlay enables I2S audio from the TC358743
to the Pi (SD to GPIO20, SCK to GPIO18, WFS to GPIO19).
ADV7282M is the Analog Devices analogue video to CSI bridge
chip.
OV5647 is the Pi V1.3 camera module. Currently the driver only
supports VGA 8bit Bayer and very few controls.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
---
arch/arm/boot/dts/overlays/Makefile | 4 +
arch/arm/boot/dts/overlays/README | 51 ++++++++
.../boot/dts/overlays/adv7282m-overlay.dts | 76 ++++++++++++
arch/arm/boot/dts/overlays/ov5647-overlay.dts | 87 ++++++++++++++
.../dts/overlays/tc358743-audio-overlay.dts | 52 ++++++++
.../boot/dts/overlays/tc358743-overlay.dts | 112 ++++++++++++++++++
6 files changed, 382 insertions(+)
create mode 100644 arch/arm/boot/dts/overlays/adv7282m-overlay.dts
create mode 100644 arch/arm/boot/dts/overlays/ov5647-overlay.dts
create mode 100644 arch/arm/boot/dts/overlays/tc358743-audio-overlay.dts
create mode 100644 arch/arm/boot/dts/overlays/tc358743-overlay.dts
--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -6,6 +6,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
ads1015.dtbo \
ads1115.dtbo \
ads7846.dtbo \
+ adv7282m.dtbo \
akkordion-iqdacplus.dtbo \
allo-boss-dac-pcm512x-audio.dtbo \
allo-digione.dtbo \
@@ -81,6 +82,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
mmc.dtbo \
mpu6050.dtbo \
mz61581.dtbo \
+ ov5647.dtbo \
papirus.dtbo \
pi3-act-led.dtbo \
pi3-disable-bt.dtbo \
@@ -132,6 +134,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
spi2-3cs.dtbo \
superaudioboard.dtbo \
sx150x.dtbo \
+ tc358743.dtbo \
+ tc358743-audio.dtbo \
tinylcd35.dtbo \
uart0.dtbo \
uart1.dtbo \
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -267,6 +267,15 @@ Params: cs SPI bus
www.kernel.org/doc/Documentation/devicetree/bindings/input/ads7846.txt
+Name: adv7282m
+Info: Analog Devices ADV7282M analogue video to CSI2 bridge.
+ Uses Unicam1, which is the standard camera connector on most Pi
+ variants.
+Load: dtoverlay=adv7282m,<param>=<val>
+Params: i2c_pins_28_29 Use pins 28&29 for the I2C instead of 44&45.
+ This is required for Pi B+, 2, 0, and 0W.
+
+
Name: akkordion-iqdacplus
Info: Configures the Digital Dreamtime Akkordion Music Player (based on the
OEM IQAudIO DAC+ or DAC Zero module).
@@ -1284,6 +1293,23 @@ Params: speed Display
xohms Touchpanel sensitivity (X-plate resistance)
+Name: ov5647
+Info: Omnivision OV5647 camera module.
+ Uses Unicam 1, which is the standard camera connector on most Pi
+ variants.
+Load: dtoverlay=ov5647,<param>=<val>
+Params: cam0-pwdn GPIO used to control the sensor powerdown line.
+
+ cam0-led GPIO used to control the sensor led
+ Both these fields should be automatically filled
+ in by the firmware to reflect the default GPIO
+ configuration of the particular Pi variant in
+ use.
+
+ i2c_pins_28_29 Use pins 28&29 for the I2C instead of 44&45.
+ This is required for Pi B+, 2, 0, and 0W.
+
+
Name: papirus
Info: PaPiRus ePaper Screen by Pi Supply (both HAT and pHAT)
Load: dtoverlay=papirus,<param>=<val>
@@ -1893,6 +1919,31 @@ Params: sx150<x>-<n>-<m> Enables
connected.
+Name: tc358743
+Info: Toshiba TC358743 HDMI to CSI-2 bridge chip.
+ Uses Unicam 1, which is the standard camera connector on most Pi
+ variants.
+Load: dtoverlay=tc358743,<param>=<val>
+Params: 4lane Use 4 lanes (only applicable to Compute Modules
+ CAM1 connector).
+
+ link-frequency Set the link frequency. Only values of 297000000
+ (574Mbit/s) and 486000000 (972Mbit/s - default)
+ are supported by the driver.
+
+ i2c_pins_28_29 Use pins 28&29 for the I2C instead of 44&45.
+ This is required for Pi B+, 2, 0, and 0W.
+
+
+Name: tc358743-audio
+Info: Used in combination with the tc358743-fast overlay to route the audio
+ from the TC358743 over I2S to the Pi.
+ Wiring is LRCK/WFS to GPIO 19, BCK/SCK to GPIO 18, and DATA/SD to GPIO
+ 20.
+Load: dtoverlay=tc358743-audio,<param>=<val>
+Params: card-name Override the default, "tc358743", card name.
+
+
Name: tinylcd35
Info: 3.5" Color TFT Display by www.tinylcd.com
Options: Touch, RTC, keypad
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/adv7282m-overlay.dts
@@ -0,0 +1,76 @@
+// SPDX-License-Identifier: GPL-2.0-only
+// Definitions for Analog Devices ADV7282-M video to CSI2 bridge on VC I2C bus
+/dts-v1/;
+/plugin/;
+
+/{
+ compatible = "brcm,bcm2708";
+
+ fragment@0 {
+ target = <&i2c_vc>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ adv7282: adv7282@21 {
+ compatible = "adi,adv7282-m";
+ reg = <0x21>;
+ status = "okay";
+ clock-frequency = <24000000>;
+ port {
+ adv7282_0: endpoint {
+ remote-endpoint = <&csi1_ep>;
+ clock-lanes = <0>;
+ data-lanes = <1>;
+ link-frequencies =
+ /bits/ 64 <297000000>;
+
+ mclk-frequency = <12000000>;
+ };
+ };
+ };
+ };
+ };
+ fragment@1 {
+ target = <&csi1>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ csi1_ep: endpoint {
+ remote-endpoint = <&adv7282_0>;
+ };
+ };
+ };
+ };
+ fragment@2 {
+ target = <&i2c0_pins>;
+ __dormant__ {
+ brcm,pins = <28 29>;
+ brcm,function = <4>; /* alt0 */
+ };
+
+ };
+ fragment@3 {
+ target = <&i2c0_pins>;
+ __overlay__ {
+ brcm,pins = <44 45>;
+ brcm,function = <5>; /* alt1 */
+ };
+ };
+ fragment@4 {
+ target = <&i2c_vc>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ __overrides__ {
+ i2c_pins_28_29 = <0>,"+2-3";
+ };
+};
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/ov5647-overlay.dts
@@ -0,0 +1,87 @@
+// SPDX-License-Identifier: GPL-2.0-only
+// Definitions for OV5647 camera module on VC I2C bus
+/dts-v1/;
+/plugin/;
+
+/{
+ compatible = "brcm,bcm2708";
+
+ fragment@0 {
+ target = <&i2c_vc>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ ov5647: ov5647@36 {
+ compatible = "ov5647";
+ reg = <0x36>;
+ status = "okay";
+
+ pwdn-gpios = <&gpio 41 1>, <&gpio 32 1>;
+ clocks = <&ov5647_clk>;
+
+ ov5647_clk: camera-clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <25000000>;
+ };
+
+ port {
+ ov5647_0: endpoint {
+ remote-endpoint = <&csi1_ep>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ clock-noncontinuous;
+ link-frequencies =
+ /bits/ 64 <297000000>;
+ };
+ };
+ };
+ };
+ };
+
+ fragment@1 {
+ target = <&csi1>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ csi1_ep: endpoint {
+ remote-endpoint = <&ov5647_0>;
+ };
+ };
+ };
+ };
+
+ fragment@2 {
+ target = <&i2c0_pins>;
+ __dormant__ {
+ brcm,pins = <28 29>;
+ brcm,function = <4>; /* alt0 */
+ };
+ };
+ fragment@3 {
+ target = <&i2c0_pins>;
+ __overlay__ {
+ brcm,pins = <44 45>;
+ brcm,function = <5>; /* alt1 */
+ };
+ };
+ fragment@4 {
+ target = <&i2c_vc>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ __overrides__ {
+ i2c_pins_28_29 = <0>,"+4-5";
+ cam0-pwdn = <&ov5647>,"pwdn-gpios:4";
+ cam0-led = <&ov5647>,"pwdn-gpios:16";
+ };
+};
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/tc358743-audio-overlay.dts
@@ -0,0 +1,52 @@
+// SPDX-License-Identifier: GPL-2.0-only
+// Definitions to add I2S audio from the Toshiba TC358743 HDMI to CSI2 bridge.
+// Requires tc358743 overlay to have been loaded to actually function.
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "brcm,bcm2708";
+
+ fragment@0 {
+ target = <&i2s>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ fragment@1 {
+ target-path = "/";
+ __overlay__ {
+ tc358743_codec: tc358743-codec {
+ #sound-dai-cells = <0>;
+ compatible = "linux,spdif-dir";
+ status = "okay";
+ };
+ };
+ };
+
+ fragment@2 {
+ target = <&sound>;
+ sound_overlay: __overlay__ {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,name = "tc358743";
+ simple-audio-card,bitclock-master = <&dailink0_slave>;
+ simple-audio-card,frame-master = <&dailink0_slave>;
+ status = "okay";
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s>;
+ dai-tdm-slot-num = <2>;
+ dai-tdm-slot-width = <32>;
+ };
+ dailink0_slave: simple-audio-card,codec {
+ sound-dai = <&tc358743_codec>;
+ };
+ };
+ };
+
+ __overrides__ {
+ card-name = <&sound_overlay>,"simple-audio-card,name";
+ };
+};
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/tc358743-overlay.dts
@@ -0,0 +1,112 @@
+// SPDX-License-Identifier: GPL-2.0-only
+// Definitions for Toshiba TC358743 HDMI to CSI2 bridge on VC I2C bus
+/dts-v1/;
+/plugin/;
+
+/{
+ compatible = "brcm,bcm2708";
+
+ fragment@0 {
+ target = <&i2c_vc>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ tc358743@0f {
+ compatible = "toshiba,tc358743";
+ reg = <0x0f>;
+ status = "okay";
+
+ clocks = <&tc358743_clk>;
+ clock-names = "refclk";
+
+ tc358743_clk: bridge-clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <27000000>;
+ };
+
+ port {
+ tc358743: endpoint {
+ remote-endpoint = <&csi1_ep>;
+ clock-lanes = <0>;
+ clock-noncontinuous;
+ link-frequencies =
+ /bits/ 64 <486000000>;
+ };
+ };
+ };
+ };
+ };
+
+ fragment@1 {
+ target = <&csi1>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ csi1_ep: endpoint {
+ remote-endpoint = <&tc358743>;
+ };
+ };
+ };
+ };
+
+ fragment@2 {
+ target = <&i2c_vc>;
+ __overlay__ {
+ tc358743@0f {
+ port {
+ endpoint {
+ data-lanes = <1 2>;
+ };
+ };
+ };
+ };
+ };
+
+ fragment@3 {
+ target = <&i2c_vc>;
+ __dormant__ {
+ tc358743@0f {
+ port {
+ endpoint {
+ data-lanes = <1 2 3 4>;
+ };
+ };
+ };
+ };
+ };
+
+ fragment@4 {
+ target = <&i2c0_pins>;
+ __dormant__ {
+ brcm,pins = <28 29>;
+ brcm,function = <4>; /* alt0 */
+ };
+ };
+ fragment@5 {
+ target = <&i2c0_pins>;
+ __overlay__ {
+ brcm,pins = <44 45>;
+ brcm,function = <5>; /* alt1 */
+ };
+ };
+ fragment@6 {
+ target = <&i2c_vc>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ __overrides__ {
+ i2c_pins_28_29 = <0>,"+4-5";
+ 4lane = <0>, "-2+3";
+ link-frequency = <&tc358743>,"link-frequencies#0";
+ };
+};
|