Commit graph

25,525 commits

Author SHA1 Message Date
Alberto Escolar Piedras
cf9634cbd0 drivers/net offloaded_sockets: Remove redundant kconfig dependency
After removing NATIVE_APPLICATION, only NATIVE_LIBRARY is
possible with ARCH_POSIX.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Alberto Escolar Piedras
0acebf7135 drivers/bluetooth/userchan: Remove NATIVE_APPLICATION support
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Alberto Escolar Piedras
2c4288ecec drivers/eeprom/eeprom_simulator: Remove NATIVE_APPLICATION support
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Alberto Escolar Piedras
e6dbe45304 drivers fake_entropy_native_sim: Remove NATIVE_APPLICATION support
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Alberto Escolar Piedras
e7d228a2b1 drivers/flash: Remove NATIVE_APPLICATION support
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Alberto Escolar Piedras
13f1e92037 drivers/serial/TTY & PTTY: Remove NATIVE_APPLICATION support
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Alberto Escolar Piedras
6e923834e6 drivers/input sdl & evdev: Remove NATIVE_APPLICATION support
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Alberto Escolar Piedras
0ec02c1873 drivers/gpio/sdl: Remove NATIVE_APPLICATION support
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Alberto Escolar Piedras
0d87d5f5b4 drivers/ethernet/native_tap: Remove NATIVE_APPLICATION support
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Alberto Escolar Piedras
848e5c53b9 drivers/display sdl: Remove NATIVE_APPLICATION support
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Alberto Escolar Piedras
e7e8216661 drivers/can/can_native_linux: Remove NATIVE_APPLICATION support
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Krzysztof Chruściński
08f14961fe drivers: serial: nrfx_uarte: Improve UART_NRFX_UARTE_ENHANCED_RX dependency
Enhanced RX cannot be used when UART_x_NRF_HW_ASYNC is used so changing
default value to depends on.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-07-17 12:46:31 -10:00
Krzysztof Chruściński
3c9389650e Revert "drivers: serial: nrfx_uarte: Deprecate CONFIG_UART_x_NRF_HW_ASYNC"
This reverts commit 384e940c66.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-07-17 12:46:31 -10:00
Krzysztof Chruściński
eb996924fb drivers: serial: nrfx_uarte: use ifdef instead of IS_ENABLED
In certain configurations timeout field is not present in the
data structure so preprocessor ifdef must be used instead of
compiler check.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-07-17 12:46:31 -10:00
Gaetan Perrot
f52d71c8cf drivers: serial: uart_sedi: Remove unused variable 'mask'
The variable 'mask' was declared but never used in
uart_sedi_line_ctrl_set().

This commit removes it to clean up the code..

No functional changes.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-14 11:18:45 -10:00
Derek Snell
09714390f6 drivers: dma: mipi_dbi_nxp_lcdic: enable inputmux clock
To optimize power consumption, the inputmux clock is only enabled when
a signal is attached.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-07-11 13:16:43 -10:00
Marcin Niestroj
cd17871cfe drivers: udc: stm32: fix USB_OTG_HS_EMB_PHY macro value check
USB_OTG_HS_EMB_PHY macro is always defined, so
`defined(USB_OTG_HS_EMB_PHY)` always results in true. This means that
driver always selected `USB_OTG_SPEED_HIGH_IN_FULL` and never
`USB_OTG_SPEED_HIGH`.

Fix that by checking value of defined macro.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2025-07-11 11:42:33 -10:00
Gaetan Perrot
bac20e419e drivers: wifi: nrf_wifi: wifi_mgmt: remove redundant null check
Deleted a redundant check for 'rpu_ctx_zep' pointer after it was already
dereferenced.

