Commit graph zephyr/drivers
Author SHA1 Message Date
Eira Siegel
14f7d496ae drivers: sensor: st: Pass internal return values to fetch caller
Several of the ST sensor implementations do not return a value to
the fetch caller, even when a fetch fails internally. This is
fixed by returning the value from the internal calls.

Signed-off-by: Eira Siegel <eira@the.cy>
2026-03-16 19:07:11 -05:00
William Markezana
6011b07c5c drivers: sensor: add Sensirion STCC4 CO2 sensor driver
Add driver for the Sensirion STCC4 miniature CO2 sensor. The STCC4
measures CO2 concentration (ppm), temperature, and humidity via I2C
using Sensirion's standard word+CRC protocol.

Features:
- Continuous and single-shot measurement modes
- CRC-8 validation on all sensor data
- Product ID readout at init
- Graceful handling of first measurement delay in continuous mode

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-03-16 19:02:13 -05:00
Jean-Pierre De Jesus DIAZ
cde85a66ab drivers: watchdog: cc13xx_cc26xx: fix unused variable.
Removed the options variable on wdt_cc13xx_cc26xx_init
which was only initialized to zero and not used.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2026-03-16 19:01:47 -05:00
Benjamin Cabé
727b3cbde1 drivers: sensor: s3km1110: Add support for S3KM1110 24GHz mmWave sensor
This adds a new sensor driver (with custom channels) for the S3KM1110, a
24GHz mmWave radar sensor from Iclegend that uses a UART interface.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-03-16 18:59:55 -05:00
Josuah Demangeon
4e2a4c2696 drivers: video: shell: support more than 10 completions
The video shell uses a workaround to have different sub-commands use
different completions. Raise the limit of maximum completions from 10 up
to 20 to support more devices.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-03-16 18:59:44 -05:00
Josuah Demangeon
3b92cb59db drivers: video: shell: add a "video tree" command
Add a "video tree <device>" command to show the topology of video devices.
This follows the chain of source devices as defined by
VIDEO_DEVICE_DEFINE() in the macros.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-03-16 18:59:44 -05:00
Josuah Demangeon
79aa7e3845 drivers: video: shell: fix shell tab completion when device fails
The tab completion was not showing the valid devices after the failed
devices. Fix it by continuing to search for devices after a failed device.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-03-16 18:59:44 -05:00
Josuah Demangeon
7ecb1d032f drivers: video: shell: add tab completion for "video selection ..."
Add support for completion for the "video selection" shell command.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-03-16 18:59:44 -05:00
Christopher Cope
f8800c8ab3 drivers: gnss: Add L5 system support
This adds L5, BeiDou and QZSS satellite systems to enum ```gnss_system```

Signed-off-by: Christopher Cope <chris.cope@roedan.com>
2026-03-16 18:59:12 -05:00
Ayush Singh
c1e14900b0 drivers: serial: Add RPMSG UART
A lot of BeagleBoard.org boards contain SOCs with co-processors such as
M4F in AM62x (PocketBeagle 2 [0]), R5s in AM67A (BeagleY-AI [1]). In such
targets, the application is normally loaded by the Linux host using
remoteproc.

There have been some out of tree patches to have micropython and other
Zephyr applications output to allow having a console without requiring
manual connections. This patch attempts to provide a more concrete and
upstream way to have that functionality.

The implementation uses existing rpmsg service subsystem.

Only implemented poll_out

Tested on PocketBeagle 2 M4F core.

[0]: https://docs.zephyrproject.org/latest/boards/beagle/pocketbeagle_2/doc/index.html
[1]: https://docs.zephyrproject.org/latest/boards/beagle/beagley_ai/doc/index.html

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2026-03-16 18:58:35 -05:00
Cherrence Sarip
79e6e32f79 drivers: pwm: add support for MAX2221X pwm
Implements PWM driver support for the MAX22216/MAX22217 device.
This driver integrates with the Zephyr PWM API and uses the parent
MFD device to perform register access.

Signed-off-by: Cherrence Sarip <cherrence.sarip@analog.com>
2026-03-16 10:09:16 -04:00
Cherrence Sarip
d5c0edf4fb drivers: misc: add support for MAX2221X misc
Add MISC driver support for the MAX22216/MAX22217 device.
The driver provides miscellaneous functions and uses the parent
MFD device for register access.

