Commit graph zephyr/drivers
Author SHA1 Message Date
The Nguyen
a706bb4861 drivers: i2s: renesas: update the code formatting
Ensure consistent code formatting on I2S Renesas RA SSIE driver

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-03-16 07:23:58 +01:00
The Nguyen
c8ede7c17e drivers: i2s: renesas: add a secondary chained buffer mechanism
Add an option to enable the secondary chained buffer mechanism for
the RX direction to improve its ability to adapt to high SPS rates

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-03-16 07:23:58 +01:00
The Nguyen
b6d796ccf3 drivers: i2s: renesas: fix issue of wrong stream drop
The prepare trigger must not drop any messages currently in the queue

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-03-16 07:23:58 +01:00
The Nguyen
af82bc1c8c drivers: i2s: renesas: lock trigger function with spinlock
Use a spinlock to avoid race conditions when receiving a new
trigger command

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-03-16 07:23:58 +01:00
The Nguyen
5e32d5d483 drivers: i2s: divide idle callback to sub function
draft

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-03-16 07:23:58 +01:00
The Nguyen
cc119d62ec drivers: i2s: renesas: update the naming of the helper
Rename free_buffer_when_stop to i2s_renesas_ra_free_stream as
appropriate for the context

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-03-16 07:23:58 +01:00
The Nguyen
cea5f99969 drivers: i2s: divide the trigger function into subfunctions
Implement subfunctions for each trigger command to improve
readability

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-03-16 07:23:58 +01:00
The Nguyen
2cb4ab6557 drivers: i2s: use helper for all free mslab buffer
Avoid calling k_memslab_free directly

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-03-16 07:23:58 +01:00
The Nguyen
c2549d6154 drivers: i2s: renesas: clean up put/get sequence
Avoid using temporary local stream variables when possible

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-03-16 07:23:58 +01:00
The Nguyen
d2bb5bb8ce drivers: i2s: renesas: add stream manage helper function
Add helper functions to manage message queue, control and
allocate the stream

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-03-16 07:23:58 +01:00
The Nguyen
432cd99dfc drivers: i2s: renesas: refine clock calculation
Clean code, update clock calculation to avoid wrong truncate when
mixing double and integer calculation

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-03-16 07:23:58 +01:00
The Nguyen
2ef38e381e drivers: i2s: renesas: refine audio clock enable interface
Change audio clock enable API to abtract the variant dependencies

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-03-16 07:23:58 +01:00
The Nguyen
104e14ec12 drivers: i2s: renesas: refine configuration api
Clean up i2s_configure flow
Use singleton active configuration instead of concurent for each
stream buffer

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-03-16 07:23:58 +01:00
Fin Maaß
ae6a48b1bf drivers: flash: spi_nor: add dt dependencies for SPI_NOR_SFDP
Add dependencies for the dt props for the
SPI_NOR_SFDP choice.
Also removes the no no longer needed build asserts.

Nice benefit is, that we fallback to SPI_NOR_SFDP_RUNTIME,
if the required dt props for the other options are not set.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-16 07:22:58 +01:00
Fabrice DJIATSA
a92f323a5f drivers: mspi: stm32: fix discarded const qualifier in STM32 XSPI
The MSPI API exposes xfer.packets as const, but the driver assigned
it to a non-const pointer, triggering -Wdiscarded-qualifiers.
Update packet to be a const struct mspi_xfer_packet * and remove
the cast.
No functional changes.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2026-03-16 07:22:43 +01:00
Fabrice DJIATSA
f731bd0b00 drivers: flash: mspi: avoid HAL macro conflicts
Rename FLASH_SIZE(inst) to FLASH_SIZE_INST(inst) and
FLASH_PAGE_SIZE(inst) to FLASH_PAGE_SIZE_INST(inst) in
flash_mspi_nor_sfdp.h to avoid redefinition conflicts with
STM32 HAL headers (stm32l562xx.h and stm32l5xx_hal_flash.h).

Note: Several HAL STM32 files use this macro naming convention;
this issue is not specific to STM32L5.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2026-03-16 07:22:43 +01:00
Steven Chang
802f790a4a drivers: gpio: kb106x: GPIO ports always readable
- The state of a GPIO pin can be sampled even if the output is enabled.

