Commit graph zephyr/drivers
Author SHA1 Message Date
Liam Ogletree
b9c2675717 drivers: haptics: Add common features to haptics subsystem API
Extends the existing haptics subsystem API to provide generic support for:
 - playback source selection
 - integrated sensor readings
 - output level control
 - calibration
 - streaming effects over a control port

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-06-03 18:26:49 -04:00
Madhab Sharma
b333d1f4cc drivers: wifi: esp32: Prevent power save in AP mode
Currently, there was no check in place if set_power_save()
was called in AP mode which might result in undefined
behavior.

Additionally, esp_wifi_get_config() doesn't return an
error when querying for STA config in AP mode.

Signed-off-by: Madhab Sharma <madhabsharma94@gmail.com>
2026-06-03 18:44:19 +02:00
Erwan SZYMANSKI
94c57ba192 drivers: ethernet: phy: lan8742: handle EALREADY properly
As it is done in phy_mii.c, set autoneg_in_progress
for already on init.

Signed-off-by: Erwan SZYMANSKI <erwan.szymanski@st.com>
2026-06-03 18:43:04 +02:00
Karl Palsson
f05380de76 drivers/eeprom_fm25xx: Show correct op lengths in debug
The debug prints were showing the maximal length of operations, instead
of the operation length actually used.

Signed-off-by: Karl Palsson <karl.palsson@marel.com>
2026-06-03 18:38:45 +02:00
Qiang Zhang
05aa0414f2 drivers: dma: mcux_edma: handle m2m on V4 instances without channel mux
Factor the m2m software-trigger check into a helper using
FSL_FEATURE_EDMA_INSTANCE_HAS_CHANNEL_MUXn(base) for per-instance
detection, and gate all four m2m-software-only branches (SG -ENOTSUP,
burst-length override, manual start trigger, suspend -ENOSYS) on the
new dma_mcux_edma_m2m_software_only().

Fixes parallel display output on MCXN947 (FlexIO-triggered m2m
channels were treated as software-only and lost their per-minor-loop
pacing).

Fixes: efe48ea674
Fixes: #108367
Signed-off-by: Qiang Zhang <qiang.zhang_6@nxp.com>
2026-06-03 18:38:23 +02:00
Tejus Subramanya
0ade2640ca drivers: wifi: siwx91x: fix listen-interval and DTIM wake cadence
The NWP ignored the host programmed listen_interval and fell back to
its ~1s default, so both WIFI_PS_WAKEUP_MODE_LISTEN_INTERVAL and
WIFI_PS_WAKEUP_MODE_DTIM woke the device roughly once per second
regardless of the AP's DTIM period or the host-requested LI.

Set SL_WIFI_JOIN_FEAT_PS_CMD_LISTEN_INTERVAL_VALID in
siwx91x_iface_init() so the NWP honors the listen_interval supplied
via the host-side power-save command path (i.e. the value programmed
through sl_wifi_set_performance_profile_v2()) instead of substituting
its built-in default.

Signed-off-by: Tejus Subramanya <ters@silabs.com>
2026-06-03 18:38:18 +02:00
Alexpandi Muniyandi
976e3691ab drivers: audio: Add audio codec support for tlv320aic26
Add minimal playback functionality for tlv320aic26 audio codec
module with SPI control interface

Signed-off-by: Alexpandi Muniyandi <alexpandi@linumiz.com>
2026-06-03 18:37:09 +02:00
Anand Kumar
4b53bb05fd drivers: entropy: stm32: rng: handle missing RNG clock source gracefully
Fixes zephyrproject-rtos#106241

When the RNG peripheral is enabled in the device tree but its kernel
clock source is not configured (e.g. HSI48 missing on STM32H7), the
driver currently hangs indefinitely inside generate_from_isr() with
interrupts locked, because RNG_SR.DRDY never asserts. This makes the
system completely unresponsive and very difficult to debug.

Three changes are made to address this:

1. Replace __ASSERT_NO_MSG(res == 0) after clock_control_on() with a
   proper error check that returns the error code and logs a message.

2. Replace __ASSERT(res == 0) after clock_control_configure() with
   the same pattern, returning the error code with a LOG_ERR.

