Commit graph

25,525 commits

Author SHA1 Message Date
Declan Snyder
63868e4301 drivers: mdio_nxp_enet: Remove mistaken busy wait
This busy wait was for debugging purposes and left in by mistake.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-11-01 08:38:28 -04:00
Declan Snyder
51f457088d drivers: ksz8081: Start monitoring phy after init
For some reason, a regression happened where the phy monitor was never
happening. Fix by starting the monitor at the end of init function. The
monitor will then reschedule itself from then on.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-11-01 08:38:28 -04:00
Mario Paja
497209c74e drivers: i2s: mcux sai update TX state after queue is empty
This change sets the TX state to ready after the TX queue
has been emptied.

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2025-10-31 20:04:53 -04:00
Benjamin Cabé
a6a520da26 drivers: fuel_gauge: remove dead code in set_prop functions
Remove useless assignments to `val` parameter in sbs_gauge_set_prop()
and bq27z746_set_prop(). Since `val` is passed by value, modifying it
has no effect. Also remove unused `tmp_val` variable.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-10-31 20:03:00 -04:00
Martin Hoff
6366bd63af drivers: serial: silabs: fix eusart driver with xg22 soc
This commit introduces a compatibility layer for older EUSART hardware
that lacks the RXTO interrupt. It fix the test uart_async_api when using
xg22 soc.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-10-31 22:40:49 +02:00
Martin Hoff
504eb7d39e drivers: serial: silabs: fix eusart driver when parity param is nok
When running uart_elementary on the xg22 SoC, some tests are failing due
to the lack of checks inside the configuration function. This patch adds
a check for the parity parameter.
I've also noticed an error in the ISR function where we check all the
ISR flags and not only the enabled ones. It has no impact but needs to be
changed in order to be accurate.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-10-31 22:40:49 +02:00
Declan Snyder
70e45b7039 drivers: spi_mcux_flexcomm: Fix spi slave count check
The current implementation checking for the validity of the spi slave
number is wrong. First of all, there is an off by one error where it
allows SPI_CHIP_SELECT_COUNT value as a valid slave, when really it
should be that value minus one. Secondly, it doesn't take into account
the fact that having software controlled GPIO CS can technically have
any number of slaves on the bus. So fix by finding the max of these two
values and fixing the off by one mistake. Also, for RW612, only one HW
native CS is available due to SOC pinmux limitations.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-10-31 22:40:40 +02:00
Jun Lin
62b1e1c28d driver: i2c: npcx: workaround invalid stop condition
The I2C state machine may fail to generate a valid STOP condition.
This may happen when the firmware sets the STOP bit in SMBCTL1 register
approximately half an SMB clock cycle following the last ACK bit in the
transaction.
Note:
  1. This issue is not expected to occur when the core clock runs at
    the default frequency (15 MHz). However, since more applications
    reuquires higher core clock frequency, this commit introduce the
    bypass to prevent the potential risk.
  2. Only NPCXn variant chips require this workaround.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2025-10-31 10:38:04 -04:00
Chekhov Ma
f4522490b9 driver: gpio: pca_series: fix pca6416 test issue
There are multiple issues in this driver:
1. gpio_pca_series_part_cfg_pca6416 is not using correct macros
2. gpio_pca_series_interrupt_handler_standard not updating input when
   no interrupt configured

Fixing these issues.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2025-10-31 10:23:23 -04:00
Mathieu Choplain
2e998cf17d drivers: usb: udc: stm32: use instance MPS for IN endpoints capabilities
When setting endpoint capabilities, the driver uses the MPS stored in each
instance's configuration for OUT endpoints, but used a hardcoded 1023 for
IN endpoints.

Use the instance MPS when preparing IN endpoints' capabilities too.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-10-31 10:22:29 -04:00
Wojciech Slenska
0468c5fb42 drivers: serial: stm32: don't disable DMA in circular mode
When cyclic mode is enabled, do not disable RX.
This mode ensures continuous availability of RX buffers.

Signed-off-by: Wojciech Slenska <wsl@trackunit.com>
2025-10-31 10:21:47 -04:00
Wenxi Xu
503df3e69e drivers: dma: stm32: add null callback checking
Fix the STM32 DMA driver did not check if the optional dma_callback was
set in dma_stm32_configure(). This could lead to a hard fault when an
interrupt occurs and the callback is NULL, even though the API allows
the callback to be omitted.

Fixes #97454
Signed-off-by: Wenxi Xu <xuwenxi0517@gmail.com>
2025-10-30 18:38:39 -04:00
Mathieu Choplain
2e7ad10247 drivers: usb: udc: stm32: use addr_before_status capability
Instead of snooping SETUP packets for SET_ADDRESS request to call the HAL
SetAddress() function manually, mark device with the addr_before_status
capability such that the UDC stack will call udc_stm32_set_address()
before submitting status by itself.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-10-30 18:38:29 -04:00
Ali Hozhabri
7a593ede3e drivers: bluetooth: hci: Fix the issue about the TRNG peripheral instance
Fix the issue regarding passing the TRNG peripheral instance to the driver.

