Commit graph

23353 commits

Author SHA1 Message Date
Dipak Shetty
b914537603 drivers: stepper: adi_tmc: extend to support uart
Add support for trinamic controller with single wire UART

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Dipak Shetty
6cc860d892 drivers: stepper: adi_tmc: bus: abstraction layer for bus
Now a bus abstraction for Trinamic stepper drivers with
unified interface for SPI/UART communication. Separates
transport logic from device-specific functionality.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Luis Ubieda
94a7f028ef ubx: Refactor codebase in order to improve usability
During testing and code inspection, there were various anti-patterns
on this (and U-Blox driver) codebase(s), including obfuscation, and
lack of data validation. This made it increasingly difficult to
introduce further variants of u-blox GNSS modems.

With this patch, both the UBX modem and the M8 driver have been
refactored to ease the reliability and maintainability of these
codebases. Here are some highlights:

WRT UBX modem:
- Helper macros to easily create UBX frames, (including checksum
calculation), at compile time; thus, making it easier to extend UBX
commands.
- Logic validation by the inclusion of the modem_ubx testsuite, used to
refactor the code through TDD.
- Ability to receive unsolicited messages, in order to enable U-Blox
drivers to rely on modem_ubx to transceive all commands, and avoid
hopping between modem_ubx and modem_chat.

WRT M8 driver:
- Remove GNSS specific protocol header files. Instead, unify them under
modem/ubx/protocol.h. Background: After a survey and looking at ubxlib
SDK I conclude the UBX protocol is by definition a GNSS protocol (there
are non-GNSS u-blox modems, but they're not interfaced through UBX
protocol).
- Establish pattern to create and send/receive commands using new
foundations on modem ubx.
- Remove dependency of Modem chat, and instead use UBX unsolicited
messages to get Navigation and Satellites data.
- Switch from the auto-baudrate detection pattern to a pattern of
transitioning between an initial known baudrate to a desired baudrate,
in order to improve initialization time.
- Add dts property to configure default fix-rate.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-05-30 19:40:19 +02:00
Declan Snyder
f1df21278c soc: rw: Enable flexcomm wakeup/sleep clocking
Following the new feature in the flexcomm driver to be able to wake up
from low power mode, the clock control drivers have to handle the
platform specific details, so this commit adds to the already ugly mess
that is the LPC syscon driver which is used by RW currently and makes
the required devicetree changes.

Make the console/shell uart on the FRDM_RW612 take advantage of this by
default.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Declan Snyder
e5a35e6435 drivers: uart_mcux_flexcomm: Enable as wakeup src
Add the feature for the flexcomm uart to be able to be a wakeup source
from low power modes. To be able to do this on a relevant platform, the
DT node for the UART needs to have the wakeup-source property and define
a "sleep" clock. The details of handling the sleep clock and default
clock are still platform specific but handled by the clock control
driver of the platform, so that this code should be able to be
applicable to any platform that follows the same DT definition.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Declan Snyder
481a2faf1e uart_mcux_flexcomm: Fix TX garbage char bug in PM
There is currently a bug where when entering low power modes, there is a
garbage character sent if the UART is in the middle of a transmit when
entering low power mode. This is because the fifo interrupt happens when
last character is pulled by transmitter from fifo and then we unlock PM
constraints at that moment, instead of waiting for actual transmitter to
become idle. Fix by adding work item to check for this when needed.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Jordan Yates
3d7979ea4a drivers: wifi: nxp: auto NXP_WIFI_SOFTAP_SUPPORT
Automatically enabled `NXP_WIFI_SOFTAP_SUPPORT` if the application
specifies it wants AP support.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Jordan Yates
53cf5ff576 drivers: wifi: esp32: auto ESP32_WIFI_AP_STA_MODE
Automatically enabled `ESP32_WIFI_AP_STA_MODE` if the application
specifies it wants either feature.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Jordan Yates
90a2d0ec92 drivers: wifi: nrf_wifi: operation mode from application request
Default the operation mode from the application requested Wi-Fi
features, not the nRF70 part number.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Jordan Yates
7dbd36a222 drivers: wifi: options for application usage of Wi-Fi
The `CONFIG_WIFI` symbol currently covers a number of different
use-cases of Wi-Fi, primarily:
  * Wi-Fi AP (Broadcasting a network others can connect to)
  * Wi-Fi Station (Connecting to an AP + SSID scanning)
  * Wi-Fi AP + Station (Both the above)
  * Wi-Fi SSID scanning (SSID scanning only)

