Commit graph

28,390 commits

Author SHA1 Message Date
Jerzy Kasenberg
7d88f4e886 smartbond_timer: Correct rounding in sys_clock_elapsed
The CYC_TO_TICK macro converts hardware cycles to
system ticks. Smartbond timers can be driven by XTAL32,
RC32K, or RCX sources. At the application level,
tests use milliseconds, which introduces rounding when
converting to hardware cycles.

Previously, CYC_TO_TICK rounded up, causing sys_clock_elapsed()
to sometimes report one extra tick. This value, propagated
through z_add_timeout() via elapsed(), was then used by tests
to determine the current time and the next wake-up point.
As a result, sleep duration was shortened by one tick,
leading to an unnecessary extra wake-up detected by the test.

With this fix, sys_clock_elapsed() no longer reports ticks
that have not fully elapsed, ensuring accurate sleep timing.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg.xr@bp.renesas.com>
2025-11-20 06:01:14 -05:00
Hardevsinh Palaniya
c784481ca0 drivers: video: Add ov5642 camera driver
Add driver to support ov5642 camera sensor

Co-developed-by: Rutvij Trivedi <rutvij.trivedi@siliconsignals.io>
Signed-off-by: Rutvij Trivedi <rutvij.trivedi@siliconsignals.io>
Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io>
2025-11-19 15:57:05 -05:00
Jerzy Kasenberg
7979dd77e9 drivers: clock_control: smartbond: Move calibration to DT
Calibration interval was specified in Kconfig now
configuration is moved to device tree.
This allows to have different values for RCX and RC32K.

While calibration is vital for correct system timing, it
periodically schedules work that measures frequency of RCX or
RC32K.

Now it's also possible to set calibration interval to 0
to prevent calibration entirely. This may be useful for
scheduling tests that are sensitive to number of active
threads.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg.xr@bp.renesas.com>
2025-11-19 15:55:40 -05:00
Mathieu Choplain
ee71b30106 drivers: usb: udc: stm32: inline priv_pcd_prepare
`priv_pcd_prepare` now only consumes per-instance information or constants.
Instead of calling it indirectly through a function pointer, it could be
called directly, but since it is very shorted and used from only one place,
inline it instead.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-11-19 15:53:55 -05:00
Mathieu Choplain
70efb293ce drivers: usb: udc: stm32: move base address to instance configuration
Instead of consuming the DT property directly, save the USB controller base
address in the instance configuration block and retrieve it at runtime.
This makes the driver more instance-aware.

While at it, cleanup `priv_pcd_prepare` to always consume the property
(through the instance configuration) instead of sometimes using the base
address from CMSIS.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-11-19 15:53:55 -05:00
Mathieu Choplain
ea07796a2d drivers: usb: udc: stm32: move IRQn to instance configuration
Move the controller's IRQn from instance data to instance configuration,
and update all consumers accordingly. One instance which used the global
UDC_STM32_IRQ is also updated to consume the per-instance field instead.

While at it, add missing comments for certain fields of the configuration.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-11-19 15:53:55 -05:00
Chun-Chieh Li
7f6fc2ee4b drivers: can: support nuvoton m333x series
Add support for Nuvoton's M3331 series SoC

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-11-19 09:14:13 -05:00
Tomasz Leman
18b34bb3d2 drivers: power_domain: intel_adsp: Refactor power management initialization
This patch refactors the power management initialization for the Intel
ADSP power domain driver to align with the recommended practices
outlined in the documentation. The changes include:

1. Replacing the manual power management initialization sequence
   (`pm_device_init_suspended` + `pm_device_runtime_enable`) with a call
   to `pm_device_driver_init` in the `pd_intel_adsp_init` function.
2. Adding the `zephyr,pm-device-runtime-auto` property to the power
   domain nodes in the device tree files for ACE15, ACE20, ACE30, and
   ACE40.

These changes ensure that the power domain driver is initialized with
the appropriate power management state and that runtime power management
is automatically enabled based on the device tree configuration. The
functionality of the power management state remains unchanged, ensuring
consistent behavior.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2025-11-19 06:55:12 -05:00
Jiafei Pan
6c27ec126b drivers: clock_control_mcux_ccm_rev2: add imx91 enet support
Add ENET clock support for i.MX91.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-11-19 06:54:54 -05:00
Felix Wang
c826167f5b drivers: counter: support multiple interrupts for LPIT
For devices like MCXE247, the LPIT instance hase multiple
interrupts, however the current  driver code just support
one interrupt. This patch has improved the code for this
requirement.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2025-11-19 06:53:31 -05:00
Andrzej Głąbek
68fab5fd2c drivers: flash: nrf_qspi_nor: Fix compilation with QER set to NONE
This is a follow-up to commit d1abe40fb0.

