Commit graph

28,390 commits

Author SHA1 Message Date
Xiaolu Sun
0ab40913c2 drivers: i2c_sedi: add API to retrieve current configuration
Introduced a API to get the current I2C configuration.
Facilitates runtime inspection of I2C settings.
Useful for debugging and dynamic configuration changes.

Signed-off-by: Xiaolu Sun <xiaolu.sun@intel.com>
2025-10-01 20:24:23 -04:00
Jeppe Odgaard
29d01736d8 drivers: sensor: omron: add d6f driver
Add support for Omron D6F mass flow rate sensor series. The sensor series
outputs an analogue voltage which is read using an ADC.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-10-01 17:14:28 -04:00
Jeppe Odgaard
f8a952f2fe include: drivers: sensor: add flow rate channel
Add flow rate to `enum sensor_channel` in litres per minute.

The SI unit for flow rate is cubic metres per second. Due to a sensor value
resolution of 1/100000 this unit is not granular enough for low flow rate
sensors.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-10-01 17:14:28 -04:00
Rex Chen
e8e4d2159e mcux: wifi_nxp: Enable IMU IRQ after event initialized
After running 'kernel reboot' cmd on coex application,
zephyr os clean bss section, IMU13 IRQ event data set as 0,
then CPU3 receive IMU13 IRQ from CPU1, need access IMU13 IRQ event,
cause hang.
Put enable IMU13 IRQ operation after related task and event created
to fix this issue.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2025-10-01 17:14:15 -04:00
Cla Mattia Galliard
4925e3a221 drivers: sensor: voltage_divider: Use k_timepoint_t for absolute time
Use k_timepoint_t instead of k_timeout_t for absolute time to avoid
ambiguity and ensure the code works even when CONFIG_TIMEOUT_64BIT=n.

Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
2025-10-01 17:13:59 -04:00
Fabian Blatz
a6500f1c48 drivers: sensor: voltage-divider: Add skip-calibration property
Adds a skip-calibration property to the voltage divider sensor,
which can be enabled, in case the underlying ADC driver
does not support calibration.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-10-01 17:13:05 -04:00
Krzysztof Chruściński
7a6c7ea0f9 drivers: serial: nrfx_uarte: Remove redundant pinctrl call
Pinctrl call is redundant as uarte_periph_enable calls it as well.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-10-01 17:12:09 -04:00
Fabrice DJIATSA
fd8035e4f7 drivers: clock_control: stm32: replace pllsai1m with pllsaim
update the function name in driver since pllsai1m was changed
to pllsaim in clock_stm32_ll_common.h.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-10-01 17:11:38 -04:00
Tomasz Moń
c180420477 drivers: udc_dwc2: Fix memory leak on subsequent bus resets
Do not queue new buffer after bus reset if there is one already queued.
This fixes memory leak on each bus reset if there are no SETUP transfers
received between resets.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-10-01 17:21:18 +03:00
Pieter De Gendt
8d94c3b091 drivers: wifi: nrf_wifi: Set device config pointer to NULL
Commit 2de30ff782
moved the driver ops from the config pointer to the API. As the config
pointer isn't used, set it to NULL and allow future updates to actually add
a configuration struct.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-01 17:20:52 +03:00
Johan Hedberg
ca1ee72236 drivers: Fix deprecated SPI_DT_SPEC_INST_GET usage
This macro doesn't accept a delay parameter anymore (well, it does, but
it's deprecated and will trigger build warnings). Just remove it from the
places that were still passing it.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-10-01 17:20:41 +03:00
Johan Hedberg
e3f3b6dca6 drivers: sensor: Fix deprecated SPI_DT_IODEV_DEFINE usage
The delay parameter was removed from this macro, so don't pass it.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-10-01 17:20:41 +03:00
Declan Snyder
82b882faa4 drivers: spi: nxp_lpspi: Use spi_config timing params
Use the timing params from spi_config that are specific to the slave
instead of using the same timing for the controller for all slaves.
Remove these properties from the LPSPI DT binding.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-10-01 14:39:36 +03:00
Declan Snyder
570b445a61 drivers: Convert to use SPI macro without delay parameters
Convert all drivers and other consumers to use SPI macros without the
delay parameters.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-10-01 14:39:36 +03:00
Andrzej Głąbek
ca79733388 drivers: pinctrl_nrf: Add support for SPIM CSN pin function
Certain SPIM instances in nRF52/53/54L/54H Series provide hardware
control of the CSN (chip select) line. Although the standard SPI
drivers do not use this feature, it should be possible to configure
this line through pinctrl in case some special driver needs this.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-10-01 14:37:46 +03:00
Krzysztof Chruściński
767c21a217 drivers: power_domain: nrf_gpio_pad_group: Fix DT macro
DT_PROP_OR instead of DT_INST_PROP_OR was used and property from
device tree was never used.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-10-01 14:36:11 +03:00
Chris Friedt
5dd3bd52c5 drivers: serial: pl011: only declare ambiq pm action when used
The conditions needed to declare `uart_ambiq_pm_action()` in
`uart_pl011_ambiq.h` and the conditions needed to use it in `uart_pl011.c`
differed, which would result in a warning promoted to error during
weekly CI runs.

