Commit graph

28,390 commits

Author SHA1 Message Date
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
Luis Ubieda
b87f0ffbf3 icm45686: stream: Remove run-time variability of samples on FIFO WM
Since the driver knows how many samples it wants (because of the
watermark threshold), stick to that per event in order to facilitate
batches of N number of samples.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-09-30 11:02:12 +02:00
Luis Ubieda
836e6fb882 icm45686: stream: Remove memset when completing stream event
As it's not required, so we rather spare the cycles.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-09-30 11:02:12 +02:00
Luis Ubieda
ea708cf9e1 icm45686: Add warning log when event triggered while busy
In order to detect when events are being missed.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-09-30 11:02:12 +02:00
Luis Ubieda
7921ca4090 icm45686: stream: Add missing call to drop RTIO Bus queue when full
Not handled otherwise.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-09-30 11:02:12 +02:00
Luis Ubieda
fdc359547b icm45686: stream: Refactor completion actions through helper function
In order to simplify code-logic.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-09-30 11:02:12 +02:00
Luis Ubieda
532c80a764 icm45686: Replace assert for check-if when buffer alloc fails
In order to allow the error-handling scheme to take action, instead
of crashing when asserts are enabled. Now possible since we have RTIO
error handling for streaming mode.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-09-30 11:02:12 +02:00
Luis Ubieda
bab0723972 icm45686: Update RTIO bus API to simplify async transfers
Similar pattern applied to other in-tree sensor drivers, where
preparing a set of SQEs for writing/reading on registers is a recurrent
syntax.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-09-30 11:02:12 +02:00
Armando Visconti
b390cbd6b2 drivers/sensor: iis3dwb: add streaming capabality
Add read_and_decode streaming APIs support.

Triggers supported:
    - SENSOR_TRIG_FIFO_WATERMARK
    - SENSOR_TRIG_FIFO_FULL
    - SENSOR_TRIG_DATA_READY

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-09-30 11:01:12 +02:00
Armando Visconti
93a30e7806 drivers/sensor/st: add support to IIS3DWB accel
The IIS3DWB is a system-in-package featuring a 3-axis digital vibration
sensor with low noise over an ultrawide and flat frequency range.
The wide bandwidth, low noise, very stable and repeatable sensitivity,
together with the capability of operating over an extended temperature
range (up to +105 C), make the device particularly suitable for vibration
monitoring in industrial applications.

Datasheet: https://www.st.com/en/mems-and-sensors/iis3dwb.html

This driver is currently only supporting the polling-mode read_and_decode
APIs (both blocking and non-blocking).

This driver is based on stmemsc HAL i/f v2.9.1.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-09-30 11:01:12 +02:00
Tobias Kässer
9cbcdda587 drivers: sensor: adxl345: Add support for motion trigger
Adding minimal support for using motion trigger interrupts
with the adxl345

Signed-off-by: Tobias Kässer <t.kaesser@gmail.com>
2025-09-30 11:00:14 +02:00
Anthony Williams
e6ff45d38a sensor: rm3100: Add support for SPI
Add support for SPI

Signed-off-by: Anthony Williams <anthony289478@gmail.com>
2025-09-30 10:59:21 +02:00
Bill Waters
95dc13d1e1 drivers: i2c: add pdl driver for Infineon devices
- Add the pdl-based version of the i2c driver for infineon devices
  like the one found on the kit_psc3m5_evk board.
- In the pull request review it was decided that the
  I2C_INFINEON_CAT1_ASYNC option was not needed.  The driver would
  always be interrupt driven.  This meant that the existing driver
  had to be updated as well.

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2025-09-30 10:58:31 +02:00
Seppo Takalo
b8541c53ee modem: modem_cellular: Allow PPP interface to wake up the device
Allow PPP device to wake up the underlying cellular modem.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-09-29 12:47:57 -04:00
Rafał Kuźnia
3d63165050 drivers: ieee802154: nrf5: Remove temporary API migration code
The new nrf-802154 now has the updated API signatures. The migration
code is no longer needed.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2025-09-29 12:47:02 -04:00
Hake Huang
fc23368673 driver: display: fix a return error on display_hx8394
hx8394_mipi_tx will return write size, so this can not used to
return init call.