Each of these application usages of Wi-Fi requires a different set of
supporting options to operate correctly (`WPA_SUPP`,
`NET_CONNECTION_MANAGER`, etc), and different opportunities for resource
optimisation (System heap, buffer counts, etc).

Currently, optimizing the Wi-Fi drivers depends on driver specific
options, which can be challenging to find and are obviously not portable
across different drivers.

The addition of this choice allows applications to specify in a single
Kconfig option which features of Wi-Fi they use, and enable individual
Wi-Fi drivers to choose defaults based on those features.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Håkon Amundsen
801107eb4d drivers: firmware: add IRONside boot report
The boot report is used to pass information from IRONside to a CPU
being booted.

Integrate the boot report to the update service sample.

Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
2025-05-30 16:35:15 +02:00
Mark Wang
8951711f96 drivers: uhc: udc: use DYNAMIC_INTERRUPTS for KHCI and EHCI
Because the same IP supports both device and host, so use
DYNAMIC_INTERRUPTS for KHCI and EHCI if both device and host
are enabled.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-05-30 16:34:41 +02:00
Mark Wang
abfa9455cc drivers: uhc: implement nxp mcux uhc driver
It is based on SDK USB Host controller driver.
Support NXP EHCI, KHCI, OHCI and IP3516HS controllers.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-05-30 16:34:41 +02:00
David Leach
c0c1b0af44 drivers: flash: Align NXP flash drivers on parameter checking
Parameter checking of flash read API expects checking for len == 0
before checking dest buffer validation.

Fixes #87021

Signed-off-by: David Leach <david.leach@nxp.com>
2025-05-30 10:27:26 +02:00
Khoa Nguyen
463f518192 drivers: Update dtc transfer info alignment
Update dtc transfer info alignment for Renesas drivers

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-05-30 10:26:34 +02:00
Sreeram Tatapudi
02f2beab29 drivers: timer: Add support for IFX Low power timer
Adding support for low power timer to enable low power modes

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-05-29 20:19:18 -04:00
Daniel Leung
069cd4b861 i3c: rtio: deal with rtio_cqe_consume() returning NULL
rtio_cqe_consume() may return NULL so we need to check before
using any members of the returned struct.

Fixes #90473
Fixes #90489
Fixes #90497

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-05-29 20:18:43 -04:00
Daniel Leung
157bea57c8 i3c: set default return for i3c_device_adv_info_get()
Coverity flagged that the return variable ret may not be
initialized when returning. So give it a default value.

Fixes #90509

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-05-29 20:18:43 -04:00
Camille BAUD
f81e7559bf drivers: spi: introduce basic spi driver for wch
introduces a basic SPI driver for CH32 series

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-05-29 23:25:49 +02:00
Vincent van der Locht
a06ded8db6 drivers: ieee802154: added raw mode to mcxw ieee802154 driver
Add support for raw mode of mcxw ieee802154 driver.

Signed-off-by: Vincent van der Locht <vincent@synchronicit.nl>
2025-05-29 23:25:41 +02:00
jhan bo chao
a95d413128 driver: espi: add espi peripheral channel driver for rts5912
add espi peripheral channel driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
da767376ca driver: espi: add espi peripheral channel 8042_KBC driver for rts5912
add espi peripheral channel 8042_KBC driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
805b213424 driver: espi: add espi peripheral channel acpi shd mem driver for rts5912
add espi peripheral channel acpi shd mem driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
4320fb5249 driver: espi: add espi peripheral channel acpi driver for rts5912
add espi peripheral channel acpi driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
8ceb0d0f11 driver: espi: add espi peripheral channel HOST_CMD driver for rts5912
espi: add espi peripheral channel HOST_CMD driver for rts5912

