Skip to content

Commit 6e49e98

Browse files
pelwellPhil Elwell
authored and
Phil Elwell
committed
overlays: Rename pi3- overlays to be less model-specific (#3052)
Rename the various pi3- overlays to be more generic, listing the devices they apply to in the README. The original names are retained for backwards compatibility as files that just include the new versions - the README marks them as being deprecated. See: raspberrypi/firmware#1174 Signed-off-by: Phil Elwell <[email protected]>
1 parent 870f3ba commit 6e49e98

10 files changed

+246
-211
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Overlays for the Raspberry Pi platform
22

33
dtbo-$(CONFIG_ARCH_BCM2835) += \
4+
act-led.dtbo \
45
adau1977-adc.dtbo \
56
adau7002-simple.dtbo \
67
ads1015.dtbo \
@@ -26,6 +27,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
2627
dht11.dtbo \
2728
dionaudio-loco.dtbo \
2829
dionaudio-loco-v2.dtbo \
30+
disable-bt.dtbo \
31+
disable-wifi.dtbo \
2932
dpi18.dtbo \
3033
dpi24.dtbo \
3134
draws.dtbo \
@@ -91,6 +94,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
9194
media-center.dtbo \
9295
midi-uart0.dtbo \
9396
midi-uart1.dtbo \
97+
miniuart-bt.dtbo \
9498
mmc.dtbo \
9599
mpu6050.dtbo \
96100
mz61581.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 62 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,16 @@ Params:
180180

181181
act_led_activelow Set to "on" to invert the sense of the LED
182182
(default "off")
183-
N.B. For Pi3 see pi3-act-led overlay.
183+
N.B. For Pi 3B, 3B+, 3A+ and 4B, use the act-led
184+
overlay.
184185

185186
act_led_gpio Set which GPIO to use for the activity LED
186187
(in case you want to connect it to an external
187188
device)
188189
(default "16" on a non-Plus board, "47" on a
189190
Plus or Pi 2)
190-
N.B. For Pi3 see pi3-act-led overlay.
191+
N.B. For Pi 3B, 3B+, 3A+ and 4B, use the act-led
192+
overlay.
191193

192194
pwr_led_trigger
193195
pwr_led_activelow
@@ -205,6 +207,23 @@ Params:
205207
and the other i2c baudrate parameters.
206208

207209

210+
Name: act-led
211+
Info: Pi 3B, 3B+, 3A+ and 4B use a GPIO expander to drive the LEDs which can
212+
only be accessed from the VPU. There is a special driver for this with a
213+
separate DT node, which has the unfortunate consequence of breaking the
214+
act_led_gpio and act_led_activelow dtparams.
215+
This overlay changes the GPIO controller back to the standard one and
216+
restores the dtparams.
217+
Load: dtoverlay=act-led,<param>=<val>
218+
Params: activelow Set to "on" to invert the sense of the LED
219+
(default "off")
220+
221+
gpio Set which GPIO to use for the activity LED
222+
(in case you want to connect it to an external
223+
device)
224+
REQUIRED
225+
226+
208227
Name: adau1977-adc
209228
Info: Overlay for activation of ADAU1977 ADC codec over I2C for control
210229
and I2S for data.
@@ -509,6 +528,21 @@ Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec
509528
that does not result in clipping/distortion!)
510529

511530

531+
Name: disable-bt
532+
Info: Disable onboard Bluetooth on Pi 3B, 3B+, 3A+, 4B and Zero W, restoring
533+
UART0/ttyAMA0 over GPIOs 14 & 15.
534+
N.B. To disable the systemd service that initialises the modem so it
535+
doesn't use the UART, use 'sudo systemctl disable hciuart'.
536+
Load: dtoverlay=disable-bt
537+
Params: <None>
538+
539+
540+
Name: disable-wifi
541+
Info: Disable onboard WiFi on Pi 3B, 3B+, 3A+, 4B and Zero W.
542+
Load: dtoverlay=disable-wifi
543+
Params: <None>
544+
545+
512546
Name: dpi18
513547
Info: Overlay for a generic 18-bit DPI display
514548
This uses GPIOs 0-21 (so no I2C, uart etc.), and activates the output
@@ -1447,6 +1481,20 @@ Load: dtoverlay=midi-uart1
14471481
Params: <None>
14481482

14491483

