Commit graph zephyr/drivers
Author SHA1 Message Date
Fin Maaß
0f5c36e112 drivers: ethernet: dwmac: mdio: add mdio controller
add mdio controller for the dwmac
ethernet controller.

Assisted-by: Github Copilot:GPT-5.4
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-30 14:02:30 -04:00
Fin Maaß
3fefff8f0d drivers: ethernet: dwmac: implement get_phy function
implement get_phy function of the ethernet api.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-30 14:02:30 -04:00
Fin Maaß
a24eb92639 drivers: ethernet: dwmac: use mmio api
use mmio api, also use dev as the reference.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-30 14:02:30 -04:00
Aiman Mazlan
a6b035fd2e drivers: ethernet: eth_w5500: add multi instances support
Add support for multi instances.

Signed-off-by: Aiman Mazlan <mohammad.aiman@stratusauto.com>
2026-04-30 14:02:00 -04:00
Raguraj Rajendran
74ae38ceeb drivers: i2c: stm32: ignore spurious BERR in controller mode
The STM32 I2C V1 and V2 peripherals can generate spurious Bus Error
(BERR) flags in controller mode. This is documented in multiple
errata sheets:
  - ES0182 (STM32F405/407/415/417) section 2.10.1
  - ES0305 (STM32F412)             section 2.11.1
  - ES0206 (STM32F2)               section 2.10.1

The recommended workaround is to clear the BERR flag and take no
further action, letting the transfer continue normally. If a real
bus error occurs, the transfer will time out.

The V2 driver already had a comment documenting this errata but
the code still aborted the transfer with is_err=1 and goto end.

Fix both V1 and V2 drivers to return 0 (continue) in controller
mode when BERR is detected. In target mode, BERR is still reported
as a real error since the errata only applies to controller mode.

Signed-off-by: Raguraj Rajendran <raguraj.rajendran@rapyuta-robotics.com>
2026-04-30 14:01:46 -04:00
Jordan Yates
fcde47fdb8 modem: cellular: move individual modems to dedicated files
Simplify the `modem_cellular.c` file by pulling out all the individual
modem macros and instantiation to a dedicated file per modem.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-04-30 14:01:23 -04:00
Jordan Yates
5d3d02316d modem: cellular: move common handlers to header
Move the common 3GPP message handlers to the header to enable OOT modems
to use the common implementations.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-04-30 14:01:23 -04: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
Michal Smola
e25276fdf0 drivers: pinctrl: nxp_port: Use fixed port index in ports array
Current implementation does not allow omitting a port. Also, if a port is
disabled, the last port is not present in ports array.

Use fixed index for each port in ports array, i.e. porta is always index 0,
portb is index 1, etc. If a port is ommitted or disabled, NULL is assigned
instead of port address.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2026-04-30 14:00:30 -04:00
Pieter De Gendt
f76c2615d5 drivers: i3c: Declare I3C API as child of I2C API
Create a parent-child relation for I2C-I3C APIs, this allow
DEVICE_API_IS(i2c, i3c_dev) to return true.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-04-30 14:00:16 -04:00
Guillaume Gautier
d441196250 drivers: i3c: stm32: Adapt driver for stm32 hal2
Adapt STM32 I3C driver for STM32 HAL2 and STM32C5.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-04-30 14:00:01 -04:00
Alexpandi Muniyandi
17c20d7713 drivers: comparator: mspm0: add support for TI MSPM0 COMP module
Add driver supporting the comp module in TI MSPM0 G and L series
with interrupt trigger and reference voltage support.

Add a window comparator mode feature for mspm0 g series

Signed-off-by: Alexpandi Muniyandi <alexpandi@linumiz.com>
2026-04-30 13:59:02 -04:00
Ruoshan Shi
35ac70010f drivers: display: Add RM692C9 driver support
Added rm692c9 driver for i.MX95 display