3. Add a runtime clock source check that verifies the domain clock is
   present in the DTS and running at a non-zero rate using
   clock_control_get_rate(), following the same pattern as
   sdmmc_stm32.c. Returns an error instead of hanging indefinitely.

4. Add LOG_MODULE_REGISTER so LOG_ERR messages are routed through
   the standard Zephyr logging subsystem.

Based on approach suggested in zephyrproject-rtos#106241 by @FRASTM.

Signed-off-by: Anand Kumar <anandvtu16158@gmail.com>
2026-06-03 18:36:50 +02:00
Fin Maaß
ad056d5454 wifi: don't select WIFI_OFFLOAD wrongly
don't select WIFI_OFFLOAD, when it is a native driver without offloading.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-06-03 08:12:39 -05:00
Flavio Ceolin
ab35eaccec mbox: userspace: fix TOCTOU race in z_vrfy_mbox_send
The syscall verifier validated msg->data directly from live userspace
memory and then forwarded the original mutable userspace struct pointer
to z_impl_mbox_send(). A concurrent thread could race msg->data to a
supervisor address after the access check.

Fix this by copying struct mbox_msg into a kernel-stack variable.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2026-06-03 08:09:59 -05:00
Flavio Ceolin
d858a79329 mbox: userspace: Fix z_vrfy_mbox_send
handle msg == NULL explicitly since it is valid according with
the API documentation.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2026-06-03 08:09:59 -05:00
Christopher Besch
d2fb3a98ab doc: watchdog: add STM32 IWDG specific note for WDT_OPT_PAUSE_IN_SLEEP
I was working with an STM32WB55RG that had the IWDG_STOP bit
unset by a previous developer. It took me hours to figure
out why WDT_OPT_PAUSE_IN_SLEEP didn't do what it's supposed to.
I hope this note helps the next one coming around to this issue.

I also wrote an article about this:
https://chris-besch.com/articles/soc_option_bytes

Signed-off-by: Christopher Besch <mail@chris-besch.com>
2026-06-03 08:09:00 -05:00
Jérôme Pouiller
4552041cb1 drivers: dma: siwx91x: udma: Add design documentation
Add a bit of history about the driver (the information I would like to
forward to my future me). Try to explain why this driver has this design.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-03 13:05:03 +02:00
Jérôme Pouiller
e0cd7263fa drivers: dma: siwx91x: udma: Simplify siwx91x_udma_reload()
By replacing "udma_table = cfg->chan_desc" by "chan_desc =
&cfg->chan_desc[channel]", we can simply many statements. So, all the
statements now fits on one line.

desc_src_addr and desc_dst_addr are in fact useless.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-03 13:05:03 +02:00
Jérôme Pouiller
bcbd445843 drivers: dma: siwx91x: udma: Reject SG transfers in siwx91x_udma_reload()
Scatter Gather transfers are not supported by siwx91x_udma_reload(). Detect
and reject them.

Also check the size of valid regarding the operation width.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-03 13:05:03 +02:00
Jérôme Pouiller
33cb6c4041 drivers: dma: siwx91x: udma: Fix long line
Compliance check complains about long lines.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-03 13:05:03 +02:00
Jérôme Pouiller
961e4f563b drivers: dma: siwx91x: udma: Fix internal variables names
Some fields names contained irrelevant information (eg. "addr" in
"sg_desc_addr_info" and in "sram_desc_addr", "dma" in "dma_desc_pool").

In other case, it lacked of consistency, (eg. "chan" vs "channel",
"config_zephyr" vs "dma_config" vs "config").

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-03 13:05:03 +02:00
Jérôme Pouiller
77043c2ce6 drivers: dma: siwx91x: udma: Fix symbols prefix
We try to prefix all the symbols in a file with the same prefix (so the
developer easily understand if a symbols is provided by Zephyr, the HAL or
is internal to the driver).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-03 13:05:03 +02:00
Jérôme Pouiller
f51b9f367a drivers: dma: siwx91x: udma: De-duplicate sanity checks
Sanity checks were duplicated in siwx91x_udma_config_sg() and
siwx91x_udma_config_single(). Move them in the caller function.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-03 13:05:03 +02:00
Jérôme Pouiller
c618108a95 drivers: dma: siwx91x: udma: Work with native data
The UDMA drivers includes some functions to translate Zephyr values in
hardware values. However, these conversion are either trivial or not very
consistent. It is more readable to directly work with the native (Zephyr)
values. We just have to check the values requested by the caller are valid
before the processing.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-03 13:05:03 +02:00
Jérôme Pouiller
08e6898e25 drivers: dma: siwx91x: udma: Change stored direction format
Rather than using internal enum type to store the direction, store the
native (Zephyr) value. It will help to simplify the code in the next
changes.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-03 13:05:03 +02:00
Jérôme Pouiller
f1600412b0 drivers: dma: siwx91x: gpdma: Fix symbols prefix
We try to prefix all the symbols in a file with the same prefix (so the
developer easily understand if a symbols is provided by Zephyr, the HAL or
is internal to the driver).

