mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Frédéric Mahé" <frederic.mahe@cirad.fr>
To: Marcel Holtmann <marcel@holtmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Yixun Lan <dlan@kernel.org>
Cc: "Vasily Khoruzhick" <anarsoul@gmail.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Paul Walmsley" <pjw@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	"Troy Mitchell" <troy.mitchell@linux.spacemit.com>,
	linux-bluetooth@vger.kernel.org, devicetree@vger.kernel.org,
	linux-riscv@lists.infradead.org, spacemit@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	"Frédéric Mahé" <frederic.mahe@cirad.fr>
Subject: [PATCH 2/2] riscv: dts: spacemit: enable Bluetooth on BPI-F3
Date: Tue, 10 Nov 2026 08:46:07 +0100	[thread overview]
Message-ID: <20261110074607.363918-3-frederic.mahe@cirad.fr> (raw)
In-Reply-To: <20261110074607.363918-1-frederic.mahe@cirad.fr>

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@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


  parent reply	other threads:[~2026-11-10  7:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  7:46 [PATCH 0/2] Bluetooth for the RTL8852BS " Frédéric Mahé
2026-11-10  7:46 ` [PATCH 1/2] dt-bindings: net: bluetooth: realtek: Add RTL8852BS Frédéric Mahé
2026-11-10  7:46 ` Frédéric Mahé [this message]
2026-11-10  8:44   ` [PATCH 2/2] riscv: dts: spacemit: enable Bluetooth on BPI-F3 Troy Mitchell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261110074607.363918-3-frederic.mahe@cirad.fr \
    --to=frederic.mahe@cirad.fr \
    --cc=alex@ghiti.fr \
    --cc=alistair@alistair23.me \
    --cc=anarsoul@gmail.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=robh@kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=troy.mitchell@linux.spacemit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®