Commit graph

28,390 commits

Author SHA1 Message Date
Carlo Caione
77739f54de lora: native: sx126x: flatten RX done handler and extract restart helper
Reduce nesting in sx126x_handle_irq_rx_done.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2026-04-14 22:22:05 -04:00
Carlo Caione
a43ef096c4 lora: native: sx126x: add RX duty cycle support
Implement the recv_duty_cycle API using the SX126x hardware
SetRxDutyCycle command. The radio autonomously alternates between
short RX windows and sleep, waking the MCU only on packet reception.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2026-04-14 22:22:05 -04:00
Fabin V Martin
9e94073c71 drivers: i2c: microchip: sercom g1: refactor code
Updates for code improvement.

Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>
2026-04-14 22:21:46 -04:00
Anand Kumar
dadf30044c drivers: serial: stm32: add UART IRQ sharing support
Add shared interrupt support for STM32 UART on SoC families where
multiple USART/LPUART peripherals share a single IRQ line (F0, G0,
L0, U0, C0).

Add a compile-time BUILD_ASSERT in the STM32 UART driver that detects
when two or more enabled UART instances share an IRQ and
CONFIG_SHARED_INTERRUPTS is not set.

Add configdefault SHARED_INTERRUPTS and SHARED_IRQ_MAX_NUM_CLIENTS
to the SoC Kconfig for STM32F0x, STM32L0x, STM32U0x, and STM32C0x.

Update DTS comments in the F0 family that previously stated shared
UART IRQs are unsupported.

The SHARED_IRQ_MAX_NUM_CLIENTS combinations in the F0x Kconfig were
generated with:

  from itertools import combinations
  usarts = ['usart3','usart4','usart5','usart6','usart7','usart8']
  for n in range(6, 2, -1):
      for combo in combinations(usarts, n):
          conds = ' && '.join(
              f'$(dt_nodelabel_enabled,{u})'
              for u in combo)
          print(f'\tdefault {n} if {conds}')

Fixes zephyrproject-rtos#39565

Signed-off-by: Anand Kumar <anandvtu16158@gmail.com>
2026-04-14 22:21:03 -04:00
Chun-Chieh Li
090564c80a drivers: sdhc: numaker: support NuMaker M55M1X SDHC
Add support for Nuvoton NuMaker M55M1X SD host controller

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2026-04-14 22:16:29 -04:00
Chun-Chieh Li
898295cd79 drivers: clock_control: numaker: support SDH
Add clock support for SDH for Nuvoton NuMaker SoC

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2026-04-14 22:16:29 -04:00
Jari Tervonen
021da3bf43 drivers: debug: Make ETR optional
Exclude ETR register writes when ETR mode is not used.

Signed-off-by: Jari Tervonen <jari.tervonen@nordicsemi.no>
2026-04-14 22:16:15 -04:00
Raffael Rostagno
5e5f18b5bf drivers: spim: esp32: Add PM support
Add PM support to ESP32 SPIM driver.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2026-04-14 22:15:02 -04:00
Lukas Gehreke
1e40470be9 drivers: modem: sim7080: Added tls and dtls support
Added tls and dtls support for the sim7080 modem driver.

Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
2026-04-14 22:14:44 -04:00
Yuzhuo Liu
f368878072 drivers: i2c: add Realtek Bee series driver
Add I2C driver support for Realtek Bee series SoCs,
including RTL87x2G and RTL8752H.

This driver supports:
- Master mode operation
- 7-bit and 10-bit addressing
- Standard and Fast mode speeds

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-04-14 22:14:35 -04:00
Ankitkumar Modi
1d574789af drivers: display: st7796s: Add tear scanline configuration support
Add support for configuring the Set Tear ScanLine (STE) command in the
ST7796S LCD display driver. This allows users to specify the exact
scanline where the Tearing Effect (TE) signal becomes active, providing
better control over display synchronization.

Changes:
- Add ST7796S_CMD_STE (0x44) command definition
- Add tear-scanline property to device tree binding
- Add tear_scanline field to driver configuration structure
- Implement STE command configuration in LCD initialization

The tear scanline can now be configured via device tree:
  tear-scanline = <240>; // TE signal at scanline 240

Signed-off-by: Ankitkumar Modi <ankit.modi912@gmail.com>
2026-04-14 22:14:14 -04:00
Davide Di Lello
d67fcbab8b drivers: comparator: Infineon LPCOMP Driver
Adds LPCOMP driver files to support LPCOMP
for the PSOC C3 family of MCUs.

