Commit graph zephyr/drivers
Author SHA1 Message Date
Ching Ping Sun
370a5b1809 drivers: ethernet: set DM9051 IMR before RCR
Set the Interrupt Mask Register (IMR) before the RX Control Register (RCR)
when initializing the DM9051 ethernet controller. This prevents potential
race conditions where the receiver is enabled before interrupt masking
is properly configured.

According to the DM9051A datasheet, IMR bit 7 (PAR - Pointer Auto-Return
Mode) affects memory read/write pointer behavior. Setting IMR first ensures
the memory pointer configuration is ready before RX is enabled.

Signed-off-by: Ching Ping Sun <tom_sun@davicom.com.tw>
2026-06-08 10:44:50 +01:00
Etienne Carriere
0896fdf5a2 drivers: i2c: stm32: Bus recovery is not supported if no GPIO defined
Change STM32 I2C driver to report that I2C bus recovery is not supported
when there are no GPIO defined for the sequence instead of returning
a IO error, helper caller (possibly a tests samples) to handle this
specific error case.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-06-08 10:44:35 +01:00
Piter Zhang
4d6742752a firmware: scmi: Fix protocol version negotiation compatibility
The CLOCK_ATTRIBUTES reply structure has a clock_enable_delay field
only in protocol v3.0. When the platform implements v2.0 (e.g.
RK3588), the reply is 24 bytes but the driver expects 28 bytes,
causing "bad message len" errors.

Fix the inverted comparison in scmi_core_protocol_negotiate() and
store the resolved version in proto->version. Split the reply struct
into version-specific variants and select the expected reply length
in scmi_clock_attributes() based on the negotiated protocol version.

Signed-off-by: Piter Zhang <zhangtdvip@163.com>
2026-06-08 10:41:43 +01:00
Shontal Biton
abf2d3cf48 drivers: video: stm32_jpeg: Added grayscale configuration to JPEG driver
Added the option to use grayscale images as input to the jpeg driver.

Signed-off-by: Shontal Biton <shontal1005@gmail.com>
2026-06-08 10:41:05 +01:00
Shontal Biton
c537cd948e drivers: video: stm32_jpeg: style: Apply clang-format on JPEG driver
Apply clang format on jpeg driver according to coding style guidelines.

Signed-off-by: Shontal Biton <shontal1005@gmail.com>
2026-06-08 10:41:05 +01:00
Darcy Lu
fa80407da3 drivers: regulator: add regulator driver for RTS5817
Add regulator driver for RTS5817

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
2026-06-08 10:40:36 +01:00
minyuan xue
a3d6575d2a drivers: i2c: add ameba i2c driver support
Add Realtek Ameba I2C driver with DMA-based TX/RX support.

Signed-off-by: minyuan xue <minyuan_xue@realsil.com.cn>
2026-06-08 10:39:14 +01:00
Henrik Brix Andersen
7e3d975502 drivers: can: nxp: flexcan: prevent log flooding
Prevent flooding the log when a bus error occurs without a mailbox
generating an interrupt.

Fixes: #110654

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-06-08 09:15:43 +02:00
Muhammad Waleed Badar
2ca586e57a drivers: firmware: rpi_fw: add rpi_fw_transfer_list() API
Add rpi_fw_transfer_list() to send multiple property tags to the
VideoCore firmware in a single mailbox transaction. Takes an array
of rpi_fw_tag_list descriptors, each holding a tag, data buffer,
and size. All buffers are updated in-place with the firmware response.

Lower RASPBERRYPI_FIRMWARE_INIT_PRIORITY from 60 to 45 to ensure
firmware is ready before dependent drivers.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-06-08 09:10:03 +02:00
Muhammad Waleed Badar
302b8e57a7 drivers: display: add bcm2711 framebuffer display driver
Add a Raspberry Pi framebuffer display driver for the
Broadcom BCM2711 SoC. The driver communicates with the
VideoCore firmware via the Broadcom VideoCore mailbox interface.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-06-08 09:10:03 +02:00
Eva Klejmova
b7e01090a0 boards: nxp: MICFIL support for RT1170
Add MICFIL support for RT1170.

Changes include:

Board configuration:
- Add MICFIL pinctrl configuration to mimxrt1170_evk-pinctrl.dtsi
- Configure MIC_CLK, MIC_BITSTREAM00, and MIC_BITSTREAM01 pins
- Enable MICFIL peripheral in board device tree

Device tree:
- Add MICFIL node to nxp_rt11xx.dtsi with 8 channel support

