Commit graph

24538 commits

Author SHA1 Message Date
Fabian Blatz
11b9eba340 drivers: display: sdl: Ensure draw is performed from init thread
Add a thread to the SDL display driver to ensure that init and renderer
calls are performed from the same thread.

Fixes #71410.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-04-08 11:45:01 +02:00
Benjamin Cabé
39a65c0be2 drivers: sensor: icp201xx: fix channel check logic
Update the channel validation logic to properly check channel against
SENSOR_CHAN_ALTITUDE.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-04-08 10:48:49 +02:00
Benjamin Cabé
93c52cf0b5 drivers: sensor: icp201xx: fix channel check logic
Update the channel validation logic to avoid using enum constants as
boolean values.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-04-08 10:48:49 +02:00
Tim Lin
a531e71376 drivers/timer: Add timer driver of it51xxx
Add timer driver for ITE it51xxx series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
d64d87f655 drivers/serial: Add ITE UART wrapper to enable serial driver of ns16550
Add ITE UART wrapper to enable serial driver of ns16550.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
df56c85e94 drivers/clock: Add clock drivers of it51xxx
Add clock drivers for ITE it51xxx series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
f67c2a3d33 drivers/gpio: Add GPIO driver of it51xxx
Add GPIO driver for ITE it51xxx series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
8c2f5684bb drivers/flash: Enable flash controller for it51xxx series
Enable flash controller for ITE it51xxx series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
f0d21fb497 drivers/pinctrl: Enable pinctrl driver for it51xxx series
Enable pinctrl driver for ITE it51xxx series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
678adea066 drivers/interrupt: Add interrupt and wake-up control drivers of it51xxx
Add interrupt and wake-up control drivers for ITE it51xxx series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
0e5218cbcc drivers: ITE: Use generic name instead of specific chip name
Use generic name for structure in driver instead of specific chip name
for better compatibility.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Khaoula Bidani
00cc4441aa drivers: usb: udc_stm32: Update UDC speed macros
Updated UDC speed definition macros for STM32 series
to handle different speed configurations
based on the SoC compatibility.

Added conditional checks for full-speed definitions
using DT_HAS_COMPAT_STATUS_OKAY for st_stm32_usb.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2025-04-08 08:58:18 +02:00
Khaoula Bidani
5f3fce67c6 drivers: usb: device_stm32: Update USB_DC speed macros
Updated USB_DC speed definition macros for STM32 series
to handle different speed configurations
based on the SoC compatibility.

Added conditional checks for full-speed definitions
using DT_HAS_COMPAT_STATUS_OKAY for st_stm32_usb.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2025-04-08 08:58:18 +02:00
Krzysztof Chruściński
e33606f300 drivers: gpio: esp32: Add ESP32_ prefix to CPU_ID() macro
Driver is using local macro to get current CPU ID and it is now
in conflict with generic CPU_ID. Added prefix to avoid conflict.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-04-08 08:57:57 +02:00
Michał Stasiak
aa34fa80aa drivers: clock_control: nrf: Apply fix for nRF54L anomaly 30.
Applied fix for nRF54L anomaly 30, which requires a periodic
calibration of high-frequency clock.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-04-08 08:57:39 +02:00
Jordan Yates
c3139c59d0 bluetooth: hci: SPI backend boot timeout
Add a timeout to the SPI boot process to ensure that `bt_enable` does
not block forever but instead returns an error after an appropriately
large delay. While 1 second would be sufficient under normal operation,
we also want to give the controller time to perform any application
upgrades via a bootloader.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-08 08:57:26 +02:00
Daniel Baluta
8bdf533d76 dma: nxp: sdma: Initialize channel capacity with zero
DMA channel capacity wasn't properly initialized and the computation
relies on it being zeroed.

This only works fine only when requesting channel the first time
causing problems when we have multiple cycles of channel
request/release.

Fix this by properly initializing the capacity when requesting the
channel.

Fixes 43a48d4630 ("drivers: dma: sdma: Update buffer descriptor")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2025-04-07 21:14:16 +02:00
Lukas Gunnarsson
e7201b9f2c drivers: rtc: add nxp pcf2123 driver
Add driver support for the NXP PCF2123 RTC.

Signed-off-by: Lukas Gunnarsson <lukasgunnarsson@protonmail.com>
2025-04-07 21:13:29 +02:00
Titan Chen
5a94a1ca66 drivers: counter: rts5912: add support slow timer counter driver
Port rts5912 slow timer counter driver on Zephyr

Signed-off-by: Titan Chen <titan.chen@realtek.com>
2025-04-07 21:13:10 +02:00
Emil Dahl Juhl
1a3dd63dde drivers: sensor: ti: opt3001: add trigger support
The ti,opt3001 ambient light sensor is capable of asserting its interrupt
gpio upon conversion completion. The interrupt gpio can then be used to
trigger a reading of the conversion result automatically.
Due to this, it makes sense for the driver to implement the sensor trigger
functionality.

Add a devicetree property, int-gpios, to the ti,opt3001 bindings to allow
describing the gpio used for getting interrupts from the ti,opt3001.

