Commit graph

903 commits

Author SHA1 Message Date
Fin Maaß
4d859419d9 drivers: serial: don't check return value of uart_irq_update()
Remove return value checks of uart_irq_update().
Needed for changing it's return value to void.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-19 17:46:51 -04:00
Ali Hozhabri
5e802fe73d drivers: bluetooth: hci: Simplify STM32WB0 BLE driver
Simplify the STM32WB0 BLE driver by leveraging CONFIG_PM_CUSTOM_TICKS_HOOK.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2026-05-19 07:39:05 -07:00
Davide Di Lello
82741b2614 drivers: infineon: Update copyright for Infineon
Update structure of the copyright

Signed-off-by: Davide Di Lello <Davide.Dilello@Infineon.com>
2026-05-12 22:19:02 +02:00
Matthias Ringwald
6214844275 Bluetooth: hci: infineon: Fix unaligned opcode read
PatchRAM records store the HCI opcode as a little-endian value in the
firmware image. Read it with sys_get_le16() instead of casting the byte
pointer to uint16_t, which can fault on targets that do not allow
unaligned accesses.

Signed-off-by: Matthias Ringwald <matthias@ringwald.ch>
2026-05-12 09:13:14 +02:00
Håvard Reierstad
a805a054fe Bluetooth: HCI: include addr.h from util_hci_evt
Include `addr.h` in `util_hci_evt.c` as it uses `bt_addr_le_str`.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2026-05-11 13:41:54 +02:00
William Markezana
b4193f101a drivers: bluetooth: add BL60x on-chip BLE HCI driver
Extend the shared BFLB HCI driver with BL60x (BL602) support: BL60x
include paths, controller init macros, IRQ setup, and platform shim
forward declarations.

Kconfig adds BT_BFLB_BL60X with two controller variant choices
(m1s1, m8s1) and smart defaults based on enabled BT roles.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-05-08 16:00:22 -05:00
Egill Sigurdur
16ac4a5b78 kernel: mem_slab: add K_MEM_SLAB_DEFINE_TYPE for automatic alignment
Introduces K_MEM_SLAB_DEFINE_TYPE() and K_MEM_SLAB_DEFINE_STATIC_TYPE()
helpers to allow the user to declare slabs for types without having to
manually ensure the alignment is correct.

Manual slab alignment was very error-prone and this change fixes several
instances of misalignment that would be trapped by the undefined
behavior sanitizer when running on 64-bit targets.

Signed-off-by: Egill Sigurdur <egill@egill.xyz>
2026-05-07 18:09:41 -05:00
William Markezana
66b4ecb85d drivers: bluetooth: add BL61x on-chip BLE HCI driver
Extend the shared BFLB HCI driver with BL61x (BL616/BL618) support:
BL61x include paths and RF init routing through bflb_rf_init().

Kconfig adds BT_BFLB_BL61X with four controller variant choices, a
configurable PHY/RF retention memory size, and a 64 KB exchange memory
option for the BR/EDR variant.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-05-07 09:16:15 +02:00
Håvard Reierstad
41e3b91fcb Bluetooth: HCI: Allow discarding of ext adv reports
Implements a method for discarding fragmented extended advertising. In
order to acheive this, we need to consider past and future fragments
of the advertising report we discard.

The future fragments are on its way from the controller, and will result
in either a complete- or incomplete event. These are handled by tracking
the adv SID and address until the controller sends either a complete or
incomplete event. Once an advertising report is marked as discarded,
consecutive fragments will be silently discarded.

The past fragments are either already in the reassembler (in scan.c),
or on their way through the rx_queue. To handle these, and allow the
reassembler to recover from a in-progress reassembly which is discarded,
we add a work item which is rescheduled when each consecutive fragment
is received. The timeout is configurable through the new Kconfig option
`CONFIG_BT_EXT_ADV_REASSEMBLY_TIMEOUT`. On timeout, the reassembler will
change its state to discard incoming fragments from the same advertiser.
The reassembler will start assembling new fragments if it recognises a
new advertiser, or if a final fragment (either marked as complete
or incomplete) from the advertiser it is currently tracking is received.