Clock control:
- Add RT11xx MICFIL clock support to CCM rev2 driver
- Map MICFIL to PDM peripheral gate (kCLOCK_Pdm)
- Configure MIC root clock from Audio PLL

Clock bindings:
- Add IMX_CCM_PDM_CLK definition for MICFIL clock reference

Signed-off-by: Eva Klejmova <eva.klejmova@nxp.com>
2026-06-08 09:09:50 +02:00
Eva Klejmova
5860e9da52 drivers: audio: Fix dmic_nxp_micfil channel mapping
Fix hardware channel mapping, and consecutive channel validation
to allow flexible channel configurations.

Signed-off-by: Eva Klejmova <eva.klejmova@nxp.com>
2026-06-08 09:09:50 +02:00
Vincent Jardin
8a68b0dd79 drivers: i2c: dw: fix target compound repeated START handling
In target mode, read_in_progress is only cleared on STOP_DET.
When a master issues a compound transaction with multiple repeated
STARTs that transitions from read back to write and then read again,
read_in_progress remains set from the first read phase. On the
second read phase the ISR takes the read_processed path instead of
read_requested, returning data from the wrong offset.

For example, an EEPROM-style compound transaction:

  S  addr+W  ptr  Sr  addr+R  [data1]  NAK
  Sr addr+W  ptr  Sr  addr+R  [data2]  NAK  P

Where S = START, Sr = repeated START, P = STOP, W = write,
R = read, NAK = not-acknowledge (last byte of a read).

data1 reads correctly, but data2 returns stale EEPROM content
because read_requested (which returns the byte at the current
pointer) is skipped in favor of read_processed (which increments
first, then returns the next byte).

Reset read_in_progress when entering a new write phase (RX_FULL
with state != CMD_SEND). This ensures the subsequent read phase
correctly calls read_requested to fetch data at the updated pointer.

The bug can be reproduced with the following C test program using
the I2C_RDWR ioctl against any I2C EEPROM target:

  /* 4-message compound: set ptr + read + set ptr + read */
  struct i2c_msg msgs[4] = {
      { .addr = 0x54, .flags = 0,       .len = 1, .buf = &ptr },
      { .addr = 0x54, .flags = I2C_M_RD, .len = 1, .buf = &rd1 },
      { .addr = 0x54, .flags = 0,       .len = 1, .buf = &ptr },
      { .addr = 0x54, .flags = I2C_M_RD, .len = 1, .buf = &rd2 },
  };
  ioctl(fd, I2C_RDWR, &(struct i2c_rdwr_ioctl_data){msgs, 4});
  /* Before fix: rd1 correct, rd2 wrong (stale offset) */
  /* After fix:  rd1 == rd2 == expected value */

Tested with FT232H master and RP2040 EEPROM target at 400 kHz:
10000 compound w+r+w+r cycles with 0 failures. Also verified with
libmpsse userspace I2C.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
2026-06-08 09:09:23 +02:00
Richard Wheatley
91a25bb3bc drivers: mspi: ambiq: add Apollo3 Blue support to ap3 driver
Guard Apollo3P Blue-only HAL fields (write latency, DMA boundary,
timing control, instruction/address size runtime control) behind
CONFIG_SOC_APOLLO3P_BLUE ifdefs so the driver also compiles and
runs correctly on Apollo3 Blue.

Add a dedicated MSPI_AMBIQ_BUFF_RAM_LOCATION default for Apollo3
Blue (0x40000) to account for its smaller SRAM layout. Gate the
MSPI_TIMING imply on SOC_APOLLO3P_BLUE since the timing API is
not available on Apollo3 Blue.

mspi_ambiq_timing_config() returns -ENOTSUP on Apollo3 Blue.
mem_boundary and time_to_break return -ENOTSUP if non-zero
values are requested on that SoC.

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2026-06-07 19:20:42 +02:00
Surya Prakash T
05bab75fc0 drivers: serial: renesas_ra_sau: Remove redundant irq_update
Removes the redundant uart_renesas_ra_sau_irq_update function,
as it performs no operations.

Signed-off-by: Surya Prakash T <suryat@aerlync.com>
2026-06-07 19:20:06 +02:00
Johan Hedberg
90e90e0cbc drivers: bluetooth: Use net_buf_drop() where applicable
Replace the two-line pattern:

  net_buf_unref(buf);
  buf = NULL;