Implement the sensor trigger functionality with options for using the
global worker thread or letting the ti,opt3001 create its own thread for
servicing the interrupts.
In both cases, when an interrupt is received the driver will read a new
measurement from the chip and clear the interrupt. The sample is then ready
to be read by the user of the sensor.

When manually triggering a sample_fetch, the trigger handler is not
invoked.

Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
2025-04-07 15:18:21 +02:00
Samuel Chee
7e95006abf drivers: pinctrl: add pinctrl drivers for arm v2m_beetle
Adds pinctrl driver for the v2m_beetle board target.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-04-07 15:18:10 +02:00
Samuel Chee
a2f0e5d372 drivers: pinctrl: add pinctrl drivers for arm mps3
Adds pinctrl driver for all Arm mps3 targets

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-04-07 15:18:10 +02:00
Samuel Chee
99ae4bf132 drivers: pinctrl: add pinctrl driver for Arm mps2
Adds pinctrl driver for all Arm mps2 targets.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-04-07 15:18:10 +02:00
Samuel Chee
9bac31e5a2 drivers: uart: adds pinctrl support for Arm cmsdk uart driver
Adds necessary pinctrl support for Arm cmsdk uart driver

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-04-07 15:18:10 +02:00
Samuel Chee
4772e183dc drivers: i2c: add pinctrl support to Arm sbcon driver
Adds necessary pinctrl support to Arm SBCon I2C driver.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-04-07 15:18:10 +02:00
Remi Buisson
7f0b538d4a drivers: sensor: icp201xx: Add icp201xx support
Use official TDK Invensense driver for icp201xx sensor in tdk_hal module.

Signed-off-by: Remi Buisson <remi.buisson@tdk.com>
2025-04-07 15:17:44 +02:00
Aksel Skauge Mellbye
64a4c593e1 drivers: pinctrl: silabs: Add support for fixed routes
Add support for fixed GPIO routes that don't have a configurable
route register, but still require mode configuration and enabling.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-04-07 08:54:38 +02:00
Gerard Marull-Paretas
bea0a068e1 drivers: gpio: nrf: add support for gpio_pin_get_config
So that pin configuration can be queried.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-04-07 08:54:20 +02:00
Marcio Ribeiro
c01489dadc drivers: i2s: esp32: add support for non-gdma SoCs
Adds support for:
- esp32
- esp32s2

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-04-06 12:17:58 +02:00
Marcio Ribeiro
0cedd4d3d9 drivers: i2s: esp32: code and data refactoring
Code and data refactoring to prepare for adding support for non-gdma SoCs

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-04-06 12:17:58 +02:00
Ivan Wagner
b5adb4457c drivers: sensor: meas: ms5837 supporting 02 and 30 variants via dt
This patch adds support via dt compatible property.

Signed-off-by: Ivan Wagner <ivan.wagner@tecinvent.ch>
2025-04-04 21:16:20 +02:00
IBEN EL HADJ MESSAOUD Marwa
8db85916f2 drivers: ethernet: Integrate GRMII and RMII interfaces
- Added macros `STM32_ETH_PHY_MODE`
  to determine the PHY mode (RGMII, GMII, RMII, and MII)
  from the `phy_connection_type` property in the device tree.
- Removed previous definitions for ETH_MEDIA_INTERFACE_MII
  and ETH_MEDIA_INTERFACE_RMII.
- Updated STM32_ETH_PHY_MODE macro to use ETH_MII_MODE
  and ETH_RMII_MODE.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2025-04-04 21:16:02 +02:00
Valerio Setti
d75c2113a9 drivers: sensors: bma4xx: add I2C_RTIO Kconfig for I2C
Since #83575 bma4xx driver relies on RTIO to work. This means that
CONFIG_I2C_RTIO should be defined together with CONFIG_I2C in the
Kconfig, otherwise I2C_DT_IODEV_DEFINE() won't be available at
build time.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-04-04 18:17:41 +02:00
Declan Snyder
0875499664 spi_nxp_lpspi: Remove mcux branding from tokens
Since these drivers mainly do not use MCUX except for the configure
function (which will soon also be changed), change namespace prefix to
lpspi_ instead of spi_mcux_ to avoid confusion.

Also improve descriptions of kconfigs to clarify what they are for.
Not changing the kconfig names for now since they are user-facing.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Declan Snyder
fa3a51bc29 spi_nxp_lpspi: Remove SDK items from header file
Remove SDK types and defines from header file.

And since now the common file is the only consumer of SDK header, move
that include there.

Also rename the tristate boolean to be more clean about what it does
rather than trying to be similar to the SDK config name.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Declan Snyder
ef60f88162 spi_nxp_lpspi: Refactor validation args to func
Minor refactor to make a separate function to validate configuration
arguments.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Declan Snyder
6a283c0a1f spi_nxp_lpspi: Convert CPU version to native code
Convert the CPU-based lpspi driver to native code.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Declan Snyder
1c00f368d9 spi_nxp_lpspi: Convert DMA version to native code
Convert the DMA-based LPSPI driver to native code.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Declan Snyder
29213b5e7c spi_nxp_lpspi: Fix DMA driver async return
We should not release context until transfer ends. The code previously
would return from wait_for_completion and then release the context. This
is only supposed to be done in the dma callback except for the case of
error in the transceive call. For async transfer this was most likely
always happening wrong and probably broken for multi threads trying to
access the bus due to this premature release of the context.