Signed-off-by: John Erasmus Mari Geronimo <johnerasmusmari.geronimo@analog.com>
Signed-off-by: Cherrence Sarip <cherrence.sarip@analog.com>
2026-03-16 10:09:16 -04:00
Cherrence Sarip
5aa97fbc7b drivers: mfd: add support for MAX2221X multi-function device
Implements SPI-based register access (read, write, update) for the
MAX22216/MAX22217 multi-function device.

Signed-off-by: Cherrence Sarip <cherrence.sarip@analog.com>
2026-03-16 10:09:16 -04:00
Felipe Neves
89de9b7ca9 video: ov5640: fix out of bounds
control initialization by setting the control array first.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2026-03-16 10:08:54 -04:00
Stanislav Poboril
71d1dd85d1 drivers: ethernet: phy: nxp_t1s_phy: add NXP 10BASE-T1S driver
Add driver for 10BASE-T1S digital PHY found on some NXP SoCs.

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2026-03-16 10:07:00 -04:00
Stanislav Poboril
e36f597c96 boards: frdm_mcxa577: add enet_qos support
1. adjusted enet_qos driver to cope with features missing on mcxa577
2. enabled enet_qos support
3. verified samples/net/zperf

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2026-03-16 10:07:00 -04:00
Stanislav Poboril
92b97cc596 drivers: ethernet: eth_nxp_enet_qos_mac: support for half-duplex mode
Mode is no longer fixed to full-duplex, it is set to half-duplex or
full-duplex in PHY callback.

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2026-03-16 10:07:00 -04:00
Josuah Demangeon
f527724abf drivers: video: add formats: 8-bit padded to 16-bit
Add padded formats as seen on Himax image sensors used with 8-bit
DVP receivers, where half of the pins are used, leading to empty
bits in memory. This replaces the Y4 format which is 8-bit despite
only giving 4-bit filled with data per byte.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-03-16 10:06:44 -04:00
Krzysztof Chruściński
0ca8d2cbd0 drivers: spi: nrfx_spis: Add missing pinctrl initial stage
Driver initialization is expected to keep the driver in the
suspended stage before calling pm_device_driver_init. It means
that initialization should set pinctrl SLEEP stage. Nordic SPIS
driver was not doing that. If device runtime PM was enabled it
resulted in pins being in the default state when it was expected
that they are in the sleep state.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-03-16 10:06:00 -04:00
Michał Stasiak
1038bd14b0 drivers: mspi: allow using MSPI type for nrf-qspi-v2 binding
MSPI type is just a rename of QSPI type. Code
provided for nrf-qspi-v2 binding should work with both.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2026-03-16 10:05:41 -04:00
Tien Nguyen
9e59e1479d drivers: spi: add missing p_reg initialize in extended configurations
add missing p_reg initialize in extended configurations

Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2026-03-16 12:32:50 +01:00
Julian Paul
64a7ee6b58 drivers: ethernet: phy: microchip_t1s: optional plca_node_count
Plca nodes with node_id not 0 do not manage transmit windows and
should therefore not be required to provide plca_node_count.
This change makes plca_node_count optional for (node_id != 0)
and if omitted sets the default value to 0.
The behaviour for node with id 0 stays the same.

Signed-off-by: Julian Paul <julian.paul@siemens.com>
2026-03-16 12:31:42 +01:00
Eric Mechin
483d216202 drivers: stm32wba: hci_stm32wba.c: Kconfig Options support
With stm32wba_set_stack_options function call set
the BLE stack Options flags initialization according
to the zephyr Kconfig options.

Signed-off-by: Eric Mechin <eric.mechin@st.com>
2026-03-16 12:31:08 +01:00
Sven Ginka
4eb4dfdd35 drivers: spi: soc sy1xx - fix bit-len
This commit fixes the bit-len field for the uDMA transfer.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2026-03-16 12:30:08 +01:00
Guillaume Gautier
872b423b63 drivers: adc: stm32: add rtio support
Add RTIO support for the STM32 ADC driver to be able to stream data
continuously.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-03-16 12:28:34 +01:00
Alain Volmat
15d03e6aef drivers: clock_control: fix STM32L4 PLLSAI2 handling
In the transition to new PLLSAI bindings, part of the
previous symbols are remaining, especially STM32_PLLSAI2_DIVR_DIVISOR
which is used to compute the clock rate and leads to division by
zero when checking the clock rate.