Signed-off-by: Davide Di Lello <Davide.Dilello@Infineon.com>
2026-04-14 22:08:41 -04:00
Muhammad Waleed Badar
0d158a626b drivers: usb: dwc2: refactor to use MMIO macros
The DWC2 USB driver was accessing hardware registers
through a raw dev->config->base pointer, which breaks on
MMU-enabled platforms where physical addresses need to be
mapped to virtual ones before use.

Use Zephyr's standard MMIO abstraction API by introducing
DEVICE_MMIO_NAMED_RAM/ROM(core) in the driver's data and
config structs, mapping the region at initialization time
with DEVICE_MMIO_NAMED_MAP, and routing all register accesses
through a dwc2_get_base() helper that calls DEVICE_MMIO_NAMED_GET.
These changes allows the driver to be useful on MMU-based
platforms like Broadcom BCM2711 SoC.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-04-14 22:08:02 -04:00
Om Srivastava
952d2c5509 wifi: esp_at: validate IPv4 family before sin_addr access
Coverity reported a potential out-of-bounds access in
drivers/wifi/esp_at/esp_offload.c when accessing sin_addr
without validating the sockaddr family.

ESP-AT offload supports IPv4 only, so add an explicit
NET_AF_INET check before dereferencing the IPv4-specific
structure to prevent invalid memory access.

Fixes: #100001

Signed-off-by: Om Srivastava <srivastavaom97714@gmail.com>
2026-04-14 22:07:49 -04:00
Bjarki Arge Andreasen
e4d61fc472 drivers: spi: nrf_spim: refactor to use common code with rtio impl
Refactor the nrf_spim device driver to share the common code between
the nrf_spim_rtio implementation.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-04-14 22:07:40 -04:00
Bjarki Arge Andreasen
6f2829ea0c drivers: spi: rtio: introduce nrfx spim rtio
Introduce support for NRF SPIM device based on RTIO.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-04-14 22:07:40 -04:00
Bjarki Arge Andreasen
d99b89ff96 drivers: spi: rtio: move private spi/rtio.h to drivers/spi/spi_rtio.h
Move the private spi_rtio.h header from the public path

 include/zephyr/drivers/spi/rtio.h

the the private path

  drivers/spi/spi_rtio.h

and update drivers to include it using a relative path.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-04-14 22:07:40 -04:00
Bjarki Arge Andreasen
5085a29ae0 spi: rtio: don't support SPI_LOCK_ON
The SPI_LOCK_ON flag is not compatible with RTIO, nor is the
related spi_release API. Introduce stub implementation for drivers to
use which simply returns -ENOTSUP and validate SPI_LOCK_ON within the
spi_rtio_transceive wrappers.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-04-14 22:07:40 -04:00
Bjarki Arge Andreasen
f37a79fd5a spi: rtio: introduce spi_rtio_transceive_cb wrapper
Introduce spi_rtio_transceive_cb which is an implementation of the
spi_transceive_cb API based on the spi_rtio context.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-04-14 22:07:40 -04:00
Bjarki Arge Andreasen
e85a5ee98c spi: rtio: make the shared rtio ctx of struct spi_rtio thread safe
Don't rely on drivers protecting the spi_rtio ctx from multiple
threads as this is generic and could just be part of the spi_rtio
context to avoid duplicate code and thus make using it safer and
more efficient.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-04-14 22:07:40 -04:00
Bjarki Arge Andreasen
652d2a7b2a spi: rtio: patch spi_rtio_copy transceive with empty buffer
The spi_rtio_copy implementation incorrectly sets up a transceive sqe
in place of a write or read when an empty "spacer" spi_buf is passed
which is not aligned with the "opposing" spi_buf. Using transceive in
these cases passes a NULL receive/transmit buffer with positive length,
which is a bug.

Some drivers have an additional check to clear the size if the buffer
is NULL, but we should not rely on this check in drivers as it is
duplicate code.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-04-14 22:07:40 -04:00
Ruoshan Shi
9231f554cb drivers: mipi dsi: Reorganize platform-specific code in dsi nxp dwc driver
Move variable declarations into platform-specific conditional blocks
and extend i.MX93 support to include M33 core. This eliminates unused
variable compilation warnings without affecting existing platform
functionality.