Ensure that the conditions match to remove the warning / error.

```cpp
if defined(CONFIG_SOC_SERIES_APOLLO3X) || \
  defined(CONFIG_SOC_SERIES_APOLLO5X)
```

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-10-01 08:27:59 +02:00
Ayush Singh
eac11753fc drivers: sensor: ti: ti-hdc20xx: Fix sensor define
- Since ti-hdc20xx is a sensor, it should use SENSOR_DEVICE_* macro for
  definition.
- Allows it to work with sensor_shell properly.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-10-01 08:26:32 +02:00
Pisit Sawangvonganan
f05f886a70 drivers: adc: remove '&' when assigning adc_xxx_init
Remove address-of operator ('&') when assigning `adc_xxx_init`
function pointer in `DEVICE_DT_INST_DEFINE` and `DEVICE_DT_DEFINE` macro.

This change aims to maintain consistency among the drivers in
`drivers/adc`, ensuring that all function pointer assignments
follow the same pattern.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-10-01 08:22:28 +02:00
TOKITA Hiroshi
9bdad1f871 drivers: xen: memory: add acquire_resource wrapper
Add XENMEM_acquire_resource wrapper to map device model related buffers.
This is required for communication with the ioreq server.

- memory
  - xendom_acquire_resource:
    HYPERVISOR_memory_op(XENMEM_acquire_resource)

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-10-01 08:15:36 +02:00
TOKITA Hiroshi
14ac666156 drivers: xen: change gnttab_[get|put]_pages for multi-page support
Replace `gnttab_get_page()`/`gnttab_put_pabes(addr)` with
`gnttab_get_pages(npages)`/`gnttab_put_pages(addr, npages)`
for supporting multi-page operation.

Note: This is a breaking change, update callers accordingly.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-10-01 08:14:47 +02:00
Wai-Hong Tam
7e195a9481 drivers: led_strip: Add UART-based driver for WS2812
This commit introduces a new driver for WS2812 and compatible LED
strips that uses a UART peripheral.

The driver generates the precise, high-speed signal required by the
WS2812 protocol by encoding each data bit into a multi-bit "symbol"
and using a frame-aware packing strategy for transmission:
 - Signal Inversion: The UART's TX line must be inverted (tx-invert)
   to create the protocol's required idle-low signal. A UART start
   bit then generates the initial high pulse of a WS2812 bit.
 - Frame-Aware Packing: The driver reuses the UART's hardware-
   generated start and stop bits as the first and last bits of the
   on-wire symbol. The inner bits of the symbol are packed into the
   UART data payload.

This packing scheme imposes a configuration constraint: the total
number of bits in a UART frame (1 start + N data + 1 stop) must be
an integer multiple of the symbol's length (bits-per-symbol).

Signed-off-by: Wai-Hong Tam <waihong@google.com>
2025-09-30 22:06:21 +02:00
Lin Yu-Cheng
1c902e5ac1 adc: rts5912: implement power management
Reduce RTS5912 ADC power consumption

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-09-30 22:05:32 +02:00
Miika Karanki
1856a03fc7 drivers: gpio: shell: fix asan reported oob error
ASAN reports error with native_sim after "gpio info <TAB>":
   runtime error: index 1 out of bounds for type 'gpio_ctrl [1]'

So, although the dev pointer was not used, don't even read it
from out-of-bounds of gpio_list.

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
2025-09-30 21:59:05 +02:00
Luis Ubieda
e868e01c1f sensor: fix: Add missing iodev const on zvrfy handler
Was forgotten on #96245. Fixes: #96668.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-09-30 19:37:41 +02:00
Andrzej Głąbek
6360c7f67c drivers: usb: udc: Fix VBUS ready timeout dependency in Kconfig.dwc2
This is a follow up to commit 4fe2c5bd5f.