1484+
Name: miniuart-bt
1485+
Info: Switch the onboard Bluetooth function on Pi 3B, 3B+, 3A+, 4B and Zero W
1486+
to use the mini-UART (ttyS0) and restore UART0/ttyAMA0 over GPIOs 14 &
1487+
15. Note that this may reduce the maximum usable baudrate.
1488+
N.B. It is also necessary to edit /lib/systemd/system/hciuart.service
1489+
and replace ttyAMA0 with ttyS0, unless using Raspbian or another
1490+
distribution with udev rules that create /dev/serial0 and /dev/serial1,
1491+
in which case use /dev/serial1 instead because it will always be
1492+
correct. Furthermore, you must also set core_freq and core_freq_min to
1493+
the same value in config.txt or the miniuart will not work.
1494+
Load: dtoverlay=miniuart-bt
1495+
Params: <None>
1496+
1497+
14501498
Name: mmc
14511499
Info: Selects the bcm2835-mmc SD/MMC driver, optionally with overclock
14521500
Load: dtoverlay=mmc,<param>=<val>
@@ -1509,48 +1557,27 @@ Params: panel Display panel (required):
15091557

15101558

15111559
Name: pi3-act-led
1512-
Info: Pi3 uses a GPIO expander to drive the LEDs which can only be accessed
1513-
from the VPU. There is a special driver for this with a separate DT
1514-
node, which has the unfortunate consequence of breaking the
1515-
act_led_gpio and act_led_activelow dtparams.
1516-
This overlay changes the GPIO controller back to the standard one and
1517-
restores the dtparams.
1518-
Load: dtoverlay=pi3-act-led,<param>=<val>
1519-
Params: activelow Set to "on" to invert the sense of the LED
1520-
(default "off")
1521-
1522-
gpio Set which GPIO to use for the activity LED
1523-
(in case you want to connect it to an external
1524-
device)
1525-
REQUIRED
1560+
Info: This overlay has been renamed act-led, keeping pi3-act-led as an alias
1561+
for backwards compatibility.
1562+
Load: <Deprecated>
15261563

15271564

15281565
Name: pi3-disable-bt
1529-
Info: Disable Pi3 Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15
1530-
N.B. To disable the systemd service that initialises the modem so it
1531-
doesn't use the UART, use 'sudo systemctl disable hciuart'.
1532-
Load: dtoverlay=pi3-disable-bt
1533-
Params: <None>
1566+
Info: This overlay has been renamed disable-bt, keeping pi3-disable-bt as an
1567+
alias for backwards compatibility.
1568+
Load: <Deprecated>
15341569

15351570

15361571
Name: pi3-disable-wifi
1537-
Info: Disable Pi3 onboard WiFi
1538-
Load: dtoverlay=pi3-disable-wifi
1539-
Params: <None>
1572+
Info: This overlay has been renamed disable-wifi, keeping pi3-disable-wifi as
1573+
an alias for backwards compatibility.
1574+
Load: <Deprecated>
15401575

15411576

15421577
Name: pi3-miniuart-bt
1543-
Info: Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore
1544-
UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum
1545-
usable baudrate.
1546-
N.B. It is also necessary to edit /lib/systemd/system/hciuart.service
1547-
and replace ttyAMA0 with ttyS0, unless you have a system with udev rules
1548-
that create /dev/serial0 and /dev/serial1, in which case use
1549-
/dev/serial1 instead because it will always be correct. Furthermore,
1550-
you must also set core_freq=250 in config.txt or the miniuart will not
1551-
work.
1552-
Load: dtoverlay=pi3-miniuart-bt
1553-
Params: <None>
1578+
Info: This overlay has been renamed miniuart-bt, keeping pi3-miniuart-bt as
1579+
an alias for backwards compatibility.
1580+
Load: <Deprecated>
15541581

15551582

