Commit graph

28,390 commits

Author SHA1 Message Date
Fabrice DJIATSA
46f2c75b21 drivers: watchdog: stm32: stm32wb0 series don't support *_FreezePeriph
STM32WB0 watchdog does not support disable the Debug
module during STANDBY mode once the DBGMCU
clock is enabled.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2026-04-03 23:12:22 +09:00
Sylvio Alves
d473e33fc6 drivers: mbox: espressif: fix missing guard for ESP32-C5
If building mbox driver for ESP32-C5, it fails due to
invalid headers. Add needed guard for that SoC.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-04-02 13:13:17 -05:00
yueling hu
763626c19c drivers: flash: shell: Fix result for test command
Fix return value issue when comparing errors

Fixes:   drivers/flash/flash_shell.c

Signed-off-by: yueling hu <502966985@qq.com>
2026-04-02 13:09:19 -05:00
Anand Kumar
93bed12c18 clock: esp32: treat already-enabled clock as success
Return 0 from clock_control_esp32_on() when the peripheral clock is
already on, matching clock_control_on() success semantics.

Signed-off-by: Anand Kumar <anandvtu16158@gmail.com>
2026-04-02 08:51:00 -05:00
Aksel Skauge Mellbye
315da11745 drivers: adc: siwx91x: Fix clock configuration
Since `a78cd34` the ADC driver did not correctly configure
its internal divisor. The responsibility was moved from the
clock control driver to the ADC driver and the `init` function
of the ADC driver was updated accordingly. But the driver
continued calling the clock control API from the `configure`
function, leading to `-EINVAL` being returned.

Correctly configure the internal divisor in the ADC driver by
calling the HAL API directly.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-04-02 08:48:48 -05:00
Muzaffar Ahmed
84e95b9046 drivers: wifi: siwx91x: Fix twt_capable by inferring it from link mode
The twt_capable field in wifi status earlier was hardcoded to true. It
seems better to set it to true only when the link mode is 802.11ax or
higher.

Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
2026-04-02 08:48:26 -05:00
Pieter De Gendt
19335b22c5 drivers: rtc: Use DEVICE_API macro
Put RTC device driver APIs into corresponding iterable section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-04-02 08:47:22 -05:00
Pieter De Gendt
c7dc4281af drivers: flash: Use DEVICE_API macro
Put flash device driver APIs into corresponding iterable section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-04-02 08:47:22 -05:00
Pieter De Gendt
793614dbf9 drivers: crypto: Use DEVICE_API macro
Put crypto device driver APIs into corresponding iterable section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-04-02 08:47:22 -05:00
Pieter De Gendt
6620d37769 drivers: clock_control: Use DEVICE_API macro
Put clock control device driver APIs into corresponding iterable section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-04-02 08:47:22 -05:00
Pieter De Gendt
9b3a60b5b3 drivers: bluetooth: hci: Use DEVICE_API macro
Put BT_HCI device driver APIs into corresponding iterable section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-04-02 08:47:22 -05:00
Pieter De Gendt
acf7dd4847 drivers: adc: Use DEVICE_API macro
Put ADC device driver APIs into corresponding iterable section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-04-02 08:47:22 -05:00
Mohit Talwar
383b1a5349 drivers: flash: mcux: clear caches after erase and write on Kinetis
Kinetis ke1xf (twr_ke18f/mke18f16) and k8x (frdm_k82f) select
CONFIG_HAS_MCUX_CACHE but previously fell through to the no-op
clear_flash_caches() path, meaning caches were not invalidated
after flash erase or write operations.

After the FTFE controller completes an erase or write, stale data
may remain in the instruction cache and (on some parts) the system
bus cache. Subsequent reads can return outdated values instead of
updated flash contents. This causes test_flash_erase,
test_flash_fill, and test_flash_flatten in
tests/drivers/flash/common to fail, with data read back as stale
values (e.g. 0xAA from a prior fill).

Rebased on top of #105918 and updated to use Zephyr's generic cache
API (sys_cache_instr_invd_all() / sys_cache_data_invd_all()) for
cache invalidation. This keeps the flash driver SoC-agnostic and
relies on the cache driver (e.g. LMEM) for hardware-specific
handling.

Fixes #98487

Signed-off-by: Mohit Talwar <talwarmohit2005@gmail.com>
2026-04-02 08:42:14 -05:00
Holt Sun
1cabbd3bdd drivers: cache: lmem: check cache enable state
LMEM cache maintenance helpers can be called before the
underlying code or system cache has been enabled.