Clarifies code logic in nrf_wifi_get_power_save_config function.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-11 16:32:06 -05:00
sudarsan N
9e7e58fb54 video: common: fix formatting for heap define to fit CI line length
Wrap K_HEAP_DEFINE to fit within 100-character CI limit and apply
consistent spacing.This is a formatting-only change.

Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
2025-07-11 15:54:09 -05:00
sudarsan N
af76ac8b9b video: common: prevent divide-by-zero video_closest_frmival_stepwise()
Adds an assertion and runtime log to ensure 'step' is not zero before
using it in division,preventing undefined behavior without modifying
 the public API.

Avoids a signature change (void → int) to preserve API stability for
Zephyr 4.2.A more complete solution can be proposed for 4.3.

CID: 444378

Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
2025-07-11 15:54:09 -05:00
Sylvio Alves
aa7901c078 drivers: spi: esp32c6: fix struct type zeroing
Fix regression caused by memset() replacement to zero volatile struct.
ESP32-C6 data_buf struct differs from other SoCs and needs custom
handling.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-11 08:20:41 -10:00
Chris Friedt
8fd0b704ab drivers: gpio: gpio_pca_series: check return values and exit on error
Check return values and exit on error to address CID 434641.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-07-11 08:19:39 -10:00
Marcin Niestroj
5e25a3e24a drivers: esp_at: fix net_if_get_by_iface() typo
s/net_if_get_by_ifindex/net_if_get_by_iface/

