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