Also we should not enable CS and leave enabled in case of error, move CS
enable to after the error check.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Declan Snyder
5acee4ad9d spi_nxp_lpspi: Prevent edge case causing DMA error
Stop the transfer with error if at any point there is some
execution reached where transfer is being set up for 0 length, this can
cause problems where for example eDMA set up with this nonsense 0 length
channels can get an infinite error interrupt.

And this is probably an erroneously crafted transfer request anyways.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Declan Snyder
2f678bd56c spi_nxp_lpspi: Reset/clock peripheral
If there are HAL definitions available, do these two things:

Ungate the clock for the device from the zephyr driver. Eventually it
would be better to have a clocks property in the LPSPI DT node and get
the resources from there rather than the HAL.

Some platforms require the peripheral to be reset at system level, add
code to do this. Eventually it would be more ideal to have Zephyr
reset drivers for all of the NXP platforms and use DT to describe the
reset resources, but for now we can just do this to get the LPSPI
supported.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Hank Wang
e11634e733 drivers: i2c: tca954x: add support for idle disconnect
Add support for an optional "idle disconnect" feature in the TCA954x
I2C multiplexer. When enabled via the `i2c-mux-idle-disconnect` device
tree property, the driver will disconnect all channels after each
transfer. This helps avoid address conflicts when multiple multiplexers
are present on the same I2C bus.

Even if the I2C transfer fails, the driver will still attempt to
disconnect the channels to ensure the bus is left in a consistent state.
If the disconnect operation itself fails, its error code will be returned
unless the transfer already failed with a different error.

This implementation is inspired by the Linux kernel driver for PCA954x
I2C multiplexers. Special thanks to Ofir Shemesh for valuable suggestion.

Signed-off-by: Hank Wang <wanghanchi2000@gmail.com>
2025-04-04 18:17:07 +02:00
Jordan Yates
e661a55044 sensor: bme280: clamp humidity to non-negative
Clamp the returned humidity to a non-negative value. This ensure that
the return value is always within the expected range, even if the
calibration parameters are read out incorrectly or corrupted.

This check is applied in the example Bosch driver for the float
conversion case, so there are situations that warrant it.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-04 14:57:43 +02:00
Jimmy Zheng
dbd0ac40ce drivers: interrupt_controller: intc_clic: add indirect access clic reg
Add indirect CSR access to access CLIC register to satisfy the current
CLIC spec (Version v0.9, 2024-06-28: Draf).

Add CONFIG_LEGACY_CLIC_MEMORYMAP_ACCESS for legacy CLIC implementation
with memory-mapped CLIC register.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-04-04 14:55:50 +02:00
Jimmy Zheng
46a828e787 drivers: interrupt_controller: intc_clic: add CLIC parameters
Add support for CLIC hardware parameters based on the hardware
implementation.

  1. CLIC_PARAMETER_INTCTLBITS
    Specifies the number of modifiable bit in interrupt control register.

  2. CLIC_PARAMETER_MNLBITS
    Specifies the number of bits are assigned to interrupt level in the
    interrupt control bits.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-04-04 14:55:50 +02:00
Jimmy Zheng
ed97af9309 drivers: interrupt_controller: intc_clic: add CLIC SMCLICCONFIG extension
Add support for CLIC SMCLICCONFIG extension, allowing user to configure
the number of available interrupt level bits at runtime.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-04-04 14:55:50 +02:00
Jimmy Zheng
8dca182b14 driver: interrupt_controller: intc_clic: fixed access CLIC w/o privileged
Temporarily disabled PMP stack guard to allow access to CLIC M-mode
register, because U-mode load/store (mstatus.MPRV=0x1,MPP=0x0) is
restricted.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-04-04 14:55:50 +02:00
Jimmy Zheng
9349d54074 driver: interrupt_controller: intc_clic: rework to standard CLIC driver
Rework intc_clic to standard CLIC driver with Nuclei ECLIC extention.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-04-04 14:55:50 +02:00
Jimmy Zheng
21f0ee0383 driver: interrupt_controller: rename intc_nuclei_eclic to intc_clic
Rename intc_nuclei_eclic to intc_clic, and separate CLIC register
definitions into intc_clic.h.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-04-04 14:55:50 +02:00
Serhiy Katsyuba
7f818b5e72 Revert "drivers: dma: intel_adsp_hda: change L1_EXIT defaults"
This reverts commit c2f02533a6.

DMA_INTEL_ADSP_HDA_TIMING_L1_EXIT should be enabled for all ACE platforms.
Any new platform in the ACE series will likely need it as well.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2025-04-04 12:07:08 +02:00