Signed-off-by: Steven Chang <steven@ene.com.tw>
2026-03-16 07:22:29 +01:00
James Bennion-Pedley
27821b8ea5 drivers: ethernet: Support CH32V Ethernet Peripheral
This adds initial support for the CH32V ethernet peripheral.
The driver supports both internal and external PHY configurations.

Signed-off-by: James Bennion-Pedley <james@bojit.org>
2026-03-16 07:17:30 +01:00
James Bennion-Pedley
58b6a6f907 drivers: rng: Add RNG Peripheral driver
This adds RNG support for the CH32V20x_30x family.
Driver required for network stack support.

Signed-off-by: James Bennion-Pedley <james@bojit.org>
2026-03-16 07:17:30 +01:00
Brett Peterson
0335354056 drivers: i2c: fix i2c_infineon_pdl error recovery
The infineon i2c driver will lock the calling thread on an error event
because the transfer semaphore is never released. This change allows the
driver to recover and resume normal operation.

Signed-off-by: Brett Peterson <brett.peterson@infineon.com>
2026-03-15 16:29:03 +01:00
Ryan Wiebe
7a5b256d66 driver: pwm: max32: Added support for PWM Events
Max32 PWM already has built-in support for interrupts at the end of
each PWM period so added baseline support for the PERIOD event type
in CONFIG_PWM_EVENT. Updated PWM Event sample to support
Max32672EvKit.

Signed-off-by: Ryan Wiebe <ryan.wiebe@analog.com>
2026-03-14 05:59:33 +01:00
Jilay Pandya
4bfce4127a drivers: stepper: tmcm3216 replace module_address by reg
reg property is to be used for addressing the device

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2026-03-13 14:31:03 -07:00
Vincent Tardy
db4734e4cc drivers: bluetooth: hci: remove host API dependency in close and setup
In the close() and setup() driver function,
the host hci APIs are removed.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-03-13 14:27:53 -07:00
Mathieu Choplain
0a05ae91f5 drivers: pinctrl: stm32: cleanup IOsync configuration
Now that obtaining the GPIO port device object is always done, the IOsync
configuration logic can be cleaned up. Notably, we can perform it while
still holding the PM Device Runtime reference to avoid an unnecessary
clock_disable and clock_enable.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-13 14:27:30 -07:00
Mathieu Choplain
7dc5e73f39 drivers: gpio|pinctrl: stm32: perform pin configuration in common module
The `gpio_stm32_configure()` function is used by both the GPIO and PINCTRL
drivers to configure I/O pins. Move it to the GPIO port manager module's
code so it can be shared properly and update both drivers accordingly.

With this change, the GPIO and PINCTRL drivers are completely decoupled.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-13 14:27:30 -07:00
Mathieu Choplain
7e18141046 drivers: gpio|pinctrl: stm32: introduce common module for device mgmt
On STM32 hardware, the GPIO port's MMIO interface is used for two purposes
which have their own separate Zephyr API: controlling the state of digital
I/O pins directly (GPIO API) and configuring I/O pins for a specific usage
(PINCTRL API). Historically, this was handled by having the PINCTRL driver
call inside the GPIO driver which works but creates a dependency loop.

Introduce a new `GPIO port manager` module in SoC-specific common code that
takes over various from the existing GPIO/PINCTRL drivers: GPIO port device
instantiation and `GPIO port index -> device` mapping respectively.

