bcm27xx: switch to 5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.10 / 950-0398-overlays-Add-PCF85063-and-PCF85063A-to-i2c-rtc.patch
1 From ba93a3eeaf4101166feec31b4a2799b6d4aee640 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Mon, 7 Dec 2020 08:49:53 +0000
4 Subject: [PATCH] overlays: Add PCF85063 and PCF85063A to i2c-rtc
5
6 Add support for the PCF85063 and PCF85063A RTC devices to the
7 i2c-rtc overlay.
8
9 Also enable the device to be used on i2c0 (i2c_vc) on GPIOs 0&1 (use
10 parameter "i2c0") and GPIOs 44 & 45 (use parameter "i2c_csi_dsi").
11
12 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
13 ---
14 arch/arm/boot/dts/overlays/README | 8 ++
15 .../arm/boot/dts/overlays/i2c-rtc-overlay.dts | 98 ++++++++++---------
16 2 files changed, 61 insertions(+), 45 deletions(-)
17
18 --- a/arch/arm/boot/dts/overlays/README
19 +++ b/arch/arm/boot/dts/overlays/README
20 @@ -1257,6 +1257,10 @@ Params: abx80x Select o
21
22 pcf2129 Select the PCF2129 device
23
24 + pcf85063 Select the PCF85363 device
25 +
26 + pcf85063a Select the PCF85363A device
27 +
28 pcf8523 Select the PCF8523 device
29
30 pcf85363 Select the PCF85363 device
31 @@ -1269,6 +1273,10 @@ Params: abx80x Select o
32
33 sd3078 Select the ZXW Shenzhen whwave SD3078 device
34
35 + i2c0 Choose the I2C0 bus on GPIOs 0&1
36 +
37 + i2c_csi_dsi Choose the I2C0 bus on GPIOs 44&45
38 +
39 addr Sets the address for the RTC. Note that the
40 device must be configured to use the specified
41 address.
42 --- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
43 +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
44 @@ -6,235 +6,238 @@
45 compatible = "brcm,bcm2835";
46
47 fragment@0 {
48 - target = <&i2c_arm>;
49 + target = <&i2cbus>;
50 __dormant__ {
51 #address-cells = <1>;
52 #size-cells = <0>;
53 - status = "okay";
54
55 abx80x: abx80x@69 {
56 compatible = "abracon,abx80x";
57 reg = <0x69>;
58 abracon,tc-diode = "standard";
59 abracon,tc-resistor = <0>;
60 - status = "okay";
61 };
62 };
63 };
64
65 fragment@1 {
66 - target = <&i2c_arm>;
67 + target = <&i2cbus>;
68 __dormant__ {
69 #address-cells = <1>;
70 #size-cells = <0>;
71 - status = "okay";
72
73 ds1307: ds1307@68 {
74 compatible = "dallas,ds1307";
75 reg = <0x68>;
76 - status = "okay";
77 };
78 };
79 };
80
81 fragment@2 {
82 - target = <&i2c_arm>;
83 + target = <&i2cbus>;
84 __dormant__ {
85 #address-cells = <1>;
86 #size-cells = <0>;
87 - status = "okay";
88
89 ds1339: ds1339@68 {
90 compatible = "dallas,ds1339";
91 trickle-resistor-ohms = <0>;
92 reg = <0x68>;
93 - status = "okay";
94 };
95 };
96 };
97
98 fragment@3 {
99 - target = <&i2c_arm>;
100 + target = <&i2cbus>;
101 __dormant__ {
102 #address-cells = <1>;
103 #size-cells = <0>;
104 - status = "okay";
105
106 ds3231: ds3231@68 {
107 compatible = "maxim,ds3231";
108 reg = <0x68>;
109 - status = "okay";
110 };
111 };
112 };
113
114 fragment@4 {
115 - target = <&i2c_arm>;
116 + target = <&i2cbus>;
117 __dormant__ {
118 #address-cells = <1>;
119 #size-cells = <0>;
120 - status = "okay";
121
122 mcp7940x: mcp7940x@6f {
123 compatible = "microchip,mcp7940x";
124 reg = <0x6f>;
125 - status = "okay";
126 };
127 };
128 };
129
130 fragment@5 {
131 - target = <&i2c_arm>;
132 + target = <&i2cbus>;
133 __dormant__ {
134 #address-cells = <1>;
135 #size-cells = <0>;
136 - status = "okay";
137
138 mcp7941x: mcp7941x@6f {
139 compatible = "microchip,mcp7941x";
140 reg = <0x6f>;
141 - status = "okay";
142 };
143 };
144 };
145
146 fragment@6 {
147 - target = <&i2c_arm>;
148 + target = <&i2cbus>;
149 __dormant__ {
150 #address-cells = <1>;
151 #size-cells = <0>;
152 - status = "okay";
153
154 pcf2127@51 {
155 compatible = "nxp,pcf2127";
156 reg = <0x51>;
157 - status = "okay";
158 };
159 };
160 };
161
162 fragment@7 {
163 - target = <&i2c_arm>;
164 + target = <&i2cbus>;
165 __dormant__ {
166 #address-cells = <1>;
167 #size-cells = <0>;
168 - status = "okay";
169
170 pcf8523: pcf8523@68 {
171 compatible = "nxp,pcf8523";
172 reg = <0x68>;
173 - status = "okay";
174 };
175 };
176 };
177
178 fragment@8 {
179 - target = <&i2c_arm>;
180 + target = <&i2cbus>;
181 __dormant__ {
182 #address-cells = <1>;
183 #size-cells = <0>;
184 - status = "okay";
185
186 pcf8563: pcf8563@51 {
187 compatible = "nxp,pcf8563";
188 reg = <0x51>;
189 - status = "okay";
190 };
191 };
192 };
193
194 fragment@9 {
195 - target = <&i2c_arm>;
196 + target = <&i2cbus>;
197 __dormant__ {
198 #address-cells = <1>;
199 #size-cells = <0>;
200 - status = "okay";
201
202 m41t62: m41t62@68 {
203 compatible = "st,m41t62";
204 reg = <0x68>;
205 - status = "okay";
206 };
207 };
208 };
209
210 fragment@10 {
211 - target = <&i2c_arm>;
212 + target = <&i2cbus>;
213 __dormant__ {
214 #address-cells = <1>;
215 #size-cells = <0>;
216 - status = "okay";
217
218 rv3028: rv3028@52 {
219 compatible = "microcrystal,rv3028";
220 reg = <0x52>;
221 - status = "okay";
222 };
223 };
224 };
225
226 fragment@11 {
227 - target = <&i2c_arm>;
228 + target = <&i2cbus>;
229 __dormant__ {
230 #address-cells = <1>;
231 #size-cells = <0>;
232 - status = "okay";
233
234 pcf2129@51 {
235 compatible = "nxp,pcf2129";
236 reg = <0x51>;
237 - status = "okay";
238 };
239 };
240 };
241
242 fragment@12 {
243 - target = <&i2c_arm>;
244 + target = <&i2cbus>;
245 __dormant__ {
246 #address-cells = <1>;
247 #size-cells = <0>;
248 - status = "okay";
249
250 pcf85363@51 {
251 compatible = "nxp,pcf85363";
252 reg = <0x51>;
253 - status = "okay";
254 };
255 };
256 };
257
258 fragment@13 {
259 - target = <&i2c_arm>;
260 + target = <&i2cbus>;
261 __dormant__ {
262 #address-cells = <1>;
263 #size-cells = <0>;
264 - status = "okay";
265
266 rv1805: rv1805@69 {
267 compatible = "microcrystal,rv1805";
268 reg = <0x69>;
269 abracon,tc-diode = "standard";
270 abracon,tc-resistor = <0>;
271 - status = "okay";
272 };
273 };
274 };
275
276 fragment@14 {
277 - target = <&i2c_arm>;
278 + target = <&i2cbus>;
279 __dormant__ {
280 #address-cells = <1>;
281 #size-cells = <0>;
282 - status = "okay";
283
284 sd3078: sd3078@32 {
285 compatible = "whwave,sd3078";
286 reg = <0x32>;
287 - status = "okay";
288 };
289 };
290 };
291
292 + fragment@15 {
293 + target = <&i2cbus>;
294 + __dormant__ {
295 + #address-cells = <1>;
296 + #size-cells = <0>;
297 +
298 + pcf85063@51 {
299 + compatible = "nxp,pcf85063";
300 + reg = <0x51>;
301 + };
302 + };
303 + };
304 +
305 + fragment@16 {
306 + target = <&i2cbus>;
307 + __dormant__ {
308 + #address-cells = <1>;
309 + #size-cells = <0>;
310 +
311 + pcf85063a@51 {
312 + compatible = "nxp,pcf85063a";
313 + reg = <0x51>;
314 + };
315 + };
316 + };
317 +
318 + frag100: fragment@100 {
319 + target = <&i2c_arm>;
320 + i2cbus: __overlay__ {
321 + status = "okay";
322 + };
323 + };
324 +
325 __overrides__ {
326 abx80x = <0>,"+0";
327 ds1307 = <0>,"+1";
328 @@ -251,6 +254,11 @@
329 pcf85363 = <0>,"+12";
330 rv1805 = <0>,"+13";
331 sd3078 = <0>,"+14";
332 + pcf85063 = <0>,"+15";
333 + pcf85063a = <0>,"+16";
334 +
335 + i2c0 = <&frag100>, "target:0=",<&i2c0>;
336 + i2c_csi_dsi = <&frag100>, "target:0=",<&i2c_csi_dsi>;
337
338 addr = <&abx80x>, "reg:0",
339 <&ds1307>, "reg:0",