This becomes visible on RT11xx CM4 targets once the generic ARM MPU
nocache-memory cleanup path uses the generic cache API for non-ARCH
cache backends during early boot. In that case, LMEM maintenance
requests must not blindly access the hardware while ENCACHE is clear.

Check the corresponding LMEM enable bit before performing code or
system cache maintenance. Return -EAGAIN when the selected cache is
currently disabled, and keep disable requests as a no-op when the
cache is already off.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-04-01 15:11:35 -05:00
Benjamin Gwin
28b8e6e875 drivers: udc_dwc2: Fix missing break statement
This code would fail to compile if compiled with
`-Werror=implicit-fallthrough=`. The fallthrough does not seem to be
intentional as it is handling 2 discrete events.

Signed-off-by: Benjamin Gwin <bgwin@google.com>
2026-04-01 11:55:18 -05:00
Nick Stoughton
12ba507599 drivers: serial: nrfx_uarte: remove unused variable
Removes compiler warning if `CONFIG_UART_USE_RUNTIME_CONFIGURE` is not
defined.

Signed-off-by: Nick Stoughton <nick.stoughton@eargo.com>
2026-04-01 11:51:24 -05:00
Fabio Baltieri
a258a4b017 auxdisplay: gpio-7seg: fix display glitch
The current code resets the refresh_pos pointer on write, but does not
clear the corresponding digit drive pin. This means that the next timer
iteration is going to set the gpio for digit 0, but any other digit may
still be selected, which would cause a glitch on that digit for the
cycle.

There's no real need to reset this pointer on write though so just drop
the line, then the timer refresh just catches up to the new string and
the display is stable.

Also drop the reset line from the clear function as it does not make
much sense there either, but reset on timer end so that the next cycle
starts from the first digit.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-04-01 11:50:08 -05:00
Ren Chen
db64bd6acf drivers: watchdog: it51xxx: improve error handling
`tests/drivers/watchdog/wdt_error_cases` test was failing
on `it51xxx_evb/it51526aw` due to insufficient error
handling. This change fixes those issues, and the following
tests now pass.
- tests/drivers/watchdog/wdt_error_cases
- tests/drivers/watchdog/wdt_basic_api
- tests/drivers/watchdog/wdt_basic_reset_none
- tests/drivers/watchdog/wdt_variables
- samples/drivers/watchdog

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2026-04-01 09:17:29 -05:00
Ren Chen
06f17b1768 drivers: adc: it51xxx: validate buffer size in start_read()
Move buffer size validation into `start_read()` to prevent adc
context from getting stuck. This issue is revealed by
`tests/drivers/adc/adc_error_cases` test.

Also, this patch adds check for unsupoorted options, including
oversampling and invalid resolution and adds support for higher
channel range. (8 and above).

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2026-04-01 09:16:23 -05:00
Fabian Kainka
218484b36b drivers: gpio: pca_series: fix GPIO_DISCONNECTED as not supported
Configuring a pin with GPIO_DISCONNECTED currently
results in the pin being set as output due to a
fallthrough in the code. This is not supported by
the driver and should return -ENOTSUP instead.

This commit ensures that configuring GPIO_DISCONNECTED
is explicitly rejected and not applied to the hardware.

Signed-off-by: Fabian Kainka <f.kainka@gmx.de>
2026-04-01 09:09:57 -05:00
Ryan Erickson
4023ded959 drivers: dp: fix reset state
When the debug port is turned on, the reset IO should be set inactive.
Setting the pin active will hold the device in reset constantly and
causes issues with debug port access.

When the port is turned off, the keep_reset_deast option should set
the IO to inactive as the kconfig states.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2026-03-31 18:21:41 -05:00
Erwan Gouriou
5ac8a0e2ae Revert "drivers: pwm: add support for enabling DMA requests"
This reverts commit 311a841620.
+ related changes done in 841e4d4597

