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
482
483
484
485
486
487
488
489
490
|
From 6198fc61e2a06a6ac7b2f264368b882905dfda71 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 4 Jun 2019 16:22:22 +0100
Subject: [PATCH 664/773] arm: dts: Improve the bcm27xx inclusion hierarchy
1) The top-level .dts files now include parallel chains of bcm27xx.dtsi
and bcm27xx-rpi.dtsi files, with no cross-inclusion between the two
chains.
2) Move definitions and deletions to the point of maximum commonality
to reduce redundancy.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 1 +
arch/arm/boot/dts/bcm2708-rpi-b.dts | 1 +
arch/arm/boot/dts/bcm2708-rpi-cm.dtsi | 1 +
arch/arm/boot/dts/bcm2708-rpi-zero-w.dts | 1 +
arch/arm/boot/dts/bcm2708-rpi-zero.dts | 1 +
arch/arm/boot/dts/bcm2708-rpi.dtsi | 63 +++++++---------------
arch/arm/boot/dts/bcm2708.dtsi | 1 -
arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 1 +
arch/arm/boot/dts/bcm2709.dtsi | 1 -
arch/arm/boot/dts/bcm270x.dtsi | 18 +------
arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts | 1 +
arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 1 +
arch/arm/boot/dts/bcm2710-rpi-cm3.dts | 1 +
arch/arm/boot/dts/bcm2710.dtsi | 1 -
arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 15 ++++--
arch/arm/boot/dts/bcm2711-rpi.dtsi | 7 +++
arch/arm/boot/dts/bcm2711.dtsi | 10 ----
arch/arm/boot/dts/bcm2835-rpi.dtsi | 16 ++++++
arch/arm/boot/dts/bcm2838.dtsi | 33 ++++++++----
arch/arm/boot/dts/bcm283x.dtsi | 2 +-
20 files changed, 86 insertions(+), 90 deletions(-)
create mode 100644 arch/arm/boot/dts/bcm2711-rpi.dtsi
--- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
@@ -1,6 +1,7 @@
/dts-v1/;
#include "bcm2708.dtsi"
+#include "bcm2708-rpi.dtsi"
#include "bcm283x-rpi-smsc9514.dtsi"
#include "bcm283x-rpi-csi1-2lane.dtsi"
--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts
@@ -1,6 +1,7 @@
/dts-v1/;
#include "bcm2708.dtsi"
+#include "bcm2708-rpi.dtsi"
#include "bcm283x-rpi-smsc9512.dtsi"
#include "bcm283x-rpi-csi1-2lane.dtsi"
--- a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi
+++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi
@@ -1,4 +1,5 @@
#include "bcm2708.dtsi"
+#include "bcm2708-rpi.dtsi"
&leds {
act_led: act {
--- a/arch/arm/boot/dts/bcm2708-rpi-zero-w.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-zero-w.dts
@@ -1,6 +1,7 @@
/dts-v1/;
#include "bcm2708.dtsi"
+#include "bcm2708-rpi.dtsi"
#include "bcm283x-rpi-csi1-2lane.dtsi"
/ {
--- a/arch/arm/boot/dts/bcm2708-rpi-zero.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-zero.dts
@@ -1,6 +1,7 @@
/dts-v1/;
#include "bcm2708.dtsi"
+#include "bcm2708-rpi.dtsi"
#include "bcm283x-rpi-csi1-2lane.dtsi"
/ {
--- a/arch/arm/boot/dts/bcm2708-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2708-rpi.dtsi
@@ -1,6 +1,6 @@
-/* Downstream version of bcm2835-rpi.dtsi */
+/* Downstream modifications to bcm2835-rpi.dtsi */
-#include <dt-bindings/power/raspberrypi-power.h>
+#include "bcm2835-rpi.dtsi"
/ {
memory {
@@ -49,29 +49,10 @@
reg = <0x7e200000 0x1000>;
};
- firmware: firmware {
- compatible = "raspberrypi,bcm2835-firmware", "simple-bus";
- #address-cells = <0>;
- #size-cells = <0>;
- mboxes = <&mailbox>;
- };
-
- power: power {
- compatible = "raspberrypi,bcm2835-power";
- firmware = <&firmware>;
- #power-domain-cells = <1>;
- };
-
fb: fb {
compatible = "brcm,bcm2708-fb";
firmware = <&firmware>;
- status = "disabled";
- };
-
- vchiq: mailbox@7e00b840 {
- compatible = "brcm,bcm2835-vchiq";
- reg = <0x7e00b840 0x3c>;
- interrupts = <0 2>;
+ status = "okay";
};
vcsm: vcsm {
@@ -91,10 +72,6 @@
sound: sound {
status = "disabled";
};
-
- txp: txp@7e004000 {
- status = "disabled";
- };
};
__overrides__ {
@@ -125,11 +102,23 @@
};
&hdmi {
- power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
+ status = "disabled";
};
-&usb {
- power-domains = <&power RPI_POWER_DOMAIN_USB>;
+&txp {
+ status = "disabled";
+};
+
+&i2c0 {
+ status = "disabled";
+};
+
+&i2c1 {
+ status = "disabled";
+};
+
+&i2c2 {
+ status = "disabled";
};
&clocks {
@@ -141,16 +130,8 @@ sdhost_pins: &sdhost_gpio48 {
};
&sdhost {
- pinctrl-names = "default";
- pinctrl-0 = <&sdhost_gpio48>;
- bus-width = <4>;
brcm,overclock-50 = <0>;
brcm,pio-limit = <1>;
- status = "okay";
-};
-
-&fb {
- status = "okay";
};
&cpu_thermal {
@@ -160,11 +141,3 @@ sdhost_pins: &sdhost_gpio48 {
&vec {
status = "disabled";
};
-
-&csi0 {
- power-domains = <&power RPI_POWER_DOMAIN_UNICAM0>;
-};
-
-&csi1 {
- power-domains = <&power RPI_POWER_DOMAIN_UNICAM1>;
-};
--- a/arch/arm/boot/dts/bcm2708.dtsi
+++ b/arch/arm/boot/dts/bcm2708.dtsi
@@ -1,6 +1,5 @@
#include "bcm2835.dtsi"
#include "bcm270x.dtsi"
-#include "bcm2708-rpi.dtsi"
/ {
/delete-node/ cpus;
--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
+++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
@@ -1,6 +1,7 @@
/dts-v1/;
#include "bcm2709.dtsi"
+#include "bcm2709-rpi.dtsi"
#include "bcm283x-rpi-smsc9514.dtsi"
#include "bcm283x-rpi-csi1-2lane.dtsi"
--- a/arch/arm/boot/dts/bcm2709.dtsi
+++ b/arch/arm/boot/dts/bcm2709.dtsi
@@ -1,6 +1,5 @@
#include "bcm2836.dtsi"
#include "bcm270x.dtsi"
-#include "bcm2709-rpi.dtsi"
/ {
soc {
--- a/arch/arm/boot/dts/bcm270x.dtsi
+++ b/arch/arm/boot/dts/bcm270x.dtsi
@@ -68,7 +68,7 @@
/delete-node/ sdhci@7e300000;
- mmc: mmc@7e300000 {
+ sdhci: mmc: mmc@7e300000 {
compatible = "brcm,bcm2835-mmc", "brcm,bcm2835-sdhci";
reg = <0x7e300000 0x100>;
interrupts = <2 30>;
@@ -152,22 +152,6 @@
};
};
- vdd_5v0_reg: fixedregulator_5v0 {
- compatible = "regulator-fixed";
- regulator-name = "5v0";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- regulator-always-on;
- };
-
- vdd_3v3_reg: fixedregulator_3v3 {
- compatible = "regulator-fixed";
- regulator-name = "3v3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
-
__overrides__ {
cam0-pwdn-ctrl;
cam0-pwdn;
--- a/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts
@@ -1,6 +1,7 @@
/dts-v1/;
#include "bcm2710.dtsi"
+#include "bcm2709-rpi.dtsi"
#include "bcm283x-rpi-lan7515.dtsi"
#include "bcm283x-rpi-csi1-2lane.dtsi"
--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
+++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
@@ -1,6 +1,7 @@
/dts-v1/;
#include "bcm2710.dtsi"
+#include "bcm2709-rpi.dtsi"
#include "bcm283x-rpi-smsc9514.dtsi"
#include "bcm283x-rpi-csi1-2lane.dtsi"
--- a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts
+++ b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts
@@ -1,6 +1,7 @@
/dts-v1/;
#include "bcm2710.dtsi"
+#include "bcm2709-rpi.dtsi"
#include "bcm283x-rpi-csi0-2lane.dtsi"
#include "bcm283x-rpi-csi1-4lane.dtsi"
--- a/arch/arm/boot/dts/bcm2710.dtsi
+++ b/arch/arm/boot/dts/bcm2710.dtsi
@@ -1,6 +1,5 @@
#include "bcm2837.dtsi"
#include "bcm270x.dtsi"
-#include "bcm2709-rpi.dtsi"
/ {
compatible = "brcm,bcm2837", "brcm,bcm2836";
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
@@ -1,13 +1,12 @@
/dts-v1/;
#include "bcm2711.dtsi"
+#include "bcm2711-rpi.dtsi"
#include "bcm283x-rpi-csi1-2lane.dtsi"
/ {
- compatible = "raspberrypi,4-model-b", "brcm,bcm2838", "brcm,bcm2837";
+ compatible = "raspberrypi,4-model-b", "brcm,bcm2838";
model = "Raspberry Pi 4 Model B";
- #address-cells = <2>;
- #size-cells = <1>;
memory {
device_type = "memory";
@@ -48,10 +47,18 @@
};
&firmware {
- expgpio: expgpio {
+ expgpio: gpio {
compatible = "raspberrypi,firmware-gpio";
gpio-controller;
#gpio-cells = <2>;
+ gpio-line-names = "BT_ON",
+ "WL_ON",
+ "PWR_LED_OFF",
+ "GLOBAL_RESET",
+ "VDD_SD_IO_SEL",
+ "CAM_GPIO",
+ "",
+ "";
status = "okay";
};
};
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2711-rpi.dtsi
@@ -0,0 +1,7 @@
+#include "bcm2708-rpi.dtsi"
+#include "bcm2838-rpi.dtsi"
+
+&v3d {
+ /* Undo the overwriting by bcm270x.dtsi */
+ power-domains = <&pm BCM2835_POWER_DOMAIN_GRAFX_V3D>;
+};
--- a/arch/arm/boot/dts/bcm2711.dtsi
+++ b/arch/arm/boot/dts/bcm2711.dtsi
@@ -1,10 +1,8 @@
#include "bcm2838.dtsi"
#include "bcm270x.dtsi"
-#include "bcm2708-rpi.dtsi"
/ {
soc {
- /delete-node/ mailbox@7e00b840;
/delete-node/ v3d@7ec00000;
};
@@ -17,14 +15,6 @@
status = "disabled";
};
-&dma {
- brcm,dma-channel-mask = <0x7ef5>;
-};
-
-&txp {
- interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
-};
-
&firmwarekms {
interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
};
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -36,6 +36,22 @@
interrupts = <0 2>;
};
};
+
+ vdd_3v3_reg: fixedregulator_3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
+ vdd_5v0_reg: fixedregulator_5v0 {
+ compatible = "regulator-fixed";
+ regulator-name = "5v0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
};
&gpio {
--- a/arch/arm/boot/dts/bcm2838.dtsi
+++ b/arch/arm/boot/dts/bcm2838.dtsi
@@ -5,7 +5,10 @@
#include <dt-bindings/soc/bcm2835-pm.h>
/ {
- compatible = "brcm,bcm2838", "brcm,bcm2837";
+ compatible = "brcm,bcm2838";
+
+ #address-cells = <2>;
+ #size-cells = <1>;
interrupt-parent = <&gicv2>;
@@ -16,8 +19,8 @@
/* Emulate a contiguous 30-bit address range for DMA */
dma-ranges = <0xc0000000 0x0 0x00000000 0x3c000000>;
- /delete-node/ mailbox@7e00b840;
/delete-node/ interrupt-controller@7e00f300;
+ /delete-node/ v3d@7ec00000;
local_intc: local_intc@40000000 {
compatible = "brcm,bcm2836-l1-intc";
@@ -191,6 +194,16 @@
interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
};
+ pwm1: pwm@7e20c800 {
+ compatible = "brcm,bcm2835-pwm";
+ reg = <0x7e20c800 0x28>;
+ clocks = <&clocks BCM2835_CLOCK_PWM>;
+ assigned-clocks = <&clocks BCM2835_CLOCK_PWM>;
+ assigned-clock-rates = <10000000>;
+ #pwm-cells = <2>;
+ status = "disabled";
+ };
+
emmc2: emmc2@7e340000 {
compatible = "brcm,bcm2711-emmc2";
status = "okay";
@@ -385,7 +398,7 @@
"dma13",
"dma14";
#dma-cells = <1>;
- brcm,dma-channel-mask = <0x7000>;
+ brcm,dma-channel-mask = <0x7800>;
};
/* DMA4 - 40 bit DMA engines */
@@ -396,12 +409,6 @@
interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
};
- vchiq: mailbox@7e00b840 {
- compatible = "brcm,bcm2838-vchiq";
- reg = <0 0x7e00b840 0x3c>;
- interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
- };
-
hevc-decoder@7eb00000 {
compatible = "raspberrypi,argon-hevc-decoder";
reg = <0x0 0x7eb00000 0x10000>;
@@ -450,6 +457,8 @@
};
&gpio {
+ compatible = "brcm,bcm2838-gpio", "brcm,bcm2835-gpio";
+
gpclk0_gpio49: gpclk0_gpio49 {
brcm,pins = <49>;
brcm,function = <BCM2835_FSEL_ALT1>;
@@ -729,5 +738,9 @@
"dma8",
"dma9",
"dma10";
- brcm,dma-channel-mask = <0x01f5>;
+ brcm,dma-channel-mask = <0x07f5>;
+};
+
+&txp {
+ interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
};
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -55,7 +55,7 @@
#address-cells = <1>;
#size-cells = <1>;
- txp@7e004000 {
+ txp: txp@7e004000 {
compatible = "brcm,bcm2835-txp";
reg = <0x7e004000 0x20>;
interrupts = <1 11>;
|