Fix the remaining PLLSAI2_DIVR parts in order to allow proper
behavior of the PLLSAI2 on STM32L4.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-03-16 12:27:44 +01:00
Alain Volmat
d68986ad85 drivers: display: rm67162: allow usage in VIDEO mode
Add VIDEO related mode_flags whenever performing mipi_attach
and ensure that default column and page address configuration
are done.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-03-16 12:27:44 +01:00
Alain Volmat
fd9c191316 display: stm32_ltdc: use DISPLAY_BITS_PER_PIXEL to compute format BPP
Use the macro DISPLAY_BITS_PER_PIXEL in order to compute each format
BPP and thus avoid requiring each format BPP written within the
driver.
Thanks to that, simply the function stm32_ltdc_set_pixel_format to
avoid code duplication.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-03-16 12:27:44 +01:00
Christophe Guibout
bb540e6278 drivers: clock_control: stm32: enable code if status okay in dt
As stm32mp215fxx SoC supports less peripherals than stm32mp257fxx,
some definitions are not available in the HAL. To avoid compilation
issues, put these definitions depending on their activation in the DT.

Signed-off-by: Christophe Guibout <christophe.guibout@st.com>
2026-03-16 12:24:52 +01:00
Phi Bang Nguyen
c916a4a141 include: drivers: video: Use uint16 for buffer index
The buffer index is to track the buffers in the whole video buffer pool
which may be used for several video pipeline, each can use up to an
uint8 buffer. Extend the type to uint16 to account for this fact.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2026-03-16 12:22:32 +01:00
Phi Bang Nguyen
5e51280b07 drivers: video: video_common: Drop mem_block structure
The mem_block structure and the video_block array are not needed.
Drop them.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2026-03-16 12:22:32 +01:00
Phi Bang Nguyen
1a74f9b50e drivers: video: ov5640: Expose the high framerates first
Expose the high framerates first so that it can be listed first and
chosen as the default frame rate in some applications.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2026-03-16 12:22:32 +01:00
Phi Bang Nguyen
263abcfe1d video: controls: Add VIDEO_CID_ROTATE
Add VIDEO_CID_ROTATE which is needed for some m2m devices.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2026-03-16 12:22:32 +01:00
Gerson Fernando Budke
6057c42eef drivers: usb: udc: sam_udp: use PLLA for USB clock
SAM4E doesn't have PLLB, so the USB clock must be derived from PLLA
which is shared with the system clock.

Use PMC_MCKR_CSS_PLLB_CLK to detect PLLB availability at compile time:
- SAM4S (has PLLB): Use dedicated PLLB, 96MHz / 2 = 48MHz
- SAM4E (no PLLB): Use PLLA, ~240MHz / 5 = 48MHz

For SAM4E, PLLA is already configured by the SoC init code for the
system clock, so we just verify it's locked and configure the USB
divider. On shutdown, we don't disable PLLA since it's needed for
the system clock.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2026-03-16 12:21:08 +01:00
Gerson Fernando Budke
f37d496b3d drivers: usb: udc: Add SAM UDP controller
Add a new USB Device Controller (UDC) driver for Atmel SAM4S, SAM4E,
and SAM3S microcontrollers with the UDP (USB Device Port) peripheral.
This driver replaces the deprecated legacy USB stack before removal.

Hardware Specifications:
- USB 2.0 Full-Speed only (12 Mbps)
- 8 hardware endpoints (EP0-EP7)
- 2668 bytes embedded DPRAM/FIFO
- No DMA - all transfers via PIO
- Integrated transceiver with pull-up on DDP
- Dual-bank (ping-pong) support on EP1,2,4,5,6,7

Endpoint Configuration (per datasheet Table 40-1):
- EP0: Control, no dual-bank, 64 bytes
- EP1,2: Bulk/Iso/Int, dual-bank, 64 bytes each bank
- EP3: Bulk/Int, no dual-bank, 64 bytes
- EP4,5: Bulk/Iso/Int, dual-bank, 512 bytes each bank
- EP6,7: Bulk/Iso/Int, dual-bank, 64 bytes each bank

Key Implementation Details:

1. Dual-Bank Pipelining (IN transfers):
- Track filled banks with tx_banks counter (0-2)
- Set TXPKTRDY after each bank fill per datasheet 40.6.2.2
- Pre-fill second bank while first is transmitting

