1 From e75384cf32c8941478f24ce4e4cdd7baff047c75 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Mon, 7 Mar 2016 09:53:03 +0000
4 Subject: [PATCH 164/381] BCM270X_DT: Add pi3-miniuart-bt DT overlay
6 Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore
7 UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum
10 It is also necessary to edit /lib/systemd/system/hciuart.server and
11 replace ttyAMA0 with ttyS0.
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
17 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
19 arch/arm/boot/dts/overlays/Makefile | 1 +
20 arch/arm/boot/dts/overlays/README | 10 ++++
21 .../boot/dts/overlays/pi3-miniuart-bt-overlay.dts | 61 ++++++++++++++++++++++
22 3 files changed, 72 insertions(+)
23 create mode 100644 arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts
25 --- a/arch/arm/boot/dts/overlays/Makefile
26 +++ b/arch/arm/boot/dts/overlays/Makefile
27 @@ -40,6 +40,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-o
28 dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb
29 dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb
30 dtb-$(RPI_DT_OVERLAYS) += pi3-disable-bt-overlay.dtb
31 +dtb-$(RPI_DT_OVERLAYS) += pi3-miniuart-bt-overlay.dtb
32 dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
33 dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb
34 dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb
35 --- a/arch/arm/boot/dts/overlays/README
36 +++ b/arch/arm/boot/dts/overlays/README
37 @@ -504,6 +504,16 @@ Load: dtoverlay=pi3-disable-bt
41 +Name: pi3-miniuart-bt
42 +Info: Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore
43 + UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum
45 + N.B. It is also necessary to edit /lib/systemd/system/hciuart.server
46 + and replace ttyAMA0 with ttyS0.
47 +Load: dtoverlay=pi3-miniuart-bt
52 Info: PiScreen display by OzzMaker.com
53 Load: dtoverlay=piscreen,<param>=<val>
55 +++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts
60 +/* Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore
61 + UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum
64 + It is also necessary to edit /lib/systemd/system/hciuart.server and
65 + replace ttyAMA0 with ttyS0.
67 + If cmdline.txt uses the alias serial0 to refer to the user-accessable port
68 + then the firmware will replace with the appropriate port whether or not
69 + this overlay is used.
73 + compatible = "brcm,bcm2708";
78 + pinctrl-names = "default";
79 + pinctrl-0 = <&uart0_pins>;
87 + pinctrl-names = "default";
88 + pinctrl-0 = <&uart1_pins>;
96 + uart0_pins: uart0_pins {
97 + brcm,pins = <14 15>;
98 + brcm,function = <4>; /* alt0 */
102 + uart1_pins: uart1_pins {
103 + brcm,pins = <32 33>;
104 + brcm,function = <2>; /* alt5=UART1 */
111 + target-path = "/aliases";
113 + serial0 = "/soc/uart@7e201000";
114 + serial1 = "/soc/uart@7e215040";