The UDC_DWC2_USBHS_VBUS_READY_TIMEOUT Kconfig option should be available
also for nRF92 Series SoCs (as it was previously when it depended on
NRFS_HAS_VBUS_DETECTOR_SERVICE), otherwise some builds will fail for
such targets.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-09-30 19:37:31 +02:00
Raffael Rostagno
f4cdf08e28 drivers: bt: esp32h2: Add support
Add BT-HCI support to ESP32-H2.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-09-30 19:37:19 +02:00
Luis Ubieda
110e315fdc rm3100: decoder: fix missing const while edata buffer casting
To suppress compliance warnings.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-09-30 19:37:10 +02:00
Luis Ubieda
ff7a350d9c rm3100: decoder: fix trigger detection on data-ready
Otherwise we'd always return false in spite of the flag being set in
the encoded data, which may lead to the user not reading the underlying
data in an event-paced readout scheme.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-09-30 19:37:10 +02:00
Mathieu Choplain
092a0820c4 drivers: usb: udc: stm32: enhance PHY type & operating speed determination
Rework how the STM32 UDC driver determines the PHY used by a given instance
and the speed at which the instance is able to and allowed to operate.

The PHY determination now uses the 'phys' property instead of looking at
whether nodes with a specific compatible were enabled. Similarly, the speed
determination takes into account the 'maximum-speed' property, along with
the selected PHY's and the instance's capabilities.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-09-30 19:36:55 +02:00
Mathieu Choplain
e31ddec781 drivers: usb: udc: stm32: rework PWR and PHY initialization
Rework how the driver performs PWR configuration and initializes HS PHYs.

Originally, the initialization logic was split in half without any real
logic. There were also attempts to share some logic but this resulted in
code that was difficult to understand.

Initialize PWR and PHY in well separated steps, and use explicit series
and PHY type checks in each part to ensure the logic is easy to understand.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-09-30 19:36:55 +02:00
Mathieu Choplain
7ec83e5c95 drivers: usb: udc: stm32: use HAL PCD macros for speed
Rework the STM32 USB UDC driver to use HAL PCD macros for speed selection,
as should have always been done since that is the library used by the shim
driver. Also dummy definitions to ensure cross-series compatibility
without many #if blocks in the driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-09-30 19:36:55 +02:00
Martin Gysel
a7df9e9860 drivers: udc_stm32: select Kconfig option UDC_DRIVER_HAS_HIGH_SPEED_SUPPORT
The driver supports high-speed capable controllers. Select
the appropriate Kconfig options to ensure that the stack does
not optimize away high-speed support.

Signed-off-by: Martin Gysel <me@bearsh.org>
2025-09-30 19:36:55 +02:00
Andrew Perepech
a75d6a40b6 drivers/timer: Fix build error when run by twister
Fix undefined reference to z_sys_timer_irq_for_test

Signed-off-by: Andrew Perepech <andrew.perepech@mediatek.com>
2025-09-30 19:36:47 +02:00
Andrew Perepech
fc8c17fd23 drivers/timer: Fix timer IRQ enable bit on MT818X and MT8195
MT818X and MT8195 use the same timer IRQ enable bit as MT8196

Signed-off-by: Andrew Perepech <andrew.perepech@mediatek.com>
2025-09-30 19:36:47 +02:00
Andrew Perepech
87a449762d drivers/timer: Fix timer clock source initialization for MT818X
Fix timer clock source initialization for MT8188, MT8186 platform.
Add 26Mhz define that is specific for MT818X.

Signed-off-by: Andrew Perepech <andrew.perepech@mediatek.com>
2025-09-30 19:36:47 +02:00
Erik Andersson
5ad9494835 drivers: i2c_stm32_v2: Abort on DMA error
If configuration of DMA is unsuccessful then
abort transaction and return with an error code

Signed-off-by: Erik Andersson <erian747@gmail.com>
2025-09-30 17:59:04 +03:00
Erik Andersson
624d9c143a drivers: i2c_stm32_v2: Refactor end of master transfer
The stm32_i2c_master_mode_end function can be
replaced with a simple irq disable and giving to
the device sync semaphore

Signed-off-by: Erik Andersson <erian747@gmail.com>
2025-09-30 17:59:04 +03:00
Erik Andersson
789e1d2d43 drivers: i2c_stm32_v2: Bus error errata fix
Don't abort transaction on bus error in master mode
according to errata sheet