with net_buf_drop(&buf) which performs both operations
atomically in a single step. Since net_buf_drop() also handles NULL
pointers checks for those before the call can be removed.

Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2026-06-07 19:19:47 +02:00
Camille BAUD
b12fc27624 drivers: display: ssd1322: Add small features
- custom LUT table
- enhance A (low grey enhance)
- external VSL toggle

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-06-07 19:18:36 +02:00
Camille BAUD
dec9d5958f drivers: display: Fix alignement and nibble issue on ssd1322
Fixes #106476, additionally fix incorrect alignement width,
SSD1322 is 4 pixels per address except when in 2ppp mode

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-06-07 19:18:36 +02:00
Ofir Shemesh
ee1034e60d spi: dw: promote fifo_depth to uint16_t to support 256-entry FIFOs
The DTS binding documents fifo-depth range as 2-256, but the
struct field is uint8_t which silently overflows 256 to 0.
Widen to uint16_t so the full hardware range is representable.

Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
2026-06-07 19:17:52 +02:00
Li Yunfan
7451b51c6a drivers: bluetooth: infineon: fixed stabilization delay for cyw43439
Changed stabilization delay in hci_uart_infineon.c from 250 to 270 ms
to allow cyw43439 to initialize.

Signed-off-by: Li Yunfan <lyftfc@gmail.com>
2026-06-07 19:17:42 +02:00
Aman Lachhiramka
8a4971a871 drivers: pinctrl: mspm0: add configuration validation
Add validation for pull-up and pull-down configuration
Add error logging

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
2026-06-07 19:17:07 +02:00
Fiona Behrens
7a08bc9cbb driver: serial: uart_numicro: Add interrupt driven support
Add support for interrup driven UART for the numicro uart driver
targeting the nuvoton m48x line.

This is mostly copied from the uart_numaker driver with some changes.

Signed-off-by: Fiona Behrens <me@kloenk.dev>
2026-06-05 22:35:10 +02:00
Fiona Behrens
416120f85c driver: serial: Use clock control driver in uart numicro
Use the new scc driver in the uart for the m48x numicro soc.
This removes quite a lot of calls into the nuvoton BSP and replaces
them with functions using the clock driver.

Signed-off-by: Fiona Behrens <me@kloenk.dev>
2026-06-05 22:35:10 +02:00
Johan Hedberg
cd27e70f93 drivers: bluetooth: stm32wb0: Fix mistakenly re-introduced code
This code snippet was originally removed by #109163 but then incorrectly
re-introduced by #107850 (most likely due to a rebasing error).

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2026-06-05 18:12:58 +02:00
Povilas Selevicius
4b2d25085c drivers: modem: cellular: change default init priority to 91
The default initialization priority of 79 causes the cellular modem
driver to initialize before the network stack (priority 90). Set the
default to 91 to ensure the modem initializes after the network stack
is ready.

Signed-off-by: Povilas Selevicius <povilas.selevicius@quadigi.com>
2026-06-05 18:12:43 +02:00
John Batch
669645bbd8 drivers: mfd: Add Infineon HPPASS CSG MFD driver
Adds the CSG MFD driver for the Infineon HPPASS block.  The CSG contains
five slices containing a DAC and comparator.  This MFD owns the combined
comparator interrupt and manages dispatches to each child comparator
device.

Assisted-by: Github Copilot:claude-opus-4.7
Signed-off-by: John Batch <john.batch@infineon.com>
2026-06-05 18:11:50 +02:00
Fabrice DJIATSA
af6c05c4f0 drivers: disk: stm32: add a GPIO dependency for all STM32 series
Most STM32 platforms do not have CONFIG_GPIO enabled by default.

Some tests, such as tests/drivers/disk/disk_access, require this
configuration to be enabled; otherwise, an error like "device API
is not gpio" occurs when testing SDMMC.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2026-06-05 16:57:03 +02:00
Etienne Carriere
688425144d drivers: i2c: stm32: Fix error case in configure handler
Correct stm32 I2C driver that did not report failure and left a semaphore
taken on some bus runtime configuration failures.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-06-05 13:23:31 +02:00
Tomas Barak
7491f2c62d drivers: audio: add dummy codec stub driver
- Create a dummy codec stub driver for testing and development purposes.
- Implemented dummy functions to satisfy the audio codec sample
- Add an audio_codec node and alias to the native_sim.dts
- Add Kconfig option
- Create a dts binding for the dummy stub

Assisted-by: GitHub Copilot:GPT-5.4

Signed-off-by: Tomas Barak <tomas.barak@nxp.com>
2026-06-05 13:20:04 +02:00
Albort Xue
7bdc1b35c1 drivers: wuc: add NXP WUU (Wakeup Unit) driver
The WUU driver supports:
- External pin wakeup sources with configurable edge detection
  (rising, falling, or any edge) and event types (interrupt, DMA, trigger)
