public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v3 0/8] Bluetooth: Add MediaTek MT7927 (MT6639) support
@ 2026-03-30 20:39 Javier Tia
  0 siblings, 0 replies; 3+ messages in thread
From: Javier Tia @ 2026-03-30 20:39 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: Marcel Holtmann, Matthias Brugger, AngeloGioacchino Del Regno,
	linux-bluetooth, linux-kernel, linux-arm-kernel, linux-mediatek,
	Ryan Gilbert, Jose Tiburcio Ribeiro Netto, Llewellyn Curran,
	Chapuis Dario, Evgeny Kapusta, Nitin Gurram, Thibaut FRANCOIS,
	Ivan Lubnin

Hi Luiz,

Thank you for the review.

On Thu, Mar 27, 2026 Luiz Augusto von Dentz wrote:
> https://sashiko.dev/#/patchset/20260326-mt7927-bt-support-v3-0-fa7ebd424323%40jetm.me
>
> First one is more concerning since it may mean it can lead to crashes
> with SDIO driver, the other comment may actually need to be addressed
> separately, perhaps WBS handling needs to be fixed on this family of
> controllers.

Both issues are addressed in v4.

For the SDIO concern: btmtk_setup_firmware_79xx now takes dev_id
as a parameter instead of reading it from hci_get_priv. The SDIO
caller passes its own dev_id, so there is no out-of-bounds read
from a mismatched private struct layout.

For the subsys reset: btmtk_usb_subsys_reset now skips the
post-reset CHIPID validation for 0x6639. On affected boards the
register always reads back 0x0000, so the validation would always
fail. This is scoped to 0x6639 only.

Regarding WBS, I verified it on MT7927 hardware (ASUS ROG
Crosshair X870E Hero). The controller reports LMP_TRANSPARENT
and LMP_ERR_DATA_REPORTING in its LMP features, and
HCI_Read_Local_Supported_Codecs returns CVSD, Transparent, and
mSBC. A btmon capture confirms eSCO links establish with
Transparent air mode (0x03) and 60-byte mSBC frames. WBS works
correctly on this controller family, no fix needed.

Link to v4: https://lore.kernel.org/linux-bluetooth/20260330-mt7927-bt-support-v4-0-cecc025e7062@jetm.me/

Best,
Javier

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH 0/2] Bluetooth: Add MediaTek MT7927 (MT6639) support
@ 2026-03-05 16:04 Javier Tia
  2026-03-26 22:13 ` [PATCH v3 0/8] " Javier Tia
  0 siblings, 1 reply; 3+ messages in thread
From: Javier Tia @ 2026-03-05 16:04 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: =?utf-8?q?linux-mediatek=40lists=2Einfradead=2Eorg=2C_Marcel_Holtmann_=3Cmarcel=40holtmann=2Eorg=3E=2C_Luiz_Augusto_von_Dentz_=3Cluiz=2Edentz=40gmail=2Ecom=3E=2C_Matthias_Brugger_=3Cmatthias=2Ebgg=40gmail=2Ecom=3E=2C_AngeloGioacchino_Del_Regno_=3Cangelogioacchino=2Edelregno=40collabora=2Ecom=3E=2C_Jean-Fran=C3=A7ois_Marli=C3=A8re_=3Cfreelance=40marliere=2Efr=3E=2C_Paul_Menzel_=3Cpmenzel=40molgen=2Empg=2Ede=3E?=

This series adds Bluetooth support for the MediaTek MT7927 (Filogic 380)
combo WiFi 7 + BT 5.4 module. The BT subsystem uses hardware variant
0x6639 and connects via USB.

The MT7927 is shipping in motherboards and PCIe add-in cards from ASUS,
Gigabyte, Lenovo, and TP-Link since mid-2024. Without these patches,
users see "Unsupported hardware variant (00006639)" or the BT subsystem
hangs during firmware download.

Jean-François Marlière independently identified the same three root
causes and posted an analysis to the list in February [1], though the
patch diff was not included in that message. This series provides the
complete, split patches addressing the same issues.

The series consists of two patches:

  [1/2] Bluetooth: btmtk: Add MT6639 (MT7927) Bluetooth support
  [2/2] Bluetooth: btusb: Add USB device IDs for MediaTek MT7927 (MT6639)

Three driver changes are needed for MT6639:

1. Firmware naming: MT6639 uses firmware version prefix "2_1" instead of
   "1_1" used by MT7925 and other variants. The firmware path is
   mediatek/mt6639/BT_RAM_CODE_MT6639_2_1_hdr.bin.

2. Section filtering: The firmware binary contains 9 sections, but only
   sections with (dlmodecrctype & 0xff) == 0x01 are Bluetooth-related.
   Sending WiFi/other sections causes an irreversible BT subsystem hang.
   The filter is gated on dev_id == 0x6639 to avoid affecting other chips.

3. Firmware persistence: Firmware persists across BT soft power cycles
   (WMT_FUNC_CTRL=0 does not clear it). Skip re-download on subsequent
   setups to avoid a ~2.6s delay.

The firmware blob (BT_RAM_CODE_MT6639_2_1_hdr.bin) is being submitted
separately to linux-firmware via GitLab MR.

Tested on:
- ASUS ROG Crosshair X870E Hero (USB 0489:e13a)
- Arch Linux 6.19.6, BlueZ 5.82

The companion WiFi support for MT7927 (mt76/mt7925e driver) is being
submitted separately to linux-wireless.

[1] https://lore.kernel.org/linux-bluetooth/496b0f8505eb6ffb19fdbee6f963c62aa6790fba.camel@marliere.fr/

Link: https://bugzilla.kernel.org/show_bug.cgi?id=221096
Link: https://github.com/openwrt/mt76/issues/927

Javier Tia (2):
  Bluetooth: btmtk: Add MT6639 (MT7927) Bluetooth support
  Bluetooth: btusb: Add USB device IDs for MediaTek MT7927 (MT6639)

 drivers/bluetooth/btmtk.c | 32 ++++++++++++++++++++++++++++++--
 drivers/bluetooth/btmtk.h |  1 +
 drivers/bluetooth/btusb.c | 10 ++++++++++
 3 files changed, 41 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-30 20:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-30 20:39 [PATCH v3 0/8] Bluetooth: Add MediaTek MT7927 (MT6639) support Javier Tia
  -- strict thread matches above, loose matches on Subject: below --
2026-03-05 16:04 [PATCH 0/2] " Javier Tia
2026-03-26 22:13 ` [PATCH v3 0/8] " Javier Tia
2026-03-27 17:58   ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox