Commit graph zephyr/drivers
Author SHA1 Message Date
Raffael Rostagno
f127e9f846 drivers: spi: esp32: Sleep retention
Add sleep retention support for GSPI driver. When peripheral
power down is enabled for light sleep, register data is lost,
so REGDMA backup is needed to mantein peripheral operational.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2026-05-29 22:05:37 +02:00
Raffael Rostagno
d464bb4df6 drivers: dma: esp32: Sleep retention
Add sleep retention support for GDMA driver. When peripheral
power down is enabled for light sleep, register data is lost,
so REGDMA backup is needed to mantein peripheral operational.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2026-05-29 22:05:37 +02:00
Sudarshan Iyengar
111a1ba43f drivers: sensor: bmi323: Add I2C bus support
Add I2C bus support to the BMI323 sensor driver. The BMI323
supports I2C communication with a dummy byte offset protocol
where 2 dummy bytes precede actual data in read operations.

Changes:
- Add bmi323_i2c.c/.h with I2C read/write and chip ID validation
- Add BMI323_BUS_I2C Kconfig option
- Update BMI323_DEVICE_BUS macro to handle I2C bus type
- Add bosch,bmi323-i2c.yaml device tree binding

The I2C implementation handles the dummy byte offset required
by the BMI323 when reading registers over I2C.

Signed-off-by: Sudarshan Iyengar <sudarshan.iyengar@alifsemi.com>
2026-05-29 22:05:08 +02:00
Sudarshan Iyengar
792718a5a3 drivers: sensor: bmi323: add RTIO async API support
Add Real-Time I/O (RTIO) asynchronous sensor API support to the
BMI323 driver. This enables non-blocking sensor reads with
kernel-managed buffering.

Features added:
- RTIO submit and decode operations for accel, gyro, and temp channels
- Q31 fixed-point format encoding for consistent sensor data scaling
- Unified sample fetch implementation shared between sync and async paths
- Decoder API with timestamped frame headers

The driver now supports both blocking (sensor_sample_fetch) and
non-blocking (sensor_read) operation modes when CONFIG_SENSOR_ASYNC_API
is enabled.

Signed-off-by: Sudarshan Iyengar <sudarshan.iyengar@alifsemi.com>
Assisted-by: GPTCodex:GPT-5.4
2026-05-29 22:05:08 +02:00
Sudarshan Iyengar
87421d3d8a drivers: sensor: bme680: Add RTIO support
Add Real-Time I/O (RTIO) support to the BME680 sensor driver to enable
asynchronous sensor operations. This implementation follows the pattern
established by other Bosch sensor drivers in Zephyr.

Changes include:
- Add bme680_async.c implementing the sensor async API submit function
  using RTIO lock free queues asynchronous read operations
- Add bme680_decoder.c implementing the sensor decoder API for
  Q31-format data conversion of temperature, pressure, humidity, and
  gas resistance channels
- Add RTIO encoded data structures (bme680_encoded_data, bme680_reading)
  to bme680.h with proper bit-packed flags for channel presence
- Update CMakeLists.txt to conditionally build async sources when
  CONFIG_SENSOR_ASYNC_API is enabled

The driver supports fetching temperature, pressure, humidity, and gas
resistance channels via the RTIO interface.

Signed-off-by: Sudarshan Iyengar <sudarshan.iyengar@alifsemi.com>
Assisted-by: Claude:claude-opus-4.6
2026-05-29 10:31:46 -05:00
Pieter De Gendt
915774def3 drivers: i2c: target: Put device driver API into iterable section
Use DEVICE_API() so DEVICE_API_GET(i2c_target, dev) passes its
section-bounds assert.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-05-29 08:29:09 -05:00
Mathieu Choplain
f4ad8ed152 drivers: hwinfo: stm32: fix reset flags handling for STM32C5
The LL function is named differently on STM32C5 because the hardware is
different: the `RMVF` bit must be cleared by software, whereas hardware
clears it automatically on all other series.

Rework the implementation to be functional, and rename the function to
match intent while at it. Also, switch to a series-specific #if guard
since this is hardware-specific rather than related to HAL1/HAL2.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-05-29 10:49:49 +02:00
Surya Prakash T
05dd7c89e3 drivers: stepper: tmc51xx_drv: remove dead stallguard assert
stallguard_threshold_velocity is always present on the controller node,
so COND_CODE_1(DT_PROP_EXISTS()) always evaluates true making the
BUILD_ASSERT unreachable and futile. Remove it.

