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