summaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-6.1/950-0702-overlays-Update-miniuart-bt-now-krnbt-is-default.patch
blob: fa1469044fccab27133cc454c0d31458fdc84a40 (plain)
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
From 2da5974313a0580d948c760214a2ea6f4e59bebf Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Wed, 19 Apr 2023 15:13:48 +0100
Subject: [PATCH] overlays: Update miniuart-bt now krnbt is default

Now that the kernel controls the onboard Bluetooth initialisation by
default, the miniuart-bt overlay needs updating to match.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
 arch/arm/boot/dts/bcm2708-rpi-zero-w.dts           |  6 ++++++
 arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts         |  6 ++++++
 arch/arm/boot/dts/bcm2710-rpi-3-b.dts              |  6 ++++++
 arch/arm/boot/dts/bcm2710-rpi-zero-2-w.dts         |  6 ++++++
 arch/arm/boot/dts/bcm2711-rpi-4-b.dts              |  6 ++++++
 arch/arm/boot/dts/bcm2711-rpi-400.dts              |  6 ++++++
 arch/arm/boot/dts/bcm2711-rpi-cm4.dts              |  6 ++++++
 arch/arm/boot/dts/overlays/README                  | 13 ++++---------
 arch/arm/boot/dts/overlays/miniuart-bt-overlay.dts |  8 +++-----
 9 files changed, 49 insertions(+), 14 deletions(-)

--- a/arch/arm/boot/dts/bcm2708-rpi-zero-w.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-zero-w.dts
@@ -138,6 +138,12 @@
 		brcm,pull;
 	};
 
+	uart1_bt_pins: uart1_bt_pins {
+		brcm,pins = <32 33 30 31>;
+		brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
+		brcm,pull = <0 2 2 0>;
+	};
+
 	audio_pins: audio_pins {
 		brcm,pins = <>;
 		brcm,function = <>;
--- a/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts
@@ -140,6 +140,12 @@
 		brcm,pull;
 	};
 
+	uart1_bt_pins: uart1_bt_pins {
+		brcm,pins = <32 33 30 31>;
+		brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
+		brcm,pull = <0 2 2 0>;
+	};
+
 	audio_pins: audio_pins {
 		brcm,pins = <40 41>;
 		brcm,function = <4>;
--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
+++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
@@ -140,6 +140,12 @@
 		brcm,pull;
 	};
 
+	uart1_bt_pins: uart1_bt_pins {
+		brcm,pins = <32 33>;
+		brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
+		brcm,pull = <0 2>;
+	};
+
 	audio_pins: audio_pins {
 		brcm,pins = <40 41>;
 		brcm,function = <4>;
--- a/arch/arm/boot/dts/bcm2710-rpi-zero-2-w.dts
+++ b/arch/arm/boot/dts/bcm2710-rpi-zero-2-w.dts
@@ -138,6 +138,12 @@
 		brcm,pull;
 	};
 
+	uart1_bt_pins: uart1_bt_pins {
+		brcm,pins = <32 33 30 31>;
+		brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
+		brcm,pull = <0 2 2 0>;
+	};
+
 	audio_pins: audio_pins {
 		brcm,pins = <>;
 		brcm,function = <>;
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
@@ -445,6 +445,12 @@
 		brcm,pull;
 	};
 
+	uart1_bt_pins: uart1_bt_pins {
+		brcm,pins = <32 33 30 31>;
+		brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
+		brcm,pull = <0 2 2 0>;
+	};
+
 	uart2_pins: uart2_pins {
 		brcm,pins = <0 1>;
 		brcm,function = <BCM2835_FSEL_ALT4>;
--- a/arch/arm/boot/dts/bcm2711-rpi-400.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-400.dts
@@ -445,6 +445,12 @@
 		brcm,pull;
 	};
 
+	uart1_bt_pins: uart1_bt_pins {
+		brcm,pins = <32 33 30 31>;
+		brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
+		brcm,pull = <0 2 2 0>;
+	};
+
 	uart2_pins: uart2_pins {
 		brcm,pins = <0 1>;
 		brcm,function = <BCM2835_FSEL_ALT4>;
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
@@ -454,6 +454,12 @@
 		brcm,pull;
 	};
 
+	uart1_bt_pins: uart1_bt_pins {
+		brcm,pins = <32 33 30 31>;
+		brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
+		brcm,pull = <0 2 2 0>;
+	};
+
 	uart2_pins: uart2_pins {
 		brcm,pins = <0 1>;
 		brcm,function = <BCM2835_FSEL_ALT4>;
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -2887,17 +2887,12 @@ Params: speed                   SPI bus
 
 
 Name:   miniuart-bt
-Info:   Switch the onboard Bluetooth function on Pi 3B, 3B+, 3A+, 4B and Zero W
+Info:   Switch the onboard Bluetooth function of a BT-equipped Raspberry Pi
         to use the mini-UART (ttyS0) and restore UART0/ttyAMA0 over GPIOs 14 &
-        15. Note that this may reduce the maximum usable baudrate.
-        N.B. It is also necessary to edit /lib/systemd/system/hciuart.service
-        and replace ttyAMA0 with ttyS0, unless using Raspbian or another
-        distribution with udev rules that create /dev/serial0 and /dev/serial1,
-        in which case use /dev/serial1 instead because it will always be
-        correct. Furthermore, you must also set core_freq and core_freq_min to
-        the same value in config.txt or the miniuart will not work.
+        15. Note that this option uses a lower baudrate, and should only be used
+        with low-bandwidth peripherals.
 Load:   dtoverlay=miniuart-bt,<param>=<val>
-Params: krnbt                   Set to "on" to enable autoprobing of Bluetooth
+Params: krnbt                   Set to "off" to disable autoprobing of Bluetooth
                                 driver without need of hciattach/btattach
 
 
--- a/arch/arm/boot/dts/overlays/miniuart-bt-overlay.dts
+++ b/arch/arm/boot/dts/overlays/miniuart-bt-overlay.dts
@@ -55,11 +55,9 @@
 	};
 
 	fragment@4 {
-		target = <&uart1_pins>;
+		target = <&uart1>;
 		__overlay__ {
-			brcm,pins = <32 33 30 31>;
-			brcm,function = <2>; /* alt5=UART1 */
-			brcm,pull = <0 2 2 0>;
+			pinctrl-0 = <&uart1_bt_pins>;
 		};
 	};
 
@@ -68,6 +66,7 @@
 		__overlay__ {
 			serial0 = "/soc/serial@7e201000";
 			serial1 = "/soc/serial@7e215040";
+			bluetooth = "/soc/serial@7e215040/bluetooth";
 		};
 	};
 
@@ -80,6 +79,5 @@
 
 	__overrides__ {
 		krnbt = <&minibt_frag>,"status";
-		krnbt_baudrate = <&minibt_frag>,"max-speed:0";
 	};
 };