Unlike other chips using IO port 0x800-0x8ff, we utilize shared memory to
transfer host command parameters. The AP firmware must have corresponding
settings for this configuration.

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
1bc30251a6 driver: espi: add espi peripheral channel port 80 driver for rts5912
add espi peripheral channel port 80 driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
1c461e38ca driver: espi: add espi vw channel driver for rts5912
add espi vw channel driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
9d41eac7ac driver: espi: add espi oob channel driver for rts5912
add espi oob channel driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
00fac713ea driver: espi: add espi flash channel driver for rts5912
add espi flash channel driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
jhan bo chao
537791facf driver: espi: add espi driver for rts5912
add espi driver for rts5912

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-29 23:25:27 +02:00
Raffael Rostagno
3780f9d817 drivers: spi: esp32: Fix NULL buffers condition
Fix condition in which both TX and RX buffers are NULL inside
spi_buf_set structures.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-05-29 20:17:33 +02:00
Titan Chen
13a024218e drivers: i2c: add i2c dw support error checks.
support errors check for
1. tx_abrt: nack and sda stuck low
2. scl stuck low

Signed-off-by: Titan Chen <titan.chen@realtek.com>
2025-05-29 20:17:05 +02:00
Titan Chen
748789eadf drivers: i2c: rts5912 i2c dirver
base on DesignWare I2C driver to implement RTS5912 I2C driver.

1. support customize bus recovery function.
2. fix isr timing issue by enable tx empty control.
3. support stuck at low handle by enable bus clear feature.
4. support custom stuck at low timeout set from dts
5. disable block mode in rts5912 i2c.
6. support I2C_ALLOW_NO_STOP_TRANSACTIONS

Signed-off-by: Titan Chen <titan.chen@realtek.com>
2025-05-29 20:17:05 +02:00
Marcin Szymczyk
b9d97aba21 drivers: misc: nordic_vpr_launcher: move SoC-specific config to DT
Targets that require setting secure attribute to VPR should specify
it in devicetree.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2025-05-29 15:16:52 +01:00
Chaitanya Tata
5601af34b7 drivers: nrf_wifi: Rejig the statistics
Separate out host(local) and FW(remote) statistics and in case of a
FW statistics timeout, return success with a magic value in the FW
statistics, this way atleast host statistics would be handy for
debugging instead of sending failure up.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-05-29 12:07:09 +02:00
Loic Domaigne
a8eace10b3 drivers: sensor: bme280: fix "config" register intialization issue
A write to the "ctrl_meas" register can cause the sensor to transition
from sleep to normal mode (which is default Kconfig settings). As per
BME280 datasheet, writes to the "config" register in normal mode may be
ignored. This can lead to use BME280_STANDBY_05MS and BME280_FILTER_OFF
instead of the values set by the application. To fix this, write to the
"config" register before "ctrl_meas" in the sensor init function.

Signed-off-by: Loic Domaigne <tech@domaigne.com>
2025-05-29 12:06:39 +02:00
Tim Lin
e1b5b8b5f9 drivers/i2c: ite: Add handling for read operation with 0-byte length
The current I2C driver assumes that at least one byte will be read in CQ
(command queue) mode. However, when a 0-byte read is issued
(e.g., by cmd_i2c_scan),
The read handler uses (len - 1) to set the command queue length.
When len is 0, this underflows to 0xFF, leading to an incorrect transfer
length and possible crash.

To fix this, add a check in cq_mode_allowed() for reads with length 0:

-Fallback to PIO mode in such cases.
-Properly handle 0-byte reads by issuing STOP (E_FINISH) when the slave
 address is acknowledged.