Signed-off-by: Surya Prakash T <suryat@aerlync.com>
2026-05-29 10:49:43 +02:00
Surya Prakash T
5fd8239cb8 drivers: stepper: tmc51xx: remove dead stallguard assert
stallguard_threshold_velocity is always present on the controller node,
so COND_CODE_1(DT_PROP_EXISTS()) always evaluates true making the
BUILD_ASSERT unreachable and futile. Remove it.

Signed-off-by: Surya Prakash T <suryat@aerlync.com>
2026-05-29 10:49:43 +02:00
Surya Prakash T
f904fbf7cc drivers: stepper: tmc50xx: remove dead stallguard assert
stallguard_threshold_velocity is always present on the controller node,
so COND_CODE_1(DT_PROP_EXISTS()) always evaluates true making the
BUILD_ASSERT unreachable and futile. Remove it.

Signed-off-by: Surya Prakash T <suryat@aerlync.com>
2026-05-29 10:49:43 +02:00
Andrzej Głąbek
6e89c21a4e drivers: flash_mspi_nor: Add self runtime device PM handling
as in the spi_nor driver, so that the DPD mode can be used even if
the flash API caller does not perform the runtime device PM calls.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2026-05-29 10:46:31 +02:00
Andrzej Głąbek
d3b85a157b drivers: flash_mspi_nor: Add support for DPD mode
Add proper handling of the `has-dpd`, `t-enter-dpd`, and `t-exit-dpd`
devicetree properties that could be applied to "jedec,mspi-nor" nodes,
but caused no effect so far.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2026-05-29 10:46:31 +02:00
Andrzej Głąbek
b7cfe0ca6d drivers: flash_mspi_nor: Apply a few editorial corrections
Correct alignment of `\` characters in the `FLASH_MSPI_NOR_INST(inst)`
macro definition.
Use `NSEC_PER_USEC` symbols instead of 1000 when doing conversion from
nanoseconds to microseconds.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2026-05-29 10:46:31 +02:00
Raffael Rostagno
2a0650072e drivers: gpio: esp32: Handle GPIO_INT_WAKEUP in pin_interrupt_configure
The GPIO subsystem forwards GPIO_INT_WAKEUP from dt_flags into the trig
argument of pin_interrupt_configure(). Wakeup source configuration is
already handled in gpio_esp32_config(); strip the bit before passing trig
to convert_int_type() to avoid -EINVAL return.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2026-05-29 07:45:26 +02:00
Henrik Brix Andersen
faa89f8c93 drivers: can: switch to using LOG_ERR_DEVICE_NOT_READY()
Switch to using LOG_ERR_DEVICE_NOT_READY() to reduce flash footprint.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2026-05-29 07:44:47 +02:00
Arayik Gharibyan
513e98118e drivers: ethernet: enc424j600: support multiple instances
Convert the ENC424J600 Ethernet driver from a single hardcoded
devicetree instance to the standard Zephyr multi-instance pattern using
DT_INST_FOREACH_STATUS_OKAY().

Before this change, only instance 0 was registered, so boards with
multiple microchip,enc424j600 nodes could only create one Ethernet
interface.

This allows all status = "okay" ENC424J600 devicetree instances to be
registered.

Fixes #109849

Signed-off-by: Arayik Gharibyan <arayik.gharibyan.1999@gmail.com>
2026-05-29 07:44:33 +02:00
Jilay Pandya
9eece736ea stepper: replace a bunch of BUILD_ASSERT with min/max
Replace most BUILD_ASSERT on property values with min/max checks on the
binding itself.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2026-05-29 07:44:21 +02:00
Fabio Baltieri
a6cca92e8f input: replace a bunch of BUILD_ASSERT with min/max
Replace most BUILD_ASSERT on property values with min/max checks on the
binding itself.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-05-29 07:43:58 +02:00
Jonas Remmert
fb3e99e38a drivers: net: nsos: replace malloc+memset with calloc
Match the allocation style used elsewhere in the file.

Signed-off-by: Jonas Remmert <j.remmert@smight.com>
2026-05-29 07:43:39 +02:00
Jonas Remmert
78453c755e drivers: net: nsos: zero-initialize accepted socket
Accepted sockets had uninitialized poll fields and timeouts. A zero
k_timeout_t equals K_NO_WAIT (not K_FOREVER), so blocking recv()/send() on
accepted sockets returned immediately instead of waiting.

Signed-off-by: Jonas Remmert <j.remmert@smight.com>
2026-05-29 07:43:39 +02:00
bfe6451a22 drivers: i2c: fix the ch32v006 build by changing the "has TRISE" test
The I2C Rise Time Register (TRISE) is present on the CH32V20x and
CH32V30x but not on the CH32V003 or CH32V00X. Change the test from
"not on the CH32V003" to "only present if the HAL defines the macro".

Tested by patching the board DTS to enable i2c1 and then building
`tests/drivers/i2c/i2c_api` for the ch32v003evt, ch32v006evt, and
linkw.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2026-05-29 07:41:50 +02:00
Sylvio Alves
1310b9b046 drivers: bluetooth: esp32: align controller knobs with zephyr
Route the ESP32_BT_* defaults through the generic BT_CTLR_* symbols
so a standard BT_CTLR_* toggle reaches the vendor knobs without
further user intervention. Select the matching BT_CTLR_*_SUPPORT
capabilities from BT_ESP32, and add Kconfig entries for the BLE 5.x
feature gates, controller power placement and light-sleep XTAL.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-05-29 07:38:05 +02:00
Alain Volmat
d0a08f6cb7 drivers: gpio: mfxstm32l152: add BOTH EDGE trigger support
The MFX does not natively support BOTH direction edge
detection. In order to support it, adapt the requested edge
depending on the level at configuration time and toggle the
edge whenever an interrupt is received.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-05-29 07:36:55 +02:00
Alain Volmat
d9a32d3395 drivers: gpio: mfxstm32l152: correct PU/PD handling
So far the driver was setting the PU/PD bit properly however
missed setting another bit indicating of a Pull-Down or Pull-Up
are necessary.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-05-29 07:36:55 +02:00
Alain Volmat
a51f00c81a drivers: gpio: mfxstm32l152: simplify PUPD/Direction handling
Simplify the way bit handling for direction and PullUp/PullDown
control is done.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-05-29 07:36:55 +02:00
Jonathan Elliot Peace
3290b3cd29 drivers: serial: uart_bcm2711: read-modify-write IER bits
The four irq_{rx,tx}_{enable,disable} helpers each wrote a single
constant value to IER -- BIT(N) on enable, ~BIT(N) on disable. As
a result they did not toggle a single bit; they overwrote the
entire register. Two side effects:

* irq_tx_disable() set the RX-enable bit (because ~BIT(1) has bit 0
  set), and vice versa. The expected sequence
      irq_rx_disable(); irq_tx_disable();
  ends with the RX bit on, even though the caller asked for both
  channels to be quiesced.

* On the BCM283x mini-UART, the upper bits of IER carry FIFO-clear
  shortcuts (see BCM2837 ARM Peripherals manual, "AUX_MU_IER_REG").
  Writing 0xfffffffd or 0xfffffffe arbitrarily perturbs them.

Fix: each helper reads IER, sets or clears its own bit, writes
back. The TX/RX-enable side now also preserves the other channel's
state correctly.

Signed-off-by: Jonathan Elliot Peace <jep@alphabetiq.com>
2026-05-29 07:36:27 +02:00
Jonathan Elliot Peace
cbc8cb440f drivers: serial: uart_bcm2711: return -1 from poll_in when no char
The current implementation spins forever waiting for a character and
unconditionally returns 0. The uart_poll_in() API contract is that
the function returns -1 (or another negative value) immediately when
no character is currently available, and 0 only after writing a
received character to *c.

Without this, callers that use the canonical drain pattern --

    while (uart_poll_in(dev, &c) == 0) {
        ;
    }

-- hang. drivers/console/uart_console.c::console_input_init() does
exactly this when registering an input handler, so any application
that calls uart_register_input() (e.g. via Zephyr's console handler
subsystem) can deadlock at startup waiting on idle UART RX.

The fix is to test once and return -1 on the no-char path. The
"got a character" path is unchanged.

Signed-off-by: Jonathan Elliot Peace <jep@alphabetiq.com>
2026-05-29 07:36:17 +02:00
Jérôme Pouiller
985f66c3ba drivers: wifi: siwx91x: Drop useless HIDE_PSK_CREDENTIALS parameter
WIFI_SILABS_SIWX91X_FEAT_HIDE_PSK_CREDENTIALS impacted the way the NWp
print the log message. However, these logs are not available on production
firmware. So, it does not make sense to expose this parameter.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-05-29 07:36:02 +02:00
Jérôme Pouiller
77ae17aa07 drivers: wifi: siwx91x: Explicitly use Wifi log level
Until now, the siwx91x wifi driver used the default log level. It make more
sense to the use the log level provided b the Wifi subsystem.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-05-29 07:36:02 +02:00
Jérôme Pouiller
aa072294fb drivers: wifi: siwx91x: Reorder Kconfig options
Reorganize the Kconfig options in preparation for a future rework of the
Wi-Fi driver. The new ordering groups related options together:

   1. Hidden configdefault entries that tune network stack parameters
   2. Native vs. offloaded network stack choice
   3. Driver feature options
   4. Scan and roaming fine-tuning options

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-05-29 07:36:02 +02:00
Jérôme Pouiller
8fa9d53751 drivers: wifi: siwx91x: Change int in booleans
There were no reason to use integers for WIFI_SILABS_SIWX91X_ADV_MULTIPROBE
parameter.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-05-29 07:36:02 +02:00
Jérôme Pouiller
0e5dde875f soc: silabs: siwx91x: Fix defaultconfig statements
Defining a Kconfig symbol several times is dangerous. It is better to use
configdefault for the CMSIS related symbols.

Bluetooth configdefault depends on NWP driver. It is more accurate to
depend on the Si91x Bluetooth driver.

Finally, configdefault is supposed to be only used in Kconfig.defconfig
files. So, relocate BT_HCI_ACL_FLOW_CONTROL.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-05-29 07:36:02 +02:00
Bjarki Arge Andreasen
18fef60e35 drivers: gpio: handlers: remove redundant cast to struct device *
Remove the redundant cast to struct device * from struct device * in
some of the GPIO API syscall handlers in gpio_handlers.c

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-05-29 07:35:53 +02:00
Bjarki Arge Andreasen
02657c2971 include: drivers: gpio: make gpio_pin_* APIs syscalls
The following APIs

  - gpio_port_set_masked()
  - gpio_port_set_bits()
  - gpio_port_clear_bits()
  - gpio_port_set_clr_bits_raw()
  - gpio_port_set_clr_bits()
  - gpio_pin_get_raw()
  - gpio_pin_get()
  - gpio_pin_set_raw()
  - gpio_pin_set()
  - gpio_pin_toggle()

are currently not syscalls, while the following are:

  - gpio_port_set_bits_raw()
  - gpio_port_get_raw()

It is therefore possible to set and get any pin of the entire port
from userspace, but only through a few of the APIs.

These APIs should all be either syscalls, or not syscalls.

Align the APIs so they are all syscalls and add syscall handlers for
them in gpio_handler.c

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-05-29 07:35:53 +02:00
Zhiyuan Tang
8396d64f38 drivers: watchdog: add Realtek Bee Core WDT driver
Add Core Watchdog Timer driver for Realtek Bee SoCs
(RTL8752H and RTL87x2G). Supports configurable timeout modes
and callback handling.

Signed-off-by: Zhiyuan Tang <zhiyuan_tang@realsil.com.cn>
2026-05-29 07:35:09 +02:00
Tomasz Moń
d40884d3ab drivers: udc_dwc2: Execute disable in driver thread
After DWC2 core is disabled the registers should no longer be accessed
to prevent CPU hangs. While the concurrent access is guarded by mutex,
there was no mechanism to ensure that driver thread won't access any
register after udc_disable() was called. Solve the issue by executing
disable in driver thread context.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-05-29 07:33:24 +02:00
Johann Fischer
0e0d804267 drivers: udc_dwc2: call disable quirk if controller initialization fails
Call disable quirk if controller initialization fails.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-05-29 07:33:24 +02:00
Johann Fischer
e11ea494e5 drivers: usb: add Nordic USBHS BC12 driver
Add driver for Nordic USB PD Charging-Type detector.
This driver depends on the USBHS wrapper driver.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-05-29 07:33:24 +02:00
Johann Fischer
a458052e4a drivers: udc: use USBHS wrapper driver in nRF54LM20a vendor quirks
Use USBHS wrapper driver to register VREGUSB regulator callback and
enable USB peripheral.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-05-29 07:33:24 +02:00
Johann Fischer
b5d8897727 drivers: usb: common: add driver for Nordic USBHS wrapper
Nordic USBHS wrapper is a set of registers used by both USB BC12 driver
and vendor specific part in UDC driver. The wrapper can be considered
to be MFD device. Both drivers depends on the VBUS regulator driver and
require some synchronisation when accessing wrapper register.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-05-29 07:33:24 +02:00
Arjun Sahajan
0aab62bba2 drivers: timer: mchp_xec: Update timer driver with new macro
Update PCR and GIRQ properties of timer driver to use new macros

Signed-off-by: Arjun Sahajan <Arjun.Sahajan@microchip.com>
2026-05-29 07:31:57 +02:00
Jordan Yates
5e285c49c2 serial: uart_nrfx_uarte: option to request HFXO
Add the option to explicitly request the HFXO while the UARTE peripheral
is active for nRF54L series devices. While the UARTE peripheral requests
a high frequency clock from the clock controller, both the HFINT and
HFXO oscillators satisfy this request. The problem is that the HFXO
oscillator is required to reach the highest bitrate accuracies (and
mitigate errata 30).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-05-29 07:31:31 +02:00
Benjamin Cabé
9ab3809f3c drivers: display: ssd135x: fix bleeding KConfig
make CONFIG_SSD135X a hidden symbol similar to other display driver groups
so that it doesn't bleed into the main display drivers menu.
Fix spelling of the prompt for the actual drivers to also align with other
drivers.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-05-28 11:14:56 +01:00
Jordan Yates
5df669aa6e modem: cellular: extend error matches
In addition to `ERROR`, also abort on `+CME ERROR`, which is a 3GPP
documented (TS.128.007 v18.6.0 9.2) alternative error code.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-05-28 11:11:08 +01:00
Jordan Yates
4bc5fcffd8 drivers: modem: move standalone drivers to subfolder
Move standalone (not using `modem_cellular.c`) drivers to a dedicated
subfolder, keeping the top level folder clean for common utilities.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-05-28 11:08:50 +01:00
Vincent Tardy
30d123cc90 drivers: flash : stm32wbax : Add flash manager thread
A flash manager thread is created and allocated to
process Flash Manager Process.
Definition of KConfigs STM32WBA_FLASH_MNGR_THREAD_STACK_SIZE,
and STM32WBA_FLASH_MNGR_THREAD_PRIO to configure the
flash manager thread.
STM32WBA_FLASH_MNGR_THREAD_STACK_SIZE is setting by default
to 768 bytes. This value was chosen empirically since reasonable
to cover generic cases.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-05-28 11:06:47 +01:00
Thomas Decker
a6eb598d80 driver: pwm: stm32: Add access to input capture prescaler via flags
Adds STM32 specific flags to set the input capture prescaler to 2, 4 or 8.

Signed-off-by: Thomas Decker <decker@jb-lighting.de>
2026-05-28 11:05:18 +01:00
Jordan Yates
84f5845ccb drivers: i2c: nrfx_twim_rtio: loop start operation
Repeat the call to `i2c_nrfx_twim_rtio_start` until there are either
no more operations queued, or an asynchronous operation is pending
completion. This fixes a queue of operations that contains an operation
that completes inside of `i2c_nrfx_twim_rtio_start` (e.g.
`RTIO_OP_I2C_CONFIGURE`) from not starting the remaining operations,
which then forever blocks any pending callers.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-05-28 11:04:32 +01:00
Jan Willem Smaal
b764bc0516 drivers: i2s: mcux_sai: fix compilation when bit clock swap is undefined
Fixes a compilation failure on NXP MCX E-series (and other NXP SoCs)
where FSL_FEATURE_SAI_HAS_BIT_CLOCK_SWAP is 0 or undefined.

The driver was unconditionally assigning to a non-existent struct
member. Resolved by wrapping the assignment in the proper feature
macro checks.

Signed-off-by: Jan Willem Smaal <usenet@gispen.org>
2026-05-27 21:34:38 -04:00
Paulo Santos
1a6aa08514 modem: cmux: add cmux-no-powersave-handshake property
3GPP TS 27.010 section 5.4.6.3.2 specifies a PSC frame exchange when
entering power save and section 5.4.7 specifies a flag-byte exchange
when exiting. modem_cmux blocks at T3 timeout on either half if the
peer does not implement the exchange, which is the case for modems
that manage sleep and wake out-of-band (hardware lines or
modem-control AT commands).

Add an opt-in DT property cmux-no-powersave-handshake (default off)
on the cellular-modem common binding. When set,
modem_cmux_runtime_pm_handler skips modem_cmux_send_psc and the T3
reschedule on entry and transitions directly to STATE_POWERSAVE;
powersave_wait_wakeup skips the wake-pattern transmission and the
STATE_RESYNC wait on exit and transitions directly to STATE_CONNECTED.

Signed-off-by: Paulo Santos <paulo.santos-ext@hexagon.com>
2026-05-27 21:34:28 -04:00