90c490e9c8f88b9f6d134d50ad7b3436d81fc318
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.1 / 0025-BCM2708-Add-core-Device-Tree-support.patch
1 From 73ffc770b510d914757449f9bd52ff5e0b300a52 Mon Sep 17 00:00:00 2001
2 From: notro <notro@tronnes.org>
3 Date: Wed, 9 Jul 2014 14:46:08 +0200
4 Subject: [PATCH 025/121] BCM2708: Add core Device Tree support
5
6 Add the bare minimum needed to boot BCM2708 from a Device Tree.
7
8 Signed-off-by: Noralf Tronnes <notro@tronnes.org>
9
10 BCM2708: DT: change 'axi' nodename to 'soc'
11
12 Change DT node named 'axi' to 'soc' so it matches ARCH_BCM2835.
13 The VC4 bootloader fills in certain properties in the 'axi' subtree,
14 but since this is part of an upstreaming effort, the name is changed.
15
16 Signed-off-by: Noralf Tronnes notro@tronnes.org
17
18 BCM2708_DT: Correct length of the peripheral space
19 ---
20 arch/arm/boot/dts/Makefile | 27 ++
21 arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 140 ++++++
22 arch/arm/boot/dts/bcm2708-rpi-b.dts | 130 ++++++
23 arch/arm/boot/dts/bcm2708-rpi-cm.dts | 18 +
24 arch/arm/boot/dts/bcm2708-rpi-cm.dtsi | 51 +++
25 arch/arm/boot/dts/bcm2708.dtsi | 19 +
26 arch/arm/boot/dts/bcm2708_common.dtsi | 230 ++++++++++
27 arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 140 ++++++
28 arch/arm/boot/dts/bcm2709.dtsi | 70 +++
29 arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 45 +-
30 arch/arm/boot/dts/bcm2835-rpi-b.dts | 29 +-
31 arch/arm/boot/dts/bcm2835-rpi.dtsi | 97 +++-
32 arch/arm/boot/dts/bcm2835.dtsi | 45 +-
33 arch/arm/boot/dts/overlays/Makefile | 57 +++
34 arch/arm/boot/dts/overlays/README | 493 +++++++++++++++++++++
35 arch/arm/boot/dts/overlays/ads7846-overlay.dts | 83 ++++
36 .../dts/overlays/bmp085_i2c-sensor-overlay.dts | 23 +
37 arch/arm/boot/dts/overlays/dht11-overlay.dts | 39 ++
38 arch/arm/boot/dts/overlays/enc28j60-overlay.dts | 50 +++
39 .../boot/dts/overlays/hifiberry-amp-overlay.dts | 39 ++
40 .../boot/dts/overlays/hifiberry-dac-overlay.dts | 34 ++
41 .../dts/overlays/hifiberry-dacplus-overlay.dts | 39 ++
42 .../boot/dts/overlays/hifiberry-digi-overlay.dts | 39 ++
43 arch/arm/boot/dts/overlays/hy28a-overlay.dts | 87 ++++
44 arch/arm/boot/dts/overlays/hy28b-overlay.dts | 142 ++++++
45 arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 49 ++
46 arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts | 13 +
47 arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts | 39 ++
48 .../boot/dts/overlays/iqaudio-dacplus-overlay.dts | 39 ++
49 arch/arm/boot/dts/overlays/lirc-rpi-overlay.dts | 57 +++
50 .../arm/boot/dts/overlays/mcp2515-can0-overlay.dts | 69 +++
51 arch/arm/boot/dts/overlays/mmc-overlay.dts | 19 +
52 arch/arm/boot/dts/overlays/mz61581-overlay.dts | 109 +++++
53 arch/arm/boot/dts/overlays/piscreen-overlay.dts | 96 ++++
54 .../dts/overlays/pitft28-resistive-overlay.dts | 115 +++++
55 arch/arm/boot/dts/overlays/pps-gpio-overlay.dts | 34 ++
56 arch/arm/boot/dts/overlays/rpi-dac-overlay.dts | 34 ++
57 arch/arm/boot/dts/overlays/rpi-display-overlay.dts | 82 ++++
58 arch/arm/boot/dts/overlays/rpi-proto-overlay.dts | 39 ++
59 arch/arm/boot/dts/overlays/sdhost-overlay.dts | 78 ++++
60 arch/arm/boot/dts/overlays/spi-bcm2708-overlay.dts | 18 +
61 arch/arm/boot/dts/overlays/spi-bcm2835-overlay.dts | 18 +
62 arch/arm/boot/dts/overlays/tinylcd35-overlay.dts | 216 +++++++++
63 arch/arm/boot/dts/overlays/w1-gpio-overlay.dts | 39 ++
64 .../boot/dts/overlays/w1-gpio-pullup-overlay.dts | 41 ++
65 45 files changed, 3316 insertions(+), 54 deletions(-)
66 create mode 100644 arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
67 create mode 100644 arch/arm/boot/dts/bcm2708-rpi-b.dts
68 create mode 100755 arch/arm/boot/dts/bcm2708-rpi-cm.dts
69 create mode 100644 arch/arm/boot/dts/bcm2708-rpi-cm.dtsi
70 create mode 100644 arch/arm/boot/dts/bcm2708.dtsi
71 create mode 100644 arch/arm/boot/dts/bcm2708_common.dtsi
72 create mode 100644 arch/arm/boot/dts/bcm2709-rpi-2-b.dts
73 create mode 100644 arch/arm/boot/dts/bcm2709.dtsi
74 create mode 100644 arch/arm/boot/dts/overlays/Makefile
75 create mode 100644 arch/arm/boot/dts/overlays/README
76 create mode 100644 arch/arm/boot/dts/overlays/ads7846-overlay.dts
77 create mode 100644 arch/arm/boot/dts/overlays/bmp085_i2c-sensor-overlay.dts
78 create mode 100644 arch/arm/boot/dts/overlays/dht11-overlay.dts
79 create mode 100644 arch/arm/boot/dts/overlays/enc28j60-overlay.dts
80 create mode 100644 arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts
81 create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts
82 create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts
83 create mode 100644 arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts
84 create mode 100644 arch/arm/boot/dts/overlays/hy28a-overlay.dts
85 create mode 100644 arch/arm/boot/dts/overlays/hy28b-overlay.dts
86 create mode 100644 arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
87 create mode 100644 arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts
88 create mode 100644 arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts
89 create mode 100644 arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts
90 create mode 100644 arch/arm/boot/dts/overlays/lirc-rpi-overlay.dts
91 create mode 100755 arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts
92 create mode 100644 arch/arm/boot/dts/overlays/mmc-overlay.dts
93 create mode 100644 arch/arm/boot/dts/overlays/mz61581-overlay.dts
94 create mode 100644 arch/arm/boot/dts/overlays/piscreen-overlay.dts
95 create mode 100644 arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts
96 create mode 100644 arch/arm/boot/dts/overlays/pps-gpio-overlay.dts
97 create mode 100644 arch/arm/boot/dts/overlays/rpi-dac-overlay.dts
98 create mode 100644 arch/arm/boot/dts/overlays/rpi-display-overlay.dts
99 create mode 100644 arch/arm/boot/dts/overlays/rpi-proto-overlay.dts
100 create mode 100644 arch/arm/boot/dts/overlays/sdhost-overlay.dts
101 create mode 100644 arch/arm/boot/dts/overlays/spi-bcm2708-overlay.dts
102 create mode 100644 arch/arm/boot/dts/overlays/spi-bcm2835-overlay.dts
103 create mode 100644 arch/arm/boot/dts/overlays/tinylcd35-overlay.dts
104 create mode 100644 arch/arm/boot/dts/overlays/w1-gpio-overlay.dts
105 create mode 100644 arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts
106
107 --- a/arch/arm/boot/dts/Makefile
108 +++ b/arch/arm/boot/dts/Makefile
109 @@ -1,5 +1,21 @@
110 ifeq ($(CONFIG_OF),y)
111
112 +dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b.dtb
113 +dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b-plus.dtb
114 +dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-cm.dtb
115 +dtb-$(CONFIG_BCM2709_DT) += bcm2709-rpi-2-b.dtb
116 +
117 +# Raspberry Pi
118 +ifeq ($(CONFIG_BCM2708_DT),y)
119 + RPI_DT_OVERLAYS=y
120 +endif
121 +ifeq ($(CONFIG_BCM2709_DT),y)
122 + RPI_DT_OVERLAYS=y
123 +endif
124 +ifeq ($(CONFIG_ARCH_BCM2835),y)
125 + RPI_DT_OVERLAYS=y
126 +endif
127 +
128 dtb-$(CONFIG_ARCH_ALPINE) += \
129 alpine-db.dtb
130 dtb-$(CONFIG_MACH_ASM9260) += \
131 @@ -660,7 +676,18 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
132 mt6592-evb.dtb \
133 mt8127-moose.dtb \
134 mt8135-evbp1.dtb
135 +
136 +targets += dtbs dtbs_install
137 +targets += $(dtb-y)
138 +
139 endif
140
141 always := $(dtb-y)
142 clean-files := *.dtb
143 +
144 +# Enable fixups to support overlays on BCM2708 platforms
145 +ifeq ($(RPI_DT_OVERLAYS),y)
146 + DTC_FLAGS ?= -@
147 +endif
148 +
149 +subdir-y += overlays
150 --- /dev/null
151 +++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
152 @@ -0,0 +1,140 @@
153 +/dts-v1/;
154 +
155 +/include/ "bcm2708.dtsi"
156 +
157 +/ {
158 + compatible = "brcm,bcm2708";
159 + model = "Raspberry Pi Model B+";
160 +
161 + aliases {
162 + soc = &soc;
163 + spi0 = &spi0;
164 + i2c0 = &i2c0;
165 + i2c1 = &i2c1;
166 + i2s = &i2s;
167 + gpio = &gpio;
168 + intc = &intc;
169 + leds = &leds;
170 + audio = &audio;
171 + sound = &sound;
172 + uart0 = &uart0;
173 + uart1 = &uart1;
174 + clocks = &clocks;
175 + };
176 +
177 + sound: sound {
178 + };
179 +};
180 +
181 +&gpio {
182 + spi0_pins: spi0_pins {
183 + brcm,pins = <7 8 9 10 11>;
184 + brcm,function = <4>; /* alt0 */
185 + };
186 +
187 + i2c0_pins: i2c0 {
188 + brcm,pins = <0 1>;
189 + brcm,function = <4>;
190 + };
191 +
192 + i2c1_pins: i2c1 {
193 + brcm,pins = <2 3>;
194 + brcm,function = <4>;
195 + };
196 +
197 + i2s_pins: i2s {
198 + brcm,pins = <18 19 20 21>;
199 + brcm,function = <4>; /* alt0 */
200 + };
201 +};
202 +
203 +&mmc {
204 + status = "okay";
205 + bus-width = <4>;
206 +};
207 +
208 +&fb {
209 + status = "okay";
210 +};
211 +
212 +&uart0 {
213 + status = "okay";
214 +};
215 +
216 +&spi0 {
217 + pinctrl-names = "default";
218 + pinctrl-0 = <&spi0_pins>;
219 +
220 + spidev@0{
221 + compatible = "spidev";
222 + reg = <0>; /* CE0 */
223 + #address-cells = <1>;
224 + #size-cells = <0>;
225 + spi-max-frequency = <500000>;
226 + };
227 +
228 + spidev@1{
229 + compatible = "spidev";
230 + reg = <1>; /* CE1 */
231 + #address-cells = <1>;
232 + #size-cells = <0>;
233 + spi-max-frequency = <500000>;
234 + };
235 +};
236 +
237 +&i2c0 {
238 + pinctrl-names = "default";
239 + pinctrl-0 = <&i2c0_pins>;
240 + clock-frequency = <100000>;
241 +};
242 +
243 +&i2c1 {
244 + pinctrl-names = "default";
245 + pinctrl-0 = <&i2c1_pins>;
246 + clock-frequency = <100000>;
247 +};
248 +
249 +&i2s {
250 + #sound-dai-cells = <0>;
251 + pinctrl-names = "default";
252 + pinctrl-0 = <&i2s_pins>;
253 +};
254 +
255 +&leds {
256 + act_led: act {
257 + label = "led0";
258 + linux,default-trigger = "mmc0";
259 + gpios = <&gpio 47 0>;
260 + };
261 +
262 + pwr_led: pwr {
263 + label = "led1";
264 + linux,default-trigger = "input";
265 + gpios = <&gpio 35 0>;
266 + };
267 +};
268 +
269 +/ {
270 + __overrides__ {
271 + uart0 = <&uart0>,"status";
272 + uart0_clkrate = <&clk_uart0>,"clock-frequency:0";
273 + i2s = <&i2s>,"status";
274 + spi = <&spi0>,"status";
275 + i2c0 = <&i2c0>,"status";
276 + i2c1 = <&i2c1>,"status";
277 + i2c0_baudrate = <&i2c0>,"clock-frequency:0";
278 + i2c1_baudrate = <&i2c1>,"clock-frequency:0";
279 +
280 + act_led_gpio = <&act_led>,"gpios:4";
281 + act_led_activelow = <&act_led>,"gpios:8";
282 + act_led_trigger = <&act_led>,"linux,default-trigger";
283 +
284 + pwr_led_gpio = <&pwr_led>,"gpios:4";
285 + pwr_led_activelow = <&pwr_led>,"gpios:8";
286 + pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
287 +
288 + audio = <&audio>,"status";
289 + watchdog = <&watchdog>,"status";
290 + random = <&random>,"status";
291 + };
292 +};
293 --- /dev/null
294 +++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts
295 @@ -0,0 +1,130 @@
296 +/dts-v1/;
297 +
298 +/include/ "bcm2708.dtsi"
299 +
300 +/ {
301 + compatible = "brcm,bcm2708";
302 + model = "Raspberry Pi Model B";
303 +
304 + aliases {
305 + soc = &soc;
306 + spi0 = &spi0;
307 + i2c0 = &i2c0;
308 + i2c1 = &i2c1;
309 + i2s = &i2s;
310 + gpio = &gpio;
311 + intc = &intc;
312 + leds = &leds;
313 + audio = &audio;
314 + sound = &sound;
315 + uart0 = &uart0;
316 + uart1 = &uart1;
317 + clocks = &clocks;
318 + };
319 +
320 + sound: sound {
321 + };
322 +};
323 +
324 +&gpio {
325 + spi0_pins: spi0_pins {
326 + brcm,pins = <7 8 9 10 11>;
327 + brcm,function = <4>; /* alt0 */
328 + };
329 +
330 + i2c0_pins: i2c0 {
331 + brcm,pins = <0 1>;
332 + brcm,function = <4>;
333 + };
334 +
335 + i2c1_pins: i2c1 {
336 + brcm,pins = <2 3>;
337 + brcm,function = <4>;
338 + };
339 +
340 + i2s_pins: i2s {
341 + brcm,pins = <28 29 30 31>;
342 + brcm,function = <4>; /* alt0 */
343 + };
344 +};
345 +
346 +&mmc {
347 + status = "okay";
348 + bus-width = <4>;
349 +};
350 +
351 +&fb {
352 + status = "okay";
353 +};
354 +
355 +&uart0 {
356 + status = "okay";
357 +};
358 +
359 +&spi0 {
360 + pinctrl-names = "default";
361 + pinctrl-0 = <&spi0_pins>;
362 +
363 + spidev@0{
364 + compatible = "spidev";
365 + reg = <0>; /* CE0 */
366 + #address-cells = <1>;
367 + #size-cells = <0>;
368 + spi-max-frequency = <500000>;
369 + };
370 +
371 + spidev@1{
372 + compatible = "spidev";
373 + reg = <1>; /* CE1 */
374 + #address-cells = <1>;
375 + #size-cells = <0>;
376 + spi-max-frequency = <500000>;
377 + };
378 +};
379 +
380 +&i2c0 {
381 + pinctrl-names = "default";
382 + pinctrl-0 = <&i2c0_pins>;
383 + clock-frequency = <100000>;
384 +};
385 +
386 +&i2c1 {
387 + pinctrl-names = "default";
388 + pinctrl-0 = <&i2c1_pins>;
389 + clock-frequency = <100000>;
390 +};
391 +
392 +&i2s {
393 + #sound-dai-cells = <0>;
394 + pinctrl-names = "default";
395 + pinctrl-0 = <&i2s_pins>;
396 +};
397 +
398 +&leds {
399 + act_led: act {
400 + label = "led0";
401 + linux,default-trigger = "mmc0";
402 + gpios = <&gpio 16 1>;
403 + };
404 +};
405 +
406 +/ {
407 + __overrides__ {
408 + uart0 = <&uart0>,"status";
409 + uart0_clkrate = <&clk_uart0>,"clock-frequency:0";
410 + i2s = <&i2s>,"status";
411 + spi = <&spi0>,"status";
412 + i2c0 = <&i2c0>,"status";
413 + i2c1 = <&i2c1>,"status";
414 + i2c0_baudrate = <&i2c0>,"clock-frequency:0";
415 + i2c1_baudrate = <&i2c1>,"clock-frequency:0";
416 +
417 + act_led_gpio = <&act_led>,"gpios:4";
418 + act_led_activelow = <&act_led>,"gpios:8";
419 + act_led_trigger = <&act_led>,"linux,default-trigger";
420 +
421 + audio = <&audio>,"status";
422 + watchdog = <&watchdog>,"status";
423 + random = <&random>,"status";
424 + };
425 +};
426 --- /dev/null
427 +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts
428 @@ -0,0 +1,18 @@
429 +/dts-v1/;
430 +
431 +/include/ "bcm2708-rpi-cm.dtsi"
432 +
433 +/ {
434 + model = "Raspberry Pi Compute Module";
435 +};
436 +
437 +&uart0 {
438 + status = "okay";
439 +};
440 +
441 +/ {
442 + __overrides__ {
443 + uart0 = <&uart0>,"status";
444 + uart0_clkrate = <&clk_uart0>,"clock-frequency:0";
445 + };
446 +};
447 --- /dev/null
448 +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi
449 @@ -0,0 +1,51 @@
450 +/include/ "bcm2708.dtsi"
451 +
452 +/ {
453 + aliases {
454 + soc = &soc;
455 + spi0 = &spi0;
456 + i2c0 = &i2c0;
457 + i2c1 = &i2c1;
458 + i2s = &i2s;
459 + gpio = &gpio;
460 + intc = &intc;
461 + leds = &leds;
462 + audio = &audio;
463 + sound = &sound;
464 + uart0 = &uart0;
465 + uart1 = &uart1;
466 + clocks = &clocks;
467 + };
468 +
469 + sound: sound {
470 + };
471 +};
472 +
473 +&leds {
474 + act_led: act {
475 + label = "led0";
476 + linux,default-trigger = "mmc0";
477 + gpios = <&gpio 47 0>;
478 + };
479 +};
480 +
481 +&mmc {
482 + status = "okay";
483 + bus-width = <4>;
484 +};
485 +
486 +&fb {
487 + status = "okay";
488 +};
489 +
490 +&audio {
491 + status = "okay";
492 +};
493 +
494 +/ {
495 + __overrides__ {
496 + act_led_gpio = <&act_led>,"gpios:4";
497 + act_led_activelow = <&act_led>,"gpios:8";
498 + act_led_trigger = <&act_led>,"linux,default-trigger";
499 + };
500 +};
501 --- /dev/null
502 +++ b/arch/arm/boot/dts/bcm2708.dtsi
503 @@ -0,0 +1,19 @@
504 +/include/ "bcm2708_common.dtsi"
505 +
506 +/ {
507 + compatible = "brcm,bcm2708";
508 + model = "BCM2708";
509 +
510 + chosen {
511 + /* No padding required - the boot loader can do that. */
512 + bootargs = "";
513 + };
514 +
515 + soc {
516 + ranges = <0x7e000000 0x20000000 0x01000000>;
517 +
518 + arm-pmu {
519 + compatible = "arm,arm1176-pmu";
520 + };
521 + };
522 +};
523 --- /dev/null
524 +++ b/arch/arm/boot/dts/bcm2708_common.dtsi
525 @@ -0,0 +1,230 @@
526 +/include/ "skeleton.dtsi"
527 +
528 +/ {
529 + interrupt-parent = <&intc>;
530 +
531 + /* Onboard audio */
532 + audio: audio {
533 + compatible = "brcm,bcm2835-audio";
534 + brcm,pwm-channels = <8>;
535 + status = "disabled";
536 + };
537 +
538 + soc: soc {
539 + compatible = "simple-bus";
540 + #address-cells = <1>;
541 + #size-cells = <1>;
542 +
543 + dma: dma@7e007000 {
544 + compatible = "brcm,bcm2835-dma";
545 + reg = <0x7e007000 0xf00>;
546 + interrupts = <1 16>,
547 + <1 17>,
548 + <1 18>,
549 + <1 19>,
550 + <1 20>,
551 + <1 21>,
552 + <1 22>,
553 + <1 23>,
554 + <1 24>,
555 + <1 25>,
556 + <1 26>,
557 + <1 27>,
558 + <1 28>;
559 +
560 + #dma-cells = <1>;
561 + brcm,dma-channel-mask = <0x7f35>;
562 + };
563 +
564 + intc: interrupt-controller {
565 + compatible = "brcm,bcm2708-armctrl-ic";
566 + reg = <0x7e00b200 0x200>;
567 + interrupt-controller;
568 + #interrupt-cells = <2>;
569 + };
570 +
571 + watchdog: watchdog@7e100000 {
572 + compatible = "brcm,bcm2835-pm-wdt";
573 + reg = <0x7e100000 0x28>;
574 + status = "disabled";
575 + };
576 +
577 + random: rng@7e104000 {
578 + compatible = "brcm,bcm2835-rng";
579 + reg = <0x7e104000 0x10>;
580 + status = "disabled";
581 + };
582 +
583 + mailbox: mailbox@7e00b800 {
584 + compatible = "brcm,bcm2708-vcio";
585 + reg = <0x7e00b880 0x40>;
586 + interrupts = <0 1>;
587 + };
588 +
589 + gpio: gpio {
590 + compatible = "brcm,bcm2835-gpio";
591 + reg = <0x7e200000 0xb4>;
592 + interrupts = <2 17>, <2 18>;
593 +
594 + gpio-controller;
595 + #gpio-cells = <2>;
596 +
597 + interrupt-controller;
598 + #interrupt-cells = <2>;
599 + };
600 +
601 + mmc: mmc@7e300000 {
602 + compatible = "brcm,bcm2835-mmc";
603 + reg = <0x7e300000 0x100>;
604 + interrupts = <2 30>;
605 + clocks = <&clk_mmc>;
606 + dmas = <&dma 11>,
607 + <&dma 11>;
608 + dma-names = "tx", "rx";
609 + status = "disabled";
610 + };
611 +
612 + uart0: uart@7e201000 {
613 + compatible = "arm,pl011", "arm,primecell";
614 + reg = <0x7e201000 0x1000>;
615 + interrupts = <2 25>;
616 + clocks = <&clk_uart0 &clk_apb_p>;
617 + clock-names = "uartclk","apb_pclk";
618 + arm,primecell-periphid = <0x00241011>; // For an explanation, see
619 + // https://github.com/raspberrypi/linux/commit/13731d862cf5219216533a3b0de052cee4cc5038
620 + status = "disabled";
621 + };
622 +
623 + i2s: i2s@7e203000 {
624 + compatible = "brcm,bcm2708-i2s";
625 + reg = <0x7e203000 0x20>,
626 + <0x7e101098 0x02>;
627 +
628 + //dmas = <&dma 2>,
629 + // <&dma 3>;
630 + dma-names = "tx", "rx";
631 + status = "disabled";
632 + };
633 +
634 + spi0: spi@7e204000 {
635 + compatible = "brcm,bcm2835-spi";
636 + reg = <0x7e204000 0x1000>;
637 + interrupts = <2 22>;
638 + clocks = <&clk_spi>;
639 + #address-cells = <1>;
640 + #size-cells = <0>;
641 + status = "disabled";
642 + /* the dma channels */
643 + dmas = <&dma 6>, <&dma 7>;
644 + dma-names = "tx", "rx";
645 + /* the chipselects used - <0> means native GPIO
646 + * add more gpios if necessary as <&gpio 6 1>
647 + * (but do not forget to make them output!)
648 + */
649 + cs-gpios = <0>, <0>;
650 + };
651 +
652 + i2c0: i2c@7e205000 {
653 + compatible = "brcm,bcm2708-i2c";
654 + reg = <0x7e205000 0x1000>;
655 + interrupts = <2 21>;
656 + clocks = <&clk_i2c>;
657 + #address-cells = <1>;
658 + #size-cells = <0>;
659 + status = "disabled";
660 + };
661 +
662 + uart1: uart@7e215040 {
663 + compatible = "brcm,bcm2835-aux-uart", "ns16550";
664 + reg = <0x7e215040 0x40>;
665 + interrupts = <1 29>;
666 + clock-frequency = <500000000>;
667 + reg-shift = <2>;
668 + no-loopback-test;
669 + status = "disabled";
670 + };
671 +
672 + i2c1: i2c@7e804000 {
673 + compatible = "brcm,bcm2708-i2c";
674 + reg = <0x7e804000 0x1000>;
675 + interrupts = <2 21>;
676 + clocks = <&clk_i2c>;
677 + #address-cells = <1>;
678 + #size-cells = <0>;
679 + status = "disabled";
680 + };
681 +
682 + usb: usb@7e980000 {
683 + compatible = "brcm,bcm2708-usb";
684 + reg = <0x7e980000 0x10000>,
685 + <0x7e006000 0x1000>;
686 + interrupts = <2 0>,
687 + <1 9>;
688 + };
689 +
690 + leds: leds {
691 + compatible = "gpio-leds";
692 + };
693 +
694 + fb: fb {
695 + compatible = "brcm,bcm2708-fb";
696 + status = "disabled";
697 + };
698 +
699 + vchiq: vchiq {
700 + compatible = "brcm,bcm2835-vchiq";
701 + reg = <0x7e00b840 0xf>;
702 + interrupts = <0 2>;
703 + };
704 +
705 + thermal: thermal {
706 + compatible = "brcm,bcm2835-thermal";
707 + };
708 + };
709 +
710 + clocks: clocks {
711 + compatible = "simple-bus";
712 + #address-cells = <1>;
713 + #size-cells = <0>;
714 +
715 + clk_mmc: clock@0 {
716 + compatible = "fixed-clock";
717 + reg = <0>;
718 + #clock-cells = <0>;
719 + clock-output-names = "mmc";
720 + clock-frequency = <250000000>;
721 + };
722 +
723 + clk_i2c: clock@1 {
724 + compatible = "fixed-clock";
725 + reg = <1>;
726 + #clock-cells = <0>;
727 + clock-output-names = "i2c";
728 + clock-frequency = <250000000>;
729 + };
730 +
731 + clk_spi: clock@2 {
732 + compatible = "fixed-clock";
733 + reg = <2>;
734 + #clock-cells = <0>;
735 + clock-output-names = "spi";
736 + clock-frequency = <250000000>;
737 + };
738 +
739 + clk_uart0: clock@3 {
740 + compatible = "fixed-clock";
741 + reg = <3>;
742 + #clock-cells = <0>;
743 + clock-output-names = "uart0_pclk";
744 + clock-frequency = <3000000>;
745 + };
746 +
747 + clk_apb_p: clock@4 {
748 + compatible = "fixed-clock";
749 + reg = <4>;
750 + #clock-cells = <0>;
751 + clock-output-names = "apb_pclk";
752 + clock-frequency = <126000000>;
753 + };
754 + };
755 +};
756 --- /dev/null
757 +++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
758 @@ -0,0 +1,140 @@
759 +/dts-v1/;
760 +
761 +/include/ "bcm2709.dtsi"
762 +
763 +/ {
764 + compatible = "brcm,bcm2709";
765 + model = "Raspberry Pi 2 Model B";
766 +
767 + aliases {
768 + soc = &soc;
769 + spi0 = &spi0;
770 + i2c0 = &i2c0;
771 + i2c1 = &i2c1;
772 + i2s = &i2s;
773 + gpio = &gpio;
774 + intc = &intc;
775 + leds = &leds;
776 + audio = &audio;
777 + sound = &sound;
778 + uart0 = &uart0;
779 + uart1 = &uart1;
780 + clocks = &clocks;
781 + };
782 +
783 + sound: sound {
784 + };
785 +};
786 +
787 +&gpio {
788 + spi0_pins: spi0_pins {
789 + brcm,pins = <7 8 9 10 11>;
790 + brcm,function = <4>; /* alt0 */
791 + };
792 +
793 + i2c0_pins: i2c0 {
794 + brcm,pins = <0 1>;
795 + brcm,function = <4>;
796 + };
797 +
798 + i2c1_pins: i2c1 {
799 + brcm,pins = <2 3>;
800 + brcm,function = <4>;
801 + };
802 +
803 + i2s_pins: i2s {
804 + brcm,pins = <18 19 20 21>;
805 + brcm,function = <4>; /* alt0 */
806 + };
807 +};
808 +
809 +&mmc {
810 + status = "okay";
811 + bus-width = <4>;
812 +};
813 +
814 +&fb {
815 + status = "okay";
816 +};
817 +
818 +&uart0 {
819 + status = "okay";
820 +};
821 +
822 +&spi0 {
823 + pinctrl-names = "default";
824 + pinctrl-0 = <&spi0_pins>;
825 +
826 + spidev@0{
827 + compatible = "spidev";
828 + reg = <0>; /* CE0 */
829 + #address-cells = <1>;
830 + #size-cells = <0>;
831 + spi-max-frequency = <500000>;
832 + };
833 +
834 + spidev@1{
835 + compatible = "spidev";
836 + reg = <1>; /* CE1 */
837 + #address-cells = <1>;
838 + #size-cells = <0>;
839 + spi-max-frequency = <500000>;
840 + };
841 +};
842 +
843 +&i2c0 {
844 + pinctrl-names = "default";
845 + pinctrl-0 = <&i2c0_pins>;
846 + clock-frequency = <100000>;
847 +};
848 +
849 +&i2c1 {
850 + pinctrl-names = "default";
851 + pinctrl-0 = <&i2c1_pins>;
852 + clock-frequency = <100000>;
853 +};
854 +
855 +&i2s {
856 + #sound-dai-cells = <0>;
857 + pinctrl-names = "default";
858 + pinctrl-0 = <&i2s_pins>;
859 +};
860 +
861 +&leds {
862 + act_led: act {
863 + label = "led0";
864 + linux,default-trigger = "mmc0";
865 + gpios = <&gpio 47 0>;
866 + };
867 +
868 + pwr_led: pwr {
869 + label = "led1";
870 + linux,default-trigger = "input";
871 + gpios = <&gpio 35 0>;
872 + };
873 +};
874 +
875 +/ {
876 + __overrides__ {
877 + uart0 = <&uart0>,"status";
878 + uart0_clkrate = <&clk_uart0>,"clock-frequency:0";
879 + i2s = <&i2s>,"status";
880 + spi = <&spi0>,"status";
881 + i2c0 = <&i2c0>,"status";
882 + i2c1 = <&i2c1>,"status";
883 + i2c0_baudrate = <&i2c0>,"clock-frequency:0";
884 + i2c1_baudrate = <&i2c1>,"clock-frequency:0";
885 +
886 + act_led_gpio = <&act_led>,"gpios:4";
887 + act_led_activelow = <&act_led>,"gpios:8";
888 + act_led_trigger = <&act_led>,"linux,default-trigger";
889 +
890 + pwr_led_gpio = <&pwr_led>,"gpios:4";
891 + pwr_led_activelow = <&pwr_led>,"gpios:8";
892 + pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
893 +
894 + audio = <&audio>,"status";
895 + watchdog = <&watchdog>,"status";
896 + random = <&random>,"status";
897 + };
898 +};
899 --- /dev/null
900 +++ b/arch/arm/boot/dts/bcm2709.dtsi
901 @@ -0,0 +1,70 @@
902 +/include/ "bcm2708_common.dtsi"
903 +
904 +/ {
905 + compatible = "brcm,bcm2709";
906 + model = "BCM2709";
907 +
908 + chosen {
909 + /* No padding required - the boot loader can do that. */
910 + bootargs = "";
911 + };
912 +
913 + soc {
914 + ranges = <0x7e000000 0x3f000000 0x01000000>;
915 +
916 + arm-pmu {
917 + compatible = "arm,cortex-a7-pmu";
918 + interrupts = <3 9>;
919 + };
920 + };
921 +
922 + timer {
923 + compatible = "arm,armv7-timer";
924 + clock-frequency = <19200000>;
925 + interrupts = <3 0>, // PHYS_SECURE_PPI
926 + <3 1>, // PHYS_NONSECURE_PPI
927 + <3 3>, // VIRT_PPI
928 + <3 2>; // HYP_PPI
929 + always-on;
930 + };
931 +
932 + cpus: cpus {
933 + #address-cells = <1>;
934 + #size-cells = <0>;
935 +
936 + v7_cpu0: cpu@0 {
937 + device_type = "cpu";
938 + compatible = "arm,cortex-a7";
939 + reg = <0xf00>;
940 + clock-frequency = <800000000>;
941 + };
942 +
943 + v7_cpu1: cpu@1 {
944 + device_type = "cpu";
945 + compatible = "arm,cortex-a7";
946 + reg = <0xf01>;
947 + clock-frequency = <800000000>;
948 + };
949 +
950 + v7_cpu2: cpu@2 {
951 + device_type = "cpu";
952 + compatible = "arm,cortex-a7";
953 + reg = <0xf02>;
954 + clock-frequency = <800000000>;
955 + };
956 +
957 + v7_cpu3: cpu@3 {
958 + device_type = "cpu";
959 + compatible = "arm,cortex-a7";
960 + reg = <0xf03>;
961 + clock-frequency = <800000000>;
962 + };
963 + };
964 +
965 + __overrides__ {
966 + arm_freq = <&v7_cpu0>, "clock-frequency:0",
967 + <&v7_cpu1>, "clock-frequency:0",
968 + <&v7_cpu2>, "clock-frequency:0",
969 + <&v7_cpu3>, "clock-frequency:0";
970 + };
971 +};
972 --- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
973 +++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
974 @@ -4,27 +4,40 @@
975 / {
976 compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
977 model = "Raspberry Pi Model B+";
978 -
979 - leds {
980 - act {
981 - gpios = <&gpio 47 0>;
982 - };
983 -
984 - pwr {
985 - label = "PWR";
986 - gpios = <&gpio 35 0>;
987 - default-state = "keep";
988 - linux,default-trigger = "default-on";
989 - };
990 - };
991 };
992
993 &gpio {
994 - pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>;
995 -
996 - /* I2S interface */
997 - i2s_alt0: i2s_alt0 {
998 + i2s_pins: i2s {
999 brcm,pins = <18 19 20 21>;
1000 brcm,function = <4>; /* alt0 */
1001 };
1002 };
1003 +
1004 +&i2s {
1005 + #sound-dai-cells = <0>;
1006 + pinctrl-names = "default";
1007 + pinctrl-0 = <&i2s_pins>;
1008 +};
1009 +
1010 +&act_led {
1011 + gpios = <&gpio 47 0>;
1012 +};
1013 +
1014 +&leds {
1015 + pwr_led: pwr {
1016 + label = "led1";
1017 + linux,default-trigger = "input";
1018 + gpios = <&gpio 35 0>;
1019 + };
1020 +};
1021 +
1022 +/ {
1023 + __overrides__ {
1024 + act_led_gpio = <&act_led>,"gpios:4";
1025 + act_led_activelow = <&act_led>,"gpios:8";
1026 +
1027 + pwr_led_gpio = <&pwr_led>,"gpios:4";
1028 + pwr_led_activelow = <&pwr_led>,"gpios:8";
1029 + pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
1030 + };
1031 +};
1032 --- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
1033 +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
1034 @@ -5,19 +5,28 @@
1035 compatible = "raspberrypi,model-b", "brcm,bcm2835";
1036 model = "Raspberry Pi Model B";
1037
1038 - leds {
1039 - act {
1040 - gpios = <&gpio 16 1>;
1041 - };
1042 - };
1043 };
1044
1045 &gpio {
1046 - pinctrl-0 = <&gpioout &alt0 &i2s_alt2 &alt3>;
1047 -
1048 - /* I2S interface */
1049 - i2s_alt2: i2s_alt2 {
1050 + i2s_pins: i2s {
1051 brcm,pins = <28 29 30 31>;
1052 - brcm,function = <6>; /* alt2 */
1053 + brcm,function = <4>; /* alt0 */
1054 + };
1055 +};
1056 +
1057 +&i2s {
1058 + #sound-dai-cells = <0>;
1059 + pinctrl-names = "default";
1060 + pinctrl-0 = <&i2s_pins>;
1061 +};
1062 +
1063 +&act_led {
1064 + gpios = <&gpio 16 1>;
1065 +};
1066 +
1067 +/ {
1068 + __overrides__ {
1069 + act_led_gpio = <&act_led>,"gpios:4";
1070 + act_led_activelow = <&act_led>,"gpios:8";
1071 };
1072 };
1073 --- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
1074 +++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
1075 @@ -1,51 +1,112 @@
1076 /include/ "bcm2835.dtsi"
1077
1078 / {
1079 + /* This is left here in case u-boot needs it */
1080 memory {
1081 reg = <0 0x10000000>;
1082 };
1083
1084 - leds {
1085 + aliases {
1086 + soc = &soc;
1087 + spi0 = &spi0;
1088 + i2c0 = &i2c0;
1089 + i2c1 = &i2c1;
1090 + i2s = &i2s;
1091 + gpio = &gpio;
1092 + intc = &intc;
1093 + leds = &leds;
1094 + sound = &sound;
1095 + };
1096 +
1097 + leds: leds {
1098 compatible = "gpio-leds";
1099
1100 - act {
1101 - label = "ACT";
1102 - default-state = "keep";
1103 - linux,default-trigger = "heartbeat";
1104 + act_led: act {
1105 + label = "led0";
1106 + linux,default-trigger = "mmc0";
1107 };
1108 };
1109 +
1110 + /* Onboard audio */
1111 + audio: audio {
1112 + compatible = "brcm,bcm2835-audio";
1113 + brcm,pwm-channels = <8>;
1114 + status = "disabled";
1115 + };
1116 +
1117 + /* External sound card */
1118 + sound: sound {
1119 + };
1120 };
1121
1122 &gpio {
1123 - pinctrl-names = "default";
1124 + spi0_pins: spi0_pins {
1125 + brcm,pins = <7 8 9 10 11>;
1126 + brcm,function = <4>; /* alt0 */
1127 + };
1128
1129 - gpioout: gpioout {
1130 - brcm,pins = <6>;
1131 - brcm,function = <1>; /* GPIO out */
1132 + i2c0_pins: i2c0 {
1133 + brcm,pins = <0 1>;
1134 + brcm,function = <4>;
1135 };
1136
1137 - alt0: alt0 {
1138 - brcm,pins = <0 1 2 3 4 5 7 8 9 10 11 14 15 40 45>;
1139 - brcm,function = <4>; /* alt0 */
1140 + i2c1_pins: i2c1 {
1141 + brcm,pins = <2 3>;
1142 + brcm,function = <4>;
1143 + };
1144 +};
1145 +
1146 +&spi0 {
1147 + pinctrl-names = "default";
1148 + pinctrl-0 = <&spi0_pins>;
1149 +
1150 + spidev@0{
1151 + compatible = "spidev";
1152 + reg = <0>; /* CE0 */
1153 + #address-cells = <1>;
1154 + #size-cells = <0>;
1155 + spi-max-frequency = <500000>;
1156 };
1157
1158 - alt3: alt3 {
1159 - brcm,pins = <48 49 50 51 52 53>;
1160 - brcm,function = <7>; /* alt3 */
1161 + spidev@1{
1162 + compatible = "spidev";
1163 + reg = <1>; /* CE1 */
1164 + #address-cells = <1>;
1165 + #size-cells = <0>;
1166 + spi-max-frequency = <500000>;
1167 };
1168 };
1169
1170 &i2c0 {
1171 - status = "okay";
1172 + pinctrl-names = "default";
1173 + pinctrl-0 = <&i2c0_pins>;
1174 clock-frequency = <100000>;
1175 };
1176
1177 &i2c1 {
1178 - status = "okay";
1179 + pinctrl-names = "default";
1180 + pinctrl-0 = <&i2c1_pins>;
1181 clock-frequency = <100000>;
1182 };
1183
1184 -&sdhci {
1185 +&mmc {
1186 status = "okay";
1187 bus-width = <4>;
1188 };
1189 +
1190 +&fb {
1191 + status = "okay";
1192 +};
1193 +
1194 +/ {
1195 + __overrides__ {
1196 + i2s = <&i2s>,"status";
1197 + spi = <&spi0>,"status";
1198 + i2c0 = <&i2c0>,"status";
1199 + i2c1 = <&i2c1>,"status";
1200 + i2c0_baudrate = <&i2c0>,"clock-frequency:0";
1201 + i2c1_baudrate = <&i2c1>,"clock-frequency:0";
1202 + act_led_trigger = <&act_led>,"linux,default-trigger";
1203 + audio = <&audio>,"status";
1204 + };
1205 +};
1206 --- a/arch/arm/boot/dts/bcm2835.dtsi
1207 +++ b/arch/arm/boot/dts/bcm2835.dtsi
1208 @@ -6,14 +6,15 @@
1209 interrupt-parent = <&intc>;
1210
1211 chosen {
1212 - bootargs = "earlyprintk console=ttyAMA0";
1213 + bootargs = "";
1214 };
1215
1216 - soc {
1217 + soc: soc {
1218 compatible = "simple-bus";
1219 #address-cells = <1>;
1220 #size-cells = <1>;
1221 ranges = <0x7e000000 0x20000000 0x02000000>;
1222 + dma-ranges = <0x40000000 0x00000000 0x20000000>;
1223
1224 timer@7e003000 {
1225 compatible = "brcm,bcm2835-system-timer";
1226 @@ -50,16 +51,22 @@
1227 #interrupt-cells = <2>;
1228 };
1229
1230 - watchdog@7e100000 {
1231 + watchdog: watchdog@7e100000 {
1232 compatible = "brcm,bcm2835-pm-wdt";
1233 reg = <0x7e100000 0x28>;
1234 };
1235
1236 - rng@7e104000 {
1237 + random: rng@7e104000 {
1238 compatible = "brcm,bcm2835-rng";
1239 reg = <0x7e104000 0x10>;
1240 };
1241
1242 + mailbox: mailbox@7e00b800 {
1243 + compatible = "brcm,bcm2708-vcio";
1244 + reg = <0x7e00b880 0x40>;
1245 + interrupts = <0 1>;
1246 + };
1247 +
1248 gpio: gpio@7e200000 {
1249 compatible = "brcm,bcm2835-gpio";
1250 reg = <0x7e200000 0xb4>;
1251 @@ -83,7 +90,7 @@
1252 #interrupt-cells = <2>;
1253 };
1254
1255 - uart@7e201000 {
1256 + uart0: uart@7e201000 {
1257 compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
1258 reg = <0x7e201000 0x1000>;
1259 interrupts = <2 25>;
1260 @@ -102,7 +109,7 @@
1261 status = "disabled";
1262 };
1263
1264 - spi: spi@7e204000 {
1265 + spi0: spi@7e204000 {
1266 compatible = "brcm,bcm2835-spi";
1267 reg = <0x7e204000 0x1000>;
1268 interrupts = <2 22>;
1269 @@ -122,11 +129,14 @@
1270 status = "disabled";
1271 };
1272
1273 - sdhci: sdhci@7e300000 {
1274 - compatible = "brcm,bcm2835-sdhci";
1275 + mmc: mmc@7e300000 {
1276 + compatible = "brcm,bcm2835-mmc";
1277 reg = <0x7e300000 0x100>;
1278 interrupts = <2 30>;
1279 clocks = <&clk_mmc>;
1280 + dmas = <&dma 11>,
1281 + <&dma 11>;
1282 + dma-names = "tx", "rx";
1283 status = "disabled";
1284 };
1285
1286 @@ -140,7 +150,7 @@
1287 status = "disabled";
1288 };
1289
1290 - usb@7e980000 {
1291 + usb: usb@7e980000 {
1292 compatible = "brcm,bcm2835-usb";
1293 reg = <0x7e980000 0x10000>;
1294 interrupts = <1 9>;
1295 @@ -149,6 +159,21 @@
1296 arm-pmu {
1297 compatible = "arm,arm1176-pmu";
1298 };
1299 +
1300 + fb: fb {
1301 + compatible = "brcm,bcm2708-fb";
1302 + status = "disabled";
1303 + };
1304 +
1305 + vchiq: vchiq {
1306 + compatible = "brcm,bcm2835-vchiq";
1307 + reg = <0x7e00b840 0xf>;
1308 + interrupts = <0 2>;
1309 + };
1310 +
1311 + thermal: thermal {
1312 + compatible = "brcm,bcm2835-thermal";
1313 + };
1314 };
1315
1316 clocks {
1317 @@ -161,7 +186,7 @@
1318 reg = <0>;
1319 #clock-cells = <0>;
1320 clock-output-names = "mmc";
1321 - clock-frequency = <100000000>;
1322 + clock-frequency = <250000000>;
1323 };
1324
1325 clk_i2c: clock@1 {
1326 --- /dev/null
1327 +++ b/arch/arm/boot/dts/overlays/Makefile
1328 @@ -0,0 +1,57 @@
1329 +ifeq ($(CONFIG_OF),y)
1330 +
1331 +# Overlays for the Raspberry Pi platform
1332 +
1333 +ifeq ($(CONFIG_BCM2708_DT),y)
1334 + RPI_DT_OVERLAYS=y
1335 +endif
1336 +ifeq ($(CONFIG_BCM2709_DT),y)
1337 + RPI_DT_OVERLAYS=y
1338 +endif
1339 +ifeq ($(CONFIG_ARCH_BCM2835),y)
1340 + RPI_DT_OVERLAYS=y
1341 +endif
1342 +
1343 +dtb-$(RPI_DT_OVERLAYS) += ads7846-overlay.dtb
1344 +dtb-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor-overlay.dtb
1345 +dtb-$(RPI_DT_OVERLAYS) += dht11-overlay.dtb
1346 +dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb
1347 +dtb-$(RPI_DT_OVERLAYS) += hifiberry-amp-overlay.dtb
1348 +dtb-$(RPI_DT_OVERLAYS) += hifiberry-dac-overlay.dtb
1349 +dtb-$(RPI_DT_OVERLAYS) += hifiberry-dacplus-overlay.dtb
1350 +dtb-$(RPI_DT_OVERLAYS) += hifiberry-digi-overlay.dtb
1351 +dtb-$(RPI_DT_OVERLAYS) += hy28a-overlay.dtb
1352 +dtb-$(RPI_DT_OVERLAYS) += hy28b-overlay.dtb
1353 +dtb-$(RPI_DT_OVERLAYS) += i2c-rtc-overlay.dtb
1354 +dtb-$(RPI_DT_OVERLAYS) += i2s-mmap-overlay.dtb
1355 +dtb-$(RPI_DT_OVERLAYS) += iqaudio-dac-overlay.dtb
1356 +dtb-$(RPI_DT_OVERLAYS) += iqaudio-dacplus-overlay.dtb
1357 +dtb-$(RPI_DT_OVERLAYS) += lirc-rpi-overlay.dtb
1358 +dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-overlay.dtb
1359 +dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb
1360 +dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb
1361 +dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
1362 +dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb
1363 +dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb
1364 +dtb-$(RPI_DT_OVERLAYS) += rpi-dac-overlay.dtb
1365 +dtb-$(RPI_DT_OVERLAYS) += rpi-display-overlay.dtb
1366 +dtb-$(RPI_DT_OVERLAYS) += rpi-proto-overlay.dtb
1367 +dtb-$(RPI_DT_OVERLAYS) += sdhost-overlay.dtb
1368 +dtb-$(RPI_DT_OVERLAYS) += spi-bcm2708-overlay.dtb
1369 +dtb-$(RPI_DT_OVERLAYS) += spi-bcm2835-overlay.dtb
1370 +dtb-$(RPI_DT_OVERLAYS) += tinylcd35-overlay.dtb
1371 +dtb-$(RPI_DT_OVERLAYS) += w1-gpio-overlay.dtb
1372 +dtb-$(RPI_DT_OVERLAYS) += w1-gpio-pullup-overlay.dtb
1373 +
1374 +targets += dtbs dtbs_install
1375 +targets += $(dtb-y)
1376 +
1377 +endif
1378 +
1379 +always := $(dtb-y)
1380 +clean-files := *.dtb
1381 +
1382 +# Enable fixups to support overlays on BCM2708 platforms
1383 +ifeq ($(RPI_DT_OVERLAYS),y)
1384 + DTC_FLAGS ?= -@
1385 +endif
1386 --- /dev/null
1387 +++ b/arch/arm/boot/dts/overlays/README
1388 @@ -0,0 +1,493 @@
1389 +Introduction
1390 +============
1391 +
1392 +This directory contains Device Tree overlays. Device Tree makes it possible
1393 +to support many hardware configurations with a single kernel and without the
1394 +need to explicitly load or blacklist kernel modules. Note that this isn't a
1395 +"pure" Device Tree configuration (c.f. MACH_BCM2835) - some on-board devices
1396 +are still configured by the board support code, but the intention is to
1397 +eventually reach that goal.
1398 +
1399 +On Raspberry Pi, Device Tree usage is controlled from /boot/config.txt. By
1400 +default, the Raspberry Pi kernel boots with device tree enabled. You can
1401 +completely disable DT usage (for now) by adding:
1402 +
1403 + device_tree=
1404 +
1405 +to your config.txt, which should cause your Pi to revert to the old way of
1406 +doing things after a reboot.
1407 +
1408 +In /boot you will find a .dtb for each base platform. This describes the
1409 +hardware that is part of the Raspberry Pi board. The loader (start.elf and its
1410 +siblings) selects the .dtb file appropriate for the platform by name, and reads
1411 +it into memory. At this point, all of the optional interfaces (i2c, i2s, spi)
1412 +are disabled, but they can be enabled using Device Tree parameters:
1413 +
1414 + dtparam=i2c=on,i2s=on,spi=on
1415 +
1416 +However, this shouldn't be necessary in many use cases because loading an
1417 +overlay that requires one of those interfaces will cause it to be enabled
1418 +automatically, and it is advisable to only enable interfaces if they are
1419 +needed.
1420 +
1421 +Configuring additional, optional hardware is done using Device Tree overlays
1422 +(see below).
1423 +
1424 +raspi-config
1425 +============
1426 +
1427 +The Advanced Options section of the raspi-config utility can enable and disable
1428 +Device Tree use, as well as toggling the I2C and SPI interfaces. Note that it
1429 +is possible to both enable an interface and blacklist the driver, if for some
1430 +reason you should want to defer the loading.
1431 +
1432 +Modules
1433 +=======
1434 +
1435 +As well as describing the hardware, Device Tree also gives enough information
1436 +to allow suitable driver modules to be located and loaded, with the corollary
1437 +that unneeded modules are not loaded. As a result it should be possible to
1438 +remove lines from /etc/modules, and /etc/modprobe.d/raspi-blacklist.conf can
1439 +have its contents deleted (or commented out).
1440 +
1441 +Using Overlays
1442 +==============
1443 +
1444 +Overlays are loaded using the "dtoverlay" directive. As an example, consider the
1445 +popular lirc-rpi module, the Linux Infrared Remote Control driver. In the
1446 +pre-DT world this would be loaded from /etc/modules, with an explicit
1447 +"modprobe lirc-rpi" command, or programmatically by lircd. With DT enabled,
1448 +this becomes a line in config.txt:
1449 +
1450 + dtoverlay=lirc-rpi
1451 +
1452 +This causes the file /boot/overlays/lirc-rpi-overlay.dtb to be loaded. By
1453 +default it will use GPIOs 17 (out) and 18 (in), but this can be modified using
1454 +DT parameters:
1455 +
1456 + dtoverlay=lirc-rpi,gpio_out_pin=17,gpio_in_pin=13
1457 +
1458 +Parameters always have default values, although in some cases (e.g. "w1-gpio")
1459 +it is necessary to provided multiple overlays in order to get the desired
1460 +behaviour. See the list of overlays below for a description of the parameters and their defaults.
1461 +
1462 +The Overlay and Parameter Reference
1463 +===================================
1464 +
1465 +Name: <The base DTB>
1466 +Info: Configures the base Raspberry Pi hardware
1467 +Load: <loaded automatically>
1468 +Params:
1469 + audio Set to "on" to disable the onboard ALSA audio
1470 + interface (default "off")
1471 +
1472 + i2c_arm Set to "on" to enable the ARM's i2c interface
1473 + (default "off")
1474 +
1475 + i2c_vc Set to "on" to enable the i2c interface
1476 + usually reserved for the VideoCore processor
1477 + (default "off")
1478 +
1479 + i2c An alias for i2c_arm
1480 +
1481 + i2c_arm_baudrate Set the baudrate of the ARM's i2c interface
1482 + (default "100000")
1483 +
1484 + i2c_vc_baudrate Set the baudrate of the VideoCore i2c interface
1485 + (default "100000")
1486 +
1487 + i2c_baudrate An alias for i2c_arm_baudrate
1488 +
1489 + i2s Set to "on" to enable the i2s interface
1490 + (default "off")
1491 +
1492 + spi Set to "on" to enable the spi interfaces
1493 + (default "off")
1494 +
1495 + random Set to "on" to enable the hardware random
1496 + number generator (default "off")
1497 +
1498 + uart0 Set to "off" to disable uart0 (default "on")
1499 +
1500 + watchdog Set to "on" to enable the hardware watchdog
1501 + (default "off")
1502 +
1503 + act_led_trigger Choose which activity the LED tracks.
1504 + Use "heartbeat" for a nice load indicator.
1505 + (default "mmc")
1506 +
1507 + act_led_activelow Set to "on" to invert the sense of the LED
1508 + (default "off")
1509 +
1510 + act_led_gpio Set which GPIO to use for the activity LED
1511 + (in case you want to connect it to an external
1512 + device)
1513 + (default "16" on a non-Plus board, "47" on a
1514 + Plus or Pi 2)
1515 +
1516 + pwr_led_trigger
1517 + pwr_led_activelow
1518 + pwr_led_gpio
1519 + As for act_led_*, but using the PWR LED.
1520 + Not available on Model A/B boards.
1521 +
1522 + N.B. It is recommended to only enable those interfaces that are needed.
1523 + Leaving all interfaces enabled can lead to unwanted behaviour (i2c_vc
1524 + interfering with Pi Camera, I2S and SPI hogging GPIO pins, etc.)
1525 + Note also that i2c, i2c_arm and i2c_vc are aliases for the physical
1526 + interfaces i2c0 and i2c1. Use of the numeric variants is still possible
1527 + but deprecated because the ARM/VC assignments differ between board
1528 + revisions. The same board-specific mapping applies to i2c_baudrate,
1529 + and the other i2c baudrate parameters.
1530 +
1531 +
1532 +Name: ads7846
1533 +Info: ADS7846 Touch controller
1534 +Load: dtoverlay=ads7846,<param>=<val>
1535 +Params: cs SPI bus Chip Select (default 1)
1536 + speed SPI bus speed (default 2Mhz, max 3.25MHz)
1537 + penirq GPIO used for PENIRQ. REQUIRED
1538 + penirq_pull Set GPIO pull (default 0=none, 2=pullup)
1539 + swapxy Swap x and y axis
1540 + xmin Minimum value on the X axis (default 0)
1541 + ymin Minimum value on the Y axis (default 0)
1542 + xmax Maximum value on the X axis (default 4095)
1543 + ymax Maximum value on the Y axis (default 4095)
1544 + pmin Minimum reported pressure value (default 0)
1545 + pmax Maximum reported pressure value (default 65535)
1546 + xohms Touchpanel sensitivity (X-plate resistance)
1547 + (default 400)
1548 +
1549 + penirq is required and usually xohms (60-100) has to be set as well.
1550 + Apart from that, pmax (255) and swapxy are also common.
1551 + The rest of the calibration can be done with xinput-calibrator.
1552 + See: github.com/notro/fbtft/wiki/FBTFT-on-Raspian
1553 + Device Tree binding document:
1554 + www.kernel.org/doc/Documentation/devicetree/bindings/input/ads7846.txt
1555 +
1556 +
1557 +Name: bmp085_i2c-sensor
1558 +Info: Configures the BMP085/BMP180 digital barometric pressure and temperature
1559 + sensors from Bosch Sensortec
1560 +Load: dtoverlay=bmp085_i2c-sensor
1561 +Params: <None>
1562 +
1563 +
1564 +[ The ds1307-rtc overlay has been deleted. See i2c-rtc. ]
1565 +
1566 +
1567 +Name: enc28j60
1568 +Info: Overlay for the Microchip ENC28J60 Ethernet Controller (SPI)
1569 +Load: dtoverlay=enc28j60,<param>=<val>
1570 +Params: int_pin GPIO used for INT (default 25)
1571 +
1572 + speed SPI bus speed (default 12000000)
1573 +
1574 +
1575 +Name: hifiberry-amp
1576 +Info: Configures the HifiBerry Amp and Amp+ audio cards
1577 +Load: dtoverlay=hifiberry-amp
1578 +Params: <None>
1579 +
1580 +
1581 +Name: hifiberry-dac
1582 +Info: Configures the HifiBerry DAC audio card
1583 +Load: dtoverlay=hifiberry-dac
1584 +Params: <None>
1585 +
1586 +
1587 +Name: hifiberry-dacplus
1588 +Info: Configures the HifiBerry DAC+ audio card
1589 +Load: dtoverlay=hifiberry-dacplus
1590 +Params: <None>
1591 +
1592 +
1593 +Name: hifiberry-digi
1594 +Info: Configures the HifiBerry Digi audio card
1595 +Load: dtoverlay=hifiberry-digi
1596 +Params: <None>
1597 +
1598 +
1599 +Name: hy28a
1600 +Info: HY28A - 2.8" TFT LCD Display Module by HAOYU Electronics
1601 + Default values match Texy's display shield
1602 +Load: dtoverlay=hy28a,<param>=<val>
1603 +Params: speed Display SPI bus speed
1604 +
1605 + rotate Display rotation {0,90,180,270}
1606 +
1607 + fps Delay between frame updates
1608 +
1609 + debug Debug output level {0-7}
1610 +
1611 + xohms Touchpanel sensitivity (X-plate resistance)
1612 +
1613 + resetgpio GPIO used to reset controller
1614 +
1615 + ledgpio GPIO used to control backlight
1616 +
1617 +
1618 +Name: hy28b
1619 +Info: HY28B - 2.8" TFT LCD Display Module by HAOYU Electronics
1620 + Default values match Texy's display shield
1621 +Load: dtoverlay=hy28b,<param>=<val>
1622 +Params: speed Display SPI bus speed
1623 +
1624 + rotate Display rotation {0,90,180,270}
1625 +
1626 + fps Delay between frame updates
1627 +
1628 + debug Debug output level {0-7}
1629 +
1630 + xohms Touchpanel sensitivity (X-plate resistance)
1631 +
1632 + resetgpio GPIO used to reset controller
1633 +
1634 + ledgpio GPIO used to control backlight
1635 +
1636 +
1637 +Name: i2c-rtc
1638 +Info: Adds support for a number of I2C Real Time Clock devices
1639 +Load: dtoverlay=i2c-rtc,<param>
1640 +Params: ds1307 Select the DS1307 device
1641 +
1642 + ds3231 Select the DS3231 device
1643 +
1644 + pcf2127 Select the PCF2127 device
1645 +
1646 + pcf8523 Select the PCF8523 device
1647 +
1648 + pcf8563 Select the PCF8563 device
1649 +
1650 +
1651 +Name: iqaudio-dac
1652 +Info: Configures the IQaudio DAC audio card
1653 +Load: dtoverlay=iqaudio-dac
1654 +Params: <None>
1655 +
1656 +
1657 +Name: iqaudio-dacplus
1658 +Info: Configures the IQaudio DAC+ audio card
1659 +Load: dtoverlay=iqaudio-dacplus
1660 +Params: <None>
1661 +
1662 +
1663 +Name: lirc-rpi
1664 +Info: Configures lirc-rpi (Linux Infrared Remote Control for Raspberry Pi)
1665 + Consult the module documentation for more details.
1666 +Load: dtoverlay=lirc-rpi,<param>=<val>,...
1667 +Params: gpio_out_pin GPIO for output (default "17")
1668 +
1669 + gpio_in_pin GPIO for input (default "18")
1670 +
1671 + gpio_in_pull Pull up/down/off on the input pin
1672 + (default "down")
1673 +
1674 + sense Override the IR receive auto-detection logic:
1675 + "1" = force active high
1676 + "0" = force active low
1677 + "-1" = use auto-detection
1678 + (default "-1")
1679 +
1680 + softcarrier Turn the software carrier "on" or "off"
1681 + (default "on")
1682 +
1683 + invert "on" = invert the output pin (default "off")
1684 +
1685 + debug "on" = enable additional debug messages
1686 + (default "off")
1687 +
1688 +
1689 +Name: mcp2515-can0
1690 +Info: Configures the MCP2515 CAN controller
1691 +Load: dtoverlay=mcp2515-can0,<param>=<val>
1692 +Params: oscillator Clock frequency for the CAN controller (Hz)
1693 +
1694 + spimaxfrequency Maximum SPI frequence (Hz)
1695 +
1696 + interrupt GPIO for interrupt signal
1697 +
1698 +
1699 +Name: mmc
1700 +Info: Selects the bcm2835-mmc SD/MMC driver, optionally with overclock
1701 +Load: dtoverlay=mmc,<param>=<val>
1702 +Params: overclock_50 Clock (in MHz) to use when the MMC framework
1703 + requests 50MHz
1704 + force_pio Disable DMA support
1705 +
1706 +
1707 +Name: mz61581
1708 +Info: MZ61581 display by Tontec
1709 +Load: dtoverlay=mz61581,<param>=<val>
1710 +Params: speed Display SPI bus speed
1711 +
1712 + rotate Display rotation {0,90,180,270}
1713 +
1714 + fps Delay between frame updates
1715 +
1716 + debug Debug output level {0-7}
1717 +
1718 + xohms Touchpanel sensitivity (X-plate resistance)
1719 +
1720 +
1721 +[ The pcf2127-rtc overlay has been deleted. See i2c-rtc. ]
1722 +
1723 +
1724 +[ The pcf8523-rtc overlay has been deleted. See i2c-rtc. ]
1725 +
1726 +
1727 +[ The pcf8563-rtc overlay has been deleted. See i2c-rtc. ]
1728 +
1729 +
1730 +Name: piscreen
1731 +Info: PiScreen display by OzzMaker.com
1732 +Load: dtoverlay=piscreen,<param>=<val>
1733 +Params: speed Display SPI bus speed
1734 +
1735 + rotate Display rotation {0,90,180,270}
1736 +
1737 + fps Delay between frame updates
1738 +
1739 + debug Debug output level {0-7}
1740 +
1741 + xohms Touchpanel sensitivity (X-plate resistance)
1742 +
1743 +
1744 +Name: pitft28-resistive
1745 +Info: Adafruit PiTFT 2.8" resistive touch screen
1746 +Load: dtoverlay=pitft28-resistive,<param>=<val>
1747 +Params: speed Display SPI bus speed
1748 +
1749 + rotate Display rotation {0,90,180,270}
1750 +
1751 + fps Delay between frame updates
1752 +
1753 + debug Debug output level {0-7}
1754 +
1755 +
1756 +Name: pps-gpio
1757 +Info: Configures the pps-gpio (pulse-per-second time signal via GPIO).
1758 +Load: dtoverlay=pps-gpio,<param>=<val>
1759 +Params: gpiopin Input GPIO (default "18")
1760 +
1761 +
1762 +Name: rpi-dac
1763 +Info: Configures the RPi DAC audio card
1764 +Load: dtoverlay=rpi-dac
1765 +Params: <None>
1766 +
1767 +
1768 +Name: rpi-display
1769 +Info: RPi-Display - 2.8" Touch Display by Watterott
1770 +Load: dtoverlay=rpi-display,<param>=<val>
1771 +Params: speed Display SPI bus speed
1772 +
1773 + rotate Display rotation {0,90,180,270}
1774 +
1775 + fps Delay between frame updates
1776 +
1777 + debug Debug output level {0-7}
1778 +
1779 + xohms Touchpanel sensitivity (X-plate resistance)
1780 +
1781 +
1782 +Name: rpi-proto
1783 +Info: Configures the RPi Proto audio card
1784 +Load: dtoverlay=rpi-proto
1785 +Params: <None>
1786 +
1787 +
1788 +Name: sdhost
1789 +Info: Selects the bcm2835-sdhost SD/MMC driver, optionally with overclock
1790 +Load: dtoverlay=sdhost,<param>=<val>
1791 +Params: overclock_50 Clock (in MHz) to use when the MMC framework
1792 + requests 50MHz
1793 + force_pio Disable DMA support
1794 +
1795 +
1796 +Name: spi-bcm2708
1797 +Info: Selects the bcm2708-spi SPI driver
1798 +Load: dtoverlay=spi-bcm2708
1799 +Params: <None>
1800 +
1801 +
1802 +Name: spi-bcm2835
1803 +Info: Selects the bcm2835-spi SPI driver
1804 +Load: dtoverlay=spi-bcm2835
1805 +Params: <None>
1806 +
1807 +
1808 +Name: tinylcd35
1809 +Info: 3.5" Color TFT Display by www.tinylcd.com
1810 + Options: Touch, RTC, keypad
1811 +Load: dtoverlay=tinylcd35,<param>=<val>
1812 +Params: speed Display SPI bus speed
1813 +
1814 + rotate Display rotation {0,90,180,270}
1815 +
1816 + fps Delay between frame updates
1817 +
1818 + debug Debug output level {0-7}
1819 +
1820 + touch Enable touch panel
1821 +
1822 + touchgpio Touch controller IRQ GPIO
1823 +
1824 + xohms Touchpanel: Resistance of X-plate in ohms
1825 +
1826 + rtc-pcf PCF8563 Real Time Clock
1827 +
1828 + rtc-ds DS1307 Real Time Clock
1829 +
1830 + keypad Enable keypad
1831 +
1832 + Examples:
1833 + Display with touchpanel, PCF8563 RTC and keypad:
1834 + dtoverlay=tinylcd35,touch,rtc-pcf,keypad
1835 + Old touch display:
1836 + dtoverlay=tinylcd35,touch,touchgpio=3
1837 +
1838 +
1839 +Name: w1-gpio
1840 +Info: Configures the w1-gpio Onewire interface module.
1841 + Use this overlay if you *don't* need a GPIO to drive an external pullup.
1842 +Load: dtoverlay=w1-gpio,<param>=<val>
1843 +Params: gpiopin GPIO for I/O (default "4")
1844 +
1845 + pullup Non-zero, "on", or "y" to enable the parasitic
1846 + power (2-wire, power-on-data) feature
1847 +
1848 +
1849 +Name: w1-gpio-pullup
1850 +Info: Configures the w1-gpio Onewire interface module.
1851 + Use this overlay if you *do* need a GPIO to drive an external pullup.
1852 +Load: dtoverlay=w1-gpio-pullup,<param>=<val>,...
1853 +Params: gpiopin GPIO for I/O (default "4")
1854 +
1855 + pullup Non-zero, "on", or "y" to enable the parasitic
1856 + power (2-wire, power-on-data) feature
1857 +
1858 + extpullup GPIO for external pullup (default "5")
1859 +
1860 +
1861 +Troubleshooting
1862 +===============
1863 +
1864 +If you are experiencing problems that you think are DT-related, enable DT
1865 +diagnostic output by adding this to /boot/config.txt:
1866 +
1867 + dtdebug=on
1868 +
1869 +and rebooting. Then run:
1870 +
1871 + sudo vcdbg log msg
1872 +
1873 +and look for relevant messages.
1874 +
1875 +Further reading
1876 +===============
1877 +
1878 +This is only meant to be a quick introduction to the subject of Device Tree on
1879 +Raspberry Pi. There is a more complete explanation here:
1880 +
1881 +http://www.raspberrypi.org/documentation/configuration/device-tree.md
1882 --- /dev/null
1883 +++ b/arch/arm/boot/dts/overlays/ads7846-overlay.dts
1884 @@ -0,0 +1,83 @@
1885 +/*
1886 + * Generic Device Tree overlay for the ADS7846 touch controller
1887 + *
1888 + */
1889 +
1890 +/dts-v1/;
1891 +/plugin/;
1892 +
1893 +/ {
1894 + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
1895 +
1896 + fragment@0 {
1897 + target = <&spi0>;
1898 + __overlay__ {
1899 + status = "okay";
1900 +
1901 + spidev@0{
1902 + status = "disabled";
1903 + };
1904 +
1905 + spidev@1{
1906 + status = "disabled";
1907 + };
1908 + };
1909 + };
1910 +
1911 + fragment@1 {
1912 + target = <&gpio>;
1913 + __overlay__ {
1914 + ads7846_pins: ads7846_pins {
1915 + brcm,pins = <255>; /* illegal default value */
1916 + brcm,function = <0>; /* in */
1917 + brcm,pull = <0>; /* none */
1918 + };
1919 + };
1920 + };
1921 +
1922 + fragment@2 {
1923 + target = <&spi0>;
1924 + __overlay__ {
1925 + /* needed to avoid dtc warning */
1926 + #address-cells = <1>;
1927 + #size-cells = <0>;
1928 +
1929 + ads7846: ads7846@1 {
1930 + compatible = "ti,ads7846";
1931 + reg = <1>;
1932 + pinctrl-names = "default";
1933 + pinctrl-0 = <&ads7846_pins>;
1934 +
1935 + spi-max-frequency = <2000000>;
1936 + interrupts = <255 2>; /* high-to-low edge triggered */
1937 + interrupt-parent = <&gpio>;
1938 + pendown-gpio = <&gpio 255 0>;
1939 +
1940 + /* driver defaults */
1941 + ti,x-min = /bits/ 16 <0>;
1942 + ti,y-min = /bits/ 16 <0>;
1943 + ti,x-max = /bits/ 16 <0x0FFF>;
1944 + ti,y-max = /bits/ 16 <0x0FFF>;
1945 + ti,pressure-min = /bits/ 16 <0>;
1946 + ti,pressure-max = /bits/ 16 <0xFFFF>;
1947 + ti,x-plate-ohms = /bits/ 16 <400>;
1948 + };
1949 + };
1950 + };
1951 + __overrides__ {
1952 + cs = <&ads7846>,"reg:0";
1953 + speed = <&ads7846>,"spi-max-frequency:0";
1954 + penirq = <&ads7846_pins>,"brcm,pins:0", /* REQUIRED */
1955 + <&ads7846>,"interrupts:0",
1956 + <&ads7846>,"pendown-gpio:4";
1957 + penirq_pull = <&ads7846_pins>,"brcm,pull:0";
1958 + swapxy = <&ads7846>,"ti,swap-xy?";
1959 + xmin = <&ads7846>,"ti,x-min;0";
1960 + ymin = <&ads7846>,"ti,y-min;0";
1961 + xmax = <&ads7846>,"ti,x-max;0";
1962 + ymax = <&ads7846>,"ti,y-max;0";
1963 + pmin = <&ads7846>,"ti,pressure-min;0";
1964 + pmax = <&ads7846>,"ti,pressure-max;0";
1965 + xohms = <&ads7846>,"ti,x-plate-ohms;0";
1966 + };
1967 +};
1968 --- /dev/null
1969 +++ b/arch/arm/boot/dts/overlays/bmp085_i2c-sensor-overlay.dts
1970 @@ -0,0 +1,23 @@
1971 +// Definitions for BMP085/BMP180 digital barometric pressure and temperature sensors from Bosch Sensortec
1972 +/dts-v1/;
1973 +/plugin/;
1974 +
1975 +/ {
1976 + compatible = "brcm,bcm2708";
1977 +
1978 + fragment@0 {
1979 + target = <&i2c1>;
1980 + __overlay__ {
1981 + #address-cells = <1>;
1982 + #size-cells = <0>;
1983 + status = "okay";
1984 +
1985 + bmp085@77 {
1986 + compatible = "bosch,bmp085";
1987 + reg = <0x77>;
1988 + default-oversampling = <3>;
1989 + status = "okay";
1990 + };
1991 + };
1992 + };
1993 +};
1994 --- /dev/null
1995 +++ b/arch/arm/boot/dts/overlays/dht11-overlay.dts
1996 @@ -0,0 +1,39 @@
1997 +/*
1998 + * Overlay for the DHT11/21/22 humidity/temperature sensor modules.
1999 + */
2000 +/dts-v1/;
2001 +/plugin/;
2002 +
2003 +/ {
2004 + compatible = "brcm,bcm2708";
2005 +
2006 + fragment@0 {
2007 + target-path = "/";
2008 + __overlay__ {
2009 +
2010 + dht11: dht11@0 {
2011 + compatible = "dht11";
2012 + pinctrl-names = "default";
2013 + pinctrl-0 = <&dht11_pins>;
2014 + gpios = <&gpio 4 0>;
2015 + status = "okay";
2016 + };
2017 + };
2018 + };
2019 +
2020 + fragment@1 {
2021 + target = <&gpio>;
2022 + __overlay__ {
2023 + dht11_pins: dht11_pins {
2024 + brcm,pins = <4>;
2025 + brcm,function = <0>; // in
2026 + brcm,pull = <0>; // off
2027 + };
2028 + };
2029 + };
2030 +
2031 + __overrides__ {
2032 + gpiopin = <&dht11_pins>,"brcm,pins:0",
2033 + <&dht11>,"gpios:4";
2034 + };
2035 +};
2036 --- /dev/null
2037 +++ b/arch/arm/boot/dts/overlays/enc28j60-overlay.dts
2038 @@ -0,0 +1,50 @@
2039 +// Overlay for the Microchip ENC28J60 Ethernet Controller
2040 +/dts-v1/;
2041 +/plugin/;
2042 +
2043 +/ {
2044 + compatible = "brcm,bcm2708";
2045 +
2046 + fragment@0 {
2047 + target = <&spi0>;
2048 + __overlay__ {
2049 + /* needed to avoid dtc warning */
2050 + #address-cells = <1>;
2051 + #size-cells = <0>;
2052 +
2053 + status = "okay";
2054 +
2055 + spidev@0{
2056 + status = "disabled";
2057 + };
2058 +
2059 + eth1: enc28j60@0{
2060 + compatible = "microchip,enc28j60";
2061 + reg = <0>; /* CE0 */
2062 + pinctrl-names = "default";
2063 + pinctrl-0 = <&eth1_pins>;
2064 + interrupt-parent = <&gpio>;
2065 + interrupts = <25 0x2>; /* falling edge */
2066 + spi-max-frequency = <12000000>;
2067 + status = "okay";
2068 + };
2069 + };
2070 + };
2071 +
2072 + fragment@1 {
2073 + target = <&gpio>;
2074 + __overlay__ {
2075 + eth1_pins: eth1_pins {
2076 + brcm,pins = <25>;
2077 + brcm,function = <0>; /* in */
2078 + brcm,pull = <0>; /* none */
2079 + };
2080 + };
2081 + };
2082 +
2083 + __overrides__ {
2084 + int_pin = <&eth1>, "interrupts:0",
2085 + <&eth1_pins>, "brcm,pins:0";
2086 + speed = <&eth1>, "spi-max-frequency:0";
2087 + };
2088 +};
2089 --- /dev/null
2090 +++ b/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts
2091 @@ -0,0 +1,39 @@
2092 +// Definitions for HiFiBerry Amp/Amp+
2093 +/dts-v1/;
2094 +/plugin/;
2095 +
2096 +/ {
2097 + compatible = "brcm,bcm2708";
2098 +
2099 + fragment@0 {
2100 + target = <&sound>;
2101 + __overlay__ {
2102 + compatible = "hifiberry,hifiberry-amp";
2103 + i2s-controller = <&i2s>;
2104 + status = "okay";
2105 + };
2106 + };
2107 +
2108 + fragment@1 {
2109 + target = <&i2s>;
2110 + __overlay__ {
2111 + status = "okay";
2112 + };
2113 + };
2114 +
2115 + fragment@2 {
2116 + target = <&i2c1>;
2117 + __overlay__ {
2118 + #address-cells = <1>;
2119 + #size-cells = <0>;
2120 + status = "okay";
2121 +
2122 + tas5713@1b {
2123 + #sound-dai-cells = <0>;
2124 + compatible = "ti,tas5713";
2125 + reg = <0x1b>;
2126 + status = "okay";
2127 + };
2128 + };
2129 + };
2130 +};
2131 --- /dev/null
2132 +++ b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts
2133 @@ -0,0 +1,34 @@
2134 +// Definitions for HiFiBerry DAC
2135 +/dts-v1/;
2136 +/plugin/;
2137 +
2138 +/ {
2139 + compatible = "brcm,bcm2708";
2140 +
2141 + fragment@0 {
2142 + target = <&sound>;
2143 + __overlay__ {
2144 + compatible = "hifiberry,hifiberry-dac";
2145 + i2s-controller = <&i2s>;
2146 + status = "okay";
2147 + };
2148 + };
2149 +
2150 + fragment@1 {
2151 + target = <&i2s>;
2152 + __overlay__ {
2153 + status = "okay";
2154 + };
2155 + };
2156 +
2157 + fragment@2 {
2158 + target-path = "/";
2159 + __overlay__ {
2160 + pcm5102a-codec {
2161 + #sound-dai-cells = <0>;
2162 + compatible = "ti,pcm5102a";
2163 + status = "okay";
2164 + };
2165 + };
2166 + };
2167 +};
2168 --- /dev/null
2169 +++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts
2170 @@ -0,0 +1,39 @@
2171 +// Definitions for HiFiBerry DAC+
2172 +/dts-v1/;
2173 +/plugin/;
2174 +
2175 +/ {
2176 + compatible = "brcm,bcm2708";
2177 +
2178 + fragment@0 {
2179 + target = <&sound>;
2180 + __overlay__ {
2181 + compatible = "hifiberry,hifiberry-dacplus";
2182 + i2s-controller = <&i2s>;
2183 + status = "okay";
2184 + };
2185 + };
2186 +
2187 + fragment@1 {
2188 + target = <&i2s>;
2189 + __overlay__ {
2190 + status = "okay";
2191 + };
2192 + };
2193 +
2194 + fragment@2 {
2195 + target = <&i2c1>;
2196 + __overlay__ {
2197 + #address-cells = <1>;
2198 + #size-cells = <0>;
2199 + status = "okay";
2200 +
2201 + pcm5122@4d {
2202 + #sound-dai-cells = <0>;
2203 + compatible = "ti,pcm5122";
2204 + reg = <0x4d>;
2205 + status = "okay";
2206 + };
2207 + };
2208 + };
2209 +};
2210 --- /dev/null
2211 +++ b/arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts
2212 @@ -0,0 +1,39 @@
2213 +// Definitions for HiFiBerry Digi
2214 +/dts-v1/;
2215 +/plugin/;
2216 +
2217 +/ {
2218 + compatible = "brcm,bcm2708";
2219 +
2220 + fragment@0 {
2221 + target = <&sound>;
2222 + __overlay__ {
2223 + compatible = "hifiberry,hifiberry-digi";
2224 + i2s-controller = <&i2s>;
2225 + status = "okay";
2226 + };
2227 + };
2228 +
2229 + fragment@1 {
2230 + target = <&i2s>;
2231 + __overlay__ {
2232 + status = "okay";
2233 + };
2234 + };
2235 +
2236 + fragment@2 {
2237 + target = <&i2c1>;
2238 + __overlay__ {
2239 + #address-cells = <1>;
2240 + #size-cells = <0>;
2241 + status = "okay";
2242 +
2243 + wm8804@3b {
2244 + #sound-dai-cells = <0>;
2245 + compatible = "wlf,wm8804";
2246 + reg = <0x3b>;
2247 + status = "okay";
2248 + };
2249 + };
2250 + };
2251 +};
2252 --- /dev/null
2253 +++ b/arch/arm/boot/dts/overlays/hy28a-overlay.dts
2254 @@ -0,0 +1,87 @@
2255 +/*
2256 + * Device Tree overlay for HY28A display
2257 + *
2258 + */
2259 +
2260 +/dts-v1/;
2261 +/plugin/;
2262 +
2263 +/ {
2264 + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
2265 +
2266 + fragment@0 {
2267 + target = <&spi0>;
2268 + __overlay__ {
2269 + status = "okay";
2270 +
2271 + spidev@0{
2272 + status = "disabled";
2273 + };
2274 +
2275 + spidev@1{
2276 + status = "disabled";
2277 + };
2278 + };
2279 + };
2280 +
2281 + fragment@1 {
2282 + target = <&gpio>;
2283 + __overlay__ {
2284 + hy28a_pins: hy28a_pins {
2285 + brcm,pins = <17 25 18>;
2286 + brcm,function = <0 1 1>; /* in out out */
2287 + };
2288 + };
2289 + };
2290 +
2291 + fragment@2 {
2292 + target = <&spi0>;
2293 + __overlay__ {
2294 + /* needed to avoid dtc warning */
2295 + #address-cells = <1>;
2296 + #size-cells = <0>;
2297 +
2298 + hy28a: hy28a@0{
2299 + compatible = "ilitek,ili9320";
2300 + reg = <0>;
2301 + pinctrl-names = "default";
2302 + pinctrl-0 = <&hy28a_pins>;
2303 +
2304 + spi-max-frequency = <32000000>;
2305 + spi-cpol;
2306 + spi-cpha;
2307 + rotate = <270>;
2308 + bgr;
2309 + fps = <50>;
2310 + buswidth = <8>;
2311 + startbyte = <0x70>;
2312 + reset-gpios = <&gpio 25 0>;
2313 + led-gpios = <&gpio 18 1>;
2314 + debug = <0>;
2315 + };
2316 +
2317 + hy28a_ts: hy28a-ts@1 {
2318 + compatible = "ti,ads7846";
2319 + reg = <1>;
2320 +
2321 + spi-max-frequency = <2000000>;
2322 + interrupts = <17 2>; /* high-to-low edge triggered */
2323 + interrupt-parent = <&gpio>;
2324 + pendown-gpio = <&gpio 17 0>;
2325 + ti,x-plate-ohms = /bits/ 16 <100>;
2326 + ti,pressure-max = /bits/ 16 <255>;
2327 + };
2328 + };
2329 + };
2330 + __overrides__ {
2331 + speed = <&hy28a>,"spi-max-frequency:0";
2332 + rotate = <&hy28a>,"rotate:0";
2333 + fps = <&hy28a>,"fps:0";
2334 + debug = <&hy28a>,"debug:0";
2335 + xohms = <&hy28a_ts>,"ti,x-plate-ohms;0";
2336 + resetgpio = <&hy28a>,"reset-gpios:4",
2337 + <&hy28a_pins>, "brcm,pins:1";
2338 + ledgpio = <&hy28a>,"led-gpios:4",
2339 + <&hy28a_pins>, "brcm,pins:2";
2340 + };
2341 +};
2342 --- /dev/null
2343 +++ b/arch/arm/boot/dts/overlays/hy28b-overlay.dts
2344 @@ -0,0 +1,142 @@
2345 +/*
2346 + * Device Tree overlay for HY28b display shield by Texy
2347 + *
2348 + */
2349 +
2350 +/dts-v1/;
2351 +/plugin/;
2352 +
2353 +/ {
2354 + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
2355 +
2356 + fragment@0 {
2357 + target = <&spi0>;
2358 + __overlay__ {
2359 + status = "okay";
2360 +
2361 + spidev@0{
2362 + status = "disabled";
2363 + };
2364 +
2365 + spidev@1{
2366 + status = "disabled";
2367 + };
2368 + };
2369 + };
2370 +
2371 + fragment@1 {
2372 + target = <&gpio>;
2373 + __overlay__ {
2374 + hy28b_pins: hy28b_pins {
2375 + brcm,pins = <17 25 18>;
2376 + brcm,function = <0 1 1>; /* in out out */
2377 + };
2378 + };
2379 + };
2380 +
2381 + fragment@2 {
2382 + target = <&spi0>;
2383 + __overlay__ {
2384 + /* needed to avoid dtc warning */
2385 + #address-cells = <1>;
2386 + #size-cells = <0>;
2387 +
2388 + hy28b: hy28b@0{
2389 + compatible = "ilitek,ili9325";
2390 + reg = <0>;
2391 + pinctrl-names = "default";
2392 + pinctrl-0 = <&hy28b_pins>;
2393 +
2394 + spi-max-frequency = <48000000>;
2395 + spi-cpol;
2396 + spi-cpha;
2397 + rotate = <270>;
2398 + bgr;
2399 + fps = <50>;
2400 + buswidth = <8>;
2401 + startbyte = <0x70>;
2402 + reset-gpios = <&gpio 25 0>;
2403 + led-gpios = <&gpio 18 1>;
2404 +
2405 + gamma = "04 1F 4 7 7 0 7 7 6 0\n0F 00 1 7 4 0 0 0 6 7";
2406 +
2407 + init = <0x10000e7 0x0010
2408 + 0x1000000 0x0001
2409 + 0x1000001 0x0100
2410 + 0x1000002 0x0700
2411 + 0x1000003 0x1030
2412 + 0x1000004 0x0000
2413 + 0x1000008 0x0207
2414 + 0x1000009 0x0000
2415 + 0x100000a 0x0000
2416 + 0x100000c 0x0001
2417 + 0x100000d 0x0000
2418 + 0x100000f 0x0000
2419 + 0x1000010 0x0000
2420 + 0x1000011 0x0007
2421 + 0x1000012 0x0000
2422 + 0x1000013 0x0000
2423 + 0x2000032
2424 + 0x1000010 0x1590
2425 + 0x1000011 0x0227
2426 + 0x2000032
2427 + 0x1000012 0x009c
2428 + 0x2000032
2429 + 0x1000013 0x1900
2430 + 0x1000029 0x0023
2431 + 0x100002b 0x000e
2432 + 0x2000032
2433 + 0x1000020 0x0000
2434 + 0x1000021 0x0000
2435 + 0x2000032
2436 + 0x1000050 0x0000
2437 + 0x1000051 0x00ef
2438 + 0x1000052 0x0000
2439 + 0x1000053 0x013f
2440 + 0x1000060 0xa700
2441 + 0x1000061 0x0001
2442 + 0x100006a 0x0000
2443 + 0x1000080 0x0000
2444 + 0x1000081 0x0000
2445 + 0x1000082 0x0000
2446 + 0x1000083 0x0000
2447 + 0x1000084 0x0000
2448 + 0x1000085 0x0000
2449 + 0x1000090 0x0010
2450 + 0x1000092 0x0000
2451 + 0x1000093 0x0003
2452 + 0x1000095 0x0110
2453 + 0x1000097 0x0000
2454 + 0x1000098 0x0000
2455 + 0x1000007 0x0133
2456 + 0x1000020 0x0000
2457 + 0x1000021 0x0000
2458 + 0x2000064>;
2459 + debug = <0>;
2460 + };
2461 +
2462 + hy28b_ts: hy28b-ts@1 {
2463 + compatible = "ti,ads7846";
2464 + reg = <1>;
2465 +
2466 + spi-max-frequency = <2000000>;
2467 + interrupts = <17 2>; /* high-to-low edge triggered */
2468 + interrupt-parent = <&gpio>;
2469 + pendown-gpio = <&gpio 17 0>;
2470 + ti,x-plate-ohms = /bits/ 16 <100>;
2471 + ti,pressure-max = /bits/ 16 <255>;
2472 + };
2473 + };
2474 + };
2475 + __overrides__ {
2476 + speed = <&hy28b>,"spi-max-frequency:0";
2477 + rotate = <&hy28b>,"rotate:0";
2478 + fps = <&hy28b>,"fps:0";
2479 + debug = <&hy28b>,"debug:0";
2480 + xohms = <&hy28b_ts>,"ti,x-plate-ohms;0";
2481 + resetgpio = <&hy28b>,"reset-gpios:4",
2482 + <&hy28b_pins>, "brcm,pins:1";
2483 + ledgpio = <&hy28b>,"led-gpios:4",
2484 + <&hy28b_pins>, "brcm,pins:2";
2485 + };
2486 +};
2487 --- /dev/null
2488 +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
2489 @@ -0,0 +1,49 @@
2490 +// Definitions for several I2C based Real Time Clocks
2491 +/dts-v1/;
2492 +/plugin/;
2493 +
2494 +/ {
2495 + compatible = "brcm,bcm2708";
2496 +
2497 + fragment@0 {
2498 + target = <&i2c1>;
2499 + __overlay__ {
2500 + #address-cells = <1>;
2501 + #size-cells = <0>;
2502 + status = "okay";
2503 +
2504 + ds1307: ds1307@68 {
2505 + compatible = "maxim,ds1307";
2506 + reg = <0x68>;
2507 + status = "disable";
2508 + };
2509 + ds3231: ds3231@68 {
2510 + compatible = "maxim,ds3231";
2511 + reg = <0x68>;
2512 + status = "disable";
2513 + };
2514 + pcf2127: pcf2127@51 {
2515 + compatible = "nxp,pcf2127";
2516 + reg = <0x51>;
2517 + status = "disable";
2518 + };
2519 + pcf8523: pcf8523@68 {
2520 + compatible = "nxp,pcf8523";
2521 + reg = <0x68>;
2522 + status = "disable";
2523 + };
2524 + pcf8563: pcf8563@51 {
2525 + compatible = "nxp,pcf8563";
2526 + reg = <0x51>;
2527 + status = "disable";
2528 + };
2529 + };
2530 + };
2531 + __overrides__ {
2532 + ds1307 = <&ds1307>,"status";
2533 + ds3231 = <&ds3231>,"status";
2534 + pcf2127 = <&pcf2127>,"status";
2535 + pcf8523 = <&pcf8523>,"status";
2536 + pcf8563 = <&pcf8563>,"status";
2537 + };
2538 +};
2539 --- /dev/null
2540 +++ b/arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts
2541 @@ -0,0 +1,13 @@
2542 +/dts-v1/;
2543 +/plugin/;
2544 +
2545 +/{
2546 + compatible = "brcm,bcm2708";
2547 +
2548 + fragment@0 {
2549 + target = <&i2s>;
2550 + __overlay__ {
2551 + brcm,enable-mmap;
2552 + };
2553 + };
2554 +};
2555 --- /dev/null
2556 +++ b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts
2557 @@ -0,0 +1,39 @@
2558 +// Definitions for IQaudIO DAC
2559 +/dts-v1/;
2560 +/plugin/;
2561 +
2562 +/ {
2563 + compatible = "brcm,bcm2708";
2564 +
2565 + fragment@0 {
2566 + target = <&sound>;
2567 + __overlay__ {
2568 + compatible = "iqaudio,iqaudio-dac";
2569 + i2s-controller = <&i2s>;
2570 + status = "okay";
2571 + };
2572 + };
2573 +
2574 + fragment@1 {
2575 + target = <&i2s>;
2576 + __overlay__ {
2577 + status = "okay";
2578 + };
2579 + };
2580 +
2581 + fragment@2 {
2582 + target = <&i2c1>;
2583 + __overlay__ {
2584 + #address-cells = <1>;
2585 + #size-cells = <0>;
2586 + status = "okay";
2587 +
2588 + pcm5122@4c {
2589 + #sound-dai-cells = <0>;
2590 + compatible = "ti,pcm5122";
2591 + reg = <0x4c>;
2592 + status = "okay";
2593 + };
2594 + };
2595 + };
2596 +};
2597 --- /dev/null
2598 +++ b/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts
2599 @@ -0,0 +1,39 @@
2600 +// Definitions for IQaudIO DAC+
2601 +/dts-v1/;
2602 +/plugin/;
2603 +
2604 +/ {
2605 + compatible = "brcm,bcm2708";
2606 +
2607 + fragment@0 {
2608 + target = <&sound>;
2609 + __overlay__ {
2610 + compatible = "iqaudio,iqaudio-dac";
2611 + i2s-controller = <&i2s>;
2612 + status = "okay";
2613 + };
2614 + };
2615 +
2616 + fragment@1 {
2617 + target = <&i2s>;
2618 + __overlay__ {
2619 + status = "okay";
2620 + };
2621 + };
2622 +
2623 + fragment@2 {
2624 + target = <&i2c1>;
2625 + __overlay__ {
2626 + #address-cells = <1>;
2627 + #size-cells = <0>;
2628 + status = "okay";
2629 +
2630 + pcm5122@4c {
2631 + #sound-dai-cells = <0>;
2632 + compatible = "ti,pcm5122";
2633 + reg = <0x4c>;
2634 + status = "okay";
2635 + };
2636 + };
2637 + };
2638 +};
2639 --- /dev/null
2640 +++ b/arch/arm/boot/dts/overlays/lirc-rpi-overlay.dts
2641 @@ -0,0 +1,57 @@
2642 +// Definitions for lirc-rpi module
2643 +/dts-v1/;
2644 +/plugin/;
2645 +
2646 +/ {
2647 + compatible = "brcm,bcm2708";
2648 +
2649 + fragment@0 {
2650 + target-path = "/";
2651 + __overlay__ {
2652 + lirc_rpi: lirc_rpi {
2653 + compatible = "rpi,lirc-rpi";
2654 + pinctrl-names = "default";
2655 + pinctrl-0 = <&lirc_pins>;
2656 + status = "okay";
2657 +
2658 + // Override autodetection of IR receiver circuit
2659 + // (0 = active high, 1 = active low, -1 = no override )
2660 + rpi,sense = <0xffffffff>;
2661 +
2662 + // Software carrier
2663 + // (0 = off, 1 = on)
2664 + rpi,softcarrier = <1>;
2665 +
2666 + // Invert output
2667 + // (0 = off, 1 = on)
2668 + rpi,invert = <0>;
2669 +
2670 + // Enable debugging messages
2671 + // (0 = off, 1 = on)
2672 + rpi,debug = <0>;
2673 + };
2674 + };
2675 + };
2676 +
2677 + fragment@1 {
2678 + target = <&gpio>;
2679 + __overlay__ {
2680 + lirc_pins: lirc_pins {
2681 + brcm,pins = <17 18>;
2682 + brcm,function = <1 0>; // out in
2683 + brcm,pull = <0 1>; // off down
2684 + };
2685 + };
2686 + };
2687 +
2688 + __overrides__ {
2689 + gpio_out_pin = <&lirc_pins>,"brcm,pins:0";
2690 + gpio_in_pin = <&lirc_pins>,"brcm,pins:4";
2691 + gpio_in_pull = <&lirc_pins>,"brcm,pull:4";
2692 +
2693 + sense = <&lirc_rpi>,"rpi,sense:0";
2694 + softcarrier = <&lirc_rpi>,"rpi,softcarrier:0";
2695 + invert = <&lirc_rpi>,"rpi,invert:0";
2696 + debug = <&lirc_rpi>,"rpi,debug:0";
2697 + };
2698 +};
2699 --- /dev/null
2700 +++ b/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts
2701 @@ -0,0 +1,69 @@
2702 +/*
2703 + * Device tree overlay for mcp251x/can0 on spi0.0
2704 + */
2705 +
2706 +/dts-v1/;
2707 +/plugin/;
2708 +
2709 +/ {
2710 + compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709";
2711 + /* disable spi-dev for spi0.0 */
2712 + fragment@0 {
2713 + target = <&spi0>;
2714 + __overlay__ {
2715 + status = "okay";
2716 + spidev@0{
2717 + status = "disabled";
2718 + };
2719 + };
2720 + };
2721 +
2722 + /* the interrupt pin of the can-controller */
2723 + fragment@1 {
2724 + target = <&gpio>;
2725 + __overlay__ {
2726 + can0_pins: can0_pins {
2727 + brcm,pins = <25>;
2728 + brcm,function = <0>; /* input */
2729 + };
2730 + };
2731 + };
2732 +
2733 + /* the clock/oscillator of the can-controller */
2734 + fragment@2 {
2735 + target-path = "/clocks";
2736 + __overlay__ {
2737 + /* external oscillator of mcp2515 on SPI0.0 */
2738 + can0_osc: can0_osc {
2739 + compatible = "fixed-clock";
2740 + #clock-cells = <0>;
2741 + clock-frequency = <16000000>;
2742 + };
2743 + };
2744 + };
2745 +
2746 + /* the spi config of the can-controller itself binding everything together */
2747 + fragment@3 {
2748 + target = <&spi0>;
2749 + __overlay__ {
2750 + /* needed to avoid dtc warning */
2751 + #address-cells = <1>;
2752 + #size-cells = <0>;
2753 + can0: mcp2515@0 {
2754 + reg = <0>;
2755 + compatible = "microchip,mcp2515";
2756 + pinctrl-names = "default";
2757 + pinctrl-0 = <&can0_pins>;
2758 + spi-max-frequency = <10000000>;
2759 + interrupt-parent = <&gpio>;
2760 + interrupts = <25 0x2>;
2761 + clocks = <&can0_osc>;
2762 + };
2763 + };
2764 + };
2765 + __overrides__ {
2766 + oscillator = <&can0_osc>,"clock-frequency:0";
2767 + spimaxfrequency = <&can0>,"spi-max-frequency:0";
2768 + interrupt = <&can0_pins>,"brcm,pins:0",<&can0>,"interrupts:0";
2769 + };
2770 +};
2771 --- /dev/null
2772 +++ b/arch/arm/boot/dts/overlays/mmc-overlay.dts
2773 @@ -0,0 +1,19 @@
2774 +/dts-v1/;
2775 +/plugin/;
2776 +
2777 +/{
2778 + compatible = "brcm,bcm2708";
2779 +
2780 + fragment@0 {
2781 + target = <&mmc>;
2782 +
2783 + __overlay__ {
2784 + brcm,overclock-50 = <0>;
2785 + };
2786 + };
2787 +
2788 + __overrides__ {
2789 + overclock_50 = <&mmc>,"brcm,overclock-50:0";
2790 + force_pio = <&mmc>,"brcm,force-pio?";
2791 + };
2792 +};
2793 --- /dev/null
2794 +++ b/arch/arm/boot/dts/overlays/mz61581-overlay.dts
2795 @@ -0,0 +1,109 @@
2796 +/*
2797 + * Device Tree overlay for MZ61581-PI-EXT 2014.12.28 by Tontec
2798 + *
2799 + */
2800 +
2801 +/dts-v1/;
2802 +/plugin/;
2803 +
2804 +/ {
2805 + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
2806 +
2807 + fragment@0 {
2808 + target = <&spi0>;
2809 + __overlay__ {
2810 + status = "okay";
2811 +
2812 + spidev@0{
2813 + status = "disabled";
2814 + };
2815 +
2816 + spidev@1{
2817 + status = "disabled";
2818 + };
2819 + };
2820 + };
2821 +
2822 + fragment@1 {
2823 + target = <&gpio>;
2824 + __overlay__ {
2825 + mz61581_pins: mz61581_pins {
2826 + brcm,pins = <4 15 18 25>;
2827 + brcm,function = <0 1 1 1>; /* in out out out */
2828 + };
2829 + };
2830 + };
2831 +
2832 + fragment@2 {
2833 + target = <&spi0>;
2834 + __overlay__ {
2835 + /* needed to avoid dtc warning */
2836 + #address-cells = <1>;
2837 + #size-cells = <0>;
2838 +
2839 + mz61581: mz61581@0{
2840 + compatible = "samsung,s6d02a1";
2841 + reg = <0>;
2842 + pinctrl-names = "default";
2843 + pinctrl-0 = <&mz61581_pins>;
2844 +
2845 + spi-max-frequency = <128000000>;
2846 + spi-cpol;
2847 + spi-cpha;
2848 +
2849 + width = <320>;
2850 + height = <480>;
2851 + rotate = <270>;
2852 + bgr;
2853 + fps = <30>;
2854 + buswidth = <8>;
2855 +
2856 + reset-gpios = <&gpio 15 0>;
2857 + dc-gpios = <&gpio 25 0>;
2858 + led-gpios = <&gpio 18 0>;
2859 +
2860 + init = <0x10000b0 00
2861 + 0x1000011
2862 + 0x20000ff
2863 + 0x10000b3 0x02 0x00 0x00 0x00
2864 + 0x10000c0 0x13 0x3b 0x00 0x02 0x00 0x01 0x00 0x43
2865 + 0x10000c1 0x08 0x16 0x08 0x08
2866 + 0x10000c4 0x11 0x07 0x03 0x03
2867 + 0x10000c6 0x00
2868 + 0x10000c8 0x03 0x03 0x13 0x5c 0x03 0x07 0x14 0x08 0x00 0x21 0x08 0x14 0x07 0x53 0x0c 0x13 0x03 0x03 0x21 0x00
2869 + 0x1000035 0x00
2870 + 0x1000036 0xa0
2871 + 0x100003a 0x55
2872 + 0x1000044 0x00 0x01
2873 + 0x10000d0 0x07 0x07 0x1d 0x03
2874 + 0x10000d1 0x03 0x30 0x10
2875 + 0x10000d2 0x03 0x14 0x04
2876 + 0x1000029
2877 + 0x100002c>;
2878 +
2879 + /* This is a workaround to make sure the init sequence slows down and doesn't fail */
2880 + debug = <3>;
2881 + };
2882 +
2883 + mz61581_ts: mz61581_ts@1 {
2884 + compatible = "ti,ads7846";
2885 + reg = <1>;
2886 +
2887 + spi-max-frequency = <2000000>;
2888 + interrupts = <4 2>; /* high-to-low edge triggered */
2889 + interrupt-parent = <&gpio>;
2890 + pendown-gpio = <&gpio 4 0>;
2891 +
2892 + ti,x-plate-ohms = /bits/ 16 <60>;
2893 + ti,pressure-max = /bits/ 16 <255>;
2894 + };
2895 + };
2896 + };
2897 + __overrides__ {
2898 + speed = <&mz61581>, "spi-max-frequency:0";
2899 + rotate = <&mz61581>, "rotate:0";
2900 + fps = <&mz61581>, "fps:0";
2901 + debug = <&mz61581>, "debug:0";
2902 + xohms = <&mz61581_ts>,"ti,x-plate-ohms;0";
2903 + };
2904 +};
2905 --- /dev/null
2906 +++ b/arch/arm/boot/dts/overlays/piscreen-overlay.dts
2907 @@ -0,0 +1,96 @@
2908 +/*
2909 + * Device Tree overlay for PiScreen 3.5" display shield by Ozzmaker
2910 + *
2911 + */
2912 +
2913 +/dts-v1/;
2914 +/plugin/;
2915 +
2916 +/ {
2917 + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
2918 +
2919 + fragment@0 {
2920 + target = <&spi0>;
2921 + __overlay__ {
2922 + status = "okay";
2923 +
2924 + spidev@0{
2925 + status = "disabled";
2926 + };
2927 +
2928 + spidev@1{
2929 + status = "disabled";
2930 + };
2931 + };
2932 + };
2933 +
2934 + fragment@1 {
2935 + target = <&gpio>;
2936 + __overlay__ {
2937 + piscreen_pins: piscreen_pins {
2938 + brcm,pins = <17 25 24 22>;
2939 + brcm,function = <0 1 1 1>; /* in out out out */
2940 + };
2941 + };
2942 + };
2943 +
2944 + fragment@2 {
2945 + target = <&spi0>;
2946 + __overlay__ {
2947 + /* needed to avoid dtc warning */
2948 + #address-cells = <1>;
2949 + #size-cells = <0>;
2950 +
2951 + piscreen: piscreen@0{
2952 + compatible = "ilitek,ili9486";
2953 + reg = <0>;
2954 + pinctrl-names = "default";
2955 + pinctrl-0 = <&piscreen_pins>;
2956 +
2957 + spi-max-frequency = <24000000>;
2958 + rotate = <270>;
2959 + bgr;
2960 + fps = <30>;
2961 + buswidth = <8>;
2962 + regwidth = <16>;
2963 + reset-gpios = <&gpio 25 0>;
2964 + dc-gpios = <&gpio 24 0>;
2965 + led-gpios = <&gpio 22 1>;
2966 + debug = <0>;
2967 +
2968 + init = <0x10000b0 0x00
2969 + 0x1000011
2970 + 0x20000ff
2971 + 0x100003a 0x55
2972 + 0x1000036 0x28
2973 + 0x10000c2 0x44
2974 + 0x10000c5 0x00 0x00 0x00 0x00
2975 + 0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00
2976 + 0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
2977 + 0x10000e2 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
2978 + 0x1000011
2979 + 0x1000029>;
2980 + };
2981 +
2982 + piscreen_ts: piscreen-ts@1 {
2983 + compatible = "ti,ads7846";
2984 + reg = <1>;
2985 +
2986 + spi-max-frequency = <2000000>;
2987 + interrupts = <17 2>; /* high-to-low edge triggered */
2988 + interrupt-parent = <&gpio>;
2989 + pendown-gpio = <&gpio 17 0>;
2990 + ti,swap-xy;
2991 + ti,x-plate-ohms = /bits/ 16 <100>;
2992 + ti,pressure-max = /bits/ 16 <255>;
2993 + };
2994 + };
2995 + };
2996 + __overrides__ {
2997 + speed = <&piscreen>,"spi-max-frequency:0";
2998 + rotate = <&piscreen>,"rotate:0";
2999 + fps = <&piscreen>,"fps:0";
3000 + debug = <&piscreen>,"debug:0";
3001 + xohms = <&piscreen_ts>,"ti,x-plate-ohms;0";
3002 + };
3003 +};
3004 --- /dev/null
3005 +++ b/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts
3006 @@ -0,0 +1,115 @@
3007 +/*
3008 + * Device Tree overlay for Adafruit PiTFT 2.8" resistive touch screen
3009 + *
3010 + */
3011 +
3012 +/dts-v1/;
3013 +/plugin/;
3014 +
3015 +/ {
3016 + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
3017 +
3018 + fragment@0 {
3019 + target = <&spi0>;
3020 + __overlay__ {
3021 + status = "okay";
3022 +
3023 + spidev@0{
3024 + status = "disabled";
3025 + };
3026 +
3027 + spidev@1{
3028 + status = "disabled";
3029 + };
3030 + };
3031 + };
3032 +
3033 + fragment@1 {
3034 + target = <&gpio>;
3035 + __overlay__ {
3036 + pitft_pins: pitft_pins {
3037 + brcm,pins = <24 25>;
3038 + brcm,function = <0 1>; /* in out */
3039 + brcm,pull = <2 0>; /* pullup none */
3040 + };
3041 + };
3042 + };
3043 +
3044 + fragment@2 {
3045 + target = <&spi0>;
3046 + __overlay__ {
3047 + /* needed to avoid dtc warning */
3048 + #address-cells = <1>;
3049 + #size-cells = <0>;
3050 +
3051 + pitft: pitft@0{
3052 + compatible = "ilitek,ili9340";
3053 + reg = <0>;
3054 + pinctrl-names = "default";
3055 + pinctrl-0 = <&pitft_pins>;
3056 +
3057 + spi-max-frequency = <32000000>;
3058 + rotate = <90>;
3059 + fps = <25>;
3060 + bgr;
3061 + buswidth = <8>;
3062 + dc-gpios = <&gpio 25 0>;
3063 + debug = <0>;
3064 + };
3065 +
3066 + pitft_ts@1 {
3067 + #address-cells = <1>;
3068 + #size-cells = <0>;
3069 + compatible = "st,stmpe610";
3070 + reg = <1>;
3071 +
3072 + spi-max-frequency = <500000>;
3073 + irq-gpio = <&gpio 24 0x2>; /* IRQF_TRIGGER_FALLING */
3074 + interrupts = <24 2>; /* high-to-low edge triggered */
3075 + interrupt-parent = <&gpio>;
3076 + interrupt-controller;
3077 +
3078 + stmpe_touchscreen {
3079 + compatible = "st,stmpe-ts";
3080 + st,sample-time = <4>;
3081 + st,mod-12b = <1>;
3082 + st,ref-sel = <0>;
3083 + st,adc-freq = <2>;
3084 + st,ave-ctrl = <3>;
3085 + st,touch-det-delay = <4>;
3086 + st,settling = <2>;
3087 + st,fraction-z = <7>;
3088 + st,i-drive = <0>;
3089 + };
3090 +
3091 + stmpe_gpio: stmpe_gpio {
3092 + #gpio-cells = <2>;
3093 + compatible = "st,stmpe-gpio";
3094 + /*
3095 + * only GPIO2 is wired/available
3096 + * and it is wired to the backlight
3097 + */
3098 + st,norequest-mask = <0x7b>;
3099 + };
3100 + };
3101 + };
3102 + };
3103 +
3104 + fragment@3 {
3105 + target-path = "/soc";
3106 + __overlay__ {
3107 + backlight {
3108 + compatible = "gpio-backlight";
3109 + gpios = <&stmpe_gpio 2 0>;
3110 + default-on;
3111 + };
3112 + };
3113 + };
3114 +
3115 + __overrides__ {
3116 + speed = <&pitft>,"spi-max-frequency:0";
3117 + rotate = <&pitft>,"rotate:0";
3118 + fps = <&pitft>,"fps:0";
3119 + debug = <&pitft>,"debug:0";
3120 + };
3121 +};
3122 --- /dev/null
3123 +++ b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts
3124 @@ -0,0 +1,34 @@
3125 +/dts-v1/;
3126 +/plugin/;
3127 +
3128 +/ {
3129 + compatible = "brcm,bcm2708";
3130 + fragment@0 {
3131 + target-path = "/";
3132 + __overlay__ {
3133 + pps: pps {
3134 + compatible = "pps-gpio";
3135 + pinctrl-names = "default";
3136 + pinctrl-0 = <&pps_pins>;
3137 + gpios = <&gpio 18 0>;
3138 + status = "okay";
3139 + };
3140 + };
3141 + };
3142 +
3143 + fragment@1 {
3144 + target = <&gpio>;
3145 + __overlay__ {
3146 + pps_pins: pps_pins {
3147 + brcm,pins = <18>;
3148 + brcm,function = <0>; // in
3149 + brcm,pull = <0>; // off
3150 + };
3151 + };
3152 + };
3153 +
3154 + __overrides__ {
3155 + gpiopin = <&pps>,"gpios:4",
3156 + <&pps_pins>,"brcm,pins:0";
3157 + };
3158 +};
3159 --- /dev/null
3160 +++ b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts
3161 @@ -0,0 +1,34 @@
3162 +// Definitions for RPi DAC
3163 +/dts-v1/;
3164 +/plugin/;
3165 +
3166 +/ {
3167 + compatible = "brcm,bcm2708";
3168 +
3169 + fragment@0 {
3170 + target = <&sound>;
3171 + __overlay__ {
3172 + compatible = "rpi,rpi-dac";
3173 + i2s-controller = <&i2s>;
3174 + status = "okay";
3175 + };
3176 + };
3177 +
3178 + fragment@1 {
3179 + target = <&i2s>;
3180 + __overlay__ {
3181 + status = "okay";
3182 + };
3183 + };
3184 +
3185 + fragment@2 {
3186 + target-path = "/";
3187 + __overlay__ {
3188 + pcm1794a-codec {
3189 + #sound-dai-cells = <0>;
3190 + compatible = "ti,pcm1794a";
3191 + status = "okay";
3192 + };
3193 + };
3194 + };
3195 +};
3196 --- /dev/null
3197 +++ b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts
3198 @@ -0,0 +1,82 @@
3199 +/*
3200 + * Device Tree overlay for rpi-display by Watterott
3201 + *
3202 + */
3203 +
3204 +/dts-v1/;
3205 +/plugin/;
3206 +
3207 +/ {
3208 + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
3209 +
3210 + fragment@0 {
3211 + target = <&spi0>;
3212 + __overlay__ {
3213 + status = "okay";
3214 +
3215 + spidev@0{
3216 + status = "disabled";
3217 + };
3218 +
3219 + spidev@1{
3220 + status = "disabled";
3221 + };
3222 + };
3223 + };
3224 +
3225 + fragment@1 {
3226 + target = <&gpio>;
3227 + __overlay__ {
3228 + rpi_display_pins: rpi_display_pins {
3229 + brcm,pins = <18 23 24 25>;
3230 + brcm,function = <1 1 1 0>; /* out out out in */
3231 + brcm,pull = <0 0 0 2>; /* - - - up */
3232 + };
3233 + };
3234 + };
3235 +
3236 + fragment@2 {
3237 + target = <&spi0>;
3238 + __overlay__ {
3239 + /* needed to avoid dtc warning */
3240 + #address-cells = <1>;
3241 + #size-cells = <0>;
3242 +
3243 + rpidisplay: rpi-display@0{
3244 + compatible = "ilitek,ili9341";
3245 + reg = <0>;
3246 + pinctrl-names = "default";
3247 + pinctrl-0 = <&rpi_display_pins>;
3248 +
3249 + spi-max-frequency = <32000000>;
3250 + rotate = <270>;
3251 + bgr;
3252 + fps = <30>;
3253 + buswidth = <8>;
3254 + reset-gpios = <&gpio 23 0>;
3255 + dc-gpios = <&gpio 24 0>;
3256 + led-gpios = <&gpio 18 1>;
3257 + debug = <0>;
3258 + };
3259 +
3260 + rpidisplay_ts: rpi-display-ts@1 {
3261 + compatible = "ti,ads7846";
3262 + reg = <1>;
3263 +
3264 + spi-max-frequency = <2000000>;
3265 + interrupts = <25 2>; /* high-to-low edge triggered */
3266 + interrupt-parent = <&gpio>;
3267 + pendown-gpio = <&gpio 25 0>;
3268 + ti,x-plate-ohms = /bits/ 16 <60>;
3269 + ti,pressure-max = /bits/ 16 <255>;
3270 + };
3271 + };
3272 + };
3273 + __overrides__ {
3274 + speed = <&rpidisplay>,"spi-max-frequency:0";
3275 + rotate = <&rpidisplay>,"rotate:0";
3276 + fps = <&rpidisplay>,"fps:0";
3277 + debug = <&rpidisplay>,"debug:0";
3278 + xohms = <&rpidisplay_ts>,"ti,x-plate-ohms;0";
3279 + };
3280 +};
3281 --- /dev/null
3282 +++ b/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts
3283 @@ -0,0 +1,39 @@
3284 +// Definitions for Rpi-Proto
3285 +/dts-v1/;
3286 +/plugin/;
3287 +
3288 +/ {
3289 + compatible = "brcm,bcm2708";
3290 +
3291 + fragment@0 {
3292 + target = <&sound>;
3293 + __overlay__ {
3294 + compatible = "rpi,rpi-proto";
3295 + i2s-controller = <&i2s>;
3296 + status = "okay";
3297 + };
3298 + };
3299 +
3300 + fragment@1 {
3301 + target = <&i2s>;
3302 + __overlay__ {
3303 + status = "okay";
3304 + };
3305 + };
3306 +
3307 + fragment@2 {
3308 + target = <&i2c1>;
3309 + __overlay__ {
3310 + #address-cells = <1>;
3311 + #size-cells = <0>;
3312 + status = "okay";
3313 +
3314 + wm8731@1a {
3315 + #sound-dai-cells = <0>;
3316 + compatible = "wlf,wm8731";
3317 + reg = <0x1a>;
3318 + status = "okay";
3319 + };
3320 + };
3321 + };
3322 +};
3323 --- /dev/null
3324 +++ b/arch/arm/boot/dts/overlays/sdhost-overlay.dts
3325 @@ -0,0 +1,78 @@
3326 +/dts-v1/;
3327 +/plugin/;
3328 +
3329 +/{
3330 + compatible = "brcm,bcm2708";
3331 +
3332 + fragment@0 {
3333 + target = <&soc>;
3334 + __overlay__ {
3335 + #address-cells = <1>;
3336 + #size-cells = <1>;
3337 +
3338 + sdhost: sdhost@7e202000 {
3339 + compatible = "brcm,bcm2835-sdhost";
3340 + reg = <0x7e202000 0x100>;
3341 + pinctrl-names = "default";
3342 + pinctrl-0 = <&sdhost_pins>;
3343 + interrupts = <2 24>;
3344 + clocks = <&clk_sdhost>;
3345 + dmas = <&dma 13>,
3346 + <&dma 13>;
3347 + dma-names = "tx", "rx";
3348 + brcm,delay-after-stop = <0>;
3349 + brcm,overclock-50 = <0>;
3350 + status = "okay";
3351 + };
3352 + };
3353 + };
3354 +
3355 + fragment@1 {
3356 + target = <&clocks>;
3357 + __overlay__ {
3358 + #address-cells = <1>;
3359 + #size-cells = <0>;
3360 +
3361 + clk_sdhost: sdhost {
3362 + compatible = "fixed-clock";
3363 + reg = <0>;
3364 + #clock-cells = <0>;
3365 + clock-output-names = "sdhost";
3366 + clock-frequency = <250000000>;
3367 + };
3368 + };
3369 + };
3370 +
3371 + fragment@2 {
3372 + target = <&gpio>;
3373 + __overlay__ {
3374 + sdhost_pins: sdhost_pins {
3375 + brcm,pins = <48 49 50 51 52 53>;
3376 + brcm,function = <4>; /* alt0 */
3377 + };
3378 + };
3379 + };
3380 +
3381 + fragment@3 {
3382 + target = <&mmc>;
3383 + __overlay__ {
3384 + /* Find a way to disable the other driver */
3385 + compatible = "";
3386 + status = "disabled";
3387 + };
3388 + };
3389 +
3390 + fragment@4 {
3391 + target-path = "/__overrides__";
3392 + __overlay__ {
3393 + sdhost_freq = <&clk_sdhost>,"clock-frequency:0";
3394 + };
3395 + };
3396 +
3397 + __overrides__ {
3398 + delay_after_stop = <&sdhost>,"brcm,delay-after-stop:0";
3399 + overclock_50 = <&sdhost>,"brcm,overclock-50:0";
3400 + force_pio = <&sdhost>,"brcm,force-pio?";
3401 + sdhost_freq = <&clk_sdhost>,"clock-frequency:0";
3402 + };
3403 +};
3404 --- /dev/null
3405 +++ b/arch/arm/boot/dts/overlays/spi-bcm2708-overlay.dts
3406 @@ -0,0 +1,18 @@
3407 +/*
3408 + * Device tree overlay for spi-bcm2835
3409 + */
3410 +
3411 +/dts-v1/;
3412 +/plugin/;
3413 +
3414 +/ {
3415 + compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709";
3416 + /* setting up compatiblity to allow loading the spi-bcm2835 driver */
3417 + fragment@0 {
3418 + target = <&spi0>;
3419 + __overlay__ {
3420 + status = "okay";
3421 + compatible = "brcm,bcm2708-spi";
3422 + };
3423 + };
3424 +};
3425 --- /dev/null
3426 +++ b/arch/arm/boot/dts/overlays/spi-bcm2835-overlay.dts
3427 @@ -0,0 +1,18 @@
3428 +/*
3429 + * Device tree overlay for spi-bcm2835
3430 + */
3431 +
3432 +/dts-v1/;
3433 +/plugin/;
3434 +
3435 +/ {
3436 + compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709";
3437 + /* setting up compatiblity to allow loading the spi-bcm2835 driver */
3438 + fragment@0 {
3439 + target = <&spi0>;
3440 + __overlay__ {
3441 + status = "okay";
3442 + compatible = "brcm,bcm2835-spi";
3443 + };
3444 + };
3445 +};
3446 --- /dev/null
3447 +++ b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts
3448 @@ -0,0 +1,216 @@
3449 +/*
3450 + * tinylcd35-overlay.dts
3451 + *
3452 + * -------------------------------------------------
3453 + * www.tinlylcd.com
3454 + * -------------------------------------------------
3455 + * Device---Driver-----BUS GPIO's
3456 + * display tinylcd35 spi0.0 25 24 18
3457 + * touch ads7846 spi0.1 5
3458 + * rtc ds1307 i2c1-0068
3459 + * rtc pcf8563 i2c1-0051
3460 + * keypad gpio-keys --------- 17 22 27 23 28
3461 + *
3462 + *
3463 + * TinyLCD.com 3.5 inch TFT
3464 + *
3465 + * Version 001
3466 + * 5/3/2015 -- Noralf Trønnes Initial Device tree framework
3467 + * 10/3/2015 -- tinylcd@gmail.com added ds1307 support.
3468 + *
3469 + */
3470 +
3471 +/dts-v1/;
3472 +/plugin/;
3473 +
3474 +/ {
3475 + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
3476 +
3477 + fragment@0 {
3478 + target = <&spi0>;
3479 + __overlay__ {
3480 + status = "okay";
3481 +
3482 + spidev@0{
3483 + status = "disabled";
3484 + };
3485 +
3486 + spidev@1{
3487 + status = "disabled";
3488 + };
3489 + };
3490 + };
3491 +
3492 + fragment@1 {
3493 + target = <&gpio>;
3494 + __overlay__ {
3495 + tinylcd35_pins: tinylcd35_pins {
3496 + brcm,pins = <25 24 18>;
3497 + brcm,function = <1>; /* out */
3498 + };
3499 + tinylcd35_ts_pins: tinylcd35_ts_pins {
3500 + brcm,pins = <5>;
3501 + brcm,function = <0>; /* in */
3502 + };
3503 + keypad_pins: keypad_pins {
3504 + brcm,pins = <4 17 22 23 27>;
3505 + brcm,function = <0>; /* in */
3506 + brcm,pull = <1>; /* down */
3507 + };
3508 + };
3509 + };
3510 +
3511 + fragment@2 {
3512 + target = <&spi0>;
3513 + __overlay__ {
3514 + /* needed to avoid dtc warning */
3515 + #address-cells = <1>;
3516 + #size-cells = <0>;
3517 +
3518 + tinylcd35: tinylcd35@0{
3519 + compatible = "neosec,tinylcd";
3520 + reg = <0>;
3521 + pinctrl-names = "default";
3522 + pinctrl-0 = <&tinylcd35_pins>,
3523 + <&tinylcd35_ts_pins>;
3524 +
3525 + spi-max-frequency = <48000000>;
3526 + rotate = <270>;
3527 + fps = <20>;
3528 + bgr;
3529 + buswidth = <8>;
3530 + reset-gpios = <&gpio 25 0>;
3531 + dc-gpios = <&gpio 24 0>;
3532 + led-gpios = <&gpio 18 1>;
3533 + debug = <0>;
3534 +
3535 + init = <0x10000B0 0x80
3536 + 0x10000C0 0x0A 0x0A
3537 + 0x10000C1 0x01 0x01
3538 + 0x10000C2 0x33
3539 + 0x10000C5 0x00 0x42 0x80
3540 + 0x10000B1 0xD0 0x11
3541 + 0x10000B4 0x02
3542 + 0x10000B6 0x00 0x22 0x3B
3543 + 0x10000B7 0x07
3544 + 0x1000036 0x58
3545 + 0x10000F0 0x36 0xA5 0xD3
3546 + 0x10000E5 0x80
3547 + 0x10000E5 0x01
3548 + 0x10000B3 0x00
3549 + 0x10000E5 0x00
3550 + 0x10000F0 0x36 0xA5 0x53
3551 + 0x10000E0 0x00 0x35 0x33 0x00 0x00 0x00 0x00 0x35 0x33 0x00 0x00 0x00
3552 + 0x100003A 0x55
3553 + 0x1000011
3554 + 0x2000001
3555 + 0x1000029>;
3556 + };
3557 +
3558 + tinylcd35_ts: tinylcd35_ts@1 {
3559 + compatible = "ti,ads7846";
3560 + reg = <1>;
3561 + status = "disabled";
3562 +
3563 + spi-max-frequency = <2000000>;
3564 + interrupts = <5 2>; /* high-to-low edge triggered */
3565 + interrupt-parent = <&gpio>;
3566 + pendown-gpio = <&gpio 5 0>;
3567 + ti,x-plate-ohms = /bits/ 16 <100>;
3568 + ti,pressure-max = /bits/ 16 <255>;
3569 + };
3570 + };
3571 + };
3572 +
3573 + /* RTC */
3574 +
3575 + fragment@3 {
3576 + target = <&i2c1>;
3577 + __overlay__ {
3578 + #address-cells = <1>;
3579 + #size-cells = <0>;
3580 +
3581 + pcf8563: pcf8563@51 {
3582 + compatible = "nxp,pcf8563";
3583 + reg = <0x51>;
3584 + status = "disabled";
3585 + };
3586 + };
3587 + };
3588 +
3589 + fragment@4 {
3590 + target = <&i2c1>;
3591 + __overlay__ {
3592 + #address-cells = <1>;
3593 + #size-cells = <0>;
3594 +
3595 + ds1307: ds1307@68 {
3596 + compatible = "maxim,ds1307";
3597 + reg = <0x68>;
3598 + status = "disabled";
3599 + };
3600 + };
3601 + };
3602 +
3603 + /*
3604 + * Values for input event code is found under the
3605 + * 'Keys and buttons' heading in include/uapi/linux/input.h
3606 + */
3607 + fragment@5 {
3608 + target-path = "/soc";
3609 + __overlay__ {
3610 + keypad: keypad {
3611 + compatible = "gpio-keys";
3612 + #address-cells = <1>;
3613 + #size-cells = <0>;
3614 + pinctrl-names = "default";
3615 + pinctrl-0 = <&keypad_pins>;
3616 + status = "disabled";
3617 + autorepeat;
3618 +
3619 + button@17 {
3620 + label = "GPIO KEY_UP";
3621 + linux,code = <103>;
3622 + gpios = <&gpio 17 0>;
3623 + };
3624 + button@22 {
3625 + label = "GPIO KEY_DOWN";
3626 + linux,code = <108>;
3627 + gpios = <&gpio 22 0>;
3628 + };
3629 + button@27 {
3630 + label = "GPIO KEY_LEFT";
3631 + linux,code = <105>;
3632 + gpios = <&gpio 27 0>;
3633 + };
3634 + button@23 {
3635 + label = "GPIO KEY_RIGHT";
3636 + linux,code = <106>;
3637 + gpios = <&gpio 23 0>;
3638 + };
3639 + button@4 {
3640 + label = "GPIO KEY_ENTER";
3641 + linux,code = <28>;
3642 + gpios = <&gpio 4 0>;
3643 + };
3644 + };
3645 + };
3646 + };
3647 +
3648 + __overrides__ {
3649 + speed = <&tinylcd35>,"spi-max-frequency:0";
3650 + rotate = <&tinylcd35>,"rotate:0";
3651 + fps = <&tinylcd35>,"fps:0";
3652 + debug = <&tinylcd35>,"debug:0";
3653 + touch = <&tinylcd35_ts>,"status";
3654 + touchgpio = <&tinylcd35_ts_pins>,"brcm,pins:0",
3655 + <&tinylcd35_ts>,"interrupts:0",
3656 + <&tinylcd35_ts>,"pendown-gpio:4";
3657 + xohms = <&tinylcd35_ts>,"ti,x-plate-ohms;0";
3658 + rtc-pcf = <&i2c1>,"status",
3659 + <&pcf8563>,"status";
3660 + rtc-ds = <&i2c1>,"status",
3661 + <&ds1307>,"status";
3662 + keypad = <&keypad>,"status";
3663 + };
3664 +};
3665 --- /dev/null
3666 +++ b/arch/arm/boot/dts/overlays/w1-gpio-overlay.dts
3667 @@ -0,0 +1,39 @@
3668 +// Definitions for w1-gpio module (without external pullup)
3669 +/dts-v1/;
3670 +/plugin/;
3671 +
3672 +/ {
3673 + compatible = "brcm,bcm2708";
3674 +
3675 + fragment@0 {
3676 + target-path = "/";
3677 + __overlay__ {
3678 +
3679 + w1: onewire@0 {
3680 + compatible = "w1-gpio";
3681 + pinctrl-names = "default";
3682 + pinctrl-0 = <&w1_pins>;
3683 + gpios = <&gpio 4 0>;
3684 + rpi,parasitic-power = <0>;
3685 + status = "okay";
3686 + };
3687 + };
3688 + };
3689 +
3690 + fragment@1 {
3691 + target = <&gpio>;
3692 + __overlay__ {
3693 + w1_pins: w1_pins {
3694 + brcm,pins = <4>;
3695 + brcm,function = <0>; // in (initially)
3696 + brcm,pull = <0>; // off
3697 + };
3698 + };
3699 + };
3700 +
3701 + __overrides__ {
3702 + gpiopin = <&w1>,"gpios:4",
3703 + <&w1_pins>,"brcm,pins:0";
3704 + pullup = <&w1>,"rpi,parasitic-power:0";
3705 + };
3706 +};
3707 --- /dev/null
3708 +++ b/arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts
3709 @@ -0,0 +1,41 @@
3710 +// Definitions for w1-gpio module (with external pullup)
3711 +/dts-v1/;
3712 +/plugin/;
3713 +
3714 +/ {
3715 + compatible = "brcm,bcm2708";
3716 +
3717 + fragment@0 {
3718 + target-path = "/";
3719 + __overlay__ {
3720 +
3721 + w1: onewire@0 {
3722 + compatible = "w1-gpio";
3723 + pinctrl-names = "default";
3724 + pinctrl-0 = <&w1_pins>;
3725 + gpios = <&gpio 4 0>, <&gpio 5 1>;
3726 + rpi,parasitic-power = <0>;
3727 + status = "okay";
3728 + };
3729 + };
3730 + };
3731 +
3732 + fragment@1 {
3733 + target = <&gpio>;
3734 + __overlay__ {
3735 + w1_pins: w1_pins {
3736 + brcm,pins = <4 5>;
3737 + brcm,function = <0 1>; // in out
3738 + brcm,pull = <0 0>; // off off
3739 + };
3740 + };
3741 + };
3742 +
3743 + __overrides__ {
3744 + gpiopin = <&w1>,"gpios:4",
3745 + <&w1_pins>,"brcm,pins:0";
3746 + extpullup = <&w1>,"gpios:16",
3747 + <&w1_pins>,"brcm,pins:4";
3748 + pullup = <&w1>,"rpi,parasitic-power:0";
3749 + };
3750 +};