fixes: #96547

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2025-09-29 12:46:43 -04:00
Frederik Wenigwieser
697e7f6189 drivers: spi: spi_esp32_spim: fix rtio include
Add missing include.

Signed-off-by: Frederik Wenigwieser <zephyr@frederik.at>
2025-09-29 12:44:59 -04:00
Pablo Bacho
7c175a1664 drivers: i2c: stm32: make transfer timeout configurable
Make the STM32 I2C transfer timeout configurable via Kconfig.

- Add CONFIG_I2C_STM32_TRANSFER_TIMEOUT_MSEC Kconfig symbol.
- Use this Kconfig value in both STM32 I2C drivers.

Tested on STM32WBA55CG.

Fixes: #95819

Signed-off-by: Pablo Bacho <pablobacho@gmail.com>
2025-09-29 12:44:39 -04:00
Daniel Leung
0b3b6f30a3 ipm: remove the Intel Audio DSP CAVS host IPM driver
This IPM driver is not being used by SOF and is there simply for
a test which does not provide much additional value compared to
the existing host IPC tests. That IPM specific test has been
removed so there is no need to keep this driver in the tree.
This is in preparation to rewrite the host IPC driver to utilize
the IPC API. There is no need to maintain another driver that is
not being used in SOF.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-09-29 12:42:00 -04:00
Gerard Marull-Paretas
4b4dcbbf4a drivers: dma: sf32lb: add initial driver
Add an initial driver for SiFli SF32LB DMAC DMA controller.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-09-29 12:40:15 -04:00
Pieter De Gendt
5b2e2afbdc drivers: display: st7701: Add PM actions
Add resume/suspend power management actions.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-09-29 12:39:47 -04:00
Tim Pambor
6e048bc068 drivers: hwinfo: native: report reset cause
Support reporting the reset cause for native_sim. The default is to
report POR (Power-On Reset). If CONFIG_NATIVE_SIM_REBOOT was enabled and
the system is rebooted using sys_reboot(), the reset cause is set to
SOFTWARE.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-09-29 12:37:47 -04:00
Andrew Featherstone
67f2e49ce3 drivers: counter: rpi_pico: Remove redundant CMSIS include
This header file isn't required, and prevents the driver building for
the RISC-V based Hazard3 cores.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-09-29 12:30:28 -04:00
Andrew Featherstone
80a54a89cd drivers: intc: RP2350: Add initial support for Hazard3
The RP2350 uses the Xh3irq interrupt controller, which supports nested
and prioritised interrupts. This adds initial support, configuring the
controller in 'direct' (non-vectored) mode.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-09-29 12:30:28 -04:00
Andrew Featherstone
d88193cba9 drivers: clock_control: rpi_pico: Start all the tick generators
There's no benefit to starting a subset of them, and this ensure that
everything is ready, regarless of RP2040 vs RP235xx, and whether the
Cortex-M33 or Hazard3 cores are in use in the latter case.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-09-29 12:30:28 -04:00
Stefan Kraus
d380d430ea drivers: led_strip: ws2812_gpio: prevent overflow
In case one defines an RGB led that is bigger than the led_rgb struct,
ws2812_gpio_update_rgb would overflow the buffer it writes to while
iterating. This could lead to crashes, as the code would also support
GRBW (as supposed in one comment).

As a 'proper' fix would require another buffer and therefore more
memory, I added a BUILD_ASSERT to ensure it does not compile.

Signed-off-by: Stefan Kraus <dev@stefankraus.org>
2025-09-29 09:58:19 +02:00
Stefan Kraus
73eb7bb18a drivers: led_strip: ws2812_gpio: fix overwriting in loop
Due to the alias of ptr on pixels, one iterates over the same area
one reads from to set values. Therefore, if the strip is not 'RGB' but
GBR, one would overwrite the pixels 'r' value with the 'g' value in the
first loop, leading to a wrong read afterwards.

