Commit graph

24538 commits

Author SHA1 Message Date
Sylvio Alves
ad3df1d0f2 driver: counter: esp32: make sure callback is executed
User callback can be used to re-trigger the alarm.
In such case, copy current callback before it is overritten.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-06-02 22:10:51 +02:00
Adib Taraben
293b8d6003 drivers: enet: eth_nxp_enet_qos_mac: handle errors in RX queue worker
Handle each error individually.
Do not skip RX loop on first error.
Revise DMA buf size to CONFIG_NET_BUF_DATA_SIZE.

Signed-off-by: Adib Taraben <theadib@gmail.com>
2025-06-02 22:10:27 +02:00
Borislav Kereziev
10e5753d20 drivers: sensor: Add support for BH1730 ambient light sensor
This commit adds support for BH1730 ambient light sensor.

Signed-off-by: Borislav Kereziev <b.kereziev@gmail.com>
2025-06-02 20:22:42 +02:00
Sylvio Alves
e0a915a178 soc: espressif: convert rtc peripheral to clock subsystem
Current ESP32 clock system is mixed with RTC labeling/registers,
but it doesn't implement a real-time clock (RTC) driver.

To avoid confusion and allow adding a proper RTC driver later,
this commit renames the existing RTC interface to CLOCK and make
it as a subsystem without any peripheral attached to it.

This better reflects its actual purpose as a general clock controller.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-06-02 17:38:08 +02:00
Ayush Singh
debdd80da1 drivers: i2c: omap: Make reg pointers volatile
Since the __IO macro use has been removed, make the whole reg pointer
volatile. This is similar to what is done in the gpio-davinci driver.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-06-02 17:37:43 +02:00
Ayush Singh
9c1f59264e drivers: i2c: i2c_omap: Fix for PocketBeagle 2 A53
Remove __IO macro.

Fix build errors for PocketBeagle 2 A53 target

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-06-02 17:37:43 +02:00
Piotr Ciura
29a191ad38 drivers: usb: Prevent from perpetual locked state
The USB CDC driver is unable to process any bulk IN transfers
after receiving spurious 'Clear Feature - Endpoint Halt' request
from host due to perpetual locked state caused by previously
scheduled transfer, that will never be finished, as the endpoint's state
is set to NAK. Fix by ignoring spurious request.

Signed-off-by: Piotr Ciura <piotr.ciura@hidglobal.com>
2025-06-02 17:37:14 +02:00
Jakub Michalski
c7107fc4d6 virtio: add API for VIRTIO devices and add VIRTIO PCI driver
This commit adds the API for accessing VIRTIO devices, and adds a driver
for a VIRTIO PCIE device based on the newly added API.

This commit is based on the Virtual I/O Device (VIRTIO) Version 1.3
specification:
https://docs.oasis-open.org/virtio/virtio/v1.3/csd01/virtio-v1.3-csd01.pdf

Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2025-06-02 17:37:07 +02:00
31fe70805f modules: hal_wch: update the HAL to pull in CH32V00x support
Now that the HAL has been commited, pick it and fix the related build
errors.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-06-02 13:30:04 +02:00
Dawid Niedzwiecki
964aa56ea7 interrupt_controller: intc_plic: move unused function
Move function that is used only if some configs are defined.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2025-06-02 13:29:30 +02:00
Henrik Brix Andersen
362e17a0c0 drivers: can: mcp2515: reformat files using clang-format
Reformat the MCP2515 driver files using clang-format and remove excessive
newlines between variable declarations.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-06-02 13:29:17 +02:00
Henrik Brix Andersen
e4fa41e2ad drivers: can: mcp2515: merge nested if-statements into one
Merge two nested if-statements into one.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-06-02 13:29:17 +02:00
Henrik Brix Andersen
c4247c6430 drivers: can: mcp2515: terminate if...else if construct with an else
Terminate the if...else if construct with an else block in order to adhere
to coding guidelines.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-06-02 13:29:17 +02:00
Henrik Brix Andersen
214b9c5278 drivers: can: mcp2515: declare the variable "data_idx" inside the loops
Declare the variable "data_idx" inside the loops to limit it's scope.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-06-02 13:29:17 +02:00
Adam Kondraciuk
5676c65ee8 drivers: i2s: Add support for nRF TDM peripherals
Add a shim that allows using the nRF TDM
(Time division multiplexed audio interface) HAL by I2S Zephyr API.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-02 13:29:10 +02:00
Adam Kondraciuk
f691d8e020 drivers: pinctrl: nrf: Add support for TDM peripheral
Add support for configuring pins of the nRF TDM peripheral.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-02 13:29:10 +02:00
Josuah Demangeon
a3465f8f4d drivers: video: sw_generator: convert to use the devicetree
Make the video software generator a devicetree node, which allows enabling
several instances, and select it as chosen { zephyr,camera = &... }; node.
It can be enabled via a `video-sw-generator` snippet.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-06-02 05:48:21 +02:00
Alain Volmat
5fa26d9aea video: gc2145: use VGA resolution as default
Since QVGA resolution is currently not working in CSI, use VGA
as default resolution to avoid failing during the init of the
driver.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 05:48:12 +02:00
Alain Volmat
79e218aaf4 video: gc2145: add CSI mode of the GC2145 sensor
Add possibility to use the gc2145 sensor in CSI mode by
adding the bus-type property in the device-tree.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 05:48:12 +02:00
Alain Volmat
979d8ff0fe video: gc2145: avoid default DVP enabling
Do not enable by default the DVP streaming to avoid conflict
with the introduction of the MIPI mode of the GC2145.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 05:48:12 +02:00
Alain Volmat
eeab052505 video: st_mipid02: addition of ST MIPID02 CSI bridge
Addition of the support for the CSI to DVP bridge ST MIPID02.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 05:48:03 +02:00
Alain Volmat
b0432a8f48 video: add LINK_FREQ ctrl and a helper to retrieve it
Add a ctrl VIDEO_CID_LINK_FREQ to indicate to a sink
the frequency at which a device streams data over
CSI2. Since not all source device currently provide the
LINK_FREQ control, add a helper function to retrieve
it, with a fall-back by doing an approximate via the
PIXEL_RATE control.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 05:48:03 +02:00
Alain Volmat
b5d8aee7d7 video: common: addition of INTEGER_MENU control type
Add a new INTEGER_MENU type allowing to store signed 64bits
integer into a menu.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 05:48:03 +02:00
Ryan McClelland
8c7417a552 drivers: i3c: fix adv_info_get ret code
It's possible if a device is an i3c v1.0 spec, no hdr, no mxds,
no controller caps, and does not have a mrl nor mwl. It should
return 0 if it doesn't need to do anything.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-05-31 07:06:13 -04:00
Sven Depoorter
ff3d5f89a2 drivers: pwm: pwm_nrf_sw: use shutdown task if available
Add a workaround for NRF52 anomaly 78: "High current consumption when
using timer STOP task only. Use the SHUTDOWN task instead."

