Commit graph

28,390 commits

Author SHA1 Message Date
Fin Maaß
625a3ee2fe drivers: wifi: esp32: reset data->scan_cb on fail
reset data->scan_cb on fail, otherwise we can't
try it again, because we check it at the begining
and return when it is already set.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-27 20:19:10 -04:00
Andrei Menzopol
940f8da2f8 drivers: ieee802154: mcxw: Fix double free
pd_mac_sap_handler gPdDataInd_c case shouldn't free msg
as it is already freed by the rx_thread. The msg is put
in rx_msgq queue through k_msgq_put which does a shallow
copy.

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2026-03-27 13:59:36 -05:00
Tomasz Moń
df6be6479e drivers: udc_nrf: Detect isochronous DMA during SOF
nRF USBD peripheral allows only one DMA to/from isochronous endpoint in
between two SOF packets. nRF UDC driver enforces this limitation using
m_ep_ready variable that has respective endpoint bit set to 1 inside SOF
handler. While this works most of the time, there is a corner case where
the DMA can start before SOF and finish after SOF.

Prevent issuing two DMA to/from isochronous endpoint within one frame by
not setting m_ep_ready bit if isochronous endpoint DMA was active during
SOF. This avoids failed assertion for iso IN endpoint being armed and
ready at the same time.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-03-27 13:48:36 -05:00
Tomasz Moń
338ea9f927 drivers: udc_nrf: Dequeue endpoints in driver thread
Endpoint dequeue is inherently racing against bus transactions. It is
possible that transfer finishes right before dequeue. When this happens
it was possible for the endpoint queue to be empty during xfer finished
handling. Resolve the software thread race by performing dequeue in the
same thread that handles finished transfers.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-03-27 13:48:36 -05:00
Anas Nashif
4809fb40a6 counter: handlers: include marshalling header
Add missing header, this prevents build issues with llvm.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-03-27 12:35:56 -04:00
Ryan McClelland
748604daec drivers: counter: fix get_pending_int return type mismatch
The counter_api_get_pending_int typedef returns uint32_t, but the
public counter_get_pending_int API, its inline implementation, and
its syscall handler all return int. Several drivers return raw hardware
register bitmasks that can have upper bits set; the implicit cast to
int would make those values appear negative, which callers could
misinterpret as error codes.

Change the public API, inline impl, and syscall handler to return
uint32_t to match the driver API typedef.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-03-27 12:35:39 -04:00
Fabio Baltieri
2dec0486bf drivers: nrf: fix some llvm warnings
Fixes:

zephyr/drivers/usb/common/nrf_usbd_common/nrf_usbd_common.c:414:23:
warning: unused function 'ep_to_hal' [-Wunused-function]

zephyr/drivers/usb/common/nrf_usbd_common/nrf_usbd_common.c:816:22:
warning: unused function 'usbd_ep_iso_capacity' [-Wunused-function]

When compiling with LLVM:

west build -p -b nrf52840dk/nrf52840 samples/subsys/usb/hid-keyboard --
-DTOOLCHAIN_VARIANT_COMPILER=llvm

Drop ep_to_hal since it's static and unused, usbd_ep_iso_capacity is
used in an assert just flag it as maybe unused.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-03-27 12:35:07 -04:00
Johann Fischer
789f5ca318 drivers: udc_nrf: submit UDC_EVT_VBUS_READ if VBUS is still present
When the device is connected to the host, but the application shuts down
and initialize USB device again, there will be no UDC_EVT_VBUS_READ
event generated from USB VBUS regulator on nRF52840 and nRF5340
controller. We can track the state in the driver and resubmit the event
just at the beginning of the initialization. If the device gets
disconnected in between, there will be subsequent UDC_EVT_VBUS_REMOVED
event. Perhaps it could also be solved in more generic way, but other
controllers could behave differently. Also, it could be considered that
the application should track the state of the VBUS.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-03-27 12:34:23 -04:00
Tim Pambor
22d1ea568e drivers: adc: shell: fix a dangling pointer warning
Fix a dangling pointer warning in adc_shell.c by placing the
help text in a static variable instead of returning a pointer
to a local variable.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-03-27 09:16:21 +01:00
Nikhil Namjoshi
4d2950a694 drivers: ksz8081: Add PHY readiness check after PHY reset
Some systems can have board layout that can cause PHY
reset to be slower. So add more checkes to make sure
PHY is completely out of reset. We basically check
1) Power down bit from BMCR register
2) Reset bit from BMCR register
3) Factory Bit in OMSO register

