[PATCH v2 2/2] riscv: dts: spacemit: enable Bluetooth on BPI-F3

Frédéric Mahé frederic.mahe at cirad.fr
Wed Nov 11 01:45:57 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 slow_uart2, set to 48 MHz.

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 | 17 +++++++++++++++++
 1 file changed, 17 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..ed6d4b7f4 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
@@ -383,6 +383,23 @@ &uart0 {
 	status = "okay";
 };
 
+&uart2 {
+	assigned-clocks = <&syscon_apbc CLK_UART2>,
+			  <&syscon_mpmu CLK_SLOW_UART2>;
+	assigned-clock-parents = <&syscon_mpmu CLK_SLOW_UART2>;
+	assigned-clock-rates = <0>, <48000000>;
+	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