[PATCH v5 0/3] Bluetooth: btmtk: Add MT7928 support
From: Chris Lu
Date: Wed Jun 24 2026 - 03:57:31 EST
This patch series adds support for MT7928 (device ID 0x7935) to the
btmtk driver, which requires a new two-stage firmware loading process
with CBMCU firmware.
Patch 1 refactors existing firmware download code by replacing magic
numbers with a descriptive BTMTK_WMT_PKT_* enum, making the packet
sequencing logic clearer.
Patch 2 improves BT firmware logging to provide more useful information
for debugging: adds firmware filename before loading and displays chip ID
as HW version instead of firmware's hwver field.
Patch 3 implements MT7928 firmware download flow, which requires loading
CBMCU firmware before Bluetooth firmware. The CBMCU firmware uses a
two-phase download sequence: Phase 1 downloads the section containing
global descriptor and signature data, Phase 2 downloads the remaining
firmware sections. After CBMCU firmware completes, the driver continues
to load the Bluetooth firmware following the standard flow.
Tested on MT7928 hardware with successful firmware loading and
Bluetooth functionality verification.
Changes in v5:
- Split into three patches: refactoring, logging improvement, and
new feature
- Add Patch 2 to improve BT firmware logging independently
* Add firmware filename before loading
* Display chip ID (dev_id) as HW version
* Use clearer log format with separate HW/SW version fields
- Apply same logging improvements to CBMCU firmware in Patch 3
- Better separation of concerns for easier review
Changes in v4:
- Split into two patches: refactoring and new feature
- Add BTMTK_WMT_PKT_* enum to improve code readability
- Replace magic numbers (0xF0, 0xF1) with descriptive macros
- Define MTK_SEC_CBMCU_DESC macro for section type
- Add MT7928 marketing name comment
- Include firmware filename in error messages
- Add detailed size information in firmware validation errors
- Use BTMTK_WMT_PKT_* enum in CBMCU download function
Changes in v3:
- Add firmware size validation with bounds checking
- Improve error messages with context information
- Add section offset validation for both phases
Changes in v2:
- Simplified enum usage by consolidating status definitions
- Improved code maintainability
Chris Lu (3):
Bluetooth: btmtk: Replace magic numbers with WMT packet flag enum
Bluetooth: btmtk: Improve BT firmware logging
Bluetooth: btmtk: Add MT7928 support
drivers/bluetooth/btmtk.c | 365 +++++++++++++++++++++++++++++++++++++-
drivers/bluetooth/btmtk.h | 9 +
2 files changed, 370 insertions(+), 4 deletions(-)
--
2.45.2