Commit graph zephyr/drivers
Author SHA1 Message Date
Marcin Niestroj
4e2bd0e38a net: nsos: fix getaddrinfo return error conversion
Convert return value from "host" to "mid" in case of error.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2026-04-27 14:20:51 +02:00
Marcin Niestroj
99d57a09ee net: nsos: fix send* and recv* flag conversion
Convert all flags from "mid" to "host" before calling host APIs.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2026-04-27 14:20:51 +02:00
Marcin Niestroj
5cf4248184 net: nsos: fix sendmsg() error propagation
Return error code in "mid" namespace, to be consistent across all
nsos_adapt_sendmsg() return values.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2026-04-27 14:20:51 +02:00
Marcin Niestroj
970e627ab8 net: nsos: handle addrinfo mapping
Add addrinfo mapping between host and Zephyr. This fixes issues for example
when AF_INET had to be mapped between host (value 2 in glibc on Linux) and
Zephyr (value 1).

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2026-04-27 14:20:51 +02:00
Marcin Niestroj
e0f96ca9c9 net: nsos: fix AF_PACKET handling
There was a copy-paste error, resulting in conversion to AF_UNIX.
Additionally sll_family needs to be converted to from "mid" to "host"
value.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2026-04-27 14:20:51 +02:00
Jordan Yates
ee1367b8c2 disk: sdmmc_stm32: missing erase PM handling
Lock the sleep modes while SDMMC is running the erase operation.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-04-27 14:17:59 +02:00
Fin Maaß
070ff02620 net: slip: refactor MAC address handling
We don't need to save the MAC address in the data
struct, therfore use a local var in the iface init for it.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-27 14:17:31 +02:00
Fin Maaß
0038b34ff2 net: slip: move dev init into iface init
move dev init into iface init. By registering the
uart pipe at the end of the iface init, we also no longer
need to check in the callback if the iface init was done.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-27 14:17:31 +02:00
Fin Maaß
c8c3f5f3ac net: slip: remove vlan handeling
since the VLAN overhaul 2 years ago
this part is wrong, therfore remove it.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-27 14:17:31 +02:00
Robert Khanafiev
23748dd517 drivers: ethernet: phy: vsc8541: added interrupt mode support
Added support for the MDINT interrupt pin, through which the PHY signals
the MCU when certain link events occur.

Signed-off-by: Robert Khanafiev <robert.khanafiev@fischer-electronic.com>
2026-04-27 14:16:31 +02:00
Robert Khanafiev
18a9f5a4bf drivers: ethernet: phy: vsc8541: replace monitor thread with workqueue
The link was monitored in a separate thread that was initialized with
an incorrectly defined stack. This caused an exception on some systems.
The thread has been replaced with a dedicated workqueue.

Signed-off-by: Robert Khanafiev <robert.khanafiev@fischer-electronic.com>
2026-04-27 14:16:31 +02:00
Basile GRUNER
f78523bf4d drivers: rtc: Add support for RTC for stm32n6 series
Add rtc node on stm32n6 DT.
Enable backup domain access before RTC clock configuration and not after.
Add rtc to the supported tags

Signed-off-by: Basile GRUNER <basile.gruner@smile.fr>
2026-04-27 14:13:55 +02:00
Fin Maaß
5da9adcb85 drivers: serial: add dependency for UART_PIPE
The uart pipe need the chosen of zephyr,uart-pipe,
add that dependency to the Kconfig option.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-27 07:24:23 +02:00
Kapil Bhatt
226ce64e9b drivers: nrf_wifi: Add NRF_WIFI_WPA3 AUTO and FT_SAE security type
Add NRF_WIFI_WPA3_AUTO and NRF_WIFI_WPA3_FT_SAE security type in
nrf_wifi driver.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-04-27 07:22:07 +02:00
Kapil Bhatt
cd0953e356 drivers: nrf_wifi: Add kconfig for BT coex and BT slot allocation time
Add Kconfig for BT coex and slot allocation time.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-04-27 07:22:07 +02:00
Keith Wheeler
3c36361cab drivers: misc: ethos_u: adding Infineon Ethos NPU support
Added Ethos U55 support for Infineon PSE84 platform.