Signed-off-by: Ruoshan Shi <ruoshan.shi@nxp.com>
2026-04-30 13:58:22 -04:00
Chun-Chieh Li
6d04936b15 drivers: can: numaker: support m335x
Add support for Nuvoton NuMaker SoC series M3351 CAN-FD

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2026-04-30 07:52:50 +02:00
Chun-Chieh Li
48d18cb0fa drivers: clock_control: numaker: support m335x canfd
Add support for Nuvoton NuMaker SoC series M3351 CANFD clock control

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2026-04-30 07:52:50 +02:00
Sylvio Alves
49e425df45 drivers: wifi: esp32: select required ecc psa symbols
The supplicant's mbedTLS crypto backend always compiles
crypto_mbedtls-ec.c when ESP32_WIFI_MBEDTLS_CRYPTO is enabled, so
the ECC PSA primitives it references are required regardless of
WPA3-SAE. Building with only ESP32_WIFI_MBEDTLS_CRYPTO=y previously
emitted PSA warnings because the ECC selects lived solely under
ESP32_WIFI_ENABLE_WPA3_SAE.

Move the always-needed ECC selects (ECDH, ECDSA, SECP_R1_256,
KEY_PAIR_BASIC, KEY_PAIR_IMPORT, PUBLIC_KEY) onto
ESP32_WIFI_MBEDTLS_CRYPTO. Keep KEY_PAIR_GENERATE and
KEY_PAIR_EXPORT under ESP32_WIFI_ENABLE_WPA3_SAE since those paths
are exercised only by SAE/DPP keypair generation.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-04-30 07:52:24 +02:00
Flavien Carvalho
e5493b5092 drivers: flash: spi-nand: Fix incorrect TX/RX buffer usage
During read operations, the same buffer was previously used for both TX
and RX, causing arbitrary data from the RX buffer to be transmitted on
MOSI. This could lead to unintended signaling on the bus and unreliable
device behavior, including corrupted reads (e.g. incorrect JEDEC ID).

Fix this by separating TX and RX buffers:
- Do not drive MOSI during read transactions (TX buffer set to NULL)
- Initialize the RX buffer to 0 before use

This ensures clean read operations without spurious data on MOSI.

During SPI operation, the TX buffer supports a maximum length of
6 bytes. It was set to 5 bytes, which could lead to a potential
overflow.

Signed-off-by: Flavien Carvalho <flavien.carvalho@wiifor.com>
2026-04-30 07:51:32 +02:00
Scott Laboe
696c37dd1d drivers: wdt: numaker: initial commit
- Initial implementation for the numaker watchdog timer peripheral.
 - Add binding to the m48x series soc.

Signed-off-by: Scott Laboe <scottyl2.718@gmail.com>
2026-04-30 07:50:44 +02:00
Anas Nashif
1f77bdd703 drivers: wifi: siwx91x: include logging/log.h
Add missing include to logging/log.h.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-04-29 19:50:34 -05:00
Marcin Niestroj
35977a2773 net: nsos: update 'revents' with poll() when not signalled
Set poll revents even when epoll didn't signal any event. This particularly
fixes the case when epoll didn't have a chance to run (blocking APi with
timeout=0).

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2026-04-29 16:34:39 -04:00
Marcin Niestroj
db19d19ba6 net: nsos: fix revents propagation after nsos_adapt_poll_update()
Propagate 'revents' after calling nsos_adapt_poll_update(), by copying
'poll->mid.revents' (which gets updated by this function) to the
'pfd->revents' object (which is read by caller function).

