BCM2708: Add core Device Tree support
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / miniuart-bt-overlay.dts
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 };