Signed-off-by: Keith Wheeler <keith.wheeler@infineon.com>
2026-04-26 17:42:04 +02:00
Benjamin Cabé
1eb2281316 drivers: display: add driver for ED2208-GCA (EL073TF1) Spectra 6 e-ink
Adds driver for the EL073TF1 (ED2208-GCA) 7.3-inch Spectra 6
electrophoretic display panel.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-04-25 11:31:10 +02:00
Benjamin Cabé
b10b9c3e5a Revert "drivers: display: Add PIXEL_FORMAT_PRIV_START value"
This reverts commit 6685c3028b
in order to  refactor the handling of indexed 4 bit pixel formats

We can handle indexed 4 bit pixel formats in a generic way without having
to resort to "private" pixel format definitions. This introduces a new
pixel format, PIXEL_FORMAT_I_4, for (up-to) 16-color palette displays.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-04-25 11:31:10 +02:00
Kai Vehmanen
ff2e5fb9d4 drivers: dai: align Kconfig help text style to project
Use correct on tab plus two extra spaces indentation for Kconfig help
entries.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2026-04-25 08:21:38 +02:00
Kai Vehmanen
6924f2cb43 drivers: dai: make max dai_config blob size configurable
Add a Kconfig CONFIG_DAI_MAX_BESPOKE_CFG_SIZE to configure the maximum
blob size for dai_config_set. This only affects user-space usage via
syscalls when the blob needs to be copied to kernel memory before
validation.

The default is increased to 1024 to make tests pass with upstream
SOF project configurations.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2026-04-25 08:21:38 +02:00
Mathias Markussen
c96e6372fa drivers: display: st: implement display callback API in LTDC driver
Implementation of DISPLAY_EVENT_VSYNC and DISPLAY_EVENT_LINE_INT callbacks.

Signed-off-by: Mathias Markussen <mathias.markussen@st.com>
2026-04-25 08:18:08 +02:00
Alexpandi Muniyandi
56604a60df drivers: clock_control: Add hfclk struct
Add hfclk struct to get the clock rate of hfclk

Signed-off-by: Alexpandi Muniyandi <alexpandi@linumiz.com>
2026-04-24 15:38:00 -04:00
Alexpandi Muniyandi
e6d4293dca drivers: adc: Add a driver support for TI MSPM0 ADC module
Add driver support for TI MSPM0 ADC module.

Add a configurable reference voltage support with vref.
Add this driver in shell.

Signed-off-by: Jackson Farley <j-farley@ti.com>
Signed-off-by: Alexpandi Muniyandi <alexpandi@linumiz.com>
2026-04-24 15:38:00 -04:00
Phi Bang Nguyen
591047374c drivers: video: sw_generator: Add support for BGR24 and BGRX32 formats
Add support for VIDEO_PIX_FMT_BGR24 and VIDEO_PIX_FMT_BGRX32 formats

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2026-04-24 15:37:46 -04:00
Maureen Helm
43d6f06f1e drivers: sensor: use LOG_ERR_DEVICE_NOT_READY macro
Unify all "device not ready" error messages across sensor drivers with
the LOG_ERR_DEVICE_NOT_READY macro, following the pattern established
for input drivers in commit 31b5866.

This improves consistency and makes device readiness errors easier to
grep across the codebase. Using the standardized macro ensures device
names are properly formatted with null-safety checks.

Image size impact (tests/drivers/build_all/sensor on native_sim,
building 211 sensor drivers):
- Before: 1,033 KB (text: 961 KB)
- After:  1,036 KB (text: 964 KB)
- Change: +2.5 KB (+0.25%), text: +2.5 KB

The small size increase is due to the macros adding null-safety checks
and dynamic device name formatting, which generates slightly more code
than some of the simpler static log strings used by drivers previously.

Assisted-by: Claude:claude-sonnet-4.5
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2026-04-24 15:36:33 -04:00
Maureen Helm
7c2a9c1a22 drivers: sensor: change device readiness LOG_DBG to LOG_ERR
Several sensor drivers were logging device readiness failures as LOG_DBG
rather than LOG_ERR, making initialization failures harder to diagnose.
These readiness checks occur during device initialization and return error
codes, so they should be logged as errors rather than debug messages.