2. OUT Processing:
- Bulk/Int endpoints processed directly in ISR
- EP0 uses thread-based processing for control transfer flexibility
- Bank alternation tracking for dual-bank endpoints

3. Clock Management:
- PLLB configured for 48MHz USB clock (UDPCK)
- Proper suspend/resume with clock gating
- Transceiver disable during disconnect for power saving

4. CSR Register Handling:
- Special "write 1 to preserve" bits handled correctly
- Polling after set/clear for MCK/UDPCK synchronization
- RX_DATA_BK0, RX_DATA_BK1, RXSETUP, STALLSENT, TXCOMP preserved

5. Endpoint Allocation Strategy:
- Odd endpoints (1,3,5,7) for IN, even (2,4,6) for OUT
- EP0 for control transfers

Performance:
- Achieves ~800-900 KB/s throughput
- Near USB Full-Speed theoretical maximum (~1.2 MB/s)
- All testusb tests (0-29) passing

Tested on sam4s_xplained board with Linux testusb utility.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2026-03-16 12:21:08 +01:00
Bartosz Bilas
b34e098f4f drivers: gpio: pcf857x: fix race condition in port_set_raw
The pcf857x_port_set_raw() function has a race condition where
the lock is only taken after the I2C write to update the cached
outputs_state. This allows concurrent threads to read stale
outputs_state values and compute tx_buf based on outdated data.

Since PCF8574/PCF8575 devices have a single output register that
is written atomically (all pins at once), a stale read causes one
thread's pin changes to be overwritten by another thread's write.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2026-03-16 12:20:15 +01:00
Holt Sun
3336e37ad5 drivers: clock_control: mcux_sim: decode clock cell via DECODE macros
Replace raw clock_ip_name_t cast with a structured decode of the
encoded `id` clock cell introduced by the KINETIS_SIM_CLOCK() macros.

The sub_system pointer carries a 32-bit encoded value. Extract it via
(uint32_t)(uintptr_t)sub_system and use the KINETIS_SIM_CLOCK_DECODE_*()
macros to retrieve gate_offset, gate_bit and clock_name. This avoids
relying on a C bitfield struct overlay (implementation-defined bit
ordering) or undefined pointer casting behaviour.

Also add mcux_sim_validate_gate_offset() which checks that the decoded
gate register offset is word-aligned and within the SIM register region
size declared in DT, returning -EINVAL if not. This prevents a malformed
clock specifier from accidentally enabling or disabling an unintended
peripheral gate.

Remove the LOG_ERR call and the entire logging module infrastructure
(LOG_LEVEL define, log.h include, LOG_MODULE_REGISTER) since no log
calls remain in the file. This also eliminates the GNU statement
expression extension warning triggered by LOG_ERR macro expansion
under -Wpedantic.

The NXP_KINETIS_SIM_NODE macro is moved to the top of the file so it
can be shared by both the validation helper and the clkout_source /
clkout_divider property accessors.

Fix pinctrl_nxp_port.c to pass the encoded `id` cell (name) as the
clock subsystem instead of constructing CLK_GATE_DEFINE() directly
from the explicit offset/bits DT cells. The old approach bypassed
the new encoding and caused PORT clocks to not be enabled, resulting
in UART pins not being muxed and no serial output.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-03-16 09:02:51 +01:00
William Markezana
6c2b586f2f drivers: counter: add Bouffalo Lab timer and rtc drivers
Add counter drivers for Bouffalo Lab SoCs:
- GP timer driver with 2 alarm channels, configurable clock source,
  and software cycle tracking for SoCs without hardware counter clear
- RTC counter driver exposing the always-on 32 kHz HBN RTC

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-03-16 08:59:13 +01:00
Camille BAUD
a393449803 clock_control: bflb: Add support for F32K
Allow configuring and using F32K 32768Hz Clock

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-03-16 08:58:06 +01:00
Camille BAUD
3b4e0f1e7e clock_control: bflb: decorrelate PLL/DLL status from root clock
Allows enabling and disabling PLLs and DLLs independently
from root clock selection.

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-03-16 08:58:06 +01:00
Camille BAUD
04de88ea93 clock_control: bflb: Add support for flash clock settings on BL60x & BL70x
Adds ability to configure flash clocks for those SoCs

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-03-16 08:58:06 +01:00
Camille BAUD
71f53e3f50 clock_control: bflb: Harmonize PLL and root clock control
Make PLL settings easier and more shared

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-03-16 08:58:06 +01:00
Ryan McClelland
24e8bf81b7 drivers: counter: run clang-format on counter_handlers.c
run clang-format on counter_handlers.c

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-03-16 08:56:53 +01:00
Ryan McClelland
d179c2b770 drivers: counter: add missing functions in to counter_handlers.c
counter_handlers.c was missing verifier/marshaling coverage for multiple
counter APIs, especially 64-bit helpers.
This change adds the missing z_vrfy handlers and corresponding mrsh
includes so the syscall layer matches the public counter API surface.

