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
|
From c305b2c14d9ec6f297062a0410010325d783eec6 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
Date: Mon, 26 Nov 2018 17:02:15 +0000
Subject: [PATCH 213/725] dtoverlays: Add i2c on 0&1 option to TC358743,
ADV7282 and OV5647
Adds the option of configuring i2c0 to be on GPIOs 0&1 as
this is of use on the Compute Module.
Also fixes the ov5647 overlay where the override enabled the wrong
fragments.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
---
arch/arm/boot/dts/overlays/README | 14 ++++++++++++--
arch/arm/boot/dts/overlays/adv7282m-overlay.dts | 10 +++++++++-
arch/arm/boot/dts/overlays/ov5647-overlay.dts | 10 +++++++++-
arch/arm/boot/dts/overlays/tc358743-overlay.dts | 10 +++++++++-
4 files changed, 39 insertions(+), 5 deletions(-)
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -277,7 +277,9 @@ Info: Analog Devices ADV7282M analogue
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.
+Params: i2c_pins_0_1 Use pins 0&1 for the I2C instead of 44&45.
+ Useful on Compute Modules.
+ 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.
addr Overrides the I2C address (default 0x21)
@@ -286,7 +288,9 @@ Name: adv728x-m
Info: Analog Devices ADV728[0|1|2]-M analogue video to CSI2 bridges.
This is a wrapper for adv7282m, and defaults to ADV7282M.
Load: dtoverlay=adv728x-m,<param>=<val>
-Params: i2c_pins_28_29 Use pins 28&29 for the I2C instead of 44&45.
+Params: i2c_pins_0_1 Use pins 0&1 for the I2C instead of 44&45.
+ Useful on Compute Modules.
+ 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.
addr Overrides the I2C address (default 0x21)
adv7280m Select ADV7280-M.
@@ -1324,6 +1328,9 @@ Params: cam0-pwdn GPIO use
configuration of the particular Pi variant in
use.
+ i2c_pins_0_1 Use pins 0&1 for the I2C instead of 44&45.
+ Useful on Compute Modules.
+
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.
@@ -1949,6 +1956,9 @@ Params: 4lane Use 4 la
(574Mbit/s) and 486000000 (972Mbit/s - default)
are supported by the driver.
+ i2c_pins_0_1 Use pins 0&1 for the I2C instead of 44&45.
+ Useful on Compute Modules.
+
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.
--- a/arch/arm/boot/dts/overlays/adv7282m-overlay.dts
+++ b/arch/arm/boot/dts/overlays/adv7282m-overlay.dts
@@ -60,6 +60,13 @@
};
};
fragment@4 {
+ target = <&i2c0_pins>;
+ __dormant__ {
+ brcm,pins = <0 1>;
+ brcm,function = <4>; /* alt0 */
+ };
+ };
+ fragment@5 {
target = <&i2c_vc>;
__overlay__ {
status = "okay";
@@ -67,7 +74,8 @@
};
__overrides__ {
- i2c_pins_28_29 = <0>,"+2-3";
+ i2c_pins_0_1 = <0>,"-2-3+4";
+ i2c_pins_28_29 = <0>,"+2-3-4";
addr = <&adv728x>,"reg:0";
};
};
--- a/arch/arm/boot/dts/overlays/ov5647-overlay.dts
+++ b/arch/arm/boot/dts/overlays/ov5647-overlay.dts
@@ -69,6 +69,13 @@
};
};
fragment@4 {
+ target = <&i2c0_pins>;
+ __dormant__ {
+ brcm,pins = <0 1>;
+ brcm,function = <4>; /* alt0 */
+ };
+ };
+ fragment@5 {
target = <&i2c_vc>;
__overlay__ {
status = "okay";
@@ -76,7 +83,8 @@
};
__overrides__ {
- i2c_pins_28_29 = <0>,"+4-5";
+ i2c_pins_0_1 = <0>,"-2-3+4";
+ i2c_pins_28_29 = <0>,"+2-3-4";
cam0-pwdn = <&ov5647>,"pwdn-gpios:4";
cam0-led = <&ov5647>,"pwdn-gpios:16";
};
--- a/arch/arm/boot/dts/overlays/tc358743-overlay.dts
+++ b/arch/arm/boot/dts/overlays/tc358743-overlay.dts
@@ -94,6 +94,13 @@
};
};
fragment@6 {
+ target = <&i2c0_pins>;
+ __dormant__ {
+ brcm,pins = <0 1>;
+ brcm,function = <4>; /* alt0 */
+ };
+ };
+ fragment@7 {
target = <&i2c_vc>;
__overlay__ {
status = "okay";
@@ -101,7 +108,8 @@
};
__overrides__ {
- i2c_pins_28_29 = <0>,"+4-5";
+ i2c_pins_0_1 = <0>,"-4-5+6";
+ i2c_pins_28_29 = <0>,"+4-5-6";
4lane = <0>, "-2+3";
link-frequency = <&tc358743>,"link-frequencies#0";
};
|