This functionality needs to be added at a HCI driver level by using the
new `hci_ext_adv_report_process` function. It is added the the
IPC HCI driver to fix zephyrproject-rtos/zephyr#50786

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2026-05-06 16:29:15 +01:00
Christoph Busold
dad5096f85 drivers: entropy: Add support for architectural entropy drivers
Add new inline function entropy_get_default_device which returns
the "zephyr,entropy" device or the architectural entropy device,
if the former is not set, and use that in all places to query the
entropy device.

This allows using architectural drivers which do not have a DT
node.

Signed-off-by: Christoph Busold <cbusold@qti.qualcomm.com>
2026-05-06 07:05:12 +02:00
Vinit Mehta
42ac32c9da drivers: bluetooth: Add BT IR support for NXP hosted SoC
-Add inband independent reset support for IW612, IW416 and IW610
-Add kconfig option to enable/disable IR support

Signed-off-by: Vinit Mehta <vinit.mehta@nxp.com>
2026-05-04 14:53:51 +02:00
Manaam Rehan
1bb7e5974a drivers: bluetooth: describe BT_STM32_IPM Kconfig option
Replace the placeholder help text for BT_STM32_IPM with a short
description of the driver. This makes the option clearer in Kconfig
interfaces and avoids leaving a visible TODO in user-facing text.

Signed-off-by: Manaam Rehan <manaamrehan2k19@gmail.com>
2026-04-30 14:00:43 -04:00
Ali Hozhabri
2e933d3fec drivers: bluetooth: hci: Calculate the future time correctly
Calculate the future time correctly to avoid negative value for "value_ms".

Register the pm_policy_event when HAL_RADIO_TIMER_SetRadioTimerValue
returns success.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2026-04-24 13:00:07 +02:00
Emil Gydesen
11c4b2b295 Bluetooth: Driver: Move bt_hci_evt_hdr to end of struct
Since bt_hci_evt_hdr is a variable sized struct, it shall be
located at the end of the struct.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-04-24 10:56:33 +02:00
Yassine El Aissaoui
b904976464 drivers: hci: nxp: Add dynamic TX power configuration support
Adding support for MCXW2X and MCXW7X SoCs

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2026-04-22 08:08:53 -05:00
William Markezana
3afca7eb53 drivers: bluetooth: hci: unify Bouffalo Lab HCI driver
Merge the separate BL70X and BL70XL HCI drivers (hci_bflb_bl70x.c,
hci_bflb_bl70xl.c) into a single hci_bflb.c. Both SoCs share the
same on-chip HCI interface; platform differences (controller API
names, includes, RF calibration) are resolved via macros in a
single #if/#elif block at the top of the file.

Add BL70XL Kconfig (silicon revision, BLE variant selection) and
update depends lines to use the unified DT_HAS_BFLB_BT_HCI_ENABLED
combined with the SoC series.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-04-21 17:46:30 +01:00
Johan Hedberg
a27994d90a drivers: bluetooth: ipm_stm32wb: Take advantage of bt_addr_le_copy_addr()
Take advantatage of the new helper to avoid manually creating a
bt_addr_le_t.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2026-04-21 17:45:36 +01:00
Lyle Zhu
695d41c991 bluetooth: hci: NXP: Fix firmware upload issues
Fix two issues in the NXP HCI firmware upload code:

1. In fw_upload_wait_length(), the length complement was incorrectly
   read from the same buffer offset as the length field. It should be
   read from offset 2 to properly validate the length field.

2. In fw_upload_write_hdr_and_payload(), replace the call to
   fw_upload_send_ack() with a direct call to fw_upload_write_data()
   to send the V1_REQUEST_ACK. This ensures the ACK is sent using the
   correct write function.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-04-21 17:45:05 +01:00
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