Increase the SYSTEM_WORKQUEUE_STACK_SIZE when CONFIG_BT is set.
According to the log of thread analyzer for beacon sample, 1048 bytes
are needed. So, it's been increased to a safer value.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-30 18:38:02 -04:00
Ali Hozhabri
57ebf79d87 drivers: entropy: Modify the recover_seed_error function for WB0x
Exclude the WB0x series from discarding data 12 times from the RNG data
register.

Add a comment to the recover_seed_error function explaining the reason
for reading and discarding data from the RNG data register 12 times.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-30 18:38:02 -04:00
Ali Hozhabri
d7074f2747 drivers: entropy: Fix non-stop RNG ISR firing for STM32WB09
Fix the TRNG driver issue regarding non-stop ISR firing for STM32WB09 by
clearing RNG_IRQ_SR_ERROR_IRQ flag.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-30 18:38:02 -04:00
Allen Zhang
82f419de74 drivers: flash: Fixed the typo in clear_flash_caches
elif should be else

Signed-off-by: Allen Zhang <chunfeng.zhang@nxp.com>
2025-10-30 11:54:03 -04:00
Allen Zhang
86b346e097 drivers: flash: Added clear_flash_caches function for MCXW2XX
MCXW2XX ROMAPI provide the function FLASH_CacheClear to clear the cache.
The SMSCM is not supported on MCXW2XX platform.

Signed-off-by: Allen Zhang <chunfeng.zhang@nxp.com>
2025-10-30 15:15:35 +02:00
Jordan Yates
3dc72db57e wifi: nrf_wifi: named MAC address choice
Add a name to the "Wi-Fi MAC address type" choice symbol so that the
default can be updated on a per-board basis.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-30 15:14:59 +02:00
Guotao Zhang
ec970a635e drivers: bluetooth: h4: Fix check for sufficient buffer size
When alloc the evt buffer,such as the adv report, only compare the
remaining data len, should aslo consider the hdr_len, because the
hdr also copy to alloced buffer.if not consider the hdr, then
hdr + remaining data may larger than alloced buffer, because the
alloced buffer is not enough,then will assert when receive the
remaining data.

Signed-off-by: Guotao Zhang <guotao.zhang@nxp.com>
2025-10-30 15:14:20 +02:00
Qingsong Gou
4bb1c676cc drivers: dma: sf32lb: fix dma compile error
Fix dma clock compile error

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2025-10-30 15:13:25 +02:00
Abhinav Kulkarni
c0d1519891 drivers: wifi: nxp: Fixed host sleep issue
Fixed hostsleep issue for IW416 and IW612 socs

Signed-off-by: Abhinav Kulkarni <abhinav.kulkarni@nxp.com>
2025-10-29 20:30:22 -04:00
S Mohamed Fiaz
5828ba5ea1 driver: pwm: pwm_silabs_siwx91x: fix pm actions when PM is enabled
This fix addresses the issue encountered when power management (pm)
is enabled, as the PWM test suites utilize the GPIO driver, which
now incorporates the latest power domain enhancements and requires
CONFIG_POWER_DOMAIN to be enabled. Power domain functionality
manages device power actions such as turning on and off.

Accordingly, the pm device support for the pwm_silabs_siwx91x
driver has been updated to align with the recent power domain
improvements.

Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
2025-10-29 14:29:34 -04:00
Tomas Gudelevičius
e8043a48ac drivers: modem: use pm_device_driver_init() in modem_cellular.c
Remove Device Runtime PM "hack" used for modem cellular driver
initialization and use pm_device_driver_init() instead.

Signed-off-by: Tomas Gudelevičius <tomas.gudelevicius@draeger.com>
2025-10-29 20:19:00 +02:00
Anas Nashif
303af992e5 style: fix 'if (' usage in cmake files
Replace with 'if(' and 'else(' per the cmake style guidelines.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-29 11:44:13 +02:00
184ee44620 drivers: clock_control: fix the ch32v003/006 build
A recent commit added support for the CH32V30x/20x PLL multiplier. The
code is protected by a `IS_ENABLED(...)` but uses a constant that
doesn't exist for the CH32V00x, breaking the build.