Function `qspi_wait_while_writing()` (and also `qspi_rdsr()` that is
called by it) is now always required for `qspi_erase()`, so it can no
longer be under `#if !IS_EQUAL(INST_0_QER, JESD216_DW15_QER_VAL_NONE)`.

Also definition of `dev_config` in `configure_chip()` needs to be moved,
as for QER set to NONE, it is not used and causes a compilation warning.

Add a test case that will ensure the driver can be built successfully
with `quad-enable-requirements = "NONE"`.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-11-19 06:53:20 -05:00
Elmo Lan
95aa209226 driver: gpio: Add sleep delay in gpio isr
When EC wakes by GPIO, it may fall back to SUSPEND_TO_IDLE
before the host or peripherals have a chance to take further action.

Add a lightweight delay-sleep mechanism to keep system awake
for as short period after a GPIO wake event.

Signed-off-by: Elmo Lan <elmo_lan@realtek.com>
2025-11-19 06:52:59 -05:00
Adam Kondraciuk
dfff593b77 drivers: timer: nrf_grtc_timer: Add system_clock_disable implementation
Add implementation of `sys_clock_disable` function for GRTC timer.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-11-19 06:52:24 -05:00
Pieter De Gendt
bb19a9bdb7 drivers: flash: shell: Use timing functions for speed tests
Use the timing functions to increase the accuracy of the flash speed
measurements.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-11-19 06:52:08 -05:00
Qingsong Gou
339cd882f7 drivers: clock_control: sf32lb: fix clock selection error
Fix clock selection error

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2025-11-19 06:51:54 -05:00
Qingsong Gou
7a928a3c4e drivers: sensor: sifli: add sf32lb temp sensor
Add temp sensor driver for sf32lb platform

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2025-11-18 19:52:37 -05:00
Nicolas Pitre
90afb8f429 drivers: pm_cpu_ops: Add Arm FVP CPU power management driver
Add a new PM CPU ops driver for Arm Fixed Virtual Platform (FVP) that
enables bare metal SMP support without Arm Trusted Firmware (ATF).

The driver provides CPU power-on and system reset operations by directly
interfacing with FVP's power controller (PWRC) and V2M system registers.

The implementation includes RVBAR_EL3 configuration to redirect
secondary CPU reset vectors to Zephyr's image header, enabling
proper SMP initialization without firmware assistance.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-11-18 17:49:40 -05:00
John Batch
1d1e2dc140 Drivers: DMA: Infineon PSE84: Adding DMA PDL based driver for pse84
Adds Infineon Cat1 PDL based driver for DMA.

Signed-off-by: John Batch <john.batch@infineon.com>
2025-11-18 17:49:09 -05:00
John Batch
62ca912c47 modules: hal_infineon: DMA cmake lists update
Updates DMA includes from the modules needed for DMA PDL based driver
implementation.
Cleans up cmake to use only USE_INFINEON_DMA Kconfig option to select
dma files from PDL/HAL.

Signed-off-by: John Batch <john.batch@infineon.com>
2025-11-18 17:49:09 -05:00
William Tang
0c4abcdd29 drivers: can: mcux: flexcan: support Enhanced CAN Bit Timing registers
Some FlexCAN devices have enhanced bit timing registers (EPRS ENCBT EDCBT)
with extended timing configuration ranges and different behavior compared
to standard bit timing registers.

This change adds proper support for these enhanced registers, utilize full
bit timing capabilities.

Key differences for enhanced bit timing registers:
- Extended timing ranges with larger maximum values for sjw, phase_seg1,
  phase_seg2, and prescaler fields
- No propagation segment configuration support, so prop_seg must be 0
- prop_seg value is used directly without the typical 'minus 1' adjustment

The implementation adds conditional compilation based on the
`FSL_FEATURE_FLEXCAN_HAS_ENHANCED_BIT_TIMING_REG` feature flag.
For Enhanced registers, use extended timing limits and prop_seg directly.

Test this commit on mimxrt1180_evk/mimxrt1189/cm33 drivers.can.timing
test case, and enable `TEST_ALL_BITRATES` Kconfig symbol.