Tested:

Verified that on a system with slow PHY
reset, the bit verification logic helps
ensure PHY is out of reset.

If the PHY takes longer thann 0.5s, then the
PHY bit checking logic helps surface the problem.

Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
2026-03-26 19:28:25 -04:00
Arjun Sahajan
1a3d043ab3 drivers: wdt: mchp_xec: Update WDT driver with new macros
Update PCR and GIRQ properties of WDT driver to use new macros

Signed-off-by: Arjun Sahajan <Arjun.Sahajan@microchip.com>
2026-03-26 19:27:05 -04:00
Brett Peterson
13b22ea472 drivers: audio: fixing dma configuration in infineon dmic driver
The infineon dmic driver did not correctly track the address offset into
the current receive buffer and there were also issues with the transfer
size calculations. This change corrects these issues.

Signed-off-by: Brett Peterson <brett.peterson@infineon.com>
2026-03-26 14:01:47 -04:00
Fin Maaß
e63d60915a drivers: wifi: esp32: set band info in scaned aps
set band info in scaned aps.
As the esp32-c5 supports 5 Ghz, the info can there otherwise
be wrong.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-26 14:01:25 -04:00
Mathieu Choplain
13c724de1e drivers: dma: stm32: enable the transfer error interrupt
The driver never enabled the transfer error interrupt. If a transfer error
occurred, the ISR would not be called which could result in a deadlock.

Make sure the transfer error interrupt is enabled.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-26 10:44:59 -04:00
Santhosh Charles
1ed50bfa78 drivers: can: add driver support for TI MSPM0 G-Series MCAN module
Add driver support for MCAN module on TI's MSPM0 G-Series MCUs.
The MCAN module supports both classic CAN and CAN FD protocols.

Signed-off-by: Santhosh Charles <santhosh@linumiz.com>
Signed-off-by: Jackson Farley <j-farley@ti.com>
Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
2026-03-26 07:17:56 -04:00
Santhosh Charles
903f988c41 drivers: clock_control: mspm0: add CANCLK source support
Add support for the CANCLK source for MSPM0. `mspm0_canclk_cfg`
config struct is used to get rate.

Signed-off-by: Santhosh Charles <santhosh@linumiz.com>
2026-03-26 07:17:56 -04:00
Srikanth Boyapally
8cc69ce9a2 spi: cdns: Fix RX FIFO overflow and adjust RX accounting for slave mode
The Cadence SPI driver relied on a conditional guard around software RX
accounting (tx_remain_entry/fifo_diff) in spi_cdns_send(). During
opcode/address/dummy phases (e.g., SPI NOR reads), the RX segment may be
NULL (discard), causing the guard to evaluate false. This prevented the
driver from tracking RX entries generated by each TX entry and could
lead to RX FIFO overflow.

Fix this by always decrementing tx_remain_entry and incrementing
fifo_diff for every TX FIFO entry pushed. Since SPI is full‑duplex, each
TX entry clocks in one RX entry, regardless of whether the client
provides an RX buffer for that phase. The ISR drains RX while fifo_diff
> 0, so keeping fifo_diff accurate prevents overflow.

Also update spi_cdns_recv() RX context handling to be mode-aware:
- In slave mode, advance RX context only when an RX buffer is present.
- In master mode, advance RX context for each received frame.

