Commit graph zephyr/drivers
Author SHA1 Message Date
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
Sofian Elmotiem
fddc5c2ce0 drivers: spi: mcux_flexcomm: check return value of init_common
spi_mcux_init_common() can fail, propagate the error on TURN_ON
instead of silently ignoring it.

Signed-off-by: Sofian Elmotiem <sofianelmotiem@gmail.com>
2026-05-27 21:34:21 -04:00
Sofian Elmotiem
81bc8fd62f drivers: i2c: mcux_flexcomm: use I2C_MasterEnable on PM RESUME/SUSPEND
For PM2 (suspend-to-idle), flexcomm registers are retained so a full
init_common is not needed. Instead, disable the I2C master before
applying the sleep pinctrl state on SUSPEND, and re-enable it after
restoring the default pinctrl state on RESUME.

Initialize the master with enableMaster = false in init_common so that
TURN_ON does not prematurely enable the master before RESUME restores
the pinctrl state. pm_device_driver_init always calls RESUME after
TURN_ON so the master is enabled correctly on both first boot and PM3
wakeup.

Signed-off-by: Sofian Elmotiem <sofianelmotiem@gmail.com>
2026-05-27 21:34:21 -04:00
Davide Di Lello
0269e4cbaa drivers: uart: infineon: Add UART IRQ update
Re-added irq_update API for UART.
It is required to clean the FIFO status, which flushes
the content correctly.

Signed-off-by: Davide Di Lello <Davide.Dilello@Infineon.com>
2026-05-27 21:34:11 -04:00
Jilay Pandya
89f41fbfac drivers: stepper: fake: default delegates to avoid uninitialized mem
Install default stepper and stepper_ctrl API delegates to avoid
unitialized variables when no delegate is installed by the
application/test suite.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2026-05-27 21:34:00 -04:00
Clark Jarvis
3be4013581 boards: infineon: kit_pse84_ai: enable WiFi support
Enable WiFi (CYW55513 via SDIO) on the PSOC Edge E84 AI evaluation kit.
The kit uses a Murata LBEE5HY2FY (Type 2FY) module with the CYW55500
family WiFi 6/6E chipset, connected via SDHC0 4-bit SDIO interface.

Changes:
- Add SDHC0 SDIO pinctrl entries (6 pins with appropriate bias)
- Add SDHC0 node with airoc-wifi child in board DTS
- Add WiFi Kconfig defaults selecting CYW55513_MURATA_2FY_SM module
- Add wifi and sdhc to supported features in board YAML
- Add CYW55513_MURATA_2FY_SM module choice in Kconfig.airoc
- Add NVRAM/CLM path mapping for Murata 2FY in whd-expansion CMakeLists

Hardware-verified on physical KIT_PSE84_AI: WiFi firmware boots,
MAC address obtained, WHD driver initialized successfully.

Note: Requires corresponding NVRAM file addition in hal_infineon
(cyw55500-sdio-mur-2FY.txt from Infineon/wifi-resources).

Signed-off-by: Clark Jarvis <Clark.Jarvis@infineon.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-27 21:33:50 -04:00
Vincent Tardy
2c690e394f drivers: bluetooth: hci: stm32wba: fix cmd packet transmission issues
This commit fixes the command packet size allocation. It allocates an
'hci_cmd_buf' buffer to store the HCI command packet to send. The buffer
size supports the maximum command packet size and the maximum event size.
This commit also fixes an issue where the buf argument was not unreferenced
when bt_buf_get_evt() failed in the BT_HCI_H4_CMD command case.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-05-27 21:32:33 -04:00
Manjae Cho
98d3df3569 drivers: i2c: restrict IT8XXX2 target defaults
IT8XXX2 currently enables I2C_TARGET_BUFFER_MODE for all I2C targets.
This affects unrelated drivers such as the LPC55S69 custom target sample.

Limit the IT8XXX2 target defaults to the ITE enhance I2C driver, so
non-ITE targets stay in byte mode unless they opt in.

Guard Ambiq IOS buffer callbacks behind I2C_TARGET_BUFFER_MODE and enable
buffer mode explicitly for Nordic TWIS target API test builds.

Fixes #108902

Signed-off-by: Manjae Cho <manjae.cho@samsung.com>
2026-05-27 21:32:23 -04:00