brcm2708: update patches to latest version
[openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0171-BCM270X_DT-Add-pi3-disable-bt-overlay.patch
1 From 42a9bb566fe376a1add4b3780c1b830f64500faa Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Wed, 2 Mar 2016 10:59:05 +0000
4 Subject: [PATCH 171/180] BCM270X_DT: Add pi3-disable-bt overlay
5
6 Disable Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15. To disable
7 the systemd service that initialises the modem so it doesn't use the UART:
8
9        sudo systemctl disable hciuart
10
11 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
12 ---
13  arch/arm/boot/dts/overlays/Makefile                |  1 +
14  arch/arm/boot/dts/overlays/README                  |  8 ++++
15  .../boot/dts/overlays/pi3-disable-bt-overlay.dts   | 48 ++++++++++++++++++++++
16  3 files changed, 57 insertions(+)
17  create mode 100644 arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts
18
19 --- a/arch/arm/boot/dts/overlays/Makefile
20 +++ b/arch/arm/boot/dts/overlays/Makefile
21 @@ -39,6 +39,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-o
22  dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-overlay.dtb
23  dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb
24  dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb
25 +dtb-$(RPI_DT_OVERLAYS) += pi3-disable-bt-overlay.dtb
26  dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
27  dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb
28  dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb
29 --- a/arch/arm/boot/dts/overlays/README
30 +++ b/arch/arm/boot/dts/overlays/README
31 @@ -496,6 +496,14 @@ Params: speed                   Display
32  [ The pcf8563-rtc overlay has been deleted. See i2c-rtc. ]
33  
34  
35 +Name:   pi3-disable-bt
36 +Info:   Disable Pi3 Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15
37 +        N.B. To disable the systemd service that initialises the modem so it
38 +        doesn't use the UART, use 'sudo systemctl disable hciuart'.
39 +Load:   dtoverlay=pi3-disable-bt
40 +Params: <None>
41 +
42 +
43  Name:   piscreen
44  Info:   PiScreen display by OzzMaker.com
45  Load:   dtoverlay=piscreen,<param>=<val>
46 --- /dev/null
47 +++ b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts
48 @@ -0,0 +1,48 @@
49 +/dts-v1/;
50 +/plugin/;
51 +
52 +/* Disable Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15.
53 +   To disable the systemd service that initialises the modem so it doesn't use
54 +   the UART:
55 +
56 +       sudo systemctl disable hciuart
57 +*/
58 +
59 +/{
60 +       compatible = "brcm,bcm2708";
61 +
62 +       fragment@0 {
63 +               target = <&uart1>;
64 +               __overlay__ {
65 +                       status = "disabled";
66 +               };
67 +       };
68 +
69 +       fragment@1 {
70 +               target = <&uart0>;
71 +               __overlay__ {
72 +                       pinctrl-names = "default";
73 +                       pinctrl-0 = <&uart0_pins>;
74 +                       status = "okay";
75 +               };
76 +       };
77 +
78 +       fragment@2 {
79 +               target = <&gpio>;
80 +               __overlay__ {
81 +                       uart0_pins: uart0_pins {
82 +                               brcm,pins = <14 15>;
83 +                               brcm,function = <4>; /* alt0 */
84 +                               brcm,pull = <0 2>;
85 +                       };
86 +               };
87 +       };
88 +
89 +       fragment@3 {
90 +               target-path = "/aliases";
91 +               __overlay__ {
92 +                       serial0 = "/soc/uart@7e201000";
93 +                       serial1 = "/soc/uart@7e215040";
94 +               };
95 +       };
96 +};