Signed-off-by: Ruoshan Shi <ruoshan.shi@nxp.com>
2026-04-14 22:06:04 -04:00
Ruoshan Shi
f44192dff9 drivers: display: add RM67199 driver support
Added rm67199 driver for i.MX93 display.

Signed-off-by: Ruoshan Shi <ruoshan.shi@nxp.com>
Signed-off-by: Winteri Wang <dongjie.wang@nxp.com>
2026-04-14 22:06:04 -04:00
Ruoshan Shi
4cb4833c7b soc: imx93: enable imx93 video pll
Added video_pll instance to soc dtsi.

Signed-off-by: Ruoshan Shi <ruoshan.shi@nxp.com>
2026-04-14 22:06:04 -04:00
Ruoshan Shi
136420ca03 drivers: display: mcux_lcdifv3: fix pointer cast warning
- Added mcux_lcdifv3_set_pixel_format api
- Fix pointer-to-integer cast error by using uintptr_t intermediate cast
instead of direct uint64_t cast
- Fixed the pixel_format setting on waveshare_dsi_lcd shield

Signed-off-by: Ruoshan Shi <ruoshan.shi@nxp.com>
2026-04-14 22:06:04 -04:00
Fin Maaß
9dccf71c77 drivers: spi: litex: support setting the spi mode
support setting the spi mode.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-14 22:05:05 -04:00
Fin Maaß
2445992057 drivers: spi: litex: use new clk divisor
use new clk divisor of litespi.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-14 22:05:05 -04:00
Fin Maaß
025cced614 drivers: spi: litex: use mem_addr_t for register addresses
use mem_addr_t for register addresses.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-14 22:05:05 -04:00
Santhosh Charles
3315866bc1 drivers: dac: add driver support for TI MSPM0 G-Series DAC module
Add support for the DAC module on TI’s MSPM0 G-Series MCUs. The DAC
supports 8-bit and 12-bit resolution.

Signed-off-by: Santhosh Charles <santhosh@linumiz.com>
2026-04-14 22:04:55 -04:00
Andreas Schweigstill
324338ad39 adi_tmc: Corrected calls of read_actual_position()
Replaced them with tmc50xx_read_actual_position() resp.
tmc51xx_read_actual_position().

Signed-off-by: Andreas Schweigstill <andreas@schweigstill.de>
2026-04-14 22:00:07 -04:00
Sylvio Alves
711e3bebf0 drivers: i2c: esp32: enable i2c controller clock on init
Call i2c_hal_init() during driver init and after the clock
off/on cycle in i2c_hw_fsm_reset(). On SoCs where the
controller clock gate defaults to off, the peripheral would
not respond until explicitly enabled, matching the behavior
of ESP-IDF's i2c_hal_init().

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-04-14 13:08:51 -05:00
Eliott Speyser
61a59366b8 doc: drivers/modem: Typo fixes
Fix some typos: s/wich/which and s/unsolicitet/unsolicited

Signed-off-by: Eliott Speyser <eliott.speyser@st.com>
2026-04-13 11:04:42 -05:00
Raffael Rostagno
80ee819be5 drivers: systimer: xtensa: Fix ISR/idle_exit concurrency
IDLE exit is programmed to happen shortly before systimer
programmed wake-up event happens. If the interrupt from
the timer happens before, idle_exit() does not run, as
timeout_idle flag is cleared at the ISR. Fix condition for
both systimer (ESP32) and xtensa drivers.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2026-04-08 07:40:46 -04:00
rob-zeno
425108a4fd drivers: flash: mcux_c40: fix incompatibility with partition macros
Fixes zephyrproject-rtos/zephyr#106597

The current driver for the NXP C40 flash controller instantiates two
drivers, one for the controller (which has no real code -- it's just
a device with no API, config, or data), and one for the flash bank.
This breaks the various partition APIs because they expect the flash
driver API to be attached to the "grandparent" of the partitions
object -- but in the current C40 driver, it is attached to the parent.

I was worried this fix was going to be more complicated, but it
appears to have been quite simple. All I needed to do was to
instantiate a single device with the the API, config and data.

The fix requires the "soc-nv-flash" compatibility to be added to
device trees which reference this driver (see previous commit).

This fix addresses the bug report I filed a few days ago:

NXP C40 flash driver incompatibility with partitions macro APIs #106597