This change affects drivers that check for bus or GPIO device readiness
and ensures consistent error reporting across the sensor subsystem.

Assisted-by: Claude:claude-sonnet-4.5
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2026-04-24 15:36:33 -04:00
Benjamin Cabé
ac7b9c7506 drivers: audio: dmic: prefix mpxxdtyy driver sources with dmic_
Align the mpxxdtyy driver sources with the other DMIC drivers.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-04-24 19:07:38 +02:00
Benjamin Cabé
4f8a71fbcd drivers: audio: dmic: make DMIC a proper driver class
There is no reason to not have DMIC be a proper driver class, so make
the appropriate change so that DMIC drivers actually populate a
driver_api struct.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-04-24 19:07:38 +02:00
Sarah Renkhoff
95ff84434f drivers: entropy: stm32: Lock semaphore before hardware register access
Resuming the device involves hardware accesses including register
writes, so we need to acquire the semaphore lock first to avoid
interference with other cores also using the RNG.

Signed-off-by: Sarah Renkhoff <sarah.renkhoff@gmail.com>
2026-04-24 19:06:12 +02:00
Fin Maaß
a551f2fac2 drivers: ethernet: mdio: stm32: use k_mutex
use k_mutex instead of the k_sem

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-24 19:05:49 +02:00
Fin Maaß
c29fb364ed drivers: ethernet: mdio: stm32: refactor driver
now that the ethernet mac is the parent of
the mdio node, we can improve the mdio
driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-24 19:05:49 +02:00
Fin Maaß
747adf26e7 drivers: ethernet: stm32: remove parent child structure
remove parent child structure in the dt,.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-24 19:05:49 +02:00
Ryan McClelland
80fc0860dd drivers: i3c: cdns: implement I2C asynchronous callback API
Wire up the i2c_api.transfer_cb endpoint so I2C transfers routed through
an I3C controller can use the asynchronous completion callback when
CONFIG_I2C_CALLBACK is enabled. The async path mirrors the existing
CONFIG_I3C_CALLBACK implementation and shares the same async_sem,
timeout timer, cb/userdata state, serialized through async_sem.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-04-24 19:04:45 +02:00
Ryan McClelland
09b483ae67 drivers: i3c: cdns: implement asynchronous callback API
Implement i3c_transfer_cb and i3c_do_ccc_cb in the Cadence I3C
controller driver. The existing transfer functions are refactored
with an async flag that skips waiting for completion and instead
starts a kernel timer for timeout handling. A semaphore serializes
async operations, and the user callback is invoked from the
transfer completion ISR or the timeout handler.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-04-24 19:04:45 +02:00
Ryan McClelland
fd7d01fdd4 drivers: i3c: add asynchronous callback API
Add an asynchronous callback API for I3C, similar to the existing
i2c_transfer_cb interface. This introduces i3c_transfer_cb and
i3c_do_ccc_cb, which start a transfer and return immediately,
invoking a user-provided callback upon completion or timeout.

A new CONFIG_I3C_CALLBACK Kconfig option gates the feature. The
driver API struct is extended with do_ccc_cb and i3c_xfers_cb
function pointers under CONFIG_I3C_CALLBACK.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-04-24 19:04:45 +02:00
Archit Anant
3c8e70f816 display: ssd1322: enforce width alignment for L4 display
When writing to the SSD1322 L4 display, the driver correctly checks
that the X coordinate origin is aligned to the hardware's pixel
packing requirements.

However, it failed to verify that the width of the write buffer
was also aligned. This caused the driver to accept unaligned writes,
resulting in partial byte processing and display corruption when
CONFIG_LV_Z_AREA_X_ALIGNMENT_WIDTH was not properly configured.

Add a missing desc->width alignment check to prevent invalid writes.

Fixes: #106558
Signed-off-by: Archit Anant <architanant5@gmail.com>
2026-04-24 19:04:02 +02:00
Archit Anant
257388199d display: ssd1363: enforce width alignment for L4 display
When writing to the SSD1363 L4 display, the driver correctly checks
that the X coordinate origin is aligned to the hardware's pixel
packing requirements.

