From nobody Sun Oct 25 14:54:28 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=212.18.0.9 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792502808; b=KTSWWC+wfAWccPx6Cm3LeO3gF908HpCFN3mRuApFefAQuV60gm8O6BsP/zf8s4HOc/w6 4vr47f89dzTQYmPqU28rR3/CCmVuWq2HGG/lPYTwmlqXG/bJ3MJtudkMoCkrfX+AQwbww jeZ/bHehPM3/LcEVDmm/pDIGhYE0x9WUhqvKlcbfoQeK3luvHRzPEEmtqBLwzysRavgI2 X3JR5MTHii5FnM1+LWjSigmvBwzpHVhNQDXO/TZ9pCMoSmUIAk1kv9x6WM0FhtgN0hWrs FtBrIRfEAdPq3MOs0yBNpyyMvnvJJUlO8103oXaGEW8wF9LLrPayeshW+VRBagpTt5Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792502808; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: X-Virus-Scanned:Received:X-Auth-Info:Received:Received:From:To:Cc: Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=GdTiT1zqUh08frHkDgB93/kDjVVTubZPK4W1lRMqWhc=; b=pVzZfJPPQfoXX8NfoNPQ/WUyl+4JwdOu6gMaJVopCejYI1n0GA5N96a5tV7IQ0j7djlP iuHunP+C8sqFoqPtSU9jEZk8Mo8Nsf9YHsfwcESRI2xrsli/pHZmgpqBBYtJg9tbFWe4U tPwGqso47mWJf7jqK0LCoFzHT1nMiW/z4m+1h8pPjaEn9NxDym3cCXO9Q/pwKpUyhf2Tz Xh1EaqddjfywC5nRaBlJuAfJTYAlE13dX1lOVGBku/+aDazTKGUoS+7EGeWqntCBRc3Pu oQTSbcdleJ/ERgvA6ImZ/GE+R8xteEUN6jdaCaToyecKn+aqSyOCC43HQGLGUSVx3vg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=muenchen-mail.de; spf=pass smtp.mailfrom=muenchen-mail.de; dkim=pass header.d=muenchen-mail.de header.i=@muenchen-mail.de header.a=rsa-sha256 header.s=r1 header.b=6SNc7g8Y; arc=none smtp.remote-ip=212.18.0.9 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7243E606A31D; Tue, 20 Oct 2026 13:26:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7243E606A31D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=muenchen-mail.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=muenchen-mail.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=muenchen-mail.de header.i=@muenchen-mail.de header.a=rsa-sha256 header.s=r1 header.b=6SNc7g8Y Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by mail-out.m-online.net (Postfix) with ESMTP id 4j8Cqd5dKnz1rB8C; Tue, 20 Oct 2026 15:26:37 +0200 (CEST) DKIM-Signature: a=rsa-sha256; bh=GdTiT1zqUh08frHkDgB93/kDjVVTubZPK4W1lRMqWhc=; c=relaxed/relaxed; d=muenchen-mail.de; h=Date:From:To:Message-ID:Subject; s=r1; t=1792502797; v=1; b=6SNc7g8YKQW8B0TohZR7jo5AebywKGsa/INxfzSIKzPosB340Pv7c47xTbkDYgg7 bqp8Tw9c/72sOkVAFqbfyYiRtNEcPgxicqFqWWG+hVxXgan2YJn/GAa9Lt1svh4/ fB1m7cF7TRso67cZ7VRoEXdyUdLtfBeE86HC+6pIWh1zYQbC3UIc6Y1TqeqJnFLt BD8ObIwULVwZGLSG5sjuNYswcr7oRn1z0459JAa6xA3000NjBoymys8Eb7ze6W6+ dfW+VqPYDGA80qU7J1bbTkeVOlwwSu7TO3esGWqf6i4yUpg8WC9vK44MRy0lJLlh YiocInrEg1HWT0qBIgCkKw== Received: from frontend03.mail.m-online.net (unknown [192.168.6.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4j8Cqb4LQ0z1rB7K; Tue, 20 Oct 2026 15:26:35 +0200 (CEST) Received: from localhost (dynscan3.mnet-online.de [192.168.6.87]) by mail.m-online.net (Postfix) with ESMTP id 4j8Cqb2pJxz1qqlR; Tue, 20 Oct 2026 15:26:35 +0200 (CEST) X-Virus-Scanned: amavis at mnet-online.de Received: from mail.mnet-online.de ([192.168.6.182]) by localhost (dynscan3.mail.m-online.net [192.168.6.87]) (amavis, port 10024) with ESMTP id 7LzTV1TIc3kf; Tue, 20 Oct 2026 15:26:33 +0200 (CEST) X-Auth-Info: bowsSLLE8E7Ly/rhqS6TupuytPwKIElhWtMg/6gsRNpShmZ+y+aRBvGJ5yv4N1LX Received: from wiesel.intern (aftr-62-216-206-189.dynamic.mnet-online.de [62.216.206.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 20 Oct 2026 15:26:33 +0200 (CEST) Received: from murmel.intern (unknown [IPv6:fdea:9b79:8984:1:7b8d:a039:76a5:1596]) by wiesel.intern (Postfix) with ESMTP id ED4C179A08EE; Tue, 20 Oct 2026 15:26:32 +0200 (CEST) From: Thomas Gerner To: Marcel Holtmann , Luiz Augusto von Dentz , Drew Fustini , Guo Ren , Fu Wei , Rob Herring , Krzysztof Kozlowski Cc: Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, Thomas Gerner Subject: [PATCH v2 1/2] Bluetooth: btbcm: disable read tx power for BeagleV-Ahead Date: Tue, 20 Oct 2026 15:26:03 +0200 Message-ID: <20261020132604.90708-2-thomas.gerner@muenchen-mail.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261020132604.90708-1-thomas.gerner@muenchen-mail.de> References: <20261020132604.90708-1-thomas.gerner@muenchen-mail.de> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The bluetooth module of the Ampak AP6203BM is identified by the btbcm driver as BCM4362A2. The firmware of the bluetooth module on the BeagleV-Ahead reports a capability of reading LE tx power. However reading fails. To get bluetooth working it is necessary to disable reading of LE tx power on the BeagleV-Ahead board. The disable is implemented in a similar way as for several Apple boards but uses the board compatible identification from the DTB as there is no DMI. Signed-off-by: Thomas Gerner --- No changes in v2 drivers/bluetooth/btbcm.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c index 463d59890bef..2d02cc1863d0 100644 --- a/drivers/bluetooth/btbcm.c +++ b/drivers/bluetooth/btbcm.c @@ -436,6 +436,11 @@ static const struct dmi_system_id disable_broken_read_= transmit_power[] =3D { { } }; =20 +static const char *board_broken_read_transmit_power[] __maybe_unused =3D { + "beagle,beaglev-ahead", + NULL +}; + static int btbcm_read_info(struct hci_dev *hdev) { struct sk_buff *skb; @@ -537,12 +542,13 @@ static const struct bcm_subver_table bcm_usb_subver_t= able[] =3D { * This currently only looks up the device tree board appendix, * but can be expanded to other mechanisms. */ -static const char *btbcm_get_board_name(struct device *dev) +static const char *btbcm_get_board_name(struct hci_dev *hdev) { #ifdef CONFIG_OF struct device_node *root __free(device_node) =3D of_find_node_by_path("/"= ); char *board_type; const char *tmp; + const char **s; =20 if (!root) return NULL; @@ -550,8 +556,15 @@ static const char *btbcm_get_board_name(struct device = *dev) if (of_property_read_string_index(root, "compatible", 0, &tmp)) return NULL; =20 + /* disable broken Read LE Min/Max Tx Power on first board found in list */ + for (s =3D board_broken_read_transmit_power; *s; s++) + if (!strcmp(tmp, *s)) { + hci_set_quirk(hdev, HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER); + break; + } + /* get rid of any '/' in the compatible string */ - board_type =3D devm_kstrdup(dev, tmp, GFP_KERNEL); + board_type =3D devm_kstrdup(&hdev->dev, tmp, GFP_KERNEL); if (!board_type) return NULL; =20 @@ -577,7 +590,7 @@ int btbcm_initialize(struct hci_dev *hdev, bool *fw_loa= d_done, bool use_autobaud const struct firmware *fw; int i, err; =20 - board_name =3D btbcm_get_board_name(&hdev->dev); + board_name =3D btbcm_get_board_name(hdev); =20 /* Reset */ err =3D btbcm_reset(hdev); --=20 2.53.0 From nobody Sun Oct 25 14:54:28 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=212.18.0.9 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792502808; b=LulTNZs+mudBF7wmCT/XT4PzR+lZc9hZwf3L+1u9DhCeELrXXSPF9JQ3OjMGWndZ9RlI HbWldEvGS4KWOrgL/LgDwYZIBVqKIgXulUgFewyxjr1Ac+1H8WBJ8TJa78TJT2Dva6zb+ LNkmKg/DA06nU5HKjztLcbPFuQfDSkOLI24UzMHTUJZk/ZFXcbEVpGiq/HGaBfIMk7dsg pGX8ZOfB8Ug6/g0RnLP7J8Girgc+u9slENH7tg4Kgj4Dw2cATw1GxFeRC3zmcTxWAnZYT /9zdYqVml8iyHH7W+4YfqKmBkfuVDbrn+5q89r3hHGZQ1E9nI4eCtu73ksFAEDF6i6A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792502808; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: X-Virus-Scanned:Received:X-Auth-Info:Received:Received:From:To:Cc: Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=gxqjTLXP2Bdl4XJTAtgSbJ5PxXoA7v64IqgAkEOSj9w=; b=gU36X8J0/UYlLQzVMgtdgpaPdHNPnv5b0TlAkaCkZc9F1C+umK2nDq6/Xzay1pIlor6z vFbvg7DGflZb/baYwaG3yVPrRyHMWOcna4k9DUnr0nMfQN4abhva/vsjtmmhLNxsJk6f0 bIhNDiStrAvAjeFoQLIMf5gceu+U2qWCmtYibIAK7whQ3l+lt5oNmQtJDlIO35bmpMZnN 5IxEs7ulBjMtqOprwparj551fG0rwZ5FEm34BLxtTMkwisarRKLjVM9/OAbZsJfghKrAE JGKRmDihxRIxfLQWsyKxZLBC4mk6pjaIo/o27GatBTmRNMB6YYO46J2KsR7ozPpbYEw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=muenchen-mail.de; spf=pass smtp.mailfrom=muenchen-mail.de; dkim=pass header.d=muenchen-mail.de header.i=@muenchen-mail.de header.a=rsa-sha256 header.s=r1 header.b=3w4L8FIE; arc=none smtp.remote-ip=212.18.0.9 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72240606A31B; Tue, 20 Oct 2026 13:26:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 72240606A31B Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=muenchen-mail.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=muenchen-mail.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=muenchen-mail.de header.i=@muenchen-mail.de header.a=rsa-sha256 header.s=r1 header.b=3w4L8FIE Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by mail-out.m-online.net (Postfix) with ESMTP id 4j8Cqd5dZFz1rB8S; Tue, 20 Oct 2026 15:26:37 +0200 (CEST) DKIM-Signature: a=rsa-sha256; bh=gxqjTLXP2Bdl4XJTAtgSbJ5PxXoA7v64IqgAkEOSj9w=; c=relaxed/relaxed; d=muenchen-mail.de; h=Date:From:To:Message-ID:Subject; s=r1; t=1792502797; v=1; b=3w4L8FIE/Ywd9uazcASiiL2vg4piD76E1+r2pBrGet6WRgBAN4pG39h73KVusL13 AD5osIiiRJrBfeljB438B8mfA5gGUwf0ETQjXrHRAdsVIgBi2jY/GvYTXJ9elojI PauLK8TM+rAkyowl2O6Tk91Xa1+q29i1LcMp9IoKL6ojD89HxOhzEpMaz9oKcO8o pUrFnVh+Qg4sWBRAh5iAFlJ4nYmT5oXsdXR8ToUo3Frco1Lo8DDnLGJHf9QfyDRi SAqOHRLBIyWkI78l8lVtjst8zYjoBLJo4yOS0lU9FvYh3WmhhFnlKsbhJm7olR0C 3hRY3+lvBWN5ylRnbNriIA== Received: from frontend03.mail.m-online.net (unknown [192.168.6.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4j8Cqc2Gkgz1rB88; Tue, 20 Oct 2026 15:26:36 +0200 (CEST) Received: from localhost (dynscan3.mnet-online.de [192.168.6.87]) by mail.m-online.net (Postfix) with ESMTP id 4j8Cqc21yyz1qqlT; Tue, 20 Oct 2026 15:26:36 +0200 (CEST) X-Virus-Scanned: amavis at mnet-online.de Received: from mail.mnet-online.de ([192.168.6.182]) by localhost (dynscan3.mail.m-online.net [192.168.6.87]) (amavis, port 10024) with ESMTP id D802EUZcgVnU; Tue, 20 Oct 2026 15:26:34 +0200 (CEST) X-Auth-Info: X//PJFB5cKJHMaFeE+OqOQNjOzV+MxMHlhQBdCjykIl9w5Vw+uMptPISYU/ALOh0 Received: from wiesel.intern (aftr-62-216-206-189.dynamic.mnet-online.de [62.216.206.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 20 Oct 2026 15:26:34 +0200 (CEST) Received: from murmel.intern (unknown [IPv6:fdea:9b79:8984:1:7b8d:a039:76a5:1596]) by wiesel.intern (Postfix) with ESMTP id DB9AB79A0932; Tue, 20 Oct 2026 15:26:33 +0200 (CEST) From: Thomas Gerner To: Marcel Holtmann , Luiz Augusto von Dentz , Drew Fustini , Guo Ren , Fu Wei , Rob Herring , Krzysztof Kozlowski Cc: Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, Thomas Gerner Subject: [PATCH v2 2/2] riscv: dts: thead: Enable bluetooth on BeagleV-Ahead Date: Tue, 20 Oct 2026 15:26:04 +0200 Message-ID: <20261020132604.90708-3-thomas.gerner@muenchen-mail.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261020132604.90708-1-thomas.gerner@muenchen-mail.de> References: <20261020132604.90708-1-thomas.gerner@muenchen-mail.de> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On the BeagleV-Ahead the bluetooth module of the Ampak AP6203BM is identified by the btbcm driver as BCM4362A2. The module is connected by UART4, several gpio pins and an I2S interface. The I2S is currently not used as there is currently no driver. Signed-off-by: Thomas Gerner --- Changes in v2: - use default pinctrl definition for bluetooth in and out pins =09 .../boot/dts/thead/th1520-beaglev-ahead.dts | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arch/risc= v/boot/dts/thead/th1520-beaglev-ahead.dts index e16484a47653..7161a9d4c61f 100644 --- a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts +++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts @@ -76,6 +76,23 @@ led-5 { }; }; =20 + reg_vbat_1v8: regulator-vbat-1v8 { + compatible =3D "regulator-fixed"; + regulator-boot-on; + regulator-max-microvolt =3D <1800000>; + regulator-min-microvolt =3D <1800000>; + regulator-name =3D "vbat-1v8"; + }; + + reg_vbat_3v3: regulator-vbat-3v3 { + compatible =3D "regulator-fixed"; + enable-active-high; + regulator-boot-on; + regulator-max-microvolt =3D <3300000>; + regulator-min-microvolt =3D <3300000>; + regulator-name =3D "vbat-3v3"; + }; + hdmi-connector { compatible =3D "hdmi-connector"; type =3D "d"; @@ -152,6 +169,28 @@ led-pins { }; =20 &padctrl0_apsys { + bluetooth_pins: bluetooth-0 { + in-pins { + bias-disable; + drive-strength =3D <1>; + function =3D "gpio"; + input-enable; + input-schmitt-enable; + pins =3D "GPIO2_30"; + slew-rate =3D <0>; + }; + + out-pins { + bias-disable; + drive-strength =3D <3>; + input-disable; + input-schmitt-disable; + pins =3D "SDIO1_DETN", /* GPIO2_29 */ + "SDIO1_WPRTN"; /* GPIO2_28 */ + slew-rate =3D <0>; + }; + }; + gmac0_pins: gmac0-0 { tx-pins { pins =3D "GMAC0_TX_CLK", @@ -268,6 +307,30 @@ reg-on-pins { }; }; =20 +&padctrl1_apsys { + uart4_pins: uart4-0 { + rx-pins { + bias-disable; + drive-strength =3D <1>; + function =3D "uart"; + input-enable; + pins =3D "UART4_RXD", "UART4_CTSN"; + input-schmitt-enable; + slew-rate =3D <0>; + }; + + tx-pins { + bias-disable; + drive-strength =3D <3>; + function =3D "uart"; + input-disable; + pins =3D "UART4_TXD", "UART4_RTSN"; + input-schmitt-disable; + slew-rate =3D <0>; + }; + }; +}; + &sdio0 { bus-width =3D <4>; max-frequency =3D <198000000>; @@ -314,3 +377,25 @@ &uart0 { pinctrl-0 =3D <&uart0_pins>; status =3D "okay"; }; + +&uart4 { + pinctrl-0 =3D <&uart4_pins>; + pinctrl-names =3D "default"; + uart-has-rtscts; + + status =3D "okay"; + + bluetooth { + compatible =3D "brcm,bcm4329-bt"; + device-wakeup-gpios =3D <&gpio2 29 GPIO_ACTIVE_HIGH>; + interrupt-parent =3D <&gpio2>; + interrupts =3D <30 IRQ_TYPE_EDGE_RISING>; + interrupt-names =3D "host-wakeup"; + max-speed =3D <921600>; + pinctrl-0 =3D <&bluetooth_pins>; + pinctrl-names =3D "default"; + shutdown-gpios =3D <&gpio2 28 GPIO_ACTIVE_HIGH>; /* BT-REG-ON */ + vbat-supply =3D <®_vbat_3v3>; + vddio-supply =3D <®_vbat_1v8>; + }; +}; --=20 2.53.0