Commit graph

25,525 commits

Author SHA1 Message Date
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
Erwan Gouriou
d1d1e5744f drivers: ethernet: stm32: Split v1 and v2 code
Split V1 and V2 code from the common file of STM32 ethernet
driver.
Whenever it is possible, make use of v1 or v2 version of functions
that are call from the common file in order to maximize factorization.

Review definitions to put them where they are used.
Review header inclusions to minimize them.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-09-30 15:27:23 +03:00
Erwan Gouriou
2f23eb2c98 drivers: ethernet: stm32: Split ptp functions into a dedicated source file
In an effort to make stm32 eth driver files easier to read and maintain,
split the ptp code in a dedicated file.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-09-30 15:27:23 +03:00
Erwan Gouriou
b1a9e39006 drivers: ethernet: Rename eth_stm32_hal.c to eth_stm32hal_common.c
Keep the history on the common file before splitting v1 and v2 code from
it.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-09-30 15:27:23 +03:00
Erwan Gouriou
4429626758 Revert "drivers: ethernet: rename eth_stm32_hal.c -> eth_stm32_hal_v2.c"
This reverts commit 678e226045.
This commit was part of PR 94142 which has been merged
while a discussion was still on going on the right direction
between splitting V1 and V2 or keeping a common file.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-09-30 15:27:23 +03:00
Erwan Gouriou
88298ae555 Revert "drivers: ethernet: eth_stm32 v1/v2 are placed in separate files"
This reverts commit 29750ac05d.
This commit was part of PR 94142 which has been merged
while a discussion was still on going on the right direction
between splitting V1 and V2 or keeping a common file.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-09-30 15:27:23 +03:00
Armin Kessler
3b3f283b3f driver: video: esp32: add set/get_frmival callbacks
forward set/get_frmival api calls to source device.

Signed-off-by: Armin Kessler <ake@espros.com>
2025-09-30 15:27:12 +03:00
Pieter De Gendt
c3bb498f86 drivers: sensor: st: iis3dwb: Update RTIO callbacks with result argument
Commit bc8d66d538931e650dd2855fabe768720dcb4b02 introduced a
result argument to some RTIO callback handlers. Update for the IIS3DWB
sensor.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-09-30 15:26:27 +03:00
Fin Maaß
4a69c1b8a8 drivers: serial: litex: add support for rx-fifo-rx-we
add support for rx-fifo-rx-we, whci got added to
LiteX in https://github.com/enjoy-digital/litex/pull/2319

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-09-30 11:03:15 +02:00
Fin Maaß
a39ab55c9d drivers: serial: litex: only ack tx event, when full
only ack tx event, when full, so we don't
have to fill the fifo with zeros as a workaround.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-09-30 11:03:15 +02:00
Fin Maaß
087cb96025 drivers: serial: litex: remove redundant rx pending
flushing rx pending already happens in
uart_litex_fifo_read, which should be called
by the callback, so don't do it again, also
it can lead to the drop of chars, as flushing
removes the current entry in the fifo.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-09-30 11:03:15 +02:00
Luis Ubieda
91c57f1eca icm45686: stream: Add missing INT disable on error completion
Multi-shot request should re-enable it shortly.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-09-30 11:02:12 +02:00
Luis Ubieda
63fe2def28 icm45686: stream: Optimize stream data-handling
Process all in one callback, in order to reduce latency.
The following changes have been done:
- Process FIFO read-out and/or Data-ready in GPIO callback.
- FIFO Full is handled on completion if needed.
- Omit fifo-count fetching, to optimize cycles. The watermark
count is the number of samples we're going for.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-09-30 11:02:12 +02:00
Luis Ubieda
9c4d1c5c4c icm45686: stream: Only enable GPIO interrupts when stream is active
Otherwise a lot of spurious callbacks may trigger shortly after
rebooting.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-09-30 11:02:12 +02:00
Luis Ubieda
214bdfd31a icm45686: rtio: Expand bus RTIO queue size
To handle streaming under stress scenario.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-09-30 11:02:12 +02:00
Luis Ubieda
60eceef41b icm45686: stream: Improve tracking of state transitions
By introducing three states: Off -> On -> Busy -> (Offf)

This allows us to more clearly guard on-going events and detect
overlapping triggers.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-09-30 11:02:12 +02:00