Signed-off-by: Erik Andersson <erian747@gmail.com>
2025-09-30 17:59:04 +03:00
Erik Andersson
a3e63022c0 drivers: i2c_stm32_v2: DMA fixup
Adapt DMA implementation to match changes
introduced by new interrupt handler

Signed-off-by: Erik Andersson <erian747@gmail.com>
2025-09-30 17:59:04 +03:00
Erik Andersson
b4aa7e7087 drivers: i2c_stm32_v2: Remove obsolete functions
stm32_i2c_msg_read and stm32_i2c_msg_write
for interrupt mode is replaced by a common
function: stm32_i2c_irq_xfer

Signed-off-by: Erik Andersson <erian747@gmail.com>
2025-09-30 17:59:04 +03:00
Erik Andersson
34b756f803 drivers: i2c_stm32_v2: Rework interrupt handler
- Rework transaction flow  to better match reference manual
and errata sheet for STM32 I2Cv2 peripheral
- Handle message transactions larger than 255 bytes in isr
- Combine stm32_i2c_msg_write and stm32_i2c_msg_read into
one common function stm32_i2c_irq_xfer when using interrupts

Signed-off-by: Erik Andersson <erian747@gmail.com>
2025-09-30 17:59:04 +03:00
Erik Andersson
066bb5f30e drivers: i2c_stm32_v2: Add DMA helpers
To prepare for further patches and separation
of interrupt/DMA modes from polled, this commit
introduces two helpers for starting and stopping
DMA transfers

Finsishing DMA transfers are also moved from
interrupt handlers to thread after beeing wokenen
by semaphore

Signed-off-by: Erik Andersson <erian747@gmail.com>
2025-09-30 17:59:04 +03:00
Jilay Pandya
cf3dddf573 drivers: stepper: step_dir: fix 87698
During testing with teensy 4.0 it was discoverd that toggling
at high frequencies led to missed steps. As per the datasheets
of step-dir drivers an active edge needs to be maintained for
a certain timerperiod, for a step to be executed.

Instead of toggling pin twice instantaneously, the current fix
halves the step period and the step-pin is toggled on the timeout
of the respective timing source.

rework stepper stepper stop

set step pin to low if the driver does not support dual edge
and increment/decrement the actual position by one

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-09-30 17:58:27 +03:00
Andrzej Głąbek
f0f5f8cdef drivers: mspi_dw: Fix race condition in RX interrupt handling
Refactor a bit the RX FIFO handling to prevent RX transfers performed
in Single IO mode from getting stuck when they are suspended due to
the empty TX FIFO and cannot be resumed because there is no further
interrupt in which the TX FIFO could be filled properly with dummy
bytes above its transfer start level.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-09-30 17:57:29 +03:00
Henrik Brix Andersen
24f473fef8 drivers: usb: udc: sam0: do not select CONFIG_SYS_MEM_BLOCKS
Do not select CONFIG_SYS_MEM_BLOCKS when enabling the Atmel SAM0 USB device
controller driver as the implementation does not use the system memory
blocks allocator.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-09-30 15:28:16 +03:00
Erwan Gouriou
522bfd5b56 drivers: ethernet: stm32: #include sections cleanup
Clean up headers includes section:
- Remove conditional inclusions
- zephyr/, then susbystem/, standardlib, locals
- Sort alphabetically within these categories
- Remove the ones already available through _priv.h

Noticeable exception, lldp.h requires prior net_pkt.h inclusion

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-09-30 15:27:23 +03:00
Erwan Gouriou
ca6e25a03f drivers: ethernet: Move back hal_init_v2 to driver init
Since phy init is not in this function anymore, it can be moved back
to driver initialization function.

While I'm at, harmonize v1/v2 flavors of the function.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-09-30 15:27:23 +03:00
Erwan Gouriou
03eafc5381 drivers: ethernet: stm32: Remove eth_stm32_get_iface
Now that the function is not static anymore, it just adds useless overhead.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-09-30 15:27:23 +03:00
Erwan Gouriou
967f554598 drivers: ethernet: stm32: Rename functions that are not static anymore
To be able to split code, some functions were removed their static
attribute, which opens the possibility of name conflict.
Rename them by adding eth_stm32_ prefix.

Additionally, review their sorting in the header file.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-09-30 15:27:23 +03:00