-Add appropriate handling for NACK conditions when the slave address is
 not acknowledged.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-05-29 10:46:47 +02:00
Joel Guittet
9d4530fb79 drivers: counter: introduce counter node in esp32 timers
Add counter device tree node to the esp32 timers.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2025-05-29 08:41:59 +02:00
The Nguyen
bd87dbc368 driver: can: renesas: remove first can bus starting at init
Remove can bus starting at initial function

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-05-29 06:31:47 +02:00
The Nguyen
990b000e31 drivers: can: renesas: avoid breaking driver instance access
Keep data instance inside of data structure.
Avoid accessing global data or using pointers to out of
data instance.

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-05-29 06:31:47 +02:00
Sreeram Tatapudi
33e5748a4f drivers: gpio: Update GPIO driver to support XMC7200
Update GPIO driver to support XMC7200

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-05-28 21:29:20 +02:00
Sreeram Tatapudi
774a62e67b drivers: serial: Update UART driver to support XMC7200
Update UART driver to support XMC7200

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-05-28 21:29:20 +02:00
Sreeram Tatapudi
1fe5cb5982 drivers: clock_control: update clock control driver to support XMC7200
update clock control driver to support XMC7200

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-05-28 21:29:20 +02:00
Luis Ubieda
5cd3a7e79c sensor: afbr_s50: Add DTS configuration bindings
The following parameters are exposed through DTS bindings:
- ODR.
- Dual Frequency Mode.
- Measurement Mode.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-05-28 21:29:13 +02:00
Luis Ubieda
820975a409 sensor: afbr_s50: Add private channel to obtain pixel matrix
Each time this sensor gets a reading, it contains a matrix of 4 x 32
pixels containing distance readings, from which the 1-D result is
calculated. The private channel would expose this array through
Sensor APIs.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-05-28 21:29:13 +02:00
Luis Ubieda
f9d9e5bb6d modules: afbr: Add basic functionality
- Add AFBR module as a HAL.
- Platform layer to support running AFBR API using Zephyr.
- Ability to instantiate on device-tree.
- Samples in the module proving foundations works.
- Zephyr Sensor API support, by introducing:
    - Read/Decode for SENSOR_CHAN_DISTANCE (1-D results).
    - Streaming mode for DATA_READY (1-D results).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-05-28 21:29:13 +02:00
Daniel Baluta
85b6ff0b0b drivers: dma: sdma: Make access to DMA channel stats atomic
DMA channel stats like pending_length or free is not protected
and can be modified in parallel by a consumer and a producer.

This can result in non-atomic updates which in turn will result
in using stale data.

Fix this by making regions of code accessing dma stats atomic.

Fixes: e94c86f395 ("drivers: dma: Add initial support for NXP SDMA")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2025-05-28 20:02:31 +02:00
Daniel Baluta
312ff1c904 drivers: dma: sdma: Fix noise issue with pause/resume
Each time we configure an SDMA channel we also compute the total
allocated DMA buffer length but we assume is initialized with zero.

This is true each time a channel is requested. But if there are
multiple calls to configure without releasing the channel the buffer
length is not correctly computed.

So, we need to initialize it with zero each time we reconfigure the dma
channel.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2025-05-28 20:02:31 +02:00
Benjamin Cabé
fdf713ab51 drivers: sensor: icp101xx: update channel check condition
Removed a logically dead else by doing sensor channel check
in a way that's more aligned with how other drivers do it.

Fixes: CID 505949
Fixes: zephyrproject-rtos/zephyr#90558
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-05-28 17:49:50 +02:00
Bjarki Arge Andreasen
b668e9de40 drivers: clock_control: nrf: adapt NRF_HFINT_CALIBRATION option
CLOCK_CONTROL_NRF_HFINT_CALIBRATION depended on the renamed
nordic,nrf-hfxo -> nordic,nrf54l-hfxo. Update config to depend on
DT_HAS_NORDIC_NRF54L_HFXO_ENABLED to match new compat name.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-05-28 17:49:41 +02:00