brcm2708: update linux 4.4 patches to latest version
[openwrt/staging/dedeckeh.git] / target / linux / brcm2708 / patches-4.4 / 0211-BCM270X_DT-Add-pi3-act-led-overlay.patch
1 From 47e82ea7d35926f12bd642e1ad2727b9a128536a Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Wed, 23 Mar 2016 15:57:14 +0000
4 Subject: [PATCH 211/423] BCM270X_DT: Add pi3-act-led overlay
5
6 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
7 ---
8 arch/arm/boot/dts/overlays/Makefile | 1 +
9 arch/arm/boot/dts/overlays/README | 19 +++++++++++++++
10 arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts | 27 ++++++++++++++++++++++
11 3 files changed, 47 insertions(+)
12 create mode 100644 arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts
13
14 --- a/arch/arm/boot/dts/overlays/Makefile
15 +++ b/arch/arm/boot/dts/overlays/Makefile
16 @@ -39,6 +39,7 @@ dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can0.
17 dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can1.dtbo
18 dtbo-$(RPI_DT_OVERLAYS) += mmc.dtbo
19 dtbo-$(RPI_DT_OVERLAYS) += mz61581.dtbo
20 +dtbo-$(RPI_DT_OVERLAYS) += pi3-act-led.dtbo
21 dtbo-$(RPI_DT_OVERLAYS) += pi3-disable-bt.dtbo
22 dtbo-$(RPI_DT_OVERLAYS) += pi3-miniuart-bt.dtbo
23 dtbo-$(RPI_DT_OVERLAYS) += piscreen.dtbo
24 --- a/arch/arm/boot/dts/overlays/README
25 +++ b/arch/arm/boot/dts/overlays/README
26 @@ -136,12 +136,14 @@ Params:
27
28 act_led_activelow Set to "on" to invert the sense of the LED
29 (default "off")
30 + N.B. For Pi3 see pi3-act-led overlay.
31
32 act_led_gpio Set which GPIO to use for the activity LED
33 (in case you want to connect it to an external
34 device)
35 (default "16" on a non-Plus board, "47" on a
36 Plus or Pi 2)
37 + N.B. For Pi3 see pi3-act-led overlay.
38
39 pwr_led_trigger
40 pwr_led_activelow
41 @@ -499,6 +501,23 @@ Params: speed Display
42 [ The pcf8563-rtc overlay has been deleted. See i2c-rtc. ]
43
44
45 +Name: pi3-act-led
46 +Info: Pi3 uses a GPIO expander to drive the LEDs which can only be accessed
47 + from the VPU. There is a special driver for this with a separate DT
48 + node, which has the unfortunate consequence of breaking the
49 + act_led_gpio and act_led_activelow dtparams.
50 + This overlay changes the GPIO controller back to the standard one and
51 + restores the dtparams.
52 +Load: dtoverlay=pi3-act-led,<param>=<val>
53 +Params: activelow Set to "on" to invert the sense of the LED
54 + (default "off")
55 +
56 + gpio Set which GPIO to use for the activity LED
57 + (in case you want to connect it to an external
58 + device)
59 + REQUIRED
60 +
61 +
62 Name: pi3-disable-bt
63 Info: Disable Pi3 Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15
64 N.B. To disable the systemd service that initialises the modem so it
65 --- /dev/null
66 +++ b/arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts
67 @@ -0,0 +1,27 @@
68 +/dts-v1/;
69 +/plugin/;
70 +
71 +/* Pi3 uses a GPIO expander to drive the LEDs which can only be accessed
72 + from the VPU. There is a special driver for this with a separate DT node,
73 + which has the unfortunate consequence of breaking the act_led_gpio and
74 + act_led_activelow dtparams.
75 +
76 + This overlay changes the GPIO controller back to the standard one and
77 + restores the dtparams.
78 +*/
79 +
80 +/{
81 + compatible = "brcm,bcm2708";
82 +
83 + fragment@0 {
84 + target = <&act_led>;
85 + frag0: __overlay__ {
86 + gpios = <&gpio 0 0>;
87 + };
88 + };
89 +
90 + __overrides__ {
91 + gpio = <&frag0>,"gpios:4";
92 + activelow = <&frag0>,"gpios:8";
93 + };
94 +};