1 From 2683773c8d2092083bafbc64fe7e6a25c48b8f5f Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <pelwell@users.noreply.github.com>
3 Date: Fri, 5 Jul 2019 14:49:22 +0100
4 Subject: [PATCH 701/703] overlays: Rename pi3- overlays to be less
7 Rename the various pi3- overlays to be more generic, listing
8 the devices they apply to in the README. The original names are
9 retained for backwards compatibility as files that just include
10 the new versions - the README marks them as being deprecated.
12 See: https://github.com/raspberrypi/firmware/issues/1174
14 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
16 arch/arm/boot/dts/overlays/Makefile | 4 +
17 arch/arm/boot/dts/overlays/README | 97 ++++++++++++-------
18 .../arm/boot/dts/overlays/act-led-overlay.dts | 27 ++++++
19 .../boot/dts/overlays/disable-bt-overlay.dts | 55 +++++++++++
20 .../dts/overlays/disable-wifi-overlay.dts | 20 ++++
21 .../boot/dts/overlays/miniuart-bt-overlay.dts | 74 ++++++++++++++
22 .../boot/dts/overlays/pi3-act-led-overlay.dts | 28 +-----
23 .../dts/overlays/pi3-disable-bt-overlay.dts | 56 +----------
24 .../dts/overlays/pi3-disable-wifi-overlay.dts | 21 +---
25 .../dts/overlays/pi3-miniuart-bt-overlay.dts | 75 +-------------
26 10 files changed, 246 insertions(+), 211 deletions(-)
27 create mode 100644 arch/arm/boot/dts/overlays/act-led-overlay.dts
28 create mode 100644 arch/arm/boot/dts/overlays/disable-bt-overlay.dts
29 create mode 100644 arch/arm/boot/dts/overlays/disable-wifi-overlay.dts
30 create mode 100644 arch/arm/boot/dts/overlays/miniuart-bt-overlay.dts
32 --- a/arch/arm/boot/dts/overlays/Makefile
33 +++ b/arch/arm/boot/dts/overlays/Makefile
35 # Overlays for the Raspberry Pi platform
37 dtbo-$(CONFIG_ARCH_BCM2835) += \
40 adau7002-simple.dtbo \
42 @@ -26,6 +27,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
45 dionaudio-loco-v2.dtbo \
51 @@ -91,6 +94,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
59 --- a/arch/arm/boot/dts/overlays/README
60 +++ b/arch/arm/boot/dts/overlays/README
61 @@ -180,14 +180,16 @@ Params:
63 act_led_activelow Set to "on" to invert the sense of the LED
65 - N.B. For Pi3 see pi3-act-led overlay.
66 + N.B. For Pi 3B, 3B+, 3A+ and 4B, use the act-led
69 act_led_gpio Set which GPIO to use for the activity LED
70 (in case you want to connect it to an external
72 (default "16" on a non-Plus board, "47" on a
74 - N.B. For Pi3 see pi3-act-led overlay.
75 + N.B. For Pi 3B, 3B+, 3A+ and 4B, use the act-led
80 @@ -205,6 +207,23 @@ Params:
81 and the other i2c baudrate parameters.
85 +Info: Pi 3B, 3B+, 3A+ and 4B use a GPIO expander to drive the LEDs which can
86 + only be accessed from the VPU. There is a special driver for this with a
87 + separate DT node, which has the unfortunate consequence of breaking the
88 + act_led_gpio and act_led_activelow dtparams.
89 + This overlay changes the GPIO controller back to the standard one and
90 + restores the dtparams.
91 +Load: dtoverlay=act-led,<param>=<val>
92 +Params: activelow Set to "on" to invert the sense of the LED
95 + gpio Set which GPIO to use for the activity LED
96 + (in case you want to connect it to an external
102 Info: Overlay for activation of ADAU1977 ADC codec over I2C for control
104 @@ -509,6 +528,21 @@ Params: 24db_digital_gain Allow ga
105 that does not result in clipping/distortion!)
109 +Info: Disable onboard Bluetooth on Pi 3B, 3B+, 3A+, 4B and Zero W, restoring
110 + UART0/ttyAMA0 over GPIOs 14 & 15.
111 + N.B. To disable the systemd service that initialises the modem so it
112 + doesn't use the UART, use 'sudo systemctl disable hciuart'.
113 +Load: dtoverlay=disable-bt
118 +Info: Disable onboard WiFi on Pi 3B, 3B+, 3A+, 4B and Zero W.
119 +Load: dtoverlay=disable-wifi
124 Info: Overlay for a generic 18-bit DPI display
125 This uses GPIOs 0-21 (so no I2C, uart etc.), and activates the output
126 @@ -1447,6 +1481,20 @@ Load: dtoverlay=midi-uart1
131 +Info: Switch the onboard Bluetooth function on Pi 3B, 3B+, 3A+, 4B and Zero W
132 + to use the mini-UART (ttyS0) and restore UART0/ttyAMA0 over GPIOs 14 &
133 + 15. Note that this may reduce the maximum usable baudrate.
134 + N.B. It is also necessary to edit /lib/systemd/system/hciuart.service
135 + and replace ttyAMA0 with ttyS0, unless using Raspbian or another
136 + distribution with udev rules that create /dev/serial0 and /dev/serial1,
137 + in which case use /dev/serial1 instead because it will always be
138 + correct. Furthermore, you must also set core_freq and core_freq_min to
139 + the same value in config.txt or the miniuart will not work.
140 +Load: dtoverlay=miniuart-bt
145 Info: Selects the bcm2835-mmc SD/MMC driver, optionally with overclock
146 Load: dtoverlay=mmc,<param>=<val>
147 @@ -1509,48 +1557,27 @@ Params: panel Display
151 -Info: Pi3 uses a GPIO expander to drive the LEDs which can only be accessed
152 - from the VPU. There is a special driver for this with a separate DT
153 - node, which has the unfortunate consequence of breaking the
154 - act_led_gpio and act_led_activelow dtparams.
155 - This overlay changes the GPIO controller back to the standard one and
156 - restores the dtparams.
157 -Load: dtoverlay=pi3-act-led,<param>=<val>
158 -Params: activelow Set to "on" to invert the sense of the LED
161 - gpio Set which GPIO to use for the activity LED
162 - (in case you want to connect it to an external
165 +Info: This overlay has been renamed act-led, keeping pi3-act-led as an alias
166 + for backwards compatibility.
171 -Info: Disable Pi3 Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15
172 - N.B. To disable the systemd service that initialises the modem so it
173 - doesn't use the UART, use 'sudo systemctl disable hciuart'.
174 -Load: dtoverlay=pi3-disable-bt
176 +Info: This overlay has been renamed disable-bt, keeping pi3-disable-bt as an
177 + alias for backwards compatibility.
181 Name: pi3-disable-wifi
182 -Info: Disable Pi3 onboard WiFi
183 -Load: dtoverlay=pi3-disable-wifi
185 +Info: This overlay has been renamed disable-wifi, keeping pi3-disable-wifi as
186 + an alias for backwards compatibility.
190 Name: pi3-miniuart-bt
191 -Info: Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore
192 - UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum
194 - N.B. It is also necessary to edit /lib/systemd/system/hciuart.service
195 - and replace ttyAMA0 with ttyS0, unless you have a system with udev rules
196 - that create /dev/serial0 and /dev/serial1, in which case use
197 - /dev/serial1 instead because it will always be correct. Furthermore,
198 - you must also set core_freq=250 in config.txt or the miniuart will not
200 -Load: dtoverlay=pi3-miniuart-bt
202 +Info: This overlay has been renamed miniuart-bt, keeping pi3-miniuart-bt as
203 + an alias for backwards compatibility.
209 +++ b/arch/arm/boot/dts/overlays/act-led-overlay.dts
214 +/* Pi3 uses a GPIO expander to drive the LEDs which can only be accessed
215 + from the VPU. There is a special driver for this with a separate DT node,
216 + which has the unfortunate consequence of breaking the act_led_gpio and
217 + act_led_activelow dtparams.
219 + This overlay changes the GPIO controller back to the standard one and
220 + restores the dtparams.
224 + compatible = "brcm,bcm2835";
227 + target = <&act_led>;
228 + frag0: __overlay__ {
229 + gpios = <&gpio 0 0>;
234 + gpio = <&frag0>,"gpios:4";
235 + activelow = <&frag0>,"gpios:8";
239 +++ b/arch/arm/boot/dts/overlays/disable-bt-overlay.dts
244 +/* Disable Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15.
245 + To disable the systemd service that initialises the modem so it doesn't use
248 + sudo systemctl disable hciuart
252 + compatible = "brcm,bcm2835";
257 + status = "disabled";
264 + pinctrl-names = "default";
265 + pinctrl-0 = <&uart0_pins>;
271 + target = <&uart0_pins>;
280 + target = <&bt_pins>;
289 + target-path = "/aliases";
291 + serial0 = "/soc/serial@7e201000";
292 + serial1 = "/soc/serial@7e215040";
297 +++ b/arch/arm/boot/dts/overlays/disable-wifi-overlay.dts
303 + compatible = "brcm,bcm2835";
308 + status = "disabled";
315 + status = "disabled";
320 +++ b/arch/arm/boot/dts/overlays/miniuart-bt-overlay.dts
325 +/* Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore
326 + UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum
329 + It is also necessary to edit /lib/systemd/system/hciuart.service and
330 + replace ttyAMA0 with ttyS0, unless you have a system with udev rules
331 + that create /dev/serial0 and /dev/serial1, in which case use /dev/serial1
332 + instead because it will always be correct.
334 + If cmdline.txt uses the alias serial0 to refer to the user-accessable port
335 + then the firmware will replace with the appropriate port whether or not
336 + this overlay is used.
340 + compatible = "brcm,bcm2835";
345 + pinctrl-names = "default";
346 + pinctrl-0 = <&uart0_pins>;
354 + pinctrl-names = "default";
355 + pinctrl-0 = <&uart1_pins &bt_pins &fake_bt_cts>;
361 + target = <&uart0_pins>;
370 + target = <&uart1_pins>;
372 + brcm,pins = <32 33>;
373 + brcm,function = <2>; /* alt5=UART1 */
381 + fake_bt_cts: fake_bt_cts {
383 + brcm,function = <1>; /* output */
389 + target-path = "/aliases";
391 + serial0 = "/soc/serial@7e201000";
392 + serial1 = "/soc/serial@7e215040";
396 --- a/arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts
397 +++ b/arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts
402 -/* Pi3 uses a GPIO expander to drive the LEDs which can only be accessed
403 - from the VPU. There is a special driver for this with a separate DT node,
404 - which has the unfortunate consequence of breaking the act_led_gpio and
405 - act_led_activelow dtparams.
407 - This overlay changes the GPIO controller back to the standard one and
408 - restores the dtparams.
412 - compatible = "brcm,bcm2835";
415 - target = <&act_led>;
416 - frag0: __overlay__ {
417 - gpios = <&gpio 0 0>;
422 - gpio = <&frag0>,"gpios:4";
423 - activelow = <&frag0>,"gpios:8";
426 +#include "act-led-overlay.dts"
427 --- a/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts
428 +++ b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts
433 -/* Disable Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15.
434 - To disable the systemd service that initialises the modem so it doesn't use
437 - sudo systemctl disable hciuart
441 - compatible = "brcm,bcm2835";
446 - status = "disabled";
453 - pinctrl-names = "default";
454 - pinctrl-0 = <&uart0_pins>;
460 - target = <&uart0_pins>;
469 - target = <&bt_pins>;
478 - target-path = "/aliases";
480 - serial0 = "/soc/serial@7e201000";
481 - serial1 = "/soc/serial@7e215040";
485 +#include "disable-bt-overlay.dts"
486 --- a/arch/arm/boot/dts/overlays/pi3-disable-wifi-overlay.dts
487 +++ b/arch/arm/boot/dts/overlays/pi3-disable-wifi-overlay.dts
493 - compatible = "brcm,bcm2835";
498 - status = "disabled";
505 - status = "disabled";
509 +#include "disable-wifi-overlay.dts"
510 --- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts
511 +++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts
516 -/* Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore
517 - UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum
520 - It is also necessary to edit /lib/systemd/system/hciuart.service and
521 - replace ttyAMA0 with ttyS0, unless you have a system with udev rules
522 - that create /dev/serial0 and /dev/serial1, in which case use /dev/serial1
523 - instead because it will always be correct.
525 - If cmdline.txt uses the alias serial0 to refer to the user-accessable port
526 - then the firmware will replace with the appropriate port whether or not
527 - this overlay is used.
531 - compatible = "brcm,bcm2835";
536 - pinctrl-names = "default";
537 - pinctrl-0 = <&uart0_pins>;
545 - pinctrl-names = "default";
546 - pinctrl-0 = <&uart1_pins &bt_pins &fake_bt_cts>;
552 - target = <&uart0_pins>;
561 - target = <&uart1_pins>;
563 - brcm,pins = <32 33>;
564 - brcm,function = <2>; /* alt5=UART1 */
572 - fake_bt_cts: fake_bt_cts {
574 - brcm,function = <1>; /* output */
580 - target-path = "/aliases";
582 - serial0 = "/soc/serial@7e201000";
583 - serial1 = "/soc/serial@7e215040";
587 +#include "miniuart-bt-overlay.dts"