Tested by building samples/basic/blinky for the ch32v003evt and linkw.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-10-28 20:20:49 -04:00
Mohamed Moawad
3559dd93ea drivers: spi: dw: Skip version detection on aux-reg platforms
The version register is not accessible through aux-reg interface,
So skip it entirely on platforms with aux-reg device tree property.

Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
2025-10-28 20:17:26 -04:00
Tim Pambor
084609a7bb drivers: spi: shell: fix deprecation warning
Remove deprecated delay parameter from SPI DT macro.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-10-28 20:11:39 -04:00
Jérôme Pouiller
f3e72b094f drivers: dma: siwx91x: Fix DMA_ADDR_ADJ_NO_CHANGE w/ memory destination
GPDMA does not support DMA_ADDR_ADJ_NO_CHANGE with a memory buffer. This
feature is required fro the SPI driver. Hopefully, SPI driver is the only
user of this feature.

Therefore, this commit introduces a hack for SPI. When the user want to
ignore the Rx data (= when he pass a NULL pointer for the Rx buffer),
rather than overwriting the destination in a loop, we just disable the rx
DMA.

This introduce a limitation: since Rx DMA stop early, any following Rx
request will start earlier than expected. Therefore, this patch breaks
cases with interleaved Rx buffers. In other words, the NULL buffer must be
the last one.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-10-28 08:46:48 -07:00
Jérôme Pouiller
e515c414a8 drivers: spi: siwx91x: Fix compatibility with gpdma
Because of limitation of gpdma, DMA Rx won't run if user doesn't specify
destination buffer.

Thus, the DMA Rx may stop before the end of the full transaction. So, wait
on DMA Tx instead.

Then, the SPI data won't be consumed by the DMA. We need to properly reset
the fifo before to start a new transaction (it is better to ensure we start
with a clean state before every transaction).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-10-28 08:46:48 -07:00
Jérôme Pouiller
42eff40bdc drivers: dma: siwx91x: Fix DMA_ADDR_ADJ_NO_CHANGE w/ memory source
GPDMA does not support DMA_ADDR_ADJ_NO_CHANGE with a memory buffer. This
feature is required for the SPI driver. Hopefully, SPI driver is the only
user of this feature.

Therefore, this commit introduces a hack for SPI. When the user request an
Rx transaction, rather than copying content of mosi_overrun parameter, it
configures the DMA to fill the destination memory (with either 0s or 1s).
Obviously, this only works if mosi_overrun is 0x00 or 0xFF. Hopefully, none
will need any other value.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-10-28 08:46:48 -07:00
Jérôme Pouiller
b359d5d29b drivers: dma: siwx91x: Simplify variables naming
Since the single-linked list management is well localized, the variable
names can now be abbreviated a bit.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-10-28 08:46:48 -07:00
Jérôme Pouiller
2fa6e07eef drivers: dma: siwx91x: Simplify descriptors list creation
The management of the single-linked list was made in various places:
  - RSI_GPDMA_BuildDescriptors()
  - after sys_mem_blocks_alloc()
  - at the end of the loop

Centralize it at the end of the loop.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-10-28 08:46:48 -07:00
Krzysztof Chruściński
182a6c62b1 drivers: timer: nrf_rtc: Kconfig clean up
Remove redundant enabling of NRF_RTC_TIMER in SoC specific files
and replace it with default y in the NRF_RTC_TIMER definition.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-10-28 17:42:38 +02:00
Yasushi SHOJI
3e4e1c52fb drivers: timer: Improve wording for AMD Xilinx PS TTC support
Clarify that the AMD Xilinx PS Triple Timer Counter (TTC) is used in both
Zynq UltraScale+ MPSoC (ZynqMP) and Versal platforms. Update the device
tree binding description and Kconfig accordingly.

Also, rephrase the Kconfig help text to fix grammar issues and improve
clarity.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2025-10-28 17:42:17 +02:00
Alain Volmat
f547fb1af5 video: dcmipp: put Pipe1 / pipe2 caps within preproc if statement
Correct compilation error due to usage of DCMIPP_PIPE1 / DCMIPP_PIPE2
on platform which do not have pixel pipes by putting those caps
under #if defined(STM32_DCMIPP_HAS_PIXEL_PIPES)
Put also DCMIPP_VIDEO_FORMAT_CAP macro inside since this is only used
for AUX / MAIN pipes.

Fixes: 126aaf6b72 ("video: dcmipp: expose dcmipp caps for all 3 pipes.")

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-28 17:41:28 +02:00
Alberto Escolar Piedras
0528554720 drivers/ethernet/eth_native_tap: Fix use of deprecated kconfig
In 200b886d3c a deprecated kconfig
option was brought back into the driver.
Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-10-28 17:40:51 +02:00
jhan bo chao
c0d973d170 drivers/espi: rts5912: handler all port 80 data until fifo is empty
The rts5912's port 80 has a FIFO. In the ISR (Interrupt Service Routine),
extract the FIFO data until the FIFO is empty, otherwise port 80 data will
be lost.

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-10-28 11:52:58 +02:00
Sylvio Alves
998d9ab04f drivers: crypto: expand mbedTLS shim driver capabilities
Select SHA24, SHA256 and SHA384 as part of the shim driver.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-10-28 11:51:04 +02:00
Sylvio Alves
4b4332ac18 drivers: crypto: return -ENOTSUP when needed
Make sure all crypto driver returns proper error
when feature is not supported.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-10-28 11:51:04 +02:00
Yongxu Wang
b6e7a754d8 drivers: timer: mcux_lptmr: Fix prescaler bypass from devicetree
The previous implementation had a logical error where the prescaler
could never be bypassed due to incorrect use of BIT() macro:

This patch fixes the issue by:

1. Remove BIT() wrapper from LPTMR_PRESCALER macro to use raw
   devicetree property value
2. Update bypass logic to check for zero value explicitly
3. Map DTS values to hardware register values correctly:
   - prescale_glitch_filter = 0 -> bypass prescaler
   - prescale_glitch_filter = n -> divide by 2^n,
     using register value (n-1)

The devicetree semantic is now:
- prescale_glitch_filter = <0>: No prescaling (bypass)
- prescale_glitch_filter = <1>: Divide by 2
- prescale_glitch_filter = <2>: Divide by 4
- prescale_glitch_filter = <3>: Divide by 8
- And so on...

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-10-28 11:49:53 +02:00
Gerard Marull-Paretas
6807fa35a1 drivers: i2c: i2c-priv: document i2c_map_dt_bitrate
Document the helper function.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-10-28 11:49:33 +02:00
Gerard Marull-Paretas
4dd6354a3b drivers: i2c: i2c-priv: drop logging
i2c_map_dt_bitrate uses LOG_ERR, however, one must define (or declare) a
log module where to sink the logs. Since this sits on a header file,
it creates a hidden include order dependency: you must include
i2c-priv.h after registering or declaring a log module on your driver.
Even worse, you are force to use logging in your drivers even if you do
not want to!

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-10-28 11:49:33 +02:00
Khoa Nguyen
bde6bdd168 drivers: flash: Fix Kconfig style for Renesas RA Flash-HP Kconfig
Fix Kconfig style for Renesas RA Flash-HP Kconfig

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-10-28 11:48:44 +02:00
David Jewsbury
55af2824dc drivers: mspi_dw: Add CONFIG_MSPI_DW_DDR
Dual data rate isn't always supported so this
config enables/disables the relevant code in
the driver.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-10-27 16:15:58 -04:00
David Jewsbury
4bf6a75628 drivers: mspi_dw: Edit core disable to after PM init
There is a scenario where a Bus fault occurs as the
power management isn't initialised yet and the core
is attempted to be turned off via the ssienr register.
This commit edits this so the core register is written
to after the initialisation of the power management.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-10-27 16:15:58 -04:00
Erik Andersson
69bfd434e1 drivers: i2c_stm32_v2: fix assert in i2c event isr
For systems where the CPU / NVIC bus are considerably
faster than the peripheral bus used for I2C, there is
a risk that the isr handler returns before I2C controller
had time to clear its interrupt status flags

This would cause immediate re-entry to isr handler
which begins read from ISR register.
During time it take to re-enter and read from ISR register,
flags had time to be cleared
The isr handler expects that a flag is set, and in this case
when its not, an assert is triggered

The solution here is to make a dummy read from the ISR register before
returning from isr handler, this forces CPU to wait as long as needed
to ensure all writes to the I2C peripheral are completed

Fixes issue #97904

Signed-off-by: Erik Andersson <erian747@gmail.com>
2025-10-27 16:15:44 -04:00
Andrzej Głąbek
70fe961223 drivers: mspi_dw: Use uint32_t for dummy_bytes field
Since the driver allows transfer lengths up to `UINT16_MAX + 1` bytes,
and additionally the `dummy_bytes` field includes bytes sent to provide
wait cycles on the bus, the type of this field must be `uint32_t`,
otherwise it can be overflowed for RX transfers close to the maximum.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-10-27 16:15:30 -04:00
Duy Nguyen
a0eb093734 drivers: i2c: Move merge buffer to driver data for RA i2c_sci_b
The merge buffer was previously declared as a static variable, causing it
to be shared across all I2C instances and risking data corruption when
used concurrently. Move the buffer into the driver data to make it
instance-specific and avoid race conditions.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2025-10-27 07:32:20 -04:00
Biwen Li
e11e459b23 drivers: firmware: scmi: add CONFIG_ARM_SCMI_CHAN_SEM_TIMEOUT_USEC
Add option CONFIG_ARM_SCMI_CHAN_SEM_TIMEOUT_USEC
for users to change default timeout value.
Different platform has different delay time when
scmi agent get scmi response from scmi platform.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
2025-10-25 15:59:49 +03:00