Signed-off-by: Sven Depoorter <svndepoorter@gmail.com>
2025-05-31 07:04:01 -04:00
Adrian Bonislawski
240b56008c drivers: ssp: unify clock selection flow across ACE platforms
During intensive testing, it was found that the clock should
be set the same way on all ACE platforms

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2025-05-31 07:03:39 -04:00
Ryan McClelland
af1ba95ba7 drivers: i3c: cdns: add busy status
Add busy status for cadence i3c.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-05-31 07:03:19 -04:00
Michal Morsisko
e87e0542b8 drivers: spi_bitbang: Increase supported word size to 32 bits
This change introduces support for words up to 32 bits size
to the spi_bitbang driver

Signed-off-by: Michal Morsisko <morsisko@gmail.com>
2025-05-31 07:02:06 -04:00
Bas van Loon
e7dd7abc0e drivers: i2c: Add support for clock stretching in the i2c-gpio module.
Some I2C peripherals like TI charger or gauge chips need support for I2C
clock stretching. This patch includes that and makes these modules
usable with I2C emulation over GPIO.

Signed-off-by: Bas van Loon <bas@arch-embedded.com>
2025-05-31 06:55:10 -04:00
Ryan McClelland
d3a7b7df9a drivers: i3c: cdns: fix ibi length with no payload
If the BCR value is not set for ibi w/ payload, then it still
has a ibi length of 1 due to the MDB. Set the PL accordingly.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-05-31 06:54:59 -04:00
Daniel Kampert
a673871970 drivers: sensor: Remove broken reset from apds9306 driver
The reset may cause initialization issues because of a missing
ACK from the sensor. The error check for the I2C communication
is removed to avoid issues during the initialization.

Closes #89850

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2025-05-31 06:54:52 -04:00
Michal Kozikowski
df65918cfa drivers: spi: spi_context.h: remove multithreading dependency
Replace semaphores with proper atomic flags when used without
multithreading enabled.

Signed-off-by: Michal Kozikowski <michal.kozikowski@nordicsemi.no>
2025-05-31 03:36:14 +02:00
John Shelton
7af55237da driver: sensor: aosong,dht: fix sensor protocol broken since change #83192
A recent change 9eeb60c improperly removed a critical line in the driver.

This commit replaces that line and moves an irq_lock to above any pin

value manipulation since the timing is sensitive with the DHT protocol.

This should also fix the timing issue 9eeb60c attempted to fix.

Signed-off-by: John Shelton <moosery@gmail.com>
2025-05-31 03:35:47 +02:00
Dipak Shetty
358907b25f drivers: stepper: adi_tmc: tmc51xx uart support
Added support for tmc51xx uart support alongside the
existing spi support. The tmc51xx driver is now consolidated
into a dedicated folder.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Dipak Shetty
a66d064dc4 drivers: stepper: adi_tmc: extend rampstat mask range
Now added pos_reached_mask for polling rampstat when
position reached event is not supported, for example,
with uart drivers. Consequently, when the position is
reached, the position is reached, and the event flag is
set active. Hence, an additional value is now introduced.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
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