This keeps slave receive accounting consistent while preserving correct
master behavior, and aligns with the software-tracking approach used to
avoid unreliable RX_NOT_EMPTY status (AR#65885).

As part of this change, refactor spi_cdns_recv() to reduce cognitive
complexity and improve readability, without changing functional behavior.

Signed-off-by: Srikanth Boyapally <srikanth.boyapally@amd.com>
2026-03-25 15:08:03 -04:00
Fabian Blatz
92a78dfa89 drivers: watchdog: wdt_cc32xx: Remove unused variable
Fix build failure caused by unused `rv` variable.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2026-03-25 15:07:02 -04:00
Carlo Caione
cb959fdb58 lorawan: native: add PM_DEVICE support to sx126x driver
Register a pm_action callback that disconnects RF GPIO pins
(antenna enable, TX/RX FE_CTRL) on suspend and reconfigures
them on resume.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2026-03-25 07:58:52 -04:00
Carlo Caione
7592b10996 lorawan: native: fix DIO1 interrupt not re-enabled when sleep disabled
When CONFIG_LORA_SX126X_NATIVE_SLEEP=n, sx126x_ensure_ready() returned
immediately without re-enabling the DIO1 interrupt. On the STM32WL the
radio ISR disables itself on entry (irq_disable), so the interrupt must be
explicitly re-armed before each TX/RX operation.

This caused every send after the first to time out because the TX_DONE
interrupt was never delivered.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2026-03-25 07:58:52 -04:00
Mohamed Azhar
763227907b drivers: spi: microchip: Updates SPI g1 driver
Includes file for mapping DFP macros to follow a common macro
name for sercom spi g1 driver
Optimizes the driver

Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
2026-03-25 07:58:21 -04:00
Holt Sun
250d291ccb soc: nxp: kinetis: wire LMEM cache support
Wire the Kinetis LMEM-capable SoCs into the generic cache
management path by selecting the LMEM driver, enabling the
available instruction and system-bus cache capabilities, and
defaulting these parts to CACHE_MANAGEMENT with the external
cache backend.

Keep MCUX eDMA descriptors in the default SRAM placement on
SYSMPU-based Kinetis parts. Their SRAM region remains outside
the cached LMEM area, so they do not use the generic
NOCACHE_MEMORY path.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-03-25 07:57:21 -04:00
Holt Sun
8b2f55272a drivers: cache: add NXP LMEM system cache ops
Add LMEM data-cache operations to the NXP LMEM cache driver for
SoCs that expose the system-bus cache and select CONFIG_DCACHE.

Rely on SoC Kconfig capability selection instead of driver-local
unsupported stubs so instruction-only LMEM parts only build
instruction-cache support.

This keeps one driver for both instruction-only LMEM parts and
SoCs that also expose the LMEM system-bus cache.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-03-25 07:57:21 -04:00
Camille BAUD
1eb897d206 drivers: gpio: Fix and extend GPIO irqs for BL70xL
Configuration per reg was wrong, also it supports both edges.

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-03-25 07:56:19 -04:00
Jose Morales
986fc3ad52 drivers: spi: spi-nrfx-spim: add missing init for anomaly 58 workaround
After #99399 the workaround for errata 58 in nRF52 chips is removed from
zephyr RTOS and is now part of the nrfx sdk. The initial glue code
between zephyr->nrfx 4.0.0 missed the initializatio of the errata 58
workaround. This commit adds the initialization to the glue code. Given
the errata only applies to nRF52 chips, is safe to assume there is a
single GPIOTE instance present.

Signed-off-by: Jose Morales <josfemova@gmail.com>
2026-03-25 07:56:05 -04:00
Fabian Blatz
c12245ce61 drivers: gpio: grgpio2: Initialize polmask always
Ensure the polmask variable is always initialized.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2026-03-25 07:55:49 -04:00
Krzysztof Chruściński
0f7c3590bd drivers: misc: nordic_vpr_launcher: Add hiberante mode support
In order to use HIBERNATE sleep mode, retention of RAM block used
for hibernating the VPR core need to be enabled. Contrary to all other
blocks, retention for this block is usually by default disabled.

Add property to vpr coprocessor node which indicates if hibernation
is going to be used. It need to be used on nRF54L to achieve low
idle current. On nRF54H20 it is not needed as DEEPSLEEP mode gives
good idle current (~5 uA).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-03-25 07:54:55 -04:00
Dave Joseph
d734f3b7ed clock_control: tisci: Fix argument order in tisci_cmd_clk_is_on/off
Fix swapped dev_id and clk_id arguments in the calls to
tisci_cmd_clk_is_on() and tisci_cmd_clk_is_off() within
tisci_get_status(), aligning them with the TISCI API signature.

Signed-off-by: Dave Joseph <d-joseph@ti.com>
2026-03-25 07:54:11 -04:00
Amneesh Singh
f4e25a3f50 drivers: adc: am335x_ti: fix log format specifier
Change format specifier to %zu for size_t. While at it, also change
required_size to size_t, for better compatibility. This prevents
compilation warnings.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
2026-03-25 07:53:17 -04:00
Henrik Brix Andersen
896964688e drivers: can: sam: fix message RAM address for sama7g5
Use CAN_MCAN_DT_INST_MRAM_ADDR() for setting the Bosch M_CAN message RAM
address from DTS as this takes the message RAM offset into account.

Fixes: #105113

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-03-25 07:53:02 -04:00
Henrik Brix Andersen
d2453e139d drivers: usb: device: stm32: fix shadowed variable
Rename "_msg" variable to "msg" to avoid shadowing the "_msg" variable used
in the LOG_* macros.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-03-25 07:52:34 -04:00
Andrei Menzopol
f831a4ee7a drivers: ieee802154: mcxw: return EALREADY in start/stop functions
Start/stop functions should return -EALREADY is the setup is already set.
If start/stop functions are called multiple times they trigger an assert.

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2026-03-24 15:42:41 -05:00
Yves Wang
7d29a090be drivers: watchdog: wwdt: use clock control API for clock management
Update the MCUX WWDT driver to partially use the Zephyr clock control API
instead of direct HAL clock APIs for clock on and get rate.

Keep using HAL clock APIs for set clock divider because the set rate API
accepts clock frequency and it may cause two external calls to get WWDT
frequency.

Support multiple instances.

Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
2026-03-24 15:38:06 -05:00
Yves Wang
afbca7aade drivers: clock_control: mcux_syscon: partial support WWDT clock control
Add clock control support for MCUX WWDT instances (wwdt0 and wwdt1)
in the MCUX SYSCON clock control driver. This enables proper clock
gating and frequency retrieval for WWDT peripherals across multiple
NXP SoC families.

The patch add support for turn on WWDT clock and get it's rate.

Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
2026-03-24 15:38:06 -05:00
Yves Wang
8451ce6704 drivers: watchdog: imx_wdog: support multiple instances
Update the MCUX i.MX WDOG driver to support multiple device instances
instead of being hardcoded to instance 0.

Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
2026-03-24 15:38:06 -05:00
Yves Wang
57f867c671 drivers: watchdog: wdog32: support multiple instances
Update the MCUX WDOG32 driver to support multiple device instances
instead of being hardcoded to instance 0.

Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
2026-03-24 15:38:06 -05:00
Krystian Balicki
92514c2c18 drivers: video: add arducam camera driver
The Arducam mega is a low power, rolling shutter camera, supports
connecting one or more cameras to any microcontroller. It provides
high-quality image capture and processing capabilities, making it
highly suitable for various application fields, including machine
vision, image recognition, and robotics, among others. In current
implementation connecting multiple instances of the same camera
system is problematic.

Co-authored-by: Lee Jackson <lee.jackson@arducam.com>
Signed-off-by: Krystian Balicki <kristos_b@wp.pl>
2026-03-24 15:36:22 -05:00
Vincent Tardy
9439366997 soc: stm32: fix issue about k_work_q used by soc and flash driver
In driver file flash_stm32wba_fm.c, rename ble_ctrl_work_q
to ble_ctle_work_q and make ble_ctle_work_q non-static
in SoC code

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-03-24 10:52:29 -05:00
Guillaume Gautier
fa317fbfab drivers: watchdog: stm32: add wwdg support for stm32c5
Add WWDG support for STM32C5. Replace the IS_WWDG_COUNTER macro (that
doesn't exist in the STM32C5 LL) by the IN_RANGE macro.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-03-24 10:51:54 -05:00
Guillaume Gautier
e5cdc0030b drivers: watchdog: stm32_iwdg: add support for stm32c5
Add the *_FreezePeriph function for STM32C5. While at it, fix the driver
for C0/F0/G0/L0 by calling the *_FreezePeriph function once the DBGMCU
clock is enabled (a #endif was missing). It is done the same
way for WWDG driver.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-03-24 10:51:54 -05:00
Guillaume Gautier
b963ba69ab drivers: watchdog: stm32: remove old macros
Some macros used in the IWDG driver are no longer present in HAL2. Replace
them by doing the same operation directly.
Also make some clean up/cosmetic changes.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-03-24 10:51:54 -05:00
Fin Maaß
ff422cd6c8 drivers: ethernet: wifi: remove now redundant net_if_set_link_addr()
As net_if_set_link_addr() is now already done by the
overlaying net_mgmt, we no longer need to do it
in the drivers

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-24 10:49:59 -05:00
Sven Ginka
927597aa6d drivers: i2c: update sy1xx driver for improved read/write support
Refactor read and write functions to handle large transfers with chunking.
Adjust the buffer size to the default 128 bytes. Simplify start/stop
condition logic.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2026-03-24 10:49:07 -05:00
Mathieu Choplain
0dd0a8ff91 drivers: usb: udc: stm32: implement isochronous support on ST USB IP
Implement proper support for isochronous operation when "st,stm32-usb" IP
is used. Previously, the driver did not take into account specificities of
this IP regarding isochronous endpoints resulting in invalid transfers.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-24 09:07:46 -04:00
Mathieu Choplain
58d9adb793 drivers: usb: udc: stm32: use SPDX-FileCopyrightText and add ST to list
Update the copyright notice to use SPDX-FileCopyrightText. While at it, add
STMicroelectronics to the list of copyright holders as we have made
numerous contributions to this driver recently.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-24 09:07:46 -04:00
Mathieu Choplain
f9ff1ecc0b drivers: usb: udc: stm32: reorganize Kconfig options
Move options such that all generic options go toghether, followed by
hardware-specific ones and wrap the HW-specific options in dedicated menus.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-24 09:07:46 -04:00
Guillaume Gautier
e6848a54ed drivers: sensor: stm32_vref: adapt st vref driver for stm32 hal2
Adapt STM32 Vref driver for STM32 HAL2.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-03-24 09:07:31 -04:00
Guillaume Gautier
b339af90b2 drivers: sensor: stm32_temp: adapt st temp driver for stm32 hal2
Adapt STM32 temperature driver for STM32 HAL2.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-03-24 09:07:31 -04:00
Guillaume Gautier
e0d3379c07 drivers: adc: stm32: add stm32c5 adc support
Update STM32 ADC driver for STM32C5 and STM32 HAL2.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-03-24 09:07:31 -04:00
Raffael Rostagno
bf1e600e0c drivers: pinctrl: esp32: Add sleep hold flag
Add sleep hold flag to allow setting groups of pins to
automatically hold pad value during low power states (light/deep sleep).

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2026-03-24 09:05:47 -04:00