bcm27xx: 6.1: add kernel patches
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-6.1 / 950-0702-overlays-Update-miniuart-bt-now-krnbt-is-default.patch
1 From 2da5974313a0580d948c760214a2ea6f4e59bebf Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Wed, 19 Apr 2023 15:13:48 +0100
4 Subject: [PATCH] overlays: Update miniuart-bt now krnbt is default
5
6 Now that the kernel controls the onboard Bluetooth initialisation by
7 default, the miniuart-bt overlay needs updating to match.
8
9 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
10 ---
11 arch/arm/boot/dts/bcm2708-rpi-zero-w.dts | 6 ++++++
12 arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts | 6 ++++++
13 arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 6 ++++++
14 arch/arm/boot/dts/bcm2710-rpi-zero-2-w.dts | 6 ++++++
15 arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 6 ++++++
16 arch/arm/boot/dts/bcm2711-rpi-400.dts | 6 ++++++
17 arch/arm/boot/dts/bcm2711-rpi-cm4.dts | 6 ++++++
18 arch/arm/boot/dts/overlays/README | 13 ++++---------
19 arch/arm/boot/dts/overlays/miniuart-bt-overlay.dts | 8 +++-----
20 9 files changed, 49 insertions(+), 14 deletions(-)
21
22 --- a/arch/arm/boot/dts/bcm2708-rpi-zero-w.dts
23 +++ b/arch/arm/boot/dts/bcm2708-rpi-zero-w.dts
24 @@ -138,6 +138,12 @@
25 brcm,pull;
26 };
27
28 + uart1_bt_pins: uart1_bt_pins {
29 + brcm,pins = <32 33 30 31>;
30 + brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
31 + brcm,pull = <0 2 2 0>;
32 + };
33 +
34 audio_pins: audio_pins {
35 brcm,pins = <>;
36 brcm,function = <>;
37 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts
38 +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts
39 @@ -140,6 +140,12 @@
40 brcm,pull;
41 };
42
43 + uart1_bt_pins: uart1_bt_pins {
44 + brcm,pins = <32 33 30 31>;
45 + brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
46 + brcm,pull = <0 2 2 0>;
47 + };
48 +
49 audio_pins: audio_pins {
50 brcm,pins = <40 41>;
51 brcm,function = <4>;
52 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
53 +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
54 @@ -140,6 +140,12 @@
55 brcm,pull;
56 };
57
58 + uart1_bt_pins: uart1_bt_pins {
59 + brcm,pins = <32 33>;
60 + brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
61 + brcm,pull = <0 2>;
62 + };
63 +
64 audio_pins: audio_pins {
65 brcm,pins = <40 41>;
66 brcm,function = <4>;
67 --- a/arch/arm/boot/dts/bcm2710-rpi-zero-2-w.dts
68 +++ b/arch/arm/boot/dts/bcm2710-rpi-zero-2-w.dts
69 @@ -138,6 +138,12 @@
70 brcm,pull;
71 };
72
73 + uart1_bt_pins: uart1_bt_pins {
74 + brcm,pins = <32 33 30 31>;
75 + brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
76 + brcm,pull = <0 2 2 0>;
77 + };
78 +
79 audio_pins: audio_pins {
80 brcm,pins = <>;
81 brcm,function = <>;
82 --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
83 +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
84 @@ -445,6 +445,12 @@
85 brcm,pull;
86 };
87
88 + uart1_bt_pins: uart1_bt_pins {
89 + brcm,pins = <32 33 30 31>;
90 + brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
91 + brcm,pull = <0 2 2 0>;
92 + };
93 +
94 uart2_pins: uart2_pins {
95 brcm,pins = <0 1>;
96 brcm,function = <BCM2835_FSEL_ALT4>;
97 --- a/arch/arm/boot/dts/bcm2711-rpi-400.dts
98 +++ b/arch/arm/boot/dts/bcm2711-rpi-400.dts
99 @@ -445,6 +445,12 @@
100 brcm,pull;
101 };
102
103 + uart1_bt_pins: uart1_bt_pins {
104 + brcm,pins = <32 33 30 31>;
105 + brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
106 + brcm,pull = <0 2 2 0>;
107 + };
108 +
109 uart2_pins: uart2_pins {
110 brcm,pins = <0 1>;
111 brcm,function = <BCM2835_FSEL_ALT4>;
112 --- a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
113 +++ b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
114 @@ -454,6 +454,12 @@
115 brcm,pull;
116 };
117
118 + uart1_bt_pins: uart1_bt_pins {
119 + brcm,pins = <32 33 30 31>;
120 + brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
121 + brcm,pull = <0 2 2 0>;
122 + };
123 +
124 uart2_pins: uart2_pins {
125 brcm,pins = <0 1>;
126 brcm,function = <BCM2835_FSEL_ALT4>;
127 --- a/arch/arm/boot/dts/overlays/README
128 +++ b/arch/arm/boot/dts/overlays/README
129 @@ -2887,17 +2887,12 @@ Params: speed SPI bus
130
131
132 Name: miniuart-bt
133 -Info: Switch the onboard Bluetooth function on Pi 3B, 3B+, 3A+, 4B and Zero W
134 +Info: Switch the onboard Bluetooth function of a BT-equipped Raspberry Pi
135 to use the mini-UART (ttyS0) and restore UART0/ttyAMA0 over GPIOs 14 &
136 - 15. Note that this may reduce the maximum usable baudrate.
137 - N.B. It is also necessary to edit /lib/systemd/system/hciuart.service
138 - and replace ttyAMA0 with ttyS0, unless using Raspbian or another
139 - distribution with udev rules that create /dev/serial0 and /dev/serial1,
140 - in which case use /dev/serial1 instead because it will always be
141 - correct. Furthermore, you must also set core_freq and core_freq_min to
142 - the same value in config.txt or the miniuart will not work.
143 + 15. Note that this option uses a lower baudrate, and should only be used
144 + with low-bandwidth peripherals.
145 Load: dtoverlay=miniuart-bt,<param>=<val>
146 -Params: krnbt Set to "on" to enable autoprobing of Bluetooth
147 +Params: krnbt Set to "off" to disable autoprobing of Bluetooth
148 driver without need of hciattach/btattach
149
150
151 --- a/arch/arm/boot/dts/overlays/miniuart-bt-overlay.dts
152 +++ b/arch/arm/boot/dts/overlays/miniuart-bt-overlay.dts
153 @@ -55,11 +55,9 @@
154 };
155
156 fragment@4 {
157 - target = <&uart1_pins>;
158 + target = <&uart1>;
159 __overlay__ {
160 - brcm,pins = <32 33 30 31>;
161 - brcm,function = <2>; /* alt5=UART1 */
162 - brcm,pull = <0 2 2 0>;
163 + pinctrl-0 = <&uart1_bt_pins>;
164 };
165 };
166
167 @@ -68,6 +66,7 @@
168 __overlay__ {
169 serial0 = "/soc/serial@7e201000";
170 serial1 = "/soc/serial@7e215040";
171 + bluetooth = "/soc/serial@7e215040/bluetooth";
172 };
173 };
174
175 @@ -80,6 +79,5 @@
176
177 __overrides__ {
178 krnbt = <&minibt_frag>,"status";
179 - krnbt_baudrate = <&minibt_frag>,"max-speed:0";
180 };
181 };