Missing functions now covered in drivers/counter/counter_handlers.c:

z_vrfy_counter_get_frequency_64
z_vrfy_counter_us_to_ticks_64
z_vrfy_counter_ticks_to_us_64
z_vrfy_counter_ns_to_ticks
z_vrfy_counter_ns_to_ticks_64
z_vrfy_counter_ticks_to_ns
z_vrfy_counter_ticks_to_ns_64
z_vrfy_counter_reset
z_vrfy_counter_set_value
z_vrfy_counter_set_value_64
z_vrfy_counter_get_max_top_value_64
z_vrfy_counter_set_top_value_64
z_vrfy_counter_set_channel_alarm_64
z_vrfy_counter_get_top_value_64
z_vrfy_counter_get_guard_period_64
z_vrfy_counter_set_guard_period_64

z_vrfy_counter_get_pending_int was removed from the macro as it
returns a uint32_t and not exactly an int.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-03-16 08:56:53 +01:00
Dave Joseph
bfeb67b734 mbox: mbox_ti_secproxy: Flush rx thread on channel enable
Add secproxy_mailbox_flush_thread() to clear stale messages from
rx thread when enabling a channel. Read and discard all pending
messages to ensure clean thread state and prevent errors from
previous unclean state.

Signed-off-by: Dave Joseph <d-joseph@ti.com>
2026-03-16 08:54:22 +01:00
Dave Joseph
aaf1924668 mbox: mbox_ti_secproxy: Implement per-channel interrupt handling
Replace single shared interrupt with per-channel interrupt support.
Change .irq to .interrupts[] array in config, use LISTIFY macros
for ISR generation and connection, add channel_enable[] array for
per-channel state tracking. Each rx channel now has independent ISR.

Signed-off-by: Dave Joseph <d-joseph@ti.com>
2026-03-16 08:54:22 +01:00
Dave Joseph
27c3152710 mbox: mbox_ti_secproxy: Remove redundant error checks
Remove duplicate error validation in ISR and send path that is
already performed by secproxy_verify_thread(). Remove error mask
checks, message queue fullness checks, and unused
SECPROXY_MAILBOX_NUM_MSGS macro.

Signed-off-by: Dave Joseph <d-joseph@ti.com>
2026-03-16 08:54:22 +01:00
Dave Joseph
d1db9b1ab7 mbox: mbox_ti_secproxy: Forward error codes in send path
Forward actual error codes from secproxy_verify_thread() instead
of masking all errors as -EBUSY. Now returns -EINVAL,
-EBUSY, or -ENODATA from secproxy_mailbox_send() to aid debugging.

Signed-off-by: Dave Joseph <d-joseph@ti.com>
2026-03-16 08:54:22 +01:00
Dave Joseph
70fec30e5e mbox: mbox_ti_secproxy: Make verify thread function non-blocking
Remove busy wait from secproxy_verify_thread() to return immediately
with error status. If mailbox is full, waiting for message processing
is unnecessary and blocks execution until timeout, reporting a timeout
error message reducing debuggability.
The mailbox driver should only return the appropriate error code.
Any required retry logic can be implemented in the caller layer.

Signed-off-by: Dave Joseph <d-joseph@ti.com>
2026-03-16 08:54:22 +01:00
David J. Leach, Jr.
ac7bdd8df4 drivers: wifi: winc1500: fix out-of-bounds write in winc1500_get
The winc1500_socket function returns a socket index that was only
being checked for negative error values. Coverity identified that
the index was not being verified against the upper bound of the
socket_data array, potentially leading to an out-of-bounds write.

Added an explicit check to ensure the socket index is within the
valid range [0, CONFIG_WIFI_WINC1500_OFFLOAD_MAX_SOCKETS].

Fixes #84708

Signed-off-by: David J. Leach, Jr. <tasmar@gmail.com>
2026-03-16 07:26:54 +01:00