- Internal module wakeup sources with interrupt and DMA event types
- Up to 32 external pins and 9 internal modules
- Recording and checking of triggered wakeup sources
- Integration with the WUC (Wakeup Controller) subsystem

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2026-06-05 13:19:50 +02:00
Madhab Sharma
5ce49e5c3c drivers: wifi : Use net_eth_set_if_type_wifi() API
Replace direct ethernet context manipulation with new
net_eth_set_if_type_wifi() API across all Wi-Fi drivers.

Signed-off-by: Madhab Sharma <madhabsharma94@gmail.com>
2026-06-05 09:37:33 +02:00
Sofian Elmotiem
a5160865d0 drivers: i2s: ambiq: fix DRAIN trigger not waiting for DMA completion
I2S_TRIGGER_DRAIN was setting state to I2S_STATE_STOPPING but never
actually stopping the hardware, so LRCK and BCLK continued toggling
indefinitely after the trigger.

Wait for the current DMA buffer to finish (tx_ready_sem) before
calling am_hal_i2s_dma_transfer_complete and am_hal_i2s_disable.

Signed-off-by: Sofian Elmotiem <sofianelmotiem@gmail.com>
2026-06-05 09:35:54 +02:00
Sofian Elmotiem
38350749a1 drivers: i2s: ambiq: fix inst_idx and shared config structs
inst_idx was set to the DT probe index n instead of the hardware
module index. On Apollo510, if only i2s1 is enabled, n=0 but the
HAL needs 1. am_hal_i2s_initialize ends up on the wrong hardware
block while the ISR and DMA stay wired to i2s1, so the ISR never
fires and the clocks on the wire are wrong.

Fix: derive the hardware module index from the interrupt number
relative to i2s0, matching the pattern in other Ambiq IOM drivers.

i2s_data_format and i2s_io_config were module-level globals mutated
by configure() on every call. Multiple instances stomp each other,
and a single instance carries stale fields across re-configure calls.

Fix: move both structs into i2s_ambiq_data and copy from const
defaults at the top of configure().

Signed-off-by: Sofian Elmotiem <sofianelmotiem@gmail.com>
2026-06-05 09:35:54 +02:00
Holt Sun
1af0beaee1 drivers: counter: mcux_lptmr: add guard period support
Implement the counter guard-period callbacks for the MCUX LPTMR alarm
configuration so late absolute alarms can be detected instead of being
silently skipped by users of the generic counter API.

Absolute alarms now compare the requested tick against the current
counter value and return -ETIME when the target is inside the late
window. The late check is disabled when the guard period is zero,
preserving the counter API contract that zero means no protection.

Convert accepted absolute alarms to relative compare values using the
LPTMR counter top value, so targets around wrap are treated consistently
with the counter API absolute-alarm semantics.

If COUNTER_ALARM_CFG_EXPIRE_WHEN_LATE is set, the driver keeps the
alarm active and pends the interrupt so wrappers such as rtc_counter
can treat the late alarm as an immediate expiry.

Keep the non-alarm configuration returning -ENOSYS for guard-period
setup, since that mode still reserves the compare register for
top-value operation.

Tested on frdm_mcxa153 with tests/drivers/counter/counter_basic_api
using CONFIG_COUNTER_MCUX_LPTMR_ALARM=y, the same test with the LPTMR
alarm option disabled, and tests/drivers/rtc/rtc_api using a temporary
zephyr,rtc-counter node backed by lptmr0.

Also validated the review case with a temporary app that sets an
absolute tick-0 alarm while stopped. With guard period 0 the alarm API
returns 0 and fires the callback; with a nonzero guard period it returns
-ETIME and fires the callback when EXPIRE_WHEN_LATE is set.

The LPTMR late-alarm counter tests now run instead of being skipped,
and the RTC API suite passed 5/5 with PROJECT EXECUTION SUCCESSFUL.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-06-05 09:34:52 +02:00
Benjamin Cabé
518ab9b152 drivers: display: sdl: support color dithering
Wire the new color dithering helper into the SDL display driver.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-06-05 09:34:34 +02:00
Benjamin Cabé
1a230d3dc0 drivers: display: ed2208_gca: support color dithering
Wire the new color dithering helper into the ED2208 driver.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-06-05 09:34:34 +02:00
Benjamin Cabé
743ba8d987 drivers: display: ac057tc1: support color dithering
Wire the new color dithering helper into the AC057TC1 driver.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-06-05 09:34:34 +02:00
Benjamin Cabé
1de537ab34 drivers: display: add color dithering support for palette-backed displays
Add helper code meant to be easily integrated into palette-backed display
drivers so that they can "automagically" expand their accepted input
formats to include RGB565 and RGB888, and automatically dither them down
to I_4 palette format.