Signed-off-by: William Tang <william.tang@nxp.com>
2025-11-18 17:45:06 -05:00
Lin Yu-Cheng
c6b8128ac7 drivers: spi: add spi driver for rts5912
Add spi driver for Realtek rts5912

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-11-18 17:44:43 -05:00
Yong Cong Sin
a028d8fafc driver: i2c: i2c_dw: clear block mode on init
Depending on the IP's `IC_TX_CMD_BLOCK_DEFAULT` parameter, we
might have to clear the `TX_CMD_BLOCK` bit on init so that
Controller mode works.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2025-11-18 17:44:10 -05:00
Declan Snyder
687935bb68 drivers: spi_mcux_flexcomm: Abbreviate ctx
I was getting real tired of typing this out, can't believe it hasn't
already been done.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-11-18 17:42:34 -05:00
Declan Snyder
7cb3fca42e drivers: spi_mcux_flexcomm: Fix length unit mixups in DMA path
This driver had a lot of regressions introduced by commits that were
clearly mixing up what values had units of bytes and what values had
units of words. Fix the issues in the DMA path of the driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-11-18 17:42:34 -05:00
Declan Snyder
93b766f4f8 drivers: spi_mcux_flexcomm: Remove asserts
The asserts are hard to debug and unrecoverable, they just say kernel
panicked but difficult to realize where and why, it's better to return
an error and log message clearly from spi driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-11-18 17:42:34 -05:00
Declan Snyder
45cade7822 drivers: spi_mcux_flexcomm: Remove wrong assert
It is not illegal to provide an RX len with no buffer.
It just means the controller should clock out that many
words but not store them in memory. So remove the assert
and just avoid null dereference.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-11-18 17:42:34 -05:00
Declan Snyder
d3818d4365 drivers: spi_mcux_flexcomm: Refactor get_last_tx_word
Refactor this function to return an error code, instead of assert.
Put the data into a pointed argument instead.
Refactor other functions to make sure to
propogate this error all the way up the call stack.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-11-18 17:42:34 -05:00
Declan Snyder
2a7f651c1f drivers: spi_mcux_flexcomm: Skip xfer if empty
If the transfer is empty we do nothing. Avoids assert in later code
paths.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-11-18 17:42:34 -05:00
Andrej Butok
9e0012b313 drivers: gpio: nxp: fix gpio_mcux_lpc_configure()
- Enables Digital mode for both input and output GPIO
  pins, in gpio_mcux_lpc_configure().
- Fixes #99255

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-11-18 17:38:58 -05:00
Siddhant Modi
1d2448e979 drivers: eeprom: mb85rsxx: Adding support for new product ID
This commit adds support for the 0x40 product ID
needed by the MB85RSMTA version of the chip.

Signed-off-by: Siddhant Modi <siddhant.modi@gmail.com>
2025-11-18 17:38:39 -05:00
Pisit Sawangvonganan
489b8a386c drivers: gpio_stm32: consolidate *pincfg writes
Use a local accumulator (`cfg`) to build the pin configuration and commit
it to `*pincfg` only once. This keeps intermediate values in registers,
reduces RAM write traffic.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-11-18 17:36:49 -05:00
Ayush Singh
9f4a0153b8 dts: arm64: ti: ti_am62x_a53: Use GPIO Proxy
After trying out a few different approaches, I think having separate
nodes for each bank in devicetree and having a GPIO proxy node for the
controller is the best solution right now.

To be more specific, GPIO proxy solution still allows for bank level
GPIO toggling. The linux kernel GPIO davinci driver is currently limited
to single pin operations. This might not be a problem in Linux, but I
feel like embedded systems would prefer having support for bank level
operations.

This also does not pose a problem for the future implementation of
interrupts due to that fact that the interrupt router is separate device
and will require a separate driver. In fact, the GPIO interrupt router
is shared between main_gpio0 and main_gpio1.

This patch also reverts the previous bank offset related work on GPIO
davinci driver.