Signed-off-by: Rob Newberry <rob@zenomoto.com>
Signed-off-by: rob-zeno <rob@zenomoto.com>
2026-04-07 15:39:39 -04:00
Nicolas Pitre
7735bf3bb8 drivers: timer: intel_adsp_timer: use sys_clock_lock() to fix SMP race
Migrate intel_adsp_timer to the unified timer lock API. Replace the
driver-private spinlock with sys_clock_lock()/sys_clock_announce_locked().

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-04-07 11:40:49 -05:00
Nicolas Pitre
8ee79c2dd3 drivers: timer: apic_tsc: use sys_clock_lock() to fix SMP race
Migrate apic_tsc to the unified timer lock API. Replace the
driver-private spinlock with sys_clock_lock()/sys_clock_announce_locked().

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-04-07 11:40:49 -05:00
Nicolas Pitre
59d4ffeea6 drivers: timer: hpet: use sys_clock_lock() to fix SMP race
Migrate hpet to the unified timer lock API. Replace the driver-private
spinlock with sys_clock_lock()/sys_clock_announce_locked().

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-04-07 11:40:49 -05:00
Nicolas Pitre
86dafedbfb drivers: timer: xtensa_sys_timer: use sys_clock_lock() to fix SMP race
Migrate xtensa_sys_timer to the unified timer lock API. Replace the
driver-private spinlock with sys_clock_lock()/sys_clock_announce_locked()
so that the hardware cycle baseline and the kernel tick counter are
always updated under the same lock.

Also migrate sys_clock_idle_exit() which updates driver state and
announces ticks on LPM exit.

Add extern declarations for sys_clock_cycle_get_32/64 in
arch/xtensa/arch.h, consistent with all other architectures, to
avoid a circular include dependency with system_timer.h. Xtensa
was the only architecture missing them.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-04-07 11:40:49 -05:00
Nicolas Pitre
8daab8d5d0 drivers: timer: riscv_machine_timer: use sys_clock_lock() to fix SMP race
Migrate riscv_machine_timer to the unified timer lock API. Replace the
driver-private spinlock with sys_clock_lock()/sys_clock_announce_locked()
so that the hardware cycle baseline (last_count) and the kernel tick
counter (curr_tick) are always updated under the same lock.

This eliminates a race on SMP where sys_clock_elapsed() could observe
the updated last_count before sys_clock_announce() had advanced
curr_tick, causing time-dependent kernel operations to see inconsistent
values.

Remove internal locking from sys_clock_set_timeout() and
sys_clock_elapsed() as they are now always called with the timer lock
held.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-04-07 11:40:49 -05:00
Nicolas Pitre
9ee7e6af75 drivers: timer: arm_arch_timer: use sys_clock_lock() to fix SMP race
Migrate arm_arch_timer to the unified timer lock API. Replace the
driver-private spinlock with sys_clock_lock()/sys_clock_announce_locked()
so that the hardware cycle baseline (last_cycle) and the kernel tick
counter (curr_tick) are always updated under the same lock.

This eliminates a race on SMP where sys_clock_elapsed() could observe
the updated last_cycle before sys_clock_announce() had advanced
curr_tick, causing time-dependent kernel operations to see inconsistent
values.

Remove internal locking from sys_clock_set_timeout() and
sys_clock_elapsed() as they are now always called with the timer lock
held.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-04-07 11:40:49 -05:00
Joakim Tjernlund
67b5d58c26 arm64: Set DS bit if GIC_SINGLE_SECURITY_STATE
This need to be set while in secure mode so do so in while in EL3

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
2026-04-07 11:34:49 -05:00
Etienne Carriere
4109e78632 drivers: i2c: stm32_v2: fix indentation in multi-line test conditions
Change indentation on multi-line test instruction for consistency
and to ease readability. Also replace 2 tabulations with a space char.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-04-07 11:32:23 -05:00
Etienne Carriere
97e77171e2 drivers: i2c: stm32_v2: consider i2c_configure() speed argument
Consider the I2C speed argument pass to i2c_configure() (or
i2c_dt_configure()) in stm32_v2 I2C driver.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-04-07 11:32:23 -05:00
Jjateen Gundesha
0c9fd34a46 drivers: adc: lpadc: fix calibration sequencing with 1us delay
LPADC_DoOffsetCalibration() triggers offset calibration but returns
immediately without waiting for it to complete. If gain calibration
is requested before offset calibration finishes, the hardware silently
rejects it and GCC[RDY] never asserts, causing
LPADC_FinishAutoCalibration() to spin forever at boot (~50% of the
time on affected boards like FRDM-MCXA266).