Assisted-by: Copilot:gpt-5.4
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-06-05 09:34:34 +02:00
Svitlana Drozd
5cacb801b0 drivers: reset: scmi: add reset protocol support
Add helpers for the SCMI Reset Domain Management protocol and a Zephyr
Reset Controller driver that utilizes these helpers.

The update introduces protocol helper functions, a new driver,
relevant Kconfig and CMake entries, and device tree bindings.

Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
2026-06-05 09:33:53 +02:00
Michael Clausen
6b5447965f drivers: input: nunchuk: Added support for acceleration readings
plus added manual polling support.

Signed-off-by: Michael Clausen <michael@clsn.ch>
2026-06-05 09:32:05 +02:00
Fabio Baltieri
61fa460c51 uart_bridge: replace BUILD_ASSERT with min-len/max-len
Replace the BUILD_ASSERT for device count with min-len/max-len.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-06-04 23:50:48 +02:00
Fabio Baltieri
a0fcce9cb2 input: replace few BUILD_ASSERT with min-len and max-len
Replace few BUILD_ASSERT(DT_INST_PROP_LEN(..)) with min-len and max-len
properties.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-06-04 23:50:20 +02:00
Mathieu Choplain
9719cc9cbe drivers: usb_c: tcpc: stm32: drop usage of LL_UCPD_Init()
Replace LL_UCPD_Init() usage, which requires building the LL UCPD `.c`
file, with plain variables and LL calls for portability. `uint8_t` is
used for lower footprint.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-06-04 23:49:50 +02:00
Mathieu Choplain
0fe9326a7c drivers: usb_c: tcpc: stm32: enable peripheral clock using CLOCK_CONTROL
Use the clock control API to enable the peripheral clock instead of
relying on LL_UCPD_Init().

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-06-04 23:49:50 +02:00
Mathieu Choplain
76aa38890f drivers: usb_c: tcpc: stm32: don't check for an enabled instance
The Kconfig guard already ensures this can't be build if there's no
enabled instance.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-06-04 23:49:50 +02:00
Alain Volmat
a65b87f2c6 drivers: video: sw_generator: add GREY format support
Allow possibility to output a GREY format (8bpp) buffer
from the video-sw-generator.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-06-04 18:22:53 +02:00
Bjarki Arge Andreasen
ebff2368a3 drivers: clock_control: nrf: refactor lfclk_spinwait to poll wait
The lfclk_spinwait implementation is partially based on
k_cpu_atomic_idle() to idle the CPU while waiting for LFCLK events
if in ISR or in pre kernel. This implementation is fragile and
complex given k_cpu_atomic_idle() is a nop if in ISR, reducing it to
a polling check, and that IRQs are masked globally in pre kernel which
conflicts with the expected use of k_cpu_atomic_idle(), signified by
the need for manually calling NVIC_ClearPending().

This commit refactors the code to use a polling check, sleeping if
possible between checks. This simplifies the wait, without loosing
support for no multithreading since k_msleep() is available even
without threads.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-06-04 18:21:26 +02:00
Muzaffar Ahmed
654121a7a4 drivers: wifi: siwx91x: Restrict TX out of TWT Service Period by default
Currently, restrict_tx_outside_tsp is false by default, and with that,
the NWP may transmit data during TWT sleep time. Many APs do not support
this also should not be the default behavior.

Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
2026-06-04 18:19:31 +02:00
Ivan Shautsou
81a15e7e99 boards: others: add support for esp32h2_supermini board
Add support for the ESP32-H2 SuperMini development board, a compact
board based on the ESP32-H2 RISC-V SoC with Thread/Zigbee and
Bluetooth 5 (LE) connectivity.

Signed-off-by: Ivan Shautsou <vano1002@gmail.com>
2026-06-04 18:19:09 +02:00
Svitlana Drozd
301879424e drivers: ramdisk: add MMU support for ramdisk mapping
Ramdisk access fails with data abort when MMU is enabled, due to
using a physical address for the buffer instead of a mapped virtual
address.

Add support for MMU configurations by mapping the ramdisk
buffer to a virtual address space and storing this pointer in
the device's private data (`struct ram_disk_data`). Update all accesses
to use this virtual address when MMU is enabled.

With MMU disabled, the ramdisk continues to use
the original physical addressing as before.

Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
2026-06-04 18:18:49 +02:00