Modify the GPIO and PINCTRL drivers to make use of this GPIO port manager
module - a first step in decoupling both drivers from each other.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-13 14:27:30 -07:00
Mathieu Choplain
13442977f4 drivers: gpio: stm32: move pinnum-to-LL-value helper to shared header
Move the helper function which computes the LL pin value from a pin number
to the <stm32_gpio_shared.h> header as this function can be useful for
modules other than the GPIO driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-13 14:27:30 -07:00
Mathieu Choplain
a6315d8332 drivers: gpio: stm32: move ports list to shared SoC-level header
Move the ports list from the GPIO driver to a shared SoC-specific header.
This will allow reuse from other drivers such as pinctrl.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-13 14:27:30 -07:00
Mathieu Choplain
8e07d72a52 drivers: gpio: stm32: inline gpio_stm32_clock_request
The function is only used from the device's PM action and is very trivial.
Inline it inside gpio_stm32_pm_action to simplify the driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-13 14:27:30 -07:00
Mathieu Choplain
6e42b8ef61 dts: bindings: stm32*-pinctrl: move definitions to SoC pinctrl header
The STM32 pinctrl dt-bindings headers were full of definitions used by the
SoC-specific pinctrl header (<pinctrl_soc.h>) rather than from Devicetree.

Move these definitions to the appropriate header. While at it, include the
<pinctrl_soc.h> header from GPIO driver instead of series-specific pinctrl
header since it uses these definitions.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-13 14:27:30 -07:00
Tim Pambor
ad9e3a7d7c drivers: ethernet: dwmac: Fix cbprintf warnings
Fix warnings about using char * for %p argument in cbprintf. It's
recommended to cast it to void * because it may cause misbehavior
in certain configurations.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-03-13 16:35:26 +01:00
Vincent Tardy
a52490f85e ieee802154 : stm32wba: ED conversion to RSSI in dBm
The ED value measured during ED scanning is converted
to RSSI in dBm at the ieee802154 driver level before
it is reported to upper layer through the scan callback.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-03-13 16:34:28 +01:00
Vincent Tardy
7c3ac51f1b drivers: ieee802154: stm32wba: fix issue if mac keys value null
Fix issue in the function
stm32wba_802154_configure_mac_key() : avoid keys copy
in case of the value field of first key in the mac_key
pointer is null.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-03-13 16:30:26 +01:00
Guillaume Gautier
515ce19bf0 drivers: spi: stm32: add dma asynchronous support
Add DMA support for asynchronous SPI transfer for STM32.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-03-13 16:26:11 +01:00
Jiafei Pan
41428ccbdf drivers: pm_cpu_ops: psci: add cpu suspend
Add PSCI API for CPU suspend.

Signed-off-by: Chenhui Zhao <chenhui.zhao@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2026-03-13 14:45:02 +01:00
Laurentiu Mihalcea
f096f2a82d firmware: scmi: replace k_is_pre_kernel() with hardcoded value
As of commit c92c8ab461
("firmware: scmi: core: merge send_message() logic"), the SCMI core is
able to figure out that it needs to use polling-based messaging whenever
in PRE_KERNEL stage. Thus, consumers are no longer required to query the
kernel's state via a `k_is_pre_kernel()` call and pass its value to
`scmi_send_message()`.

Furthermore, said commit also changes the semantic of the "use_polling"
parameter. Now, for interrupt-based messaging, the core may choose to
ignore the caller's request and use polling instead.

Thus, replace all usages of `k_is_pre_kernel()` with a hardcoded value.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2026-03-13 14:43:45 +01:00
Marco Widmer
5abd0035f2 drivers: serial: cmsdk_apb: lock irqs when writing the ctrl register
Enabling and disabling interrupts may happen concurrently from thread
and interrupt context. Add locks to synchronize the access to the ctrl
register.

This was observed to improve the stability of the zephyr,bt-hci-uart
driver when used with the cmsdk_apb uart driver.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2026-03-13 14:43:17 +01:00
Marco Widmer
c73c1cb476 drivers: serial: cmsdk_apb: rework interrupt "priming"
Similar to the TX interrupt, the RX interrupt is also an edge interrupt
that only fires when a new bytes is received. When enabling the RX
interrupt, data may be already present in the RX FIFO. Call the
interrupt handler manually to start processing.