Fix by replacing LPADC_DoAutoCalibration() with the split HAL API:
  LPADC_PrepareAutoCalibration() + k_busy_wait(1U) +
  LPADC_FinishAutoCalibration()

The 1us busy-wait gives offset calibration sufficient time to complete
on all LPADC platforms before the gain calibration request is issued.
Only the HAS_CTRL_CALOFS path is affected (the path that also calls
DoOffsetCalibration); the HAS_CFG_CALOFS path has no preceding offset
calibration and is left unchanged.

Fixes #105652

Signed-off-by: Jjateen Gundesha <jjateen97@gmail.com>
2026-04-07 08:39:42 -05:00
Pete Johanson
a3962e2290 drivers: spi: MAX32 DMA + RTIO fixes
Correct some behaviors that were broken in the original SPI DMA + RTIO
work:

* Properly fallback to interrupt behavior if no DMA channels are assigned
  to a given SPI peripheral.
* Properly handle held CS lines across transactions when using hardware CS
  control.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2026-04-07 08:39:07 -05:00
Shreyas Shankar
785633e585 drivers: interrupt_controller: Fix VIM assert
The VIM IP has a register that informs the maximum
number of interrupts that can be supported.

The ASSERT must check whether the number of IRQs
is LESSER THAN OR EQUAL to above register value,
not a strict equality check.

Signed-off-by: Shreyas Shankar <s-shankar@ti.com>
2026-04-07 08:37:58 -05:00
John Batch
7796339c41 drivers: clock_control: infineon: fix psc3m5 build error
Updates the legacy HAL version of the Infineon clock control driver to
be excluded for devices not using the legacy HAL based drivers.

This fixes a failure in the libraries.devicetree.api_ext test, which
on PSC3M5 introduces a "fixed-clock" DTS note that causes
DT_HAS_FIXED_CLOCK_ENABLED and SOC_FAMILY_INFINEON_CAT1 to both be
selected.  This results in the HAL based driver being incorrectly
included in the build, causing build errors.

Assisted-by: GitHub Copilot:claude-opus-4.6
Signed-off-by: John Batch <john.batch@infineon.com>
2026-04-07 08:36:58 -05:00
Fengming Ye
a4010304f7 drivers: wifi: nxp: fix build error for custom host platform
Fix build error when independent reset is enabled on custom host.
Add out-of-band reset kconfig option to guard dependency on host GPIO,
so that in-band independent reset can be supported by default.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2026-04-07 08:36:27 -05:00
Jianchao Wang
3855c04157 drivers: can_mcux_flexcan: Ensure that prop_seg is aligned with fsl_flexcan
In the `FLEXCAN_SetTimingConfig` function(fsl_flexcan.c), the following
statement is implemented when the Enhanced Bit Timing Register is enabled:
```
base->ENCBT = CAN_ENCBT_NRJW(pConfig->rJumpwidth) |
              CAN_ENCBT_NTSEG1((uint32_t)pConfig->phaseSeg1 +
                               pConfig->propSeg + 1U) |
              CAN_ENCBT_NTSEG2(pConfig->phaseSeg2);
```
`prop_seg + 1` represents the length of the propagation segment.
- `pConfig->propSeg` = `flexcan_config.timingConfig.propSeg`
- Therefore, flexcan_config.timingConfig.propSeg(can_mcux_flexcan.c) should
  be equal to `data->timing.prop_seg - 1U`.
Fixes: #106238

Signed-off-by: Jianchao Wang <Jianchao.wang_1@nxp.com>
2026-04-07 08:35:29 -05:00
David J. Leach, Jr.
91f2980f6b drivers: crypto: ataes132a: fix integer overflows in CRC and commands
This commit addresses two integer handling issues in the ataes132a
crypto driver identified by coverity scans.

1. In ataes132a_send_command, added a centralized validation check
   to ensure the 'nparams' value, when combined with the 5-byte
   packet overhead, does not exceed the 8-bit 'count' limit or the
   physical 64-byte command buffer. This prevents a potential wrap-
   around that would cause the chip to receive an invalid length byte.

2. In the Atmel CRC calculation, added an explicit cast to uint16_t
   during the bit-shift operation. This prevents unintended integer
   promotion and satisfies static analysis regarding potential
   overflows during the 16-bit CRC generation.

Fixes #84683
Fixes #84690

Signed-off-by: David J. Leach, Jr. <tasmar@gmail.com>
2026-04-06 10:29:20 -05:00