From nobody Sun Oct 25 14:12:46 2026 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F817293458; Sun, 11 Oct 2026 13:48:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.18.0.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791726498; cv=none; b=BcpdEK9rj/RlrbZBeRaGbjedYqOBC4LdAbrJ6qbDzFEWMiq9Jbe2XA9AXHj03IKLzBuPlvpgStVDzAO/AE0SJIoTSNWrqsDeumBxA18nOW3TB8KLGpT/+1Ax7a//W0OkMMUhe7fmfqDd3nig8rqwT/I0yLUaiAdqs1pzDzyrZKQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791726498; c=relaxed/simple; bh=8bWXy5ihmzFZm3TRCjLyQfV7ciHf1hIZZHKCXyaaW1M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tVwUzkYOATVNj1oQufK5PEK2ceC8ZD1ZLEODRbWuCMb1GD7YCWpPX5QugQcis1R2mLo67iG1kglGIraaCtAXvOv3DQIJKCahAAwjzFmTj79g4+QQh0qf9V2h2tO+apaAh54TO30vYOx8hFO64o3fu+c8UZClaYxUDgdQHlj/h3k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=muenchen-mail.de; spf=pass smtp.mailfrom=muenchen-mail.de; dkim=pass (2048-bit key) header.d=muenchen-mail.de header.i=@muenchen-mail.de header.b=lqimsr+d; arc=none smtp.client-ip=212.18.0.10 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) header.d=muenchen-mail.de header.i=@muenchen-mail.de header.b="lqimsr+d" Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by mail-out.m-online.net (Postfix) with ESMTP id 4j2hX94YNZz1sR8g; Sun, 11 Oct 2026 15:39:05 +0200 (CEST) DKIM-Signature: a=rsa-sha256; bh=AAYA6v5MnUMcI9QcPmOweeiWGFke9spuzNUKiC+8dQk=; c=relaxed/relaxed; d=muenchen-mail.de; h=Date:From:To:Message-ID:Subject; s=r1; t=1791725945; v=1; b=lqimsr+d3XBAIbP1dAkFm4PQDrYYKkjwksqiZwg9mxvSopH2HO0pAreftwjg4mqe CIfep0WRE3Gbqpm2rjtYaHxdXXF0f+0kyewlbG82BdxxNlu8H3AjgCAmim8rXPVb gHEklZrga8IXWbfRl3+UkmkfqI7QnqqXt+OjzuQhDdilAhpkhfgHwS2aOourDqk1 tDdbF29b62VeyfxrbBBl+FEYr29quFfIbt1XqVBmNDWzBlXDAszD2+Hj3OodUYIQ LrDylKQQHoVRBE2KJRUFu9Wvl9epV6U3NrApWrr884p7/Z+u8Sv+qTiWsnaGo6ex 1Vqq9MwWQ06LWRN077VQYw== Received: from frontend03.mail.m-online.net (unknown [192.168.6.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4j2hX80GS8z1sR8H; Sun, 11 Oct 2026 15:39:03 +0200 (CEST) Received: from localhost (dynscan3.mnet-online.de [192.168.6.87]) by mail.m-online.net (Postfix) with ESMTP id 4j2hX74jXDz1qqlS; Sun, 11 Oct 2026 15:39:03 +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 ATq7ikQRj-9X; Sun, 11 Oct 2026 15:39:01 +0200 (CEST) X-Auth-Info: RWtFOPa2WPAAcoNvORZRjrjvz3yyE/RdyuxRfNfJkBn6yqWRhEJ0wED3jO+mdFff Received: from wiesel.intern (aftr-62-216-206-149.dynamic.mnet-online.de [62.216.206.149]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 11 Oct 2026 15:39:01 +0200 (CEST) Received: from murmel.intern (unknown [IPv6:fdea:9b79:8984:1:c2df:628d:efc1:8817]) by wiesel.intern (Postfix) with ESMTP id D62AC79A086A; Sun, 11 Oct 2026 15:39:00 +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 1/2] riscv: dts: thead: Enable bluetooth on BeagleV-Ahead Date: Sun, 11 Oct 2026 15:37:59 +0200 Message-ID: <22787b9b20b62ac010a0fd8de0aa1f564fa577ce.1791720467.git.thomas.gerner@muenchen-mail.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 no driver.=20 Signed-off-by: Thomas Gerner --- .../boot/dts/thead/th1520-beaglev-ahead.dts | 89 +++++++++++++++++++ 1 file changed, 89 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..bf64eb667745 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,31 @@ led-pins { }; =20 &padctrl0_apsys { + bluetooth_in_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>; + }; + }; + + bluetooth_out_pins: bluetooth-1 { + out-pins { + bias-disable; + drive-strength =3D <3>; + function =3D "gpio"; + 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 +310,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 +380,26 @@ &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_in_pins>; + pinctrl-1 =3D <&bluetooth_out_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 From nobody Sun Oct 25 14:12:46 2026 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FCA23B5DE9; Sun, 11 Oct 2026 13:48:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.18.0.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791726497; cv=none; b=g1WX6lzguPpkCeNOdYdpwFGpMiaW3G5dYNiwXwJyxXufVdowTB7VDCyVadWzwcxutZFgxD4/vNdXiKzAUfGQNmsLv1Vjj8cuXBUCX+eU0OG0gvDWRVtoq5ahKBf3LuvVK2+HL9PErvzyLe+PRMwnVSaj74z2UYSubYCy5vSzbcY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791726497; c=relaxed/simple; bh=6+N7J6t2yLEWtzAtDeUfrbKdYFzLj0LDNvuZilpOE+U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EkfDJvZVZ4D/iMdgC6WnPmQ3q1mq0OQWbVwi8hpiV4tmS3sEBeda85gFtBkruX4iwnGrY4XHCpeYPfK38oFCZdyktfGJIrV9HeU081G0GiL6xfq5z6R42dCq9oHfZWI92hMMYNFOf3w5EeHm4V8uj95xyUJ5WqnomZJt/4K7vzQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=muenchen-mail.de; spf=pass smtp.mailfrom=muenchen-mail.de; dkim=pass (2048-bit key) header.d=muenchen-mail.de header.i=@muenchen-mail.de header.b=hxJA5Ia/; arc=none smtp.client-ip=212.18.0.10 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) header.d=muenchen-mail.de header.i=@muenchen-mail.de header.b="hxJA5Ia/" Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by mail-out.m-online.net (Postfix) with ESMTP id 4j2hX94YV1z1sRL5; Sun, 11 Oct 2026 15:39:05 +0200 (CEST) DKIM-Signature: a=rsa-sha256; bh=gctCJrJ7Kds3CcZcJwy4+R3P44nlumx62CuaYhKhBXA=; c=relaxed/relaxed; d=muenchen-mail.de; h=Date:From:To:Message-ID:Subject; s=r1; t=1791725945; v=1; b=hxJA5Ia/WCT0qT3mkgZX6yahUx1R0mBqLPfnDK7n0/SqTnX6/p4Cj4rqutOkXURC c+7GbvhjmrBTa/I3XXltN42CNR1rV22LBUFn/PJ5nWLzM2n/myM79DumIS86Wtmh cE6Z9AYIsiVEl3p7FT/vMg/2+tAPfMs9aMOXL2/9TyHTWj668u2Ab7iuQ3FMBEf2 kCvxDXHxwxCxyZFzVb8kvf0Fz2C+mLDJ8fj0VxoVrZixcOaSG0Ag31d9stLkH9Y8 Qu4sVStqg1Wt7sY/qjBed3H0fLmLouFweUVCxswqW7GP+Lkby1GFvsLsTJ+o4ole EGguTPG5gV2AYXA3vjBAyg== Received: from frontend03.mail.m-online.net (unknown [192.168.6.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4j2hX80GpLz1sR8M; Sun, 11 Oct 2026 15:39:03 +0200 (CEST) Received: from localhost (dynscan3.mnet-online.de [192.168.6.87]) by mail.m-online.net (Postfix) with ESMTP id 4j2hX74SX8z1qqlR; Sun, 11 Oct 2026 15:39:03 +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 aaz3n9_3Nu0C; Sun, 11 Oct 2026 15:39:01 +0200 (CEST) X-Auth-Info: RWtFOPa2WPAAcoNvORZRjrjvz3yyE/RdyuxRfNfJkBn6yqWRhEJ0wED3jO+mdFff Received: from wiesel.intern (aftr-62-216-206-149.dynamic.mnet-online.de [62.216.206.149]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 11 Oct 2026 15:39:01 +0200 (CEST) Received: from murmel.intern (unknown [IPv6:fdea:9b79:8984:1:c2df:628d:efc1:8817]) by wiesel.intern (Postfix) with ESMTP id BE9AB79A081C; Sun, 11 Oct 2026 15:39:00 +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 2/2] Bluetooth: btbcm: disable read tx power for BeagleV-Ahead Date: Sun, 11 Oct 2026 15:37:58 +0200 Message-ID: <578087018e274b0dcf25a523adc0d5cc590cceee.1791720467.git.thomas.gerner@muenchen-mail.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 --- 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