Commit graph

885 commits

Author SHA1 Message Date
Pieter De Gendt
9b3a60b5b3 drivers: bluetooth: hci: Use DEVICE_API macro
Put BT_HCI device driver APIs into corresponding iterable section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-04-02 08:47:22 -05:00
Pisit Sawangvonganan
3c44bcd2a0 drivers: fix typo in (adc, audio, bluetooth, can, charger)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/adc`
- `drivers/audio`
- `drivers/bluetooth`
- `drivers/can`
- `drivers/charger`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00
Valerio Setti
8372f0939f drivers: esp32: bt|wifi: adjust Kconfigs for TF-PSA-Crypto 1.x
- replace legacy Kconfigs with corresponding PSA_WANT ones.
- extend Mbed TLS' CMake file in order to include these legacy ecdh module
  that was removed from TF-PSA-Crypto when ESP32 BT and WiFi drivers are
  built.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-03-20 12:32:52 -05:00
Sylvio Alves
789bed73bc drivers: bluetooth: add esp32c5 support
Extend the ESP32 Bluetooth HCI driver and Kconfig to support
ESP32-C5 with Bluetooth 5.4 LE.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-03-19 14:53:05 -05:00
William Markezana
00e5796acf drivers: bluetooth: hci: add Bouffalo Lab BL70X HCI driver
Add an HCI driver for the BL702 on-chip BLE controller. The controller
is a precompiled binary blob communicating via vendor on-chip HCI
functions (bt_onchiphci_send/bt_onchiphci_interface_init).

The driver:
- Translates between Zephyr HCI net_buf and the vendor's internal
  packet structures for both TX (commands, ACL data) and RX (events,
  ACL data)
- Uses a dedicated RX thread with FIFO+semaphore to dequeue messages
  from the controller callback (which may run in ISR context)
- Reads the BLE MAC address from eFuse during initialization
- Supports multiple controller binary variants via Kconfig choice
  (peripheral-only, multi-role, observer, etc.)
- Provides proper open/close lifecycle with RX queue draining

Also adds the DT binding (bflb,bl70x-bt-hci) and a bt-hci node in
the BL70X SoC dtsi (disabled by default).

Signed-off-by: William Markezana <william.markezana@gmail.com>

# Conflicts:
#	drivers/bluetooth/hci/CMakeLists.txt
2026-03-19 14:47:46 -05:00
Vincent Tardy
2a71bd41ff soc: stm32: ble and link layer threads initialization change
Ble host and link layer threads initialization is no more done
during the system initialization.
Add stm32wba_ble_ctlr_thread_init() and
stm32wba_ll_ctlr_thread_init() functions calls
during ble and ieee802.15.4 driver initialization

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-03-19 16:58:28 +01:00
Jane Gu
e720b99431 drivers: bt: hci: add realtek bee bt hci driver
Add Bluetooth HCI driver implementation for Realtek Bee family SoCs.

Signed-off-by: Jane Gu <jane_gu@realsil.com.cn>
2026-03-19 11:39:07 +00:00
Ali Hozhabri
fec68bf0f3 drivers: bluetooth: hci: Provide support for CubeFW v1.4.0
Provide necessary changes to support CubeFW v1.4.0.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2026-03-17 18:26:31 -04:00
Eric Mechin
483d216202 drivers: stm32wba: hci_stm32wba.c: Kconfig Options support
With stm32wba_set_stack_options function call set
the BLE stack Options flags initialization according
to the zephyr Kconfig options.

Signed-off-by: Eric Mechin <eric.mechin@st.com>
2026-03-16 12:31:08 +01:00
Vincent Tardy
db4734e4cc drivers: bluetooth: hci: remove host API dependency in close and setup
In the close() and setup() driver function,
the host hci APIs are removed.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-03-13 14:27:53 -07:00
Aksel Skauge Mellbye
a30340fcf6 drivers: bluetooth: hci: silabs: Migrate to RAIL 3.0 API
Use RAIL 3.0 API to configure sleep in EFR32 HCI driver.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-03-09 11:08:52 +01:00
Merin George
832b5f65c7 drivers: bluetooth: update Infineon HCI UART transport for CYW55513
Introduces common Kconfig configurations for the CYW55513 connectivity
module, supporting both Murata 2FY and discrete implementations.

Additionally, updates the HCI driver to include a new vendor-specific
command required for updating the SCO route to PCM

Signed-off-by: Merin George <merin.george@infineon.com>
2026-03-06 09:57:43 +01:00
Vincent Tardy
05f7e6ab0e drivers: bluetooth: hci: stm32wba: fix semaphore issue in send process
In the bt_hci_stm32wba_send() function, in case of the function
bt_buf_get_evt() fails, call k_sem_give() before return.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-03-03 11:15:26 +01:00
Mathieu Choplain
a11688fab5 drivers: *: stm32: don't check if clock device is ready
If the clock device (i.e., RCC) failed to initialize, we have bigger
problems than trying to call clock_control_{off,on,configure} on it.
Don't bother checking to save some footprint.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-02-13 18:59:16 +00:00
Alessandro Manganaro
93c2d2ba3d drivers: bluetooth: hci: stm32wba: align with radio power hook
Update the stm32wbax ble hci driver to integrate the new SoC-level
radio power management hook.

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2026-02-13 09:51:52 -06:00
Merin George
10904385e3 drivers: bluetooth: infineon: rename BT-HCI UART driver
This change renames the Infineon BT-HCI UART driver source
and binding file to allow reuse across all Infineon AIROC
connectivity chips that use HCI UART transport.
No functional changes

Signed-off-by: Merin George <merin.george@infineon.com>
2026-02-13 10:08:20 +01:00
Axel Le Bourhis
9ba4525d05 drivers: bluetooth: hci_nxp: fix clang-format defects
Run clang-format on hci_nxp.c to fix formatting issues in the file.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2026-02-11 07:56:13 +01:00
Axel Le Bourhis
aea630b9e5 drivers: bluetooth: hci_nxp: move calibration data to zephyr
This commit moves NXP Bluetooth HCI calibration data handling from the
HAL to Zephyr hci_nxp driver.
Added Kconfig choice to select antenna diversity.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2026-02-11 07:56:13 +01:00
Lyle Zhu
ab4569ea97 bluetooth: hci: nxp: Reduce the fw sending buffer size
In current implementation, the sending buffer size is 0x10000. This
will result in a very small amount of RAM available for the
application. Actually, the maximum required sending buffer size is
4KB.

Reduce the maximum sending buffer size by changing
`SEND_BUFFER_MAX_LENGTH` from 64KB to 4KB.
And add runtime assertions to prevent buffer overflows during firmware
upload.

- Change SEND_BUFFER_MAX_LENGTH from 0xFFFF to 4096 (4 KB)
  * Reflects the actual maximum FW chunk size supported by hardware
  * Reduces memory footprint from 64 KB to 4 KB
- Remove unnecessary +1 from send_buffer array size
- Add __ASSERT checks in fw_upload_v1_send_data() to validate
  memcpy does not exceed buffer size
- Add __ASSERT checks in fw_upload_v3_send_data() to validate
  memcpy does not exceed buffer size

This prevents potential buffer overflows when copying firmware data
and ensures the buffer size matches hardware capabilities.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-01-26 13:57:50 -06:00
Merin George
019b31f3eb drivers: bluetooth: hci: enable controller low power mode
Enable low power mode support in the bluetooth HCI driver for
cyw20829 so that the controller can enter sleep states when idle

Signed-off-by: Merin George <merin.george@infineon.com>
2026-01-25 14:39:08 +01:00
Johan Hedberg
f64a999147 drivers: bluetooth: silabs_efr32: Fix default for max PAwR advertisers
This option already depends on BT_PER_ADV_RSP being enabled, so we should
have a more reasonable default for it. This way e.g. the existing PAwR
sample app should work without additional changes.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2026-01-23 13:55:25 +01:00
Vincent Tardy
86d55a8d81 drivers: bluetooth: hci: remove RAM allocation in send process
Remove local Tx buffer allocated in the
bt_hci_stm32wba_send() function.
Get Event buffer resource to store data returned
by lower layer and provide it to Host in case of
Tx packet is an HCI Command type.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-01-22 13:00:00 -05:00
Vincent Tardy
77f933e7d3 drivers: bluetooth: hci: fix RAM allocation in stm32wbax ble hci driver
Remove useless allocated RAM in stm32wbax ble hci driver.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-01-22 13:00:00 -05:00
Vinit Mehta
46d8f1baa9 drivers: bluetooth: hci: add host wakeup for IW612 BT controller
Add wakeup IO config for IW612 shield for BT host wakeup
functionality.
Add kconfig to enable/disable BT host wakeup functionality
Add kconfig to toggle onboard LED upon detecting BT activity

Signed-off-by: Vinit Mehta <vinit.mehta@nxp.com>
2026-01-20 15:30:54 +00:00
Thomas Hebb
bf81b7ca07 bluetooth: cyw43xxx: Wire up vendor command to set MAC address
There's a standardized way to set a public Bluetooth address in the
core, and this hardware has a vendor specific command to do just that.
Tell the core we support the operation and implement the command. This
allows applications to set a MAC by calling bt_id_create() prior to
bt_enable().

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2026-01-19 12:21:32 +01:00
Thomas Hebb
0b75b100cc drivers: bluetooth: h4: Pass params to vendor setup function
If the vendor driver knows how to set a public MAC, it can select
CONFIG_BT_HCI_SET_PUBLIC_ADDR and set the address in this argument,
allowing applications to set a public address with bt_id_create().

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2026-01-19 12:21:32 +01:00
Lyle Zhu
18d6e8c8b1 drivers: bluetooth: hci: nxp: enable calibration data by default
Enable HCI_NXP_SET_CAL_DATA and HCI_NXP_SET_CAL_DATA_ANNEX100 by
default for NW612 and IW416 modules to ensure proper calibration
during HCI initialization.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-01-14 13:04:42 -06:00
Eric Mechin
8aec838deb drivers: stm32wb: ipm_stm32wb: Add extended advertising support
Set extended advertising setting in ipm_stm32wb.c with
stm32wb_set_stack_options function call for the BLE stack
Options flags initialization according to the
zephyr Kconfig options.

Signed-off-by: Eric Mechin <eric.mechin@st.com>
2026-01-12 12:39:56 -06:00
Sylvio Alves
06890c3f92 drivers: bluetooth: esp32: add vendor-specific HCI commands
Implement VS HCI commands for ESP32 BLE controllers:
- Read/Write TX power level with per-handle support
- Read version info (platform, variant, firmware version)
- Read supported commands and features
- Read static addresses from eFuse (C2/C6/H2)
- Read build info (controller version string)

For original ESP32, use the legacy esp_ble_tx_power_set/get API.
For newer variants (ESP32-S3, ESP32-C2, ESP32-C3, ESP32-C6, ESP32-H2),
use the enhanced API that supports per-connection power control.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-01-12 12:34:47 -06:00
Vincent Tardy
8bb85a6cbd drivers: bluetooth: hci: support driver close feature
Update stm32wbax ble hci driver to support driver close

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-01-09 14:27:00 -06:00
Vincent Tardy
05e5bbeb9b bluetooth: stm32wbax: add BT_STM32WBA_LIB_CONFIG KConfig
Add new KConfig BT_STM32WBA_LIB_CONFIG specifying the configuration
of the stm32wba ble library (full or basic) depending to bluetooth
features.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2025-12-19 13:54:59 -05:00
Sylvio Alves
84ac9af572 drivers: bluetooth: hci: esp32: enable coded PHY support
Select BT_CTLR_PHY_CODED_SUPPORT for ESP32 variants that support
Bluetooth 5.0 coded PHY (long range). The original ESP32 series
is excluded as it only supports Bluetooth 4.2.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-12-19 13:54:51 -05:00
Vincent Tardy
7273479e43 soc: st: stm32wba: hci_if: allow forcing ISR registration
Add parameter to the link_layer_register_isr() to force
or not the link layer isr registration in case of multiple
function calls.
This change fixes the interrupt service when resuming
from a PM standby state.

Update Bluetooth hci_stm32wba.c driver and
IEEE 802.15.4 ieee802154_stm32wba.c driver accordingly.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2025-12-18 14:50:58 +00:00
Sreeram Tatapudi
0a06f5b91a dts: bindings: Drop cat1 from the infineon binding files
Drop cat1 from the binding files to enable reuse by other
category devices as well.

Fixes #99174

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-12-17 13:58:09 -05:00
Sylvio Alves
f8d2e00a0e includes: remove duplicated entries in zephyr-tree
Remove duplicated #include directives within the same
preprocessor scope across the Zephyr tree.

Duplicates inside different #ifdef branches are preserved
as they may be intentional.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-12-17 13:57:38 -05:00
Martin Hoff
be4723c213 soc: silabs: siwx91x: fix pm when bt is enabled
This patch is a workaround to a know issue when Bluetooth and pm
is activated.
We actually need to set the tx power to the Bluetooth controller
(network coprocessor) before sending power saving request to the
coprocessor.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-12-16 10:13:00 +01:00
Jordan Yates
a1970ebd2f bluetooth: hci: spi: fix length check
The buffer length check was not updated with the change to the H4 header
push location (changed in 6113230c). As the complete buffer is now
provided, a buffer of length `SPI_MAX_MSG_LEN` is now valid.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-12-09 09:27:32 +01:00
Sreeram Tatapudi
5ecf248ba3 drivers: infineon: Drop cat1 from the files names
Drop cat1 from the file names to enable reuse by other
category devices as well

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-12-07 21:19:38 -05:00
Alberto Escolar Piedras
efca68625a Bluetooth: userchan: Validate UNIX socket path fits in sockaddr_un
sockaddr_un.sun_path is limited to 108 in Linux
(and to similarly small numbers in other systems).

Let's check that it fits before copying it, and error out otherwise
(the user won't be able to connect to that socket if the path
is truncated, and if we overflow we will just corrupt memory).

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-05 11:10:38 -05:00
Ivan Pankratov
0aa208d51e dts: bluetooth: add base binding for BLE radio hardware capabilities
Create a shared base binding (ble-radio.yaml) for common Bluetooth LE
radio hardware capabilities to avoid duplication between vendors and
ensure consistent property naming across the ecosystem.

Properties are prefixed with 'ble-' and ordered chronologically by
Bluetooth Core Specification version (5.0, 5.1, 6.0). Each property
indicates a hardware capability, not current enablement state.

Signed-off-by: Ivan Pankratov <ivan.pankratov@silabs.com>
2025-12-01 12:22:33 -05:00
Ivan Pankratov
675e6e05cd drivers: bluetooth: efr32: move Silabs Kconfig settings
Vendor specific configuration is moved to a separate file.

Signed-off-by: Ivan Pankratov <ivan.pankratov@silabs.com>
2025-12-01 12:22:33 -05:00
Gang He
562afb6279 driver: bluetooth: hci: sifli: Add SF32LB Bluetooth HCI driver
Add Bluetooth driver for SF32LB chipsets.

Signed-off-by: Gang He <ganghe@sifli.com>
2025-11-25 16:05:02 +00:00
Gang He
6305063de2 driver: bluetooth: hci: sifli: Add configuration for SF32LB HCI driver
Add configuration for SiFli SF32LB chipset Bluetooth HCI driver.

Signed-off-by: Gang He <ganghe@sifli.com>
2025-11-25 16:05:02 +00:00
John Batch
a736bb4cba Drivers: Bluetooth: Infineon: Updating CYW920829 Bluetooth for B1
- Updates Bluetooth driver to include bluetooth firmware for B1 device
  revision.
- Changes build behavior to allow building without blobs being fetched
  to allow CI to verify build.
- Adds cmake warning if blobs are not present.

Signed-off-by: John Batch <john.batch@infineon.com>
2025-11-20 06:02:48 -05:00
Josuah Demangeon
30950b888d style: drivers: sort Kconfig and CMake includes
Use the "zephyr-keep-sorted-start/stop" comment to have CI check
the alphabetical order of includes, to help reducing the chance
of conflicts while contributing drivers.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-11-17 13:48:03 -05:00
Badr Bacem KAABIA
8c8d1b5166 Bluetooth: hci_nxp: Improve MAC address uniqueness using CRC-32 hash
The previous method of deriving the local MAC address from the MCU's
Unique ID (UID) by slicing the last 3 bytes had two issues:

1.  **Low Entropy:** Risk of address collision because only a small
    portion of the UID was used, and this portion may not vary much.
2.  **Offset Error:** An incorrect offset calculation could copy
    non-intended bytes.

This commit resolves both issues by replacing the slice operation
with a **CRC-32 hash** over the **entire 16-byte UID**.

The lower 3 bytes (24 bits) of the resulting CRC-32 are used as the
local part of the MAC address, maximizing randomization and ensuring
a high probability of uniqueness across all devices.

Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
2025-11-08 08:28:43 -05:00
Arun Kumar Nagelly
4b9bbc5006 drivers: bluetooth: hci: siwx91x: add RF power config
Add vendor-specific RF power mode configuration during HCI setup
for SiLabs SiWx91x devices. This configures the BLE TX power
index in the controller's RF subsystem.

The implementation sends a vendor command (OCF 0x0006) with
protocol mode (2) and power index (RSI_BLE_PWR_INX) during the
setup phase. This ensures proper RF power configuration before
normal Bluetooth operations begin.

Technical details:
- Uses bt_hci_cmd_alloc() with manual HCI header construction
- Command opcode: 0xFC06 (OGF=0x3F, OCF=0x0006)
- Parameters: protocol_mode=2, power_index from RSI_BLE_PWR_INX
- Executed during bt_hci_setup callback

Signed-off-by: Arun Kumar Nagelly <arnagell@silabs.com>
2025-11-04 09:26:46 +00:00
Ali Hozhabri
7a593ede3e drivers: bluetooth: hci: Fix the issue about the TRNG peripheral instance
Fix the issue regarding passing the TRNG peripheral instance to the driver.

Increase the SYSTEM_WORKQUEUE_STACK_SIZE when CONFIG_BT is set.
According to the log of thread analyzer for beacon sample, 1048 bytes
are needed. So, it's been increased to a safer value.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-30 18:38:02 -04:00
Guotao Zhang
ec970a635e drivers: bluetooth: h4: Fix check for sufficient buffer size
When alloc the evt buffer,such as the adv report, only compare the
remaining data len, should aslo consider the hdr_len, because the
hdr also copy to alloced buffer.if not consider the hdr, then
hdr + remaining data may larger than alloced buffer, because the
alloced buffer is not enough,then will assert when receive the
remaining data.

Signed-off-by: Guotao Zhang <guotao.zhang@nxp.com>
2025-10-30 15:14:20 +02:00
Anas Nashif
303af992e5 style: fix 'if (' usage in cmake files
Replace with 'if(' and 'else(' per the cmake style guidelines.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-29 11:44:13 +02:00