Fixes: 0e57844b2d ("drivers: wifi: esp_at: Bind DNS to device net
  interface")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2025-07-11 08:19:06 -10:00
Thomas Altenbach
6aeb12d558 drivers: flash: stm32_qspi: Fix flash not reset when in QPI mode
The reset commands were sent only in SPI mode, causing the device not to
be properly reset when in QPI mode. On the STM32H747I-DISCO boards, this
was causing the driver initialization to fail due to a bad SFDP magic
after flashing the external memory using STM32CubeProgrammer since the
external loader is configuring the flash memory in QPI mode.

The commands are sent in QPI mode first, then in SPI mode:
- If the flash memory was in QPI mode, the two first reset commands are
  processed and after reset, the flash memory is in SPI mode and
  correctly handles the SPI mode reset commands.
- If the flash memory was in SPI mode, for each QPI command the chip
  select signal will be released before the flash memory had the
  opportunity to receive a whole command (1 byte), so the partially
  received commands will be ignored and won't cause any harm. Then, the
  chip is reset by the commands sent in SPI mode.

Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
2025-07-11 09:41:38 -05:00
Declan Snyder
9166d6ac7b spi_mcux_dspi: Hotfix for failing null rx test
This is not really high priority to support and is disrupting test
reporting, for now just hotfix the test by returning that this is not
supported, it's not really necessary anyways, there's multiple ways to
call the API to achieve the same effect.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-11 09:41:14 -05:00
Declan Snyder
a622070a24 dma_mcux_edma: Remove header file
There is really no need for this header file at all besides if
there is a requirement to be annoying.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-11 09:41:14 -05:00
Declan Snyder
b3083dac07 spi_mcux_dspi: Return error if data update fails
This data update returns an error, we should propogate it where it is
called if there is an error returned.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-11 09:41:14 -05:00
Declan Snyder
a94a16c454 dma_mcux_edma: Abort transfer before clear status
The transfer must be aborted before clearing the status flags otherwise
they will be set again before the transfer is aborted and stay set
causing infinite interrupt.

Also, elevate the log message to error level and give it actual useful
information. The "flag" being logged before literally just is a bit that
says if there is an error or not, which we already know by virtue of
handling an error. The channel error status has actual details about
what was the reason of the error. Also this status should be reported
before the transfer is aborted to get the right status.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-11 09:41:14 -05:00
Tomasz Moń
d590d27ec9 drivers: udc_dwc2: Set EP0 IN CNAK only when necessary
Adhere to Programming Guide with regards to when the DIEPCTL0.CNAK is
set. This allows the driver to survive abusive control transfers with
extremely short host timeouts.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-07-11 09:41:04 -05:00
Guillaume Gautier
70b910981d drivers: pwm: stm32: fix four channel pwm capture
With the four-channel-capture-support property enabled, the STM32 PWM
driver was missing every other frames during PWM capture.

The counter values are now reset just after getting the pulse and the
period of the cycle, instead of waiting the next interrupt to do so, and
thus missing a cycle.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-07-10 16:01:23 -05:00
Lucas Tamborrino
79f599ace4 drivers: lp uart: fix initialization
Fix initialization after HAL update

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2025-07-10 16:01:11 -05:00
Gaetan Perrot
3ff4d051ca drivers: clock_control: Remove unused 'sys' argument
The 'sys' argument in clock_control_renesas_ra_get_rate() is unused and
has been removed to clean up the implementation.

This also aligns with the function's actual behavior and eliminates
misleading validation logic.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-10 16:00:52 -05:00
Guillaume Gautier
d2e8d0a00e drivers: spi: context: check that config exists before reading it
Function spi_context_release reads the content of ctx->config without
checking first if it is set. In many drivers (including STM32), when a bad
configuration is made for the first transaction, ctx->config is not set,
and spi_context_release is called, resulting in hard fault.

This commit adds a check that ctx->config exists before reading it to
avoid this problem.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-07-10 16:00:42 -05:00
Vitaliy Livnov
e6894ad576 drivers: can: sam0: fix clock configuration for SAM0 series
Fixed a bug where unconfigured clocks were connected to the can
interface in the device tree for SAM0, causing the interface to work
incorrectly. Fixed by adding the correct index when calling GENCTRL.
Also, the default divider has been reduced to 6 to allow setting
the bitrate to 500 kbps.

Tested on a canopennode sample on a board with an ATSAMC21E18A
microcontroller.

Signed-off-by: Vitaliy Livnov <vitaliy.livnov@devkit.agency>
2025-07-10 15:53:46 -05:00
IBEN EL HADJ MESSAOUD Marwa
e1248eff82 drivers: clock_control: set voltage scaling before PLL
Move the call to prepare_regulator_voltage_scale()
before PLL setup in clock_stm32_ll_h7.c.

This ensures the voltage regulator is configured
to the appropriate voltage scale before increasing
the system clock frequency via PLLs.
Without this change, the system configuration
may be out of spec.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2025-07-10 15:49:59 -05:00
cyliang tw
553fc84e77 drivers: spi: fix numaker spi auto cs control
As while there is no cs_gpio, it should enable H/W auto cs control.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2025-07-10 10:14:25 -05:00
Jiafei Pan
255e7f960b drivers: gpio: pca6416: fix dt get id
It should use "n" but not use "inst".

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-07-10 10:14:16 -05:00
Loic Domaigne
28f37e522a drivers: crypto: crypto_ataes132a fix memset undefined behavior
Coverity reported a memory - illegal accesses when using memset in
ataes132a_aes_ecb_block(). This can happen when the input block is
exactly 16 bytes: memset(&param_buffer[19], 0x0, 0) is called. But this
is an undefined behaviour in C even if size is 0, as &param_buffer[19]
is an invalid pointer.

The fix consists of simply skipping memset() in this case, since there's
nothing to zero out.

Coverity CID: 434642

Signed-off-by: Loic Domaigne <tech@domaigne.com>
2025-07-10 10:13:17 -05:00
Thomas Altenbach
81f95f15fa drivers: flash: stm32_qspi: Fix flash configuration in dual flash mode
When the QSPI is used in dual flash mode, e.g. on the STM32H747I-DISCO
board, only the first flash memory was reset and configured in 4-byte
addressing mode. This was in particular causing data to be incorrectly
read from the second flash memory and only even bytes were valid during
a read.

The dual flash mode was only enabled after reading the SFDP table since
it is desired to read the table of only one flash memory, not both.

This commit changes the driver to only disable the dual mode temporarily
while reading the SFDP table, ensuring all other commands and in
particular configuration commands are sent to both flash memories.

Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
2025-07-10 10:13:06 -05:00
Luis Ubieda
07c1d010f7 shell: spi: fix typo on spi cs command
Copy-paste error fixed from help text.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-10 10:12:31 -05:00
Fabrice DJIATSA
1804eb7bc3 drivers: i2c: stm32: exclude stm32f7 family for PM
The STM32F7 family does not yet support power management in Zephyr.

Besides, LL_I2C_EnableWakeUpFromStop and LL_I2C_DisableWakeUpFromStop

are not implemented in the H7 HAL/LL drivers

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-07-09 17:16:16 -05:00
Sylvio Alves
61147a3841 drivers: spi: esp32: fix volatile array zeroing to use explicit loop
Replace memset() with an explicit loop to zero the data_buf array,
which is part of a volatile struct. Standard memset does not guarantee
volatile stores, which can lead to incorrect hardware access.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-09 17:14:04 -05:00
Khaoula Bidani
618044ed78 drivers: clock_control: fix PLL input frequency
Correct PLL input frequency calculation to consider
HSI clock divider in clock_stm32_ll_h7.c file.
For sake of simplicity, use PLLSRC_FREQmacro that
already considers the HSI clock divider when applicable.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-07-09 09:44:25 -05:00
Josuah Demangeon
e0b706b6c6 drivers: video: stm32_dcmipp: move video/ header directory to drivers/
During #89407 a driver-specific header stm32_dcmipp.h got introduced to
support new functionnalities not yet covered by video APIs.
Move this header into a new <include/zephyr/drivers/video/> include
direcctory like what other driver classes do.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-07-09 09:42:43 -05:00
Filip Stojanovic
f0b5911d0a sensor: bme280: Fix bad chip id read after power cycle
Fix an issue where the BME280 sometimes returns an incorrect chip ID
immediately after a power cycle. This causes sensor initialization to fail.

According to the datasheet, the sensor requires a 2 ms start-up delay after
power is applied. This patch introduces a sleep delay to ensure the
required start-up time is respected before reading the chip ID.

Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
2025-07-09 00:25:33 -05:00
Emilio Benavente
0bdb9595b1 drivers: misc: mcux_flexio: Set the DOZEN bit
Setting the DOZEN bit in the flexio so the soc
does not force the peripheral to go into
low power mode when the soc is in idle.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2025-07-09 00:24:14 -05:00
Petri Pitkanen
808ee1713d drivers: bluetooth: silabs: Fix indicating support for 2M phy
Previously we always had driver to support 2M PHY regardless of
configuration. As this was fixed the missing support statemenent
caused 2M support to miss regardless of configuration.

Signed-off-by: Petri Pitkanen <petri.pitkanen@silabs.com>
2025-07-08 13:44:51 -05:00
Fabrice DJIATSA
24af0c8ee1 drivers: pwm: stm32: add stm32h7rs bus prescalers
The clock tree of the STM32H7RS series uses the ppre1
and ppre2 naming convention instead of apb1_prescaler
and apb2_prescaler for bus prescaler.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-07-08 13:40:50 -05:00
Jacob Wienecke
112cd172c1 drivers: mdio_nxp_enet_qos: fix CR overwrite
Current Implementation to write to MAC_MDIO_ADDRESS causes CR to be
set to 0. This leads to the divide always being 42 (on FRDM_MCXN947)
so, by default the clock is running at ~3.6MHz which is out of spec
range (1.0-2.5MHz)

This stops the do_transaction function from overwriting CR.
It also saves off the CR register before DMA reset

Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
2025-07-08 13:40:17 -05:00
Chaitanya Tata
e728f80416 drivers: nrf_wifi: Fix TX drop statistics
In case FMAC API fails, increment the TX drop counter, helpful in
debug.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-08 13:39:17 -05:00