-
Notifications
You must be signed in to change notification settings - Fork 5k
/
miniuart-bt-overlay.dts
93 lines (79 loc) · 1.75 KB
/
miniuart-bt-overlay.dts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/dts-v1/;
/plugin/;
/* Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore
UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum
usable baudrate.
It is also necessary to edit /lib/systemd/system/hciuart.service and
replace ttyAMA0 with ttyS0, unless you have a system with udev rules
that create /dev/serial0 and /dev/serial1, in which case use /dev/serial1
instead because it will always be correct.
If cmdline.txt uses the alias serial0 to refer to the user-accessable port
then the firmware will replace with the appropriate port whether or not
this overlay is used.
*/
#include <dt-bindings/gpio/gpio.h>
/{
compatible = "brcm,bcm2835";
fragment@0 {
target = <&uart0>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins>;
status = "okay";
};
};
fragment@1 {
target = <&bt>;
__overlay__ {
status = "disabled";
};
};
fragment@2 {
target = <&uart1>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins &bt_pins &fake_bt_cts>;
status = "okay";
};
};
fragment@3 {
target = <&uart0_pins>;
__overlay__ {
brcm,pins;
brcm,function;
brcm,pull;
};
};
fragment@4 {
target = <&uart1_pins>;
__overlay__ {
brcm,pins = <32 33>;
brcm,function = <2>; /* alt5=UART1 */
brcm,pull = <0 2>;
};
};
fragment@5 {
target = <&gpio>;
__overlay__ {
fake_bt_cts: fake_bt_cts {
brcm,pins = <31>;
brcm,function = <1>; /* output */
};
};
};
fragment@6 {
target-path = "/aliases";
__overlay__ {
serial0 = "/soc/serial@7e201000";
serial1 = "/soc/serial@7e215040";
};
};
fragment@7 {
target = <&minibt>;
minibt_frag: __overlay__ {
};
};
__overrides__ {
krnbt = <&minibt_frag>,"status";
};
};