Also check if calling the interrupt handler is really required.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2026-03-13 14:43:17 +01:00
Marco Widmer
fd801f8a0c drivers: serial: cmsdk_apb: fix irq_is_pending when interrupts disabled
irq_is_pending should not return 1 when interrupts are disabled through
irq_XX_disable. Check the interrupt enable bit before returning.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2026-03-13 14:43:17 +01:00
Henrik Lindblom
8494c5bdcf drivers: dac: add emulator driver
For use in tests where the existing "vnd,dac" driver doesn't work as it
returns error codes for all API functions. The approach is mimicked from
the adc-emul driver.

Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
2026-03-13 14:43:00 +01:00
Adam BERLINGER
fa30a2f8fe drivers: clock: stm32-mco: Add support for STM32N6
STM32N6 requires enable bit in RCC_MISCENR register.

Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
2026-03-13 14:42:29 +01:00
Adam BERLINGER
dff0f12283 drivers: clock: stm32-mco: Move enable bit for STM32MP1 to DT
Instead of using MCOX specific check with STM32MP1 devices,
the dedicated enable bit is defined in device tree.
This breaks compatibility with old DT overlays for
STM32MP13 devices.

The new overlay should now have 2 clocks, where the 1st one
is the enable bit, e.g. like:
clocks = <&rcc MCO1CFGR_REG BIT(12)>, <&rcc ...>;

Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
2026-03-13 14:42:29 +01:00
Adam BERLINGER
a0d0d51b26 drivers: clock: stm32-mco: Use named clock-names property
The change introduces clock-names into the MCO device tree.
This shouldn't break compatibility with existing DT overlays.
It clarifies the clock configuration for devices
with dedicated enable bit for MCO.

Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
2026-03-13 14:42:29 +01:00
Tim Pambor
1d6491e699 drivers: regulator: shell: fix uninitialized variables
Fix warnings due to uninitialized variables in the clist and vlist
commands.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-03-13 11:39:33 +01:00
Sylvio Alves
c64a74e711 espressif: adapt to hal_espressif IDF master sync
Adapt all Espressif SoC and driver code to the updated
hal_espressif module synced with IDF master branch.

Main changes:
- clock control: delegate peripheral clock gating to HAL
  layer using new clock/reset APIs
- SPI/GDMA: adapt to restructured DMA HAL with new channel
  allocation and configuration interfaces
- ethernet: add RMII clock configuration and PHY management
- GPIO: simplify using direct HAL function calls
- flash: adapt to updated SPI flash HAL interfaces
- linker scripts: update IRAM/DRAM mappings for new HAL
  object files
- DTS: fix ESP32-S2 PSRAM dcache1 address to match actual
  MMU mapping region (0x3f800000 DRAM1 instead of 0x3f500000
  DPORT which lacks 8-bit access capability)
- west.yml: update hal_espressif revision

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-03-13 11:38:18 +01:00
Raul Hernandez
4bfba93475 drivers: flash: rpi_pico: add optional untranslated read support
Add an opt-in Kconfig option to use the RP2350 untranslated XIP alias
for flash reads. This ensures the flash API can still access physical
partitions when Address Translation has remapped the primary window.
It otherwise introduces no changes for existing applications.

Signed-off-by: Raul Hernandez <raul.hernandez@spaceface.dev>
2026-03-13 09:13:37 +01:00
Muhammad Waleed Badar
5437848dff drivers: i2c: dw: fix invalid MMIO access
Move the get_regs(dev) call after DEVICE_MMIO_MAP() to ensure the MMIO
region is mapped before retrieving the register base.

This fixes the potential invalid MMIO access.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-03-13 07:12:16 +01:00
Chun-Chieh Li
00360c4e65 drivers: usb: udc: numaker: fix compile error with sof for usbd
Add missing dummy macro define HSUSBD_BUSINTEN_SOFIEN_Msk for when
CONFIG_UDC_ENABLE_SOF is enabled to pass compile for USBD

Fixes: #102173

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2026-03-13 07:11:43 +01:00
Zhaoxiang Jin
74f6827c32 drivers: adc: mcux_lpadc: Add device PM Action suppport
Add device PM Action suppport for lpadc driver.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-03-13 07:09:22 +01:00
Zhaoxiang Jin
af3bfc6084 drivers: adc: mcux_lpadc: Add support for PM policy device constraints
Add support for PM policy device constraints to the MCUX LPADC driver.
This allows the driver to specify that certain power states should be
disabled when the device is active, which can help ensure proper operation
and reduce power consumption.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-03-13 07:09:22 +01:00