Proposed API change result in vendor specific details of the DMA leaking
into application code, which prevents usage with portable code.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-03-31 13:58:55 -05:00
Guillaume Gautier
9e10d4a7ca drivers: adc: stm32: fix preselection register for stm32h72x/73x
STM32H72x/73x ADC have a PCSEL_RES0 register instead of PCSEL for other
series.
Make a special case to prevent a compilation error.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-03-31 13:54:23 -05:00
Valerio Setti
a28407d9b2 drivers: entropy: mcux: require PRNG on ENTROPY_MCUX_TRNG
According to the note the driver is not able to provide large amount of
data and it can only be used as seed for a RNG. Therefore enable
ENTROPY_NEEDS_PRNG on it.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-03-31 13:50:34 -05:00
Valerio Setti
2b9e3265c8 drivers: entropy: add new Kconfig ENTROPY_NEEDS_PRNG
This Kconfig is used to signal that the entropy driver needs a PRNG crypto
algorithm on the provided data. The reason is that the driver is not
capable of providing large amount of data in a relatively short amount of
time.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-03-31 13:50:34 -05:00
Yangbo Lu
1be0d9a58b drivers: ethernet: dsa_tag_netc: validate RX tag before using
The RX tag length and port index in the tag should be validated
before using.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-03-31 10:25:39 -05:00
Jacob Wienecke
99a9e1a284 drivers: hwinfo: rw61x: fix multi-cause reset handling
POWER_GetResetCause() returns an OR'd bitmask since multiple reset
causes can occur simultaneously. The switch statement only matched
a single value, falling through to default and returning 0 when
multiple bits were set. Replace with bitwise checks to accumulate
all active reset flags.

Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
2026-03-31 10:22:13 -05:00
Ofir Shemesh
b1afb494b0 flash: nxp: align FlexSPI NOR DTS with soc-nv-flash layout
NXP FlexSPI NOR flash nodes were missing the soc-nv-flash child
node expected by Zephyr's flash map API.

Without this child node, DT_MTD_FROM_FIXED_PARTITION resolved to
the FlexSPI memory controller instead of the flash device. Since
the controller has api = NULL, MCUboot could hit a NULL pointer
dereference during boot on Zephyr 4.4.

Fix this by updating the DTS structure to match the soc-nv-flash
convention used by the flash map infrastructure.

Changes:
- add a soc-nv-flash child under each nxp,imx-flexspi-nor node
- move erase-block-size, write-block-size, and partitions into it
- add ranges to flash controller nodes for address translation
- update zephyr,flash to point to the soc-nv-flash child
- add zephyr,flash-controller chosen for the flash driver node
- remove soc-nv-flash.yaml from nxp,imx-flexspi-nor.yaml
- use zephyr,flash-controller in flash CMake XIP decisions
- update FlexSPI XIP Kconfig logic to walk to the grandparent

This keeps the controller and flash device roles separate and
restores correct flash map resolution for MCUboot and XIP logic.

Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
2026-03-30 15:04:48 -05:00
Krisztian Szilvasi
7ee1146a5b drivers: memc: fix compiler warnings for stm32 ospi psram
shared_multi_heap_add expects the region parameter to be
a non-const parameter; if const is passed, it still discards
it, but generates warnings.

Signed-off-by: Krisztian Szilvasi <krisztian@atym.io>
2026-03-30 15:02:52 -05:00
Jaro Van Landschoot
b85c717d86 drivers: i2s: i2s_mcux_sai: i2s_mcux_write take size argument into account
The size argument was ignored in i2s_mcux_write. This caused unwanted
behaviour when writing data smaller than the configured size.

Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
2026-03-30 15:02:21 -05:00
Michal Chromec
235b214df7 drivers: i2c: mcux_lpi2c: remove using of kLPI2C_TransferRepeatedStartFlag
The enum kLPI2C_TransferRepeatedStartFlag is not used in fsl_lpi2c.c,
so it shouldn't be used in mcux_lpi2c drivers.
Update nxp hal to get latest version of lpi2c drivers.

Signed-off-by: Michal Chromec <michal.chromec@nxp.com>
2026-03-30 15:01:43 -05:00
Kate Wang
cfbeb7b74c drivers: display: mcux_dcnano_lcdif: use DT_INST_ENUM_HAS_VALUE macro
Replace DT_ENUM_IDX_OR with DT_NODELABEL usage with the more appropriate
DT_INST_ENUM_HAS_VALUE macro for checking the version property value.
This improves code readability and uses the proper devicetree API for
enum value checking.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2026-03-30 10:17:00 -05:00
Chun-Chieh Li
4a7f05be17 drivers: usb: udc: numaker: remove Control OUT error check
Remove the error check because it may misjudge some right cases.
For example, for HSUSBD, in the case Setup-DataIn-StatusOut and
immediately following Setup-DataOut-StatusIn, the DataOut in the
second Control transfer has arrived but user buffer for OUT may
be only ready for StatusOut in the first Control transfer.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2026-03-30 10:09:56 -05:00
Chun-Chieh Li
19346d6ac6 drivers: usb: udc: numaker: hsusbd: fix NULL transfer buffer
The scheduled transfer message can be just a hint and its attached
transfer buffer can be NULL. Skip this case.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2026-03-30 10:09:56 -05:00
Chun-Chieh Li
b6d6a10a7e drivers: usb: udc: numaker: hsusbd: fix STALL causes crash
The crash results from Control transfer STALL interrupt flag
not cleared. To catch all uncleared interrupt flags, all Control
transfer interrupt flags are cleared altogether at one place
instead of separately, with their handling order not changed.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2026-03-30 10:09:56 -05:00
Chun-Chieh Li
91f84a8ace drivers: usb: udc: numaker: refine format
Slightly refine the format

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2026-03-30 10:09:56 -05:00
Jonathan Keller
388f386d60 drivers: wifi: infineon: Fix null pointer dereference in airoc_mgmt_scan
If the user passed no parameters, `params->scan_type` would dereference a
null pointer.

