[PATCH 2/2] riscv: dts: spacemit: enable Bluetooth on BPI-F3
Frédéric Mahé
frederic.mahe at cirad.fr
Mon Nov 9 23:46:07 PST 2026
The BPI-F3 has an RTL8852BS module whose Bluetooth part is on UART2,
with hardware flow control. GPIO 63 powers Bluetooth on and GPIO 64
is the device wake line.
The firmware config switches the UART to 1.5 Mbaud, so take the UART2
clock from the 48 MHz slow_uart2 clock.
Tested with a laptop: scan, pairing, and l2ping in both directions,
including incoming connections while the UART is runtime suspended.
An 8-hour soak (an HCI command every 20 s) showed no errors.
This patch was prepared with the help of an AI assistant (Claude),
which also ran the tests.
Signed-off-by: Frédéric Mahé <frederic.mahe at cirad.fr>
---
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
index 58035d886..280adc9dc 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
@@ -383,6 +383,21 @@ &uart0 {
status = "okay";
};
+&uart2 {
+ assigned-clocks = <&syscon_apbc CLK_UART2>;
+ assigned-clock-parents = <&syscon_mpmu CLK_SLOW_UART2>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2_0_cfg>, <&uart2_0_cts_rts_cfg>;
+ uart-has-rtscts;
+ status = "okay";
+
+ bluetooth {
+ compatible = "realtek,rtl8852bs-bt", "realtek,rtl8822cs-bt";
+ enable-gpios = <&gpio K1_GPIO(63) GPIO_ACTIVE_HIGH>;
+ device-wake-gpios = <&gpio K1_GPIO(64) GPIO_ACTIVE_HIGH>;
+ };
+};
+
&usbphy2 {
status = "okay";
};
--
2.47.3
More information about the linux-riscv
mailing list