The patch has been tested on PocketBeagle 2.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-11-18 10:47:20 -05:00
Seppo Takalo
1d9947188d drivers: modem_cellular: Update nRF91 Serial Modem PPP script
nRF91 Serial Modem application does not anymore start PPP automatically.
Update initialization script to request it.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-11-18 08:13:09 -05:00
Jakub Klimczak
f16f3f641e zvfs: Move fdtable into ZVFS
The file descriptor table is used in every area that expects to work on
files through descriptor indices. It can only be operated on through
functions whose names indicate a relationship with ZVFS (`zvfs_*fd*`).
The integer file descriptor mechanism shouldn't be separate from ZVFS.
This will make cooperation between different file access APIs much
simpler. This commit also makes preparations for the fdtable becoming
optional.

Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
2025-11-18 08:12:19 -05:00
Simon Maurer
c7fc608633 drivers: i2c: i2c_xilinx_axi: switch to DEVICE_MMIO API
Switch the Xilinx AXI I2C device driver to use the DEVICE_MMIO_...
macros instead of directly using the physical base address from the
device tree. This allows the driver to work on SoCs with an MMU,
such as the Zynq-7000.

Signed-off-by: Simon Maurer <mail@maurer.systems>
2025-11-18 08:11:16 -05:00
Jamie McCrae
09d520cbd0 drivers: i2c: i2c_nrfx_twi: Fix not guarding deinit function
Fixes an issue with an unused function being defined if
CONFIG_DEVICE_DEINIT_SUPPORT was disabled

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-11-18 08:09:24 -05:00
Jamie McCrae
828183f45a drivers: spi: spi_nrfx_spim: Fix not guarding deinit function
Fixes an issue with an unused function being defined if
CONFIG_DEVICE_DEINIT_SUPPORT was disabled

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-11-18 08:09:24 -05:00
Jamie McCrae
6a07d96b5f drivers: serial: uart_nrfx_uarte: Fix not guarding deinit function
Fixes an issue with an unused function being defined if
CONFIG_DEVICE_DEINIT_SUPPORT was disabled

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-11-18 08:09:24 -05:00
Pete Johanson
fbf04aa1c8 drivers: adc: shell: add support for ADI AD7124 ADCs
Include the correct compatible for the ADI AD7124 family of ADCs.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2025-11-18 11:22:06 +01:00
Mario Paja
4727f602da drivers: i2s: stm32 sai add sai disable function
This change introduces sai disable at the end of stream or
in an event of an error. It disables SD, FS and SCK.

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2025-11-18 11:20:42 +01:00
Armando Visconti
a920a8b966 modules/hal_st: Align to stmemsc HAL i/f v2.11.1
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v2.11.1

Requires https://github.com/zephyrproject-rtos/hal_st/pull/27

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-11-18 11:17:41 +01:00
Mark Wang
3daddb836f drivers: usb: udc: mcux: force ehci speep as FS
When CONFIG_UDC_DRIVER_HIGH_SPEED_SUPPORT_ENABLED is disabled, force
configure ehci controller to work as FS.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-11-17 16:42:27 -05:00
Jukka Rissanen
55c49cdb8f net: Convert wifi drivers to use renamed network APIs
Rename network symbols in wifi drivers to use the renamed
network APIs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-17 14:01:32 -05:00
Jukka Rissanen
bf5af88589 net: Convert usb drivers to use renamed network APIs
Rename network symbols in usb drivers to use the renamed network APIs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-17 14:01:32 -05:00
Jukka Rissanen
b5588ed684 net: Convert modem drivers to use renamed network APIs
Rename network symbols in modem drivers to use the renamed
network APIs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-17 14:01:32 -05:00
Jukka Rissanen
985d1c0351 net: Convert IEEE 802.15.4 drivers to use renamed network APIs
Rename network symbols in IEEE 802.15.4 drivers to use the renamed
network APIs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-17 14:01:32 -05:00
Jukka Rissanen
e6daacf3c9 net: Convert Ethernet drivers to use renamed network APIs
Rename network symbols in Ethernet drivers to use the renamed network APIs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-17 14:01:32 -05:00
Jukka Rissanen
d67611a908 net: Convert network drivers to use renamed network APIs
Rename network symbols in net drivers to use the renamed network APIs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-17 14:01:32 -05:00
Richard Skriwanek
ffa8d6cacf drivers: clock_control: stm32: fix configuration for stm32u3
A change was introduced in how stm32 timers clocks are defined
to have multiple clock definitions.
This change was not handled in the stm32u3 series driver
(which had no timers defined in the dts at all).
This fix ports the required code to the stm32u3 mcu.

Signed-off-by: Richard Skriwanek <richy@fnc.at>
2025-11-17 13:48:31 -05:00
Josuah Demangeon
30950b888d style: drivers: sort Kconfig and CMake includes
Use the "zephyr-keep-sorted-start/stop" comment to have CI check
the alphabetical order of includes, to help reducing the chance
of conflicts while contributing drivers.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-11-17 13:48:03 -05:00