By writing to a temporary variable, we have a clean, unmodified copy
of the original values.

Additionally, this removes the dependency on 'LED_STRIP_RGB_SCRATCH',
as the scratch part (that masked most error cases) is not necessary
anymore.

Signed-off-by: Stefan Kraus <dev@stefankraus.org>
2025-09-29 09:58:19 +02:00
Sylvio Alves
49355813d3 drivers: entropy: espressif: enable TRNG in driver, not clock init
Move the TRNG peripheral enable from the clock/SoC init path to the
Espressif entropy driver init.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-09-29 05:50:56 +02:00
Sherry Li
d90d71c42c drivers: smbus: stm32: implement smbus_block_read
Smbus implementation for stm32 lacks of smbus_block_read(), so add the
functionality.

Fix some indentations.

Signed-off-by: Andrew Lewycky <alewycky@tenstorrent.com>
Signed-off-by: Sherry Li <xiaoruli@tenstorrent.com>
2025-09-28 14:14:35 -04:00
Marcin Niestroj
7fc8051b0f drivers: wifi: esp_at: return WIFI_STATUS_* connect error codes
Return `enum wifi_conn_status` after failed connection attempt. Parse
`+CWJAP:` messages to get failure reason.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2025-09-27 14:00:09 -04:00
Pisit Sawangvonganan
601f2fde6e drivers: serial: pl011: reduce device's base address accesses
In several functions, the UART registers are accessed multiple times
through the `get_uart(dev)` inline function. This results in repeated
dereferencing of the device's base address.

This commit caches the UART register struct pointer in a local variable
`uart` at the beginning of each relevant function.

For registers where repeated access is not needed, the value is read once
into a temporary variable. Modifications, if any, are applied to
the temporary copy, and the result is written back once.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-09-27 13:59:43 -04:00
Johann Fischer
4fe2c5bd5f drivers: udc: allow to use timeout Kconfig option on nRF54LM20A SoC
Kconfig option UDC_DWC2_USBHS_VBUS_READY_TIMEOUT depends on services
exclusively available for nRF54H20, but the option can also be used for
nRF54LM20A, where there are no service dependencies, and VREG can be
accessed by the driver directly. Let depend the option on the SOC
series, as the controller can be used by the different CPUs on the SOC.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-09-26 20:48:32 -04:00
Johann Fischer
0018e8d600 drivers: udc: cleanup depends in Kconfig.dwc2
Factor out UDC_DWC2 dependency.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-09-26 20:48:32 -04:00
TOKITA Hiroshi
c6608fcd80 drivers: virtio: Separate macros into a common header
Move macros derived from the VIRTIO specification to a shared include.
This change allows the VIRTIO standard definitions to be referenced
from outside the driver implementation.

The following definitions have also been added:

- VIRTIO_F_VERSION_1
- VIRTIO_F_ACCESS_PLATFORM
- VIRTIO_RING_F_INDIRECT_DESC
- VIRTIO_RING_F_EVENT_IDX
- VIRTQ_AVAIL_F_NO_INTERRUPT
- VIRTQ_USED_F_NO_NOTIFY

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-09-26 20:45:00 -04:00
Vincent Tardy
dc89803697 drivers: ieee802154: add support of 802.15.4 for STM32WBA
Add the driver itself and Kconfig/CMakeLists/dts/bindings related to it.
Other files and libraries needed are in ST's dedicated folder
hal_stm32 (modules/hal/stm32).

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2025-09-26 20:44:45 -04:00
Titouan Christophe
3993a739e9 drivers: i2s: ll_stm32: fix missing implementation for i2s_config_get
This fixes system crashes in `i2s_buf_write`, because this function
internally calls `i2s_config_get`, which resulted in a NULL pointer on
stm32 i2s devices.

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-09-26 16:02:02 -04:00