Fixes: ea44e2715a ("drivers: net: nsos: update unwatched file descriptor
  with poll()")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2026-04-29 16:34:39 -04:00
Marcin Niestroj
6c4b022561 net: nsos: support ICMPV6
Just add conversion between ICMPV6 for host <-> Zephyr.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2026-04-29 16:34:15 -04:00
Marcin Niestroj
ede960d8f9 net: nsos: use host libc allocation functions
Use nsi_host_{*alloc,free,strdup} to utilize host side libc heap memory.
This removes dependency on Zephyr heap configurations: kernel heap and
embedded libc heap.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2026-04-29 16:34:08 -04:00
David Jewsbury
7c8cc654b2 drivers: mspi_dw: Fix compilation error when DMA and Sys work-Q enabled
If both CONFIG_MSPI_DMA and
CONFIG_MSPI_DW_HANDLE_FIFOS_IN_SYSTEM_WORKQUEUE are enabled then
a compilation error would occur as dev_data would be defined twice.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2026-04-29 16:33:58 -04:00
Alberto Escolar Piedras
1b381e71d3 drivers: ethernet: lan9250: Add log.h include
Add logging/log.h include instead of relaying on it being included
indirectly from other headers

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-04-29 16:33:37 -04:00
Alberto Escolar Piedras
2b1fc98328 drivers: ethernet: enc424j600: Add log.h include
Add logging/log.h include instead of relaying on it being
included indirectly from other headers

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-04-29 16:33:37 -04:00
Mathieu Choplain
280ee68dc1 drivers: dma: stm32u5: don't clear flags when overridden by HAL
Don't clear DMA status flags when DMA controller is managed by the HAL.
The same logic was introduced in the dmav1/dmav2 driver by commit
110c61bfea.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-04-29 16:33:16 -04:00
Bartlomiej Fijal
7a1e78e0b3 drivers: sensor: nxp_pmc_tmpsns: fix invalid member access in init
config->adc is of type 'const struct device *', assigned via
DEVICE_DT_GET(). It has no '.dev' member — that field exists only
in 'struct adc_dt_spec'.

The LOG_ERR_DEVICE_NOT_READY() call in lpadc_temp40_init() was
using config->adc.dev, causing a compile error on all platforms
that select NXP_PMC_TMPSNS:

  error: 'config->adc' is a pointer; did you mean to use '->'?

Remove the spurious '.dev' dereference. LOG_ERR_DEVICE_NOT_READY()
accepts 'const struct device *' directly, so passing config->adc
is correct and consistent with the device_is_ready() call on the
line above.

Signed-off-by: Bartlomiej Fijal <StaryAnoda@Gmail.com>
2026-04-29 16:33:03 -04:00
Bartlomiej Fijal
a0dbdc2073 drivers: sensor: nxp_lpadc_temp40: fix invalid member access in init
config->adc is of type 'const struct device *', assigned via
DEVICE_DT_GET(). It has no '.dev' member — that field exists only
in 'struct adc_dt_spec'.

The LOG_ERR_DEVICE_NOT_READY() call in lpadc_temp40_init() was
using config->adc.dev, causing a compile error on all platforms
that select NXP_LPADC_TEMP40:

  error: 'config->adc' is a pointer; did you mean to use '->'?

Remove the spurious '.dev' dereference. LOG_ERR_DEVICE_NOT_READY()
accepts 'const struct device *' directly, so passing config->adc
is correct and consistent with the device_is_ready() call on the
line above.

Signed-off-by: Bartlomiej Fijal <StaryAnoda@Gmail.com>
2026-04-29 16:32:52 -04:00
Julien Racki
3a8c6f1714 drivers: flash: stm32_xspi: add page-layout fallback for XIP init path
When flash_stm32_xspi_init() returns early in the XIP fast path it
leaves layout.pages_size unset. This causes problems for code that
relies on the page layout being available, even in XIP mode. This
commit adds a fallback to ensure a valid page layout is always
available.

Signed-off-by: Julien Racki <julien.racki-ext@st.com>
2026-04-29 16:31:40 -04:00
William Markezana
fc58a57869 drivers: sensor: bflb: add TSEN die temperature sensor
Add a die temperature sensor driver for Bouffalo Lab SoCs using
the internal TSEN peripheral integrated into the GPADC.

The driver uses the ADC subsystem for hardware initialization and
raw sample acquisition via adc_bflb_tsen_read_phase(). Temperature
is computed from two ADC measurement phases (TSVBE_LOW toggle)
using the formula: temp = (|v0 - v1| - tsen_offset) / 7.753

The TSEN calibration offset is read from efuse when available,
falling back to the default value of 2042.

Includes:
- Sensor driver at drivers/sensor/bflb/bflb_tsen/
- DT binding for compatible "bflb,tsen"
- TSEN nodes (disabled) in bl60x, bl61x, bl70x, bl70xl dtsi files

Tested on BL602, BL616, BL706, and BL704L hardware.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-04-29 16:31:08 -04:00
William Markezana
557ad86efc drivers: adc: bflb: add internal TSEN channel support
Add temperature sensor (TSEN) support to the BFLB ADC driver.

When input_positive is set to the TSEN channel (14), the driver
automatically configures CONFIG2 for TSEN mode: enables TS_EN,
sets VREF to 2.0V, CHOP_MODE to Vref AZ, and clears test/debug
bits. ADC calibration is skipped for TSEN channels since the
temperature formula uses raw values.

A new adc_bflb_tsen_read_phase() function is exposed for the TSEN
sensor driver to perform the two-phase measurement (TSVBE_LOW
toggle) needed for temperature calculation.

Also makes efuse calibration failure non-fatal (warning instead
of error) since some chips lack programmed trim data.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-04-29 16:31:08 -04:00
Bjarki Arge Andreasen
407cedc1cf drivers: spi: nrfx_spim: patch flow so bus inits before cs is set
The current flow sets CS before the SPIM peripheral actually drives
the bus. This can cause SCK to be in the incorrect initial state
dictated by CPOL. New flow enables SPIM after it has been configured,
before CS is set, and disabled is after CS is cleared, thus the bus
is driven by SPIM during the entire transfer.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-04-29 16:30:23 -04:00
Bjarki Arge Andreasen
0068b2f06b drivers: spi: nrfx_spim_common: include gpiote_nrfx.h
The gpiote_nrfx.h header is needed for a macro used when handling
NRF52_ANOMALY_58

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-04-29 16:30:23 -04:00
Bjarki Arge Andreasen
05d6a7f770 drivers: spi: context: calculate total rxtx before using buffers
The spi context tx_buf, rx_buf, tx_count and rx_count members are
modified during the transfer. These members are currently accessed
in spi_context_wait_for_completion when calculating the expected
timeout, which happens concurrently with the transfer being in
progress. This can lead to concurrency issues as the mentioned
members may be modified independently as they are being accessed by
the thread setting up the wait.

Remove this potential conflict by calculating the number of bytes
as part of spi_context_buffers_setup and store it, before the
transfer is started. Then used the stored value when setting up
the wait.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-04-29 16:30:23 -04:00
Bjarki Arge Andreasen
ff6084fe96 drivers: spi: nrfx_spim: move update of buffer to after transfer
Update the tx and rx buffer progress after each transfer has
completed.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-04-29 16:30:23 -04:00
Bjarki Arge Andreasen
ca9b6d4ab9 drivers: spi: nrfx_spim_rtio: set CS after configuring SPIM
Ensure SPI pins are correctly configured before setting CS, by
configuring the SPIM before setting CS.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-04-29 16:30:23 -04:00
Bjarki Arge Andreasen
50df2d9a77 drivers: spi: spi_nrfx_spim_common.c: patch pinctrl sleep state set
The common pm_suspend implementation for the spi_nrfx_spim drivers
unconditionally sets the sleep state. The sleep state may not be
available, in which case we should not try to set it. Check
CONFIG_PINCTRL_KEEP_SLEEP_STATE and only try to set sleep state if
true.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-04-29 16:30:23 -04:00
Bjarki Arge Andreasen
8ff7835ff1 drivers: spi: spi_nrfx_spim_rtio: update spi_rtio.h include path
The header at drivers/spi/rtio.h was moved to a relative path, and
renamed "spi_rtio.h".

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-04-29 16:30:23 -04:00
Ofir Shemesh
4e59810ffa boards: nxp: add soc-nv-flash child to remaining FlexSPI boards
Add soc-nv-flash child nodes to the six NXP FlexSPI boards
not yet converted: mimxrt595_evk, mimxrt685_evk, vmu_rt1170
(mx25um51345g), and mimxrt1050_evk, mimxrt1060_evk,
mimxrt1062_fmurt6 (hyperflash).

Update FlexSPI NOR and HyperFlash drivers to read
write_block_size from the soc-nv-flash node. Remove
soc-nv-flash.yaml from hyperflash and mx25um51345g
bindings.

Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
2026-04-29 16:30:04 -04:00
Julien Racki
9baa42e68f drivers: ethernet: Introduce the eth_stm32_hal2 driver
Introduce eth_stm32_hal2 driver based on HAL2.

Signed-off-by: Julien Racki <julien.racki-ext@st.com>
2026-04-29 16:29:40 -04:00
Julien Racki
94c46e7b1d drivers: mdio: Introduce new driver for HAL2 MDIO
Introduce a new MDIO driver for STM32 HAL2.

Signed-off-by: Julien Racki <julien.racki-ext@st.com>
2026-04-29 16:29:40 -04:00
Narek Aydinyan
6873d691ae drivers: i2c: stm32_v2: align style with clang-format
Apply the formatting-only adjustments flagged by the
ClangFormat compliance check in the STM32 I2C v2 driver.

Keep these style-only changes separate from the functional
commits in the branch.

Signed-off-by: Narek Aydinyan <aydinyan.narek@gmail.com>
2026-04-29 16:29:18 -04:00
Narek Aydinyan
a1609f6a45 drivers: i2c: stm32_v2: make target preempt check explicit
Use an explicit boolean comparison for the
target-preempt helper call in the IRQ path to address
review feedback without mixing the style-only change
into the functional commits.

Signed-off-by: Narek Aydinyan <aydinyan.narek@gmail.com>
2026-04-29 16:29:18 -04:00
Narek Aydinyan
d2d09bde31 drivers: i2c: stm32_v2: make bus wait timeout configurable
Replace the hard-coded bus-wait timeout with
CONFIG_I2C_STM32_WAIT_BUS_IDLE_TIMEOUT_USEC and use it when
waiting for the bus to become idle before starting a new
controller session with target mode attached.

Keep wait_bus_idle() thread-context only, switch timeout
tracking to k_timepoint_t, and sleep briefly between BUSY
polls.

Also document why the IRQ transfer path resets
device_sync_sem before arming a new transfer.

Signed-off-by: Narek Aydinyan <aydinyan.narek@gmail.com>
2026-04-29 16:29:18 -04:00
Narek Aydinyan
879678acbb drivers: i2c: stm32_v2: handle controller/target own-address races
In target+controller mode, the STM32 I2C v2 peripheral can
recognize its own target address while a controller transfer is
being started. If the driver stays on the controller path,
target IRQ handling may be blocked and the bus can hang.

Wait briefly for BUSY to clear before starting a new controller
session when target mode is attached. If own-address recognition
still happens after a controller request has been queued, abort
the controller path and continue immediately with target
handling.

Fold the later handover-only cleanup into this change so the
branch keeps a single commit for the controller/target race
handling behavior.

Fixes #99074

Signed-off-by: Narek Aydinyan <aydinyan.narek@gmail.com>
2026-04-29 16:29:18 -04:00
Narek Aydinyan
dd9b1122e1 drivers: i2c: stm32_v2: abort pending controller START on ADDR
In multi-master scenarios, controller mode may mark itself active before
START is actually issued. If the controller then waits for BUSY while an
ADDR event arrives in target mode, target IRQ handling can be blocked,
which may leave the bus stuck.

Abort the pending controller START when ADDR is detected so target-side
handling can proceed correctly.

Fixes #99074

Signed-off-by: Narek Aydinyan <aydinyan.narek@gmail.com>
2026-04-29 16:29:18 -04:00
Yuzhuo Liu
a3138ce417 drivers: sensor: add Realtek Bee series QDEC driver
Add QDEC driver support for Realtek Bee series SoCs,
including RTL87x2G (AON QDEC) and RTL8752H (Basic QDEC).

This driver supports:
- X, Y, and Z axis count reading
- Hardware interrupt-based event trigger

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-04-29 16:29:07 -04:00
Ramya T
3259e5d3a2 drivers: spi: sam0: Add DMA support for synchronous transfers
The SAM0 SPI driver previously supported DMA only for asynchronous
operations, which required higher-level drivers needing blocking DMA
transfers to implement workarounds. This patch extends DMA support
to the synchronous transfer path, enabling efficient blocking SPI
transactions without driver-specific hacks.

With this change, both synchronous and asynchronous SPI operations
can leverage DMA for improved performance and reduced CPU overhead.

Signed-off-by: Ramya T <ramya.t@microchip.com>
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
2026-04-29 16:28:36 -04:00
Måns Ansgariusson
794f8abe75 drivers: i2s: silabs_siwx91x: use sys_ringq instead of ring_buffer
Use the sys_ringq instead of the custom ring_buffer implementation for
SiWx91x I2S driver.
The aim is to reduce code duplication and improve maintainability.

Signed-off-by: Måns Ansgariusson <mansgariusson@gmail.com>
2026-04-29 16:28:23 -04:00