15561583
Name: pibell
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
/* Pi3 uses a GPIO expander to drive the LEDs which can only be accessed
5+
from the VPU. There is a special driver for this with a separate DT node,
6+
which has the unfortunate consequence of breaking the act_led_gpio and
7+
act_led_activelow dtparams.
8+
9+
This overlay changes the GPIO controller back to the standard one and
10+
restores the dtparams.
11+
*/
12+
13+
/{
14+
compatible = "brcm,bcm2835";
15+
16+
fragment@0 {
17+
target = <&act_led>;
18+
frag0: __overlay__ {
19+
gpios = <&gpio 0 0>;
20+
};
21+
};
22+
23+
__overrides__ {
24+
gpio = <&frag0>,"gpios:4";
25+
activelow = <&frag0>,"gpios:8";
26+
};
27+
};
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
/* Disable Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15.
5+
To disable the systemd service that initialises the modem so it doesn't use
6+
the UART:
7+
8+
sudo systemctl disable hciuart
9+
*/
10+
11+
/{
12+
compatible = "brcm,bcm2835";
13+
14+
fragment@0 {
15+
target = <&uart1>;
16+
__overlay__ {
17+
status = "disabled";
18+
};
19+
};
20+
21+
fragment@1 {
22+
target = <&uart0>;
23+
__overlay__ {
24+
pinctrl-names = "default";
25+
pinctrl-0 = <&uart0_pins>;
26+
status = "okay";
27+
};
28+
};
29+
30+
fragment@2 {
31+
target = <&uart0_pins>;
32+
__overlay__ {
33+
brcm,pins;
34+
brcm,function;
35+
brcm,pull;
36+
};
37+
};
38+
39+
fragment@3 {
40+
target = <&bt_pins>;
41+
__overlay__ {
42+
brcm,pins;
43+
brcm,function;
44+
brcm,pull;
45+
};
46+
};
47+
48+
fragment@4 {
49+
target-path = "/aliases";
50+
__overlay__ {
51+
serial0 = "/soc/serial@7e201000";
52+
serial1 = "/soc/serial@7e215040";
53+
};
54+
};
55+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
/{
5+
compatible = "brcm,bcm2835";
6+
7+
fragment@0 {
8+
target = <&mmc>;
9+
__overlay__ {
10+
status = "disabled";
11+
};
12+
};
13+
14+
fragment@1 {
15+
target = <&mmcnr>;
16+
__overlay__ {
17+
status = "disabled";
18+
};
19+
};
20+
};
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
/* Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore
5+
UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum
6+
usable baudrate.
7+
8+
It is also necessary to edit /lib/systemd/system/hciuart.service and
9+
replace ttyAMA0 with ttyS0, unless you have a system with udev rules
10+
that create /dev/serial0 and /dev/serial1, in which case use /dev/serial1
11+
instead because it will always be correct.
12+
13+
If cmdline.txt uses the alias serial0 to refer to the user-accessable port
14+
then the firmware will replace with the appropriate port whether or not
15+
this overlay is used.
16+
*/
17+
18+
/{
19+
compatible = "brcm,bcm2835";
20+
21+
fragment@0 {
22+
target = <&uart0>;
23+
__overlay__ {
24+
pinctrl-names = "default";
25+
pinctrl-0 = <&uart0_pins>;
26+
status = "okay";
27+
};
28+
};
29+
30+
fragment@1 {
31+
target = <&uart1>;
32+
__overlay__ {
33+
pinctrl-names = "default";
34+
pinctrl-0 = <&uart1_pins &bt_pins &fake_bt_cts>;
35+
status = "okay";
36+
};
37+
};
38+
39+
fragment@2 {
40+
target = <&uart0_pins>;
41+
__overlay__ {
42+
brcm,pins;
43+
brcm,function;
44+
brcm,pull;
45+
};
46+
};
47+
48+
fragment@3 {
49+
target = <&uart1_pins>;
50+
__overlay__ {
51+
brcm,pins = <32 33>;
52+
brcm,function = <2>; /* alt5=UART1 */
53+
brcm,pull = <0 2>;
54+
};
55+
};
56+
57+
fragment@4 {
58+
target = <&gpio>;
59+
__overlay__ {
60+
fake_bt_cts: fake_bt_cts {
61+
brcm,pins = <31>;
62+
brcm,function = <1>; /* output */
63+
};
64+
};
65+
};
66+
67+
fragment@5 {
68+
target-path = "/aliases";
69+
__overlay__ {
70+
serial0 = "/soc/serial@7e201000";
71+
serial1 = "/soc/serial@7e215040";
72+
};
73+
};
74+
};
Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1 @@
1-
/dts-v1/;
2-
/plugin/;
3-
4-
/* Pi3 uses a GPIO expander to drive the LEDs which can only be accessed
5-
from the VPU. There is a special driver for this with a separate DT node,
6-
which has the unfortunate consequence of breaking the act_led_gpio and
7-
act_led_activelow dtparams.
8-
9-
This overlay changes the GPIO controller back to the standard one and
10-
restores the dtparams.
11-
*/
12-
13-
/{
14-
compatible = "brcm,bcm2835";
15-
16-
fragment@0 {
17-
target = <&act_led>;
18-
frag0: __overlay__ {
19-
gpios = <&gpio 0 0>;
20-
};
21-
};
22-
23-
__overrides__ {
24-
gpio = <&frag0>,"gpios:4";
25-
activelow = <&frag0>,"gpios:8";
26-
};
27-
};
1+
#include "act-led-overlay.dts"

0 commit comments

Comments
 (0)