mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefano Radaelli <stefano.radaelli21@gmail.com>
To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-bluetooth@vger.kernel.org
Cc: pierluigi.p@variscite.com,
	Stefano Radaelli <stefano.r@variscite.com>,
	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>,
	David Lechner <david@lechnology.com>
Subject: [PATCH v1 2/2] Bluetooth: hci_ll: Add DT property to disable enhanced SCO setup
Date: Mon, 23 Feb 2026 12:52:56 +0100	[thread overview]
Message-ID: <998db3667bb97a6908be01912e165d79ba849925.1771847350.git.stefano.r@variscite.com> (raw)
In-Reply-To: <cover.1771847350.git.stefano.r@variscite.com>

The HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN quirk was introduced by
commit 05abad857277 ("Bluetooth: HCI: Add
HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN quirk") to handle controllers
that advertise support for the HCI Enhanced Setup Synchronous Connection
command but fail to use it properly with some SCO configurations (e.g.
BT_VOICE_TRANSPARENT/mSBC).

This behavior has been observed on TI controllers used with the
hci_ll driver, where SCO setup can fail unless the enhanced setup path
is avoided.

Add support for the optional DT property "ti,no-enhanced-setup-sync-conn"
and, when present, set HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN during
controller setup, as intended by the quirk documentation.

Signed-off-by: Stefano Radaelli <stefano.r@variscite.com>
---
 drivers/bluetooth/hci_ll.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
index 91acf24f1ef5..5f69f0654c19 100644
--- a/drivers/bluetooth/hci_ll.c
+++ b/drivers/bluetooth/hci_ll.c
@@ -68,6 +68,7 @@ struct ll_device {
 	struct gpio_desc *enable_gpio;
 	struct clk *ext_clk;
 	bdaddr_t bdaddr;
+	bool broken_enhanced_setup;
 };
 
 struct ll_struct {
@@ -656,6 +657,10 @@ static int ll_setup(struct hci_uart *hu)
 			hci_set_quirk(hu->hdev, HCI_QUIRK_INVALID_BDADDR);
 	}
 
+	if (lldev->broken_enhanced_setup)
+		hci_set_quirk(hu->hdev,
+			      HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN);
+
 	/* Operational speed if any */
 	if (hu->oper_speed)
 		speed = hu->oper_speed;
@@ -710,6 +715,10 @@ static int hci_ti_probe(struct serdev_device *serdev)
 	of_property_read_u32(serdev->dev.of_node, "max-speed", &max_speed);
 	hci_uart_set_speeds(hu, 115200, max_speed);
 
+	lldev->broken_enhanced_setup =
+	       of_property_read_bool(serdev->dev.of_node,
+				     "ti,no-enhanced-setup-sync-conn");
+
 	/* optional BD address from nvram */
 	bdaddr_cell = nvmem_cell_get(&serdev->dev, "bd-address");
 	if (IS_ERR(bdaddr_cell)) {
-- 
2.47.3


      parent reply	other threads:[~2026-02-23 11:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 11:52 [PATCH v1 0/2] Bluetooth: hci_ll: Add DT control for enhanced SCO setup erratum Stefano Radaelli
2026-02-23 11:52 ` [PATCH v1 1/2] dt-bindings: net: bluetooth: ti: Add property " Stefano Radaelli
2026-02-23 12:03   ` Krzysztof Kozlowski
2026-02-23 12:15     ` Stefano Radaelli
2026-02-24  7:35       ` Krzysztof Kozlowski
2026-02-24 10:42         ` Stefano Radaelli
2026-02-23 11:52 ` Stefano Radaelli [this message]

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=998db3667bb97a6908be01912e165d79ba849925.1771847350.git.stefano.r@variscite.com \
    --to=stefano.radaelli21@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=david@lechnology.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=pierluigi.p@variscite.com \
    --cc=robh@kernel.org \
    --cc=stefano.r@variscite.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®