A few symbols in dma_silabs_siwx91x_gpdma.c did not follow this rule.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-03 13:05:03 +02:00
Jérôme Pouiller
233545d1e6 drivers: spi: siwx91x: Simplify DMA configuration
SPI_SILABS_SIWX91X_GSPI_DMA and SPI_SILABS_SIWX91X_GSPI_DMA_MAX_BLOCKS are
redundant. We can achieve the same by checking if
SPI_SILABS_SIWX91X_GSPI_DMA_MAX_BLOCKS > 0.

Then, rather than pulling the DMA if one device use it, automatically use
the DMA it exist (the user can still disable it by settings DMA_MAX_BLOCKS
== 0).

Thanks to that change, we can remove allthe #ifdef in the SPI driver.
A test in spi_siwx91x_is_dma_enabled_instance() is sufficient to make the
DMA relative functions orphans.

Then, we can enable the dma instances in the board DTS, so the user just
have to set DMA=y to enable DMA in the drivers.

The two errors cases are:
  - DMA=y while referenced DMA instance in the DT is disabled. The user get
    a compilation error
  - DMA=n (or DMA driver is disabled) but the user explicitly set
    DMA_MAX_BLOCKS > 0. The user get an error during runtime.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-03 13:05:03 +02:00
Jérôme Pouiller
7b8aadcade drivers: spi: siwx91x: No longer need to split the descriptors
Until now, the SPI driver had to take care about the size of the blocks
sent to the DMA. There were several drawbacks:
  - The SPI driver need to know the DMA internal parameter and the SPI
    driver has configured for a specific DMA hardware block.
  - For large transfer, the user has to allocate a large number of
    descriptor in the SPI driver. The user had to know the DMA block size
    of set the right parameter and the descriptors were duplicated with the
    DMA driver (which store them in the hardware format).

However, our DMA drivers now automatically split the large blocks. So the
SPI driver no longer need to do that.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-03 13:05:03 +02:00
Jérôme Pouiller
09d988e023 drivers: dma: siwx91x: udma: Allow to split large buffers
The UDMA scatter-gather mode rejected any block whose size exceeded
DMA_MAX_TRANSFER_COUNT * burst_length bytes (1024 transfers). The was
caller responsible for splitting.

Apply the same fix as the GPDMA driver: when a dma_block_config block is
too large for a single scatter-gather descriptor, automatically split it
into as many chained descriptors as needed, advancing src/dst addresses
for each chunk (honoring DMA_ADDR_ADJ_INCREMENT / DMA_ADDR_ADJ_NO_CHANGE).

Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-03 13:05:03 +02:00
Jérôme Pouiller
527b04e0a0 drivers: dma: siwx91x: gpdma: Allow to split large buffers
The GPDMA rejected any block whose size exceeded
GPDMA_DESC_MAX_TRANSFER_SIZE (4096 transfers). The was caller responsible
for splitting. There is no way for the caller to be aware of this
restriction.

This patch allow the GPDMA driver to automatically split the oversized
block and run the DMA with a linked descriptors.

Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-03 13:05:03 +02:00
Jérôme Pouiller
4c55936506 drivers: dma: siwx91x: udma: Rename driver
SiWx91x provide two DMA hardware block: GPDMA and UDMA, The GPDMA is
properly named: silabs,gpdma. However, the UDMA is named
"silabs,siwx91x-dma" without any reference to the hardware block it is
supposed to run.

Rename the UDMA driver to fix this inconsistency.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-03 13:05:03 +02:00
T Madhusudhan Rao
b577094164 wifi: nxp: fix build failure in IPv6-only configuration
The NXP Wi-Fi middleware unconditionally accesses IPv4 network
structures and DHCPv4 APIs, causing compiler and linker failures
when CONFIG_NET_IPV4 is disabled (e.g., in IPv6-only environments).

This commit introduces Kconfig guards around the IPv4-specific
logic. Functionally, when IPv4 is disabled, the middleware now
safely bypasses IPv4 static address assignment, IPv4 address and
netmask retrieval, and DHCPv4 client initialization.

Additionally, variables that become unused in IPv6-only builds
are properly suppressed using the ARG_UNUSED() macro.

Fixes #87647

Signed-off-by: T Madhusudhan Rao <tetakalam@aerlync.com>
2026-06-03 11:01:55 +01:00
Benjamin Cabé
3353896942 drivers: sensor: apds9960: move register definitions to private header
Drop all the symbols that were incorrectly part of the public header
and move them to a driver-internal header.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-06-03 08:27:19 +02:00
Thomas Hebb
021c2a6431 drivers: bluetooth: h4: Take reset-assert-duration-ms from proper node
When there are multiple zephyr,bt-hci-uart nodes, we currently use the
reset-assert-duration-ms property from the first one for all of them due
to a typo in the initializer macro. Fix it.

Fixes: 9f44b011de ("bluetooth: hci: h4: optional reset pin")
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2026-06-03 08:26:55 +02:00
Thomas Hebb
68a329a70b style: Fix various typos across the tree
Some of these are in user-visible log messages, but none are breaking
changes for applications.

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2026-06-03 08:26:41 +02:00
Shan Pen
9436dad631 drivers: spi: renesas_ra8: add RTIO submit fallback
Add the default SPI RTIO submit hook for RA8 SPI-B.

Signed-off-by: Shan Pen <bricle031@gmail.com>
2026-06-03 08:26:24 +02:00
Madhab Sharma
fb9ecd7afc drivers: wifi: esp32: Set Wi-Fi mode post handling esp_wifi_init return
esp_wifi_set_mode can fail silently if esp_wifi_init was not successful.
Move the mode set and handle its return value post esp_wifi_init error
checking.

Signed-off-by: Madhab Sharma <madhabsharma94@gmail.com>
2026-06-03 08:25:53 +02:00
David Jewsbury
d7d1a64e27 drivers: flash_mspi_nor: Configure IO mode when switching to XIP
Include MSPI_DEVICE_CONFIG_IO_MODE in XIP_DEV_CFG_MASK and populate
mspi_cfg.io_mode from dev_config->read_io_mode so the XIP setup call
configures the XIP io-mode which wasn't previously the case.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2026-06-03 08:25:32 +02:00
David Jewsbury
ee1462f653 drivers: mspi_dw: Add optional HW concurrent memmap configuration
Some configurations of the DesignWare IP support concurrent XIP
(memory mapping) as part of the IP. The driver currently supports
concurrent XIP using a software workaround and this HW feature is not
yet supported by the driver. However, if concurrent XIP is supported as
well as write XIP not being supported, this will introduce a new
register called XIPSER which this commit adds support for.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2026-06-03 08:25:32 +02:00
David Jewsbury
086be9caac drivers: mspi_dw: Add optional mem-map write support configuration
Some configurations of the designware IP support write access but not
all. Therefore, this is a configurable devicetree option to enable or
disable support for the mem-map (memory mapped) write registers. Otherwise,
devices that don't support this will come into a bus fault.

signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2026-06-03 08:25:32 +02:00
David Jewsbury
4073d50842 drivers: mspi_dw: Add xip enable and disable functions for nrf-mspi
Enabling of the nrf-mspi XIP is done via the core registers and hence
these functions can just be placeholders to stop compilation errors.

signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2026-06-03 08:25:32 +02:00
minyuan xue
aa0a90c620 drivers: entropy: add ameba entropy driver
Add realtek ameba entropy driver.

Signed-off-by: minyuan xue <minyuan_xue@realsil.com.cn>
2026-06-03 08:24:57 +02:00
Robert Lubos
392802e277 drivers: ethernet: e1000: Don't enable automatically if QEMU uses SLIP
Enabling the driver while QEMU is configured to use SLIP driver (which
is the default) causes crash on boot, making any networking sample
defunct in default configuration when running on qemu_x86.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-06-02 20:22:35 -04:00
Henrik Brix Andersen
b6bf833a61 drivers: can: bosch: m_can: always use RX FIFO0
Always use RX FIFO0 when adding RX filters to ensure CAN frames are
processed in the order (priority) received on the bus.