Signed-off-by: Jonathan Keller <jonathan.keller@infineon.com>
2026-03-30 10:09:02 -05:00
Ahmed Ahmed
c64d271a03 drivers: serial: nrfx_uarte: Fix high-speed UART baudrate calculation
The UARTE_GET_CUSTOM_BAUDRATE macro used an incorrect formula that
did not match the one specified in the nRF54x UARTE datasheet.

The correct formula is:
  2^12 * floor(2^20 / round(f_PCLK / desired_baudrate))

Update the macro to match the datasheet formula, to reduce the
baudrate error for high-speed UART instances on nRF54x devices.

Signed-off-by: Ahmed Ahmed <ahmed.ahmed@dewinelabs.com>
2026-03-30 09:58:40 -05:00
Fin Maaß
511a50d831 drivers: ethernet: nxp: correct net_if_carrier use
net_if_carrier is to be used independently of the
administrative state (start and stop of the ethernet_api).

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-30 09:55:50 -05:00
Jianxiong Gu
fc4a381bd2 soc: wch: unify SOC series naming for CH32V00X
Replace SOC_SERIES_CH32V00X with SOC_SERIES_QINGKE_V2C to maintain
consistent naming across SOC series.

Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
2026-03-28 08:04:33 -04:00
Pisit Sawangvonganan
c7ca7abc87 drivers: fix typo in (w1, watchdog, wifi)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/w1`
- `drivers/watchdog`
- `drivers/wifi`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00
Pisit Sawangvonganan
4328b32b5c drivers: fix typo in (serial, spi, tee, timer, usb, usb_c, video)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/serial`
- `drivers/spi`
- `drivers/tee`
- `drivers/timer`
- `drivers/usb`
- `drivers/usb_c`
- `drivers/video`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00
Pisit Sawangvonganan
4f9a85e80a drivers: fix typo in (rtc, sdhc, sensor)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/rtc`
- `drivers/sdhc`
- `drivers/sensor`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00
Pisit Sawangvonganan
f5512a6907 drivers: fix typo in (mipi_dbi, misc, mm, mspi, pcie, ptp_clock, pwm)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/mipi_dbi`
- `drivers/misc`
- `drivers/mm`
- `drivers/mspi`
- `drivers/pcie`
- `drivers/ptp_clock`
- `drivers/pwm`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00
Pisit Sawangvonganan
c259c78097 drivers: fix typo in (interrupt_controller, led_strip, lora, memc, mfd)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/interrupt_controller`
- `drivers/led_strip`
- `drivers/lora`
- `drivers/memc`
- `drivers/mfd`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00
Pisit Sawangvonganan
a847abf22c drivers: fix typo in (i2s, i3c, ieee802154, input)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/i2s`
- `drivers/i3c`
- `drivers/ieee802154`
- `drivers/input`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00
Pisit Sawangvonganan
edae0e7e30 drivers: fix typo in (ethernet, flash, fpga, fuel_gauge, gpio, i2c)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/ethernet`
- `drivers/flash`
- `drivers/fpga`
- `drivers/fuel_gauge`
- `drivers/gpio`
- `drivers/i2c`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00
Pisit Sawangvonganan
531628e57a drivers: fix typo in (disk, display, dma, eeprom, entropy, espi)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/disk`
- `drivers/display`
- `drivers/dma`
- `drivers/eeprom`
- `drivers/entropy`
- `drivers/espi`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00
Pisit Sawangvonganan
d08da865be drivers: fix typo in (clock_control, counter, crypto, dai, debug)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/clock_control`
- `drivers/counter`
- `drivers/crypto`
- `drivers/dai`
- `drivers/debug`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00
Pisit Sawangvonganan
3c44bcd2a0 drivers: fix typo in (adc, audio, bluetooth, can, charger)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/adc`
- `drivers/audio`
- `drivers/bluetooth`
- `drivers/can`
- `drivers/charger`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00