However, it failed to verify that the width of the write buffer
was also aligned. This caused the driver to accept unaligned writes,
resulting in partial byte processing and display corruption when
CONFIG_LV_Z_AREA_X_ALIGNMENT_WIDTH was not properly configured.

Add a missing desc->width alignment check (multiple of 4) to prevent
invalid writes.

Fixes: #106558
Signed-off-by: Archit Anant <architanant5@gmail.com>
2026-04-24 19:04:02 +02:00
Archit Anant
179f317e69 display: ssd1327_5: enforce width alignment for L4 display
When writing to the SSD1327 L4 display, the driver correctly checks
that the X coordinate origin is aligned to the hardware's pixel
packing requirements.

However, it failed to verify that the width of the write buffer
was also aligned. This caused the driver to accept unaligned writes,
resulting in partial byte processing and display corruption when
CONFIG_LV_Z_AREA_X_ALIGNMENT_WIDTH was not properly configured.

Add a missing desc->width alignment check to prevent invalid writes.

Fixes: #106558
Signed-off-by: Archit Anant <architanant5@gmail.com>
2026-04-24 19:04:02 +02:00
Archit Anant
98cba50226 display: ssd1320: enforce width alignment for L4 display
When writing to the SSD1320 L4 display, the driver correctly checks
that the X coordinate origin is aligned to the hardware's pixel
packing requirements.

However, it failed to verify that the width of the write buffer
was also aligned. This caused the driver to accept unaligned writes,
resulting in partial byte processing and display corruption when
CONFIG_LV_Z_AREA_X_ALIGNMENT_WIDTH was not properly configured.

Add a missing desc->width alignment check to prevent invalid writes.

Fixes: #106558
Signed-off-by: Archit Anant <architanant5@gmail.com>
2026-04-24 19:04:02 +02:00
Archit Anant
f6ce947e4c display: sh1122: enforce width alignment for L4 display
When writing to the SH1122 L4 display, the driver correctly checks
that the X coordinate origin is aligned to the hardware's pixel
packing requirements.

However, it failed to verify that the width of the write buffer
was also aligned. This caused the driver to accept unaligned writes,
resulting in partial byte processing and display corruption when
CONFIG_LV_Z_AREA_X_ALIGNMENT_WIDTH was not properly configured.

Add a missing desc->width alignment check to prevent invalid writes.

Fixes: #106558
Signed-off-by: Archit Anant <architanant5@gmail.com>
2026-04-24 19:04:02 +02:00
Camille BAUD
0b3c77eef3 drivers: sensor: Add Sensylink CHT8315
Add a temperature and humidty sensor with advanced trigger functions

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-04-24 19:02:52 +02:00
Henrik Brix Andersen
09f4511297 drivers: sensor: st: lsm6dsv80x: fix lsm6dsv80x_gy_setup() call params
Use the correct parameters for setting the ODR to "off" when calling
lsm6dsv80x_gy_setup().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2026-04-24 19:02:15 +02:00
Henrik Brix Andersen
4fc2b02601 drivers: sensor: st: lsm6dsv320x: fix lsm6dsv320x_gy_setup() call params
Use the correct parameters for setting the ODR to "off" when calling
lsm6dsv320x_gy_setup().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2026-04-24 19:02:15 +02:00
Benedek Kupper
1c27adc708 drivers: flash: stm32f1: implement option bytes R/W
While other lines of the STM32 family have their flash controllers with
option bytes driver support, the STM32F1 line was missing it.
(Which might have something to do with the rather complex handling that
it needs to program them.) This patch adds support for modifying the
option bytes as they are represented in FLASH/OBR, which involves erasing
all option bytes (including the write protection bytes), then writing
back the new values for each (restoring the write protection to its
previous value).

Signed-off-by: Benedek Kupper <kupper.benedek@gmail.com>
2026-04-24 10:30:02 -04:00
Benjamin Cabé
6c1ae30866 drivers: charger: add support for Silergy SY6974B
Add support for Silergy SY6974B 3A single-cell Li-Ion switching battery
charger with I2C control, USB BC1.2 detection, OTG boost and power-path
management.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-4.7
2026-04-24 10:28:49 -04:00
Jisheng Zhang
5f1892d707 usb: udc_dwc2: Fix warnings on 64 bit platforms
Fix below warnings on 64bit platforms:

drivers/usb/udc/udc_dwc2.c: In function 'dwc2_tx_fifo_write':
rivers/usb/udc/udc_dwc2.c:454:29: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
  454 |                 sys_write32((uint32_t)buf->data,
      |                             ^
drivers/usb/udc/udc_dwc2.c: In function 'dwc2_prep_rx':
drivers/usb/udc/udc_dwc2.c:651:29: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
  651 |                 sys_write32((uint32_t)data,
      |                             ^

drivers/usb/udc/udc_dwc2.c: In function 'dwc2_read_fifo_setup':
drivers/usb/udc/udc_dwc2.c:2324:25: warning: format '%d' expects argument
of type 'int', but argument 2 has type 'size_t' {aka 'long unsigned int'}
 2324 |         LOG_ERR("%d bytes SETUP", size);
      |                 ^~~~~~~~~~~~~~~~  ~~~~
      |                                   |
      |                                   size_t {aka long unsigned int}
include/zephyr/logging/log_core.h:336:50: note: in definition of macro
'Z_LOG2'
  336 |                         z_log_printf_arg_checker(__VA_ARGS__);
      |                                                  ^~~~~~~~~~~
include/zephyr/logging/log.h:62:22: note: in expansion of macro 'Z_LOG'
   62 | #define LOG_ERR(...) Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                      ^~~~~
drivers/usb/udc/udc_dwc2.c:2324:17: note: in expansion of macro 'LOG_ERR'
 2324 |                 LOG_ERR("%d bytes SETUP", size);
      |                 ^~~~~~~
drivers/usb/udc/udc_dwc2.c:2324:27: note: format string is defined here
 2324 |                 LOG_ERR("%d bytes SETUP", size);
      |                          ~^
      |                           |
      |                           int
      |                          %ld
drivers/usb/udc/udc_dwc2.c: In function 'dwc2_handle_oepint':
drivers/usb/udc/udc_dwc2.c:2615:51: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
 2615 | sys_cache_data_invd_range((void *)(addr - 8), 8);
      |                                   ^
drivers/usb/udc/udc_dwc2.c:2616:45: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
 2616 | memcpy(priv->setup, (void *)(addr - 8), sizeof(priv->setup));

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
2026-04-24 10:28:34 -04:00
Khai Cao
6168031e21 drivers: ethernet: recover stuck mode transition using MIOC
When switching ETHA operating modes, the transition may fail to
complete if the PHY-derived clock is unexpectedly stopped, leaving
RMAC in an indeterminate state.

If the requested mode is not reached within the timeout, enable
RMAC emergency clock recovery (MIOC0) to flush internal RMAC state
and temporarily switch to a free‑running clock. Wait for the ETHA
mode transition to complete, then restore normal PHY clocking.

This improves robustness of RMAC/ETHA mode transitions without
requiring a full device reset.

Signed-off-by: Khai Cao <khai.cao.xk@renesas.com>
2026-04-24 13:02:27 +02:00
Armando Visconti
896e8819af modules/hal_st: Align to stmemsc HAL i/f v2.13.2
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v2.13.2

Requires https://github.com/zephyrproject-rtos/hal_st/pull/35

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2026-04-24 13:02:14 +02:00
Haoran Jiang
c64977b722 drivers: sf32lb: fix DMA completion polling
SF32LB DMA cleared its software busy bit on half-complete.
The QSPI NOR write path polled that bit while holding the flash lock.

Clear the DMA status bit only on completion or error.
Derive busy from the active state plus pending_length.
Poll pending_length until the flash DMA transfer reaches zero.

Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
2026-04-24 13:02:05 +02:00
Haoran Jiang
5aa494194f drivers: flash: sf32lb: re-enable write before erase
The SF32LB MPI QSPI NOR erase path issued WREN only once before
entering the erase loop. On SPI NOR devices the write-enable latch
is typically cleared after each erase command, so a multi-block erase
can fail after the first block.

Move WREN into the loop and issue it while holding the driver lock,
immediately before the selected erase command. This matches the write
path and aligns the driver with Zephyr's generic SPI NOR erase flow.

Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
2026-04-24 13:01:53 +02:00