With two FIFOs there is a risk that frames are processed out-of-order by
the application layer.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-06-02 20:22:25 -04:00
Madhab Sharma
ff590c2214 drivers: wifi: esp32: use net_eth_set_if_type_wifi() API
Use net_eth_set_if_type_wifi() instead of directly accessing
ethernet_context->eth_if_type to set the interface type.

Signed-off-by: Madhab Sharma <madhabsharma94@gmail.com>
2026-06-02 20:21:35 -04:00
Jilay Pandya
8692bcbce0 drivers: tmcm3216: use correct format specifier for size_t
incorrect format specifier for size_t leads to a bunch of
compiler warnings on qemu_x86_64.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2026-06-02 20:19:57 -04:00
Dan Mangum
7daea21650 drivers: sensor: ntc_thermistor: make tdk ntcg generic
Uses generic nomenclature for TDK ntcg series NTC thermistors, which use a
naming scheme that indicates their resistance (R25) and beta (B25/85)
values. Compensation tables are identical for parts with the same
resistance and beta values.

Signed-off-by: Dan Mangum <georgedanielmangum@gmail.com>
2026-06-02 20:19:47 -04:00
Camille BAUD
16b8db7fbf drivers: bflb: Convert EFUSEs to OTP
Use new OTP API instead of syscon

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-06-02 20:19:36 -04:00
Benjamin Cabé
efffca7c2a drivers: watchdog: add watchdog driver for M5Stack M5PM1 PMIC
Implement the M5PM1 watchdog as a Zephyr watchdog controller child
of the MFD device.
The driver supports a single reset-only timeout channel with one-second
granularity (1 to 255 s).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-4.7
2026-06-02 20:18:46 -04:00
Benjamin Cabé
8e18d508bb drivers: regulator: add regulator driver for M5Stack M5PM1 PMIC
Expose the M5PM1 switchable power rails as fixed-voltage regulator devices
child of the MFD device. The driver supports enabling and disabling the 3.3
V DCDC, 3.3 V LDO, and 5 V boost outputs via the PMIC power config
register.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-4.7
2026-06-02 20:18:46 -04:00
Benjamin Cabé
5a231ea4d9 drivers: gpio: add GPIO driver for M5Stack M5PM1 PMIC
Expose the M5PM1 GPIO bank as a Zephyr GPIO controller child of the MFD
device. The driver supports five pins with input/output configuration,
pull-up/pull-down, and open-drain outputs; pin interrupts are not
supported.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-4.7
2026-06-02 20:18:46 -04:00
Benjamin Cabé
8d579a72fa drivers: adc: add ADC driver for M5Stack M5PM1 PMIC
Expose the M5PM1 on-chip ADC as a Zephyr ADC controller child of the MFD
device.

The driver supports rail monitoring channels (VREF, VBAT, VIN, 5VOUT),
GPIO1/GPIO2 inputs via the ADC mux, and an internal temperature channel
at 12-bit resolution.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-4.7
2026-06-02 20:18:46 -04:00
Benjamin Cabé
e5532e6287 drivers: mfd: add MFD driver for M5Stack M5PM1 PMIC
The M5PM1 is a small companion microcontroller used on M5Stack boards to
provide power management (battery charging, switchable rails), a small
bank of GPIOs, and an on-chip ADC.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-4.7
2026-06-02 20:18:46 -04:00
John Batch
6e4debbd23 drivers: mfd: add Infineon HPPASS MFD driver
Adds the MFD parent driver for the Infineon HPPASS analog subsystem.
HPPASS houses a SAR ADC and Comparator and Slope Generator coordinated
by an Autonomous Controller executing a hardware state machine defined
by a configurable State Transition Table (STT).  The HPPASS MFD driver
owns the following shared resources:

- Subsystem Initialization including factory trimming.
- AC Management, including AC start and STT configuration.
- Trigger I/O routing
- MCPASS interrupt handling.

Signed-off-by: John Batch <john.batch@infineon.com>
2026-06-02 20:18:27 -04:00