Commit graph zephyr/drivers
Author SHA1 Message Date
Yuzhuo Liu
3835a949f5 drivers: i2c: bee: add async transfer_cb with timeout
Implement the I2C callback API (CONFIG_I2C_CALLBACK) and a transfer
timeout backstop for the Bee controller.

The transfer path is refactored into i2c_bee_start(), which kicks off a
transaction, and i2c_bee_complete(), which finalizes it from the
completion ISR. i2c_bee_transfer_cb() arms the transfer, stores the
user callback and, unless the timeout is K_FOREVER, starts a watchdog
timer; the callback is invoked from ISR context on completion. The
blocking i2c_bee_transfer() now waits on the sync semaphore with the
configured transfer timeout and returns -ETIMEDOUT on a hung bus.

Because the completion path releases the bus lock from ISR context, the
bus mutex is replaced with a binary semaphore (a mutex cannot be given
back from an ISR). The driver selects I2C_TRANSFER_TIMEOUT_SUPPORTED and
honors CONFIG_I2C_TRANSFER_TIMEOUT_MS via I2C_DT_INST_TRANSFER_TIMEOUT().

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-10-28 22:27:33 -04:00
Yuzhuo Liu
0537754527 drivers: i2c: bee: add bus recovery support
Add optional I2C bus recovery for the Bee controllers. When
CONFIG_I2C_BEE_BUS_RECOVERY is enabled and scl-gpios/sda-gpios are
provided on the I2C node, recover_bus() temporarily muxes the pins to
GPIO and drives the standard bit-bang recovery sequence via the shared
i2c_bitbang helper, then restores the pinctrl default state and
reprograms the controller with the cached configuration.

On RTL87X2G the recovery lines are configured once as hardware
open-drain outputs, so each bit-bang edge is a single data-register
write that meets the SCL timing. RTL8752H has no hardware open-drain,
so its callbacks emulate it by switching pin direction (input with
pull-up for high, output-low for low).

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-10-28 22:27:33 -04:00
Yuzhuo Liu
1f64bb5e7e drivers: i2c: bee: implement get_config
Cache the last applied controller configuration and expose it through
the I2C get_config API. The configuration logic is split into a lockless
i2c_bee_do_configure() helper that performs the hardware programming and
records the active configuration word, and a thin i2c_bee_configure()
wrapper that keeps holding the bus lock around it. i2c_bee_get_config()
returns the cached word, allowing clients to query the current bus speed
and addressing mode.

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-10-28 22:27:33 -04:00
Yuzhuo Liu
67bf2fe962 drivers: i2c: bee: add RTIO submit support
Wire up the I2C RTIO fallback submit handler so that the Bee I2C
controller can be used through the RTIO-based asynchronous API. The
fallback executes the submitted transactions on top of the existing
blocking transfer path, which keeps the change minimal while making the
device usable from i2c_iodev/rtio_submit based clients.

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-10-28 22:27:33 -04:00
Muhammad Waleed Badar
e2738fea8c drivers: i2c: bcm2711: query pclk at runtime via clock_control
Update platform clock using clock controller API.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-10-28 22:27:23 -04:00
Yangbo Lu
e6c3abe724 drivers: sdhc: imx_usdhc: use standard driver APIs for host init
Converted imx_usdhc to use standard driver APIs for host properties
and capabilities init.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-10-28 22:27:14 -04:00
Yangbo Lu
3e7ff3e9b4 drivers: sdhc: add standard controller driver
Added standard controller driver per SD Specifications Part A2
SD Host Controller Simplified Specification (Version 3.00) which
matches current sdhc and sd subsystem features support.
It can be updated in the future for example to v4.20 if new
features are required to support.

For now, the driver provided standard registers definition and
access APIs, also provided a sdhc_standard_host_init API for host
properties/capabilities initialization.

Vendor drivers to reuse the standard host driver are required to
use sdhc_standard_host_common_config/sdhc_standard_host_common_data.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-10-28 22:27:14 -04:00
Yangbo Lu
36b4e6a14a drivers: sdhc: add common code
Added sdhc_common.c for common code. For now, it provided
only one common API, for SDHC device tree properties
initialization.

Vendor drivers can convert to use sdhc_common_config and
sdhc_common_dt_props_init API.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-10-28 22:27:14 -04:00
Yangbo Lu
49d9810342 drivers: sdhc: rename sdhc_helpers.h to sdhc_common.h
Renamed sdhc_helpers.h to sdhc_common.h for more usage
in the future. The SDHC needs a common c file for vendor
drivers reusing, and this file can be as its header file.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-10-28 22:27:14 -04:00
Satya Sri
ba6268291c drivers: interrupt_controller: add Xilinx AXI INTC driver
Add support for the Xilinx AXI/XPS Interrupt Controller (PG099).

The driver integrates with Zephyr's next-level interrupt framework and
supports multiple interrupt controller instances described in devicetree.
Optional hardware features (IPR, SIE, and CIE) are selected at build
time from Vivado xlnx,has-* devicetree properties.

IER updates use sys_read32()/sys_write32() with a per-instance spinlock
when SIE/CIE registers are not synthesized. Fast interrupt mode is
rejected at build time.

Signed-off-by: Alp Sayin <alpsayin@gmail.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Satya Sri <satyasri.katru@amd.com>
2026-10-28 22:27:05 -04:00
Tony Han
368e07425d drivers: timer: mchp_pit_g1_timer: use generic timer core for TICKLESS
Update the driver for using the generic timer core.
Enable the TICKLESS_CAPABLE support for mchp_pit_g1_timer.

Signed-off-by: Tony Han <tony.han@microchip.com>
2026-10-28 22:26:50 -04:00
Tony Han
a77e43ff91 drivers: timer: mchp_pit_g1_timer: simplify calculation in tickful ISR
Announce PICNT directly in tickful ISR by removing the unnecessary
multiplication and division.
Add a guard for early calls for "mchp_pit_get_cycles()" before MMIO is
mapped.

Signed-off-by: Tony Han <tony.han@microchip.com>
2026-10-28 22:26:50 -04:00
Tony Han
f7b5470028 drivers: timer: mchp_sam: add dependence for PIT64B timer config item
Add dependence for the configuration item of PIT64B timer when it is
used as the system timer.

Signed-off-by: Tony Han <tony.han@microchip.com>
2026-10-28 22:26:50 -04:00
Tony Han
40aa3735f0 drivers: timer: mchp_sam: add dependence for PIT G1 timer config item
Add dependence for the configuration item of PIT G1 timer when it is
used as the system timer.

Signed-off-by: Tony Han <tony.han@microchip.com>
2026-10-28 22:26:50 -04:00
Parin Baudhanwala
4f76d4e954 drivers: sensor: ams_as7341: add support for AMS AS7341 spectral sensor
Add initial driver support for the AMS AS7341 11-channel spectral sensor.
The driver communicates over I2C and implements the Zephyr sensor API.

- Add driver source files (ams_as7341.c, ams_as7341.h)
- Add devicetree binding (ams,as7341.yaml)
- Add Kconfig and CMakeLists.txt integration

Signed-off-by: Parin Baudhanwala <parin.baudhanwala@dnkmail.in>
2026-10-28 22:26:45 -04:00
minyuan xue
ce2921bd48 drivers: uart: add ameba uart driver support
Add realtek ameba uart driver.

Signed-off-by: minyuan xue <minyuan_xue@realsil.com.cn>
2026-10-28 22:26:35 -04:00
Alexpandi Muniyandi
1c0f1a764a drivers: adc: Add adc driver support for cyt4dn soc
Add adc driver support for cat1 cyt4dn soc infineon devices which
consumes sar2 module.

Signed-off-by: Alexpandi Muniyandi <alexpandi@linumiz.com>
2026-10-28 22:26:30 -04:00
Jamie McCrae
22bbf1cba4 drivers: mm: Fix bleeding Kconfig
Fixes a Kconfig bleeding when the driver it impacts is not
enabled. The Kconfig has not been renamed, but looks to have been
mis-named as it applies to MTL_TLB and just not TLB, which is a
different Kconfig and driver

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-10-28 21:52:00 -04:00
Jamie McCrae
0c788841b6 drivers: mm: Fix incorrect Kconfig dependency
Fixes a dependency for a Kconfig that bleeds, which looks to have
added the same dependency requirement twice by mistake

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-10-28 21:51:32 -04:00
Camille BAUD
d1f736496a clock_control: bflb: Make timebase-frequency define the effective timebase
System timer speed is now calculated from the timebase-frequency value.
Increase timebase-frequency for all SoCs.

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-10-28 20:17:40 -04:00
Michal Chromec
07345ca8ec drivers: serial: mcux_flexcomm: reduce DMA RX buffer switch gap
In the async RX DMA completion callback, dma_reload() and dma_start()
were called after three user-visible callbacks (UART_RX_RDY,
UART_RX_BUF_RELEASED, UART_RX_BUF_REQUEST). During this window the
DMA was idle and only the RX FIFO protected against data loss.

Reorder the callback so that dma_reload() and dma_start() are called
immediately after the driver state is updated, before any user
callbacks are issued. Bytes arriving during the callbacks are then
captured by DMA rather than stalling in the RX FIFO.

Signed-off-by: Michal Chromec <michal.chromec@nxp.com>
2026-10-28 20:17:07 -04:00
Alan Yang
7e8c59e774 drivers: pinctrl: npcm: add pin controller driver
Add the NPCM pin controller driver. It selects a pin's function by
writing the SCFG bits listed in devicetree, and sets the pull and
voltage level when requested.

Also add the NPCM4 pin function and pin group tables.

Signed-off-by: Alan Yang <tyang1@nuvoton.com>
2026-10-28 20:16:12 -04:00
Afonso Oliveira
d0f94fa7cc drivers: serial: add Nekko Shakti UART polling support
Include the UART needed for console output on the Erbium board. Its
original Shakti integration uses 32-bit MMIO accesses at eight-byte
register intervals, while the generic Shakti driver uses four-byte
intervals and mixed access widths.

Use openhwgroup,shakti-uart-v1 to identify the original register layout,
with interrupt enable at 0x30 and receive threshold at 0x40. The later
Erbium UART has a different interrupt register layout. Link the public
register documentation for the supported revision in the binding [1].

Follow the documented transmit flow: wait for space in the FIFO and
write the character. The functional emulator [2] also enqueues data on
the TX write, without additional configuration-register writes.

Provide polling input/output, receive error reporting and fixed 8N1
initialization. Calculate the baud divisor at build time from devicetree
clock-frequency and current-speed. Reject zero baud rates and divisors
outside 1..65535 with build assertions. Keep the divisor in the constant
device configuration and program it once at initialization. Use the
device MMIO API and add the serial Kconfig and CMake integration.

Validate polling transmit and receive with actual input on the public
et-platform functional emulator at 836a4ab600e93. Interrupt-driven,
asynchronous and runtime line-configuration APIs remain unsupported.

[1] 325b32b7ef/doc/uart.md
[2] 836a4ab600/sw-sysemu/devices/shakti_uart.h

Signed-off-by: Afonso Oliveira <afonso.oliveira707@gmail.com>
Assisted-by: Codex:GPT-6
2026-10-28 20:14:43 -04:00
Nicolas Pitre
ef27f62aa8 drivers: timer: renesas_rx_cmt: fold CMT1 wraps from its own interrupt
The 16-bit CMT1 counter is extended to 32 bits in software: a read
counts a wrap when it sees the IR flag, or the count going backwards
during the read, then clears IR. A wrap landing between the count
sample and that clear loses its flag, and the next read sees neither
the flag nor a backwards step. The count then steps back by a period,
which the core announces as a jump of about 2^32 cycles (716 s at
6 MHz). Since commit dc295cc414 ("drivers: timer: renesas_rx_cmt:
use the generic timer core") the alarm can be armed for COUNTER_MAX,
one count short of a CMT1 period, so the read point creeps through the
period and regularly hits that window. Nothing but the alarm paced the
reads either, so two wraps could also pass between them.

Remember the last count read, so a count below it is a wrap whatever
became of the flag, and enable CMT1's compare-match interrupt to do a
read every period, so wraps can't pile up between reads however the
alarm is armed. Accepting the interrupt clears IR; a read that already
folded the wrap leaves nothing for the interrupt to add.

The wrap interrupt also wakes the CPU from idle, so raise the number
of early wakes the k_cpu_idle() test allows for this driver.

Fixes #123189

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-10-22 18:48:14 +02:00
Vincent Tardy
8bfd51a5ec drivers: ieee802154: stm32wba: fix low power exit
When the driver receives the PM_DEVICE_ACTION_RESUME notification,
the Link Layer deep-sleep exit function is called regardless of
the standby_entered value, and the NVIC configuration for the radio
is restored regardless of the Link Layer state.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-10-22 18:38:53 +02:00
Vincent Tardy
584ed746e5 drivers: bluetooth: stm32wba: fix low power exit
When the driver receives the PM_DEVICE_ACTION_RESUME notification,
the Link Layer deep-sleep exit function is called regardless of
the standby_entered value, and the NVIC configuration for the radio
is restored regardless of the Link Layer state.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-10-22 18:38:53 +02:00
John Batch
c46c5948a1 drivers: i2c: infineon_pdl: disable the SCB during bus recovery
Bus recovery muxes SCL and SDA to GPIO while the SCB stays enabled, and
every later transfer on the instance times out after a recovery.

The driver now disables the SCB before taking the pins and re-enables it
once they are restored.

Assisted-by: Copilot:claude-opus-5.5
Signed-off-by: John Batch <john.batch@infineon.com>
2026-10-22 18:38:05 +02:00
Fin Maaß
9688c124ef drivers: ethernet: bcmgenet: Use the standard Ethernet MTU
The interface was registered with GENET_MAX_FRAME_LEN, the 1536 byte
frame length programmed into the MAC, as its MTU. That made TCP and IP
fragmentation build packets up to 1536 bytes of L3 payload, which
exceeds the Ethernet frame size the MAC is configured for.

Register the interface with NET_ETH_MTU. The MAC frame length register
keeps GENET_MAX_FRAME_LEN.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-10-22 18:26:43 +02:00
Fin Maaß
8a2d68e904 drivers: ethernet: nxp_imx_netc: vsi: don't set link addr in set_config
The ETHERNET_CONFIG_TYPE_MAC_ADDRESS case of set_config called
net_if_set_link_addr(). The caller of set_config,
NET_REQUEST_ETHERNET_SET_MAC_ADDRESS, updates the link address of the
interface itself once set_config succeeded, and the driver should only
register the initial address from iface_init. Only store the address
in the driver data.

Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-10-22 18:25:56 +02:00
Fin Maaß
1a0eebccc4 drivers: ethernet: stm32: hal2: use the new MAC address in set_config
The ETHERNET_CONFIG_TYPE_MAC_ADDRESS case programmed the address
already stored in the driver data instead of the one passed in the
config, so the hardware kept the old MAC address. Store the new
address before programming it.

Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-10-22 18:25:25 +02:00
André Costa
688d4e3126 modules: hal_nxp: build pxp driver with LV_Z_DRAW_PXP
When LV_Z_DRAW_PXP is enabled, the build requires the PXP driver
sources. Add it to the build.

Additionally, ensure `MCUX_PXP` is not enabled at the same time as
the PXP IRQ is required by both LVGL and the DMA driver resulting
in conflicts.

Signed-off-by: André Costa <andre_miguel_costa@hotmail.com>
2026-10-22 18:24:31 +02:00
Sylvio Alves
675cbbc148 drivers: clock_control: esp32: default ext osc for slow-clk-src
Select CLOCK_CONTROL_ESP32_RTC_CLK_SRC_EXT_OSC when the
devicetree selects an external 32 kHz oscillator as slow clock
source, so the startup calibration uses the cycle count meant for
external slow clocks. This also applies the lower
CLOCK_CONTROL_ESP32_RTC_CLK_CAL_CYCLES limit used for external
slow clocks.

Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-10-22 18:24:16 +02:00
Sylvio Alves
b38155be1a drivers: clock_control: esp32: fix pmu external 32k osc source
On the PMU based SoCs other than ESP32-P4 the devicetree value
ESP32_RTC_SLOW_CLK_32K_EXT_OSC reached rtc_clk_slow_src_set()
unchanged, which aborts because the slow clock mux has no such
input, and the external clock pad setup was unreachable. Map it
to SOC_RTC_SLOW_CLK_SRC_OSC_SLOW, enable the external clock input
for that source and calibrate it with CLK_CAL_32K_OSC_SLOW. When
the external clock does not start, release its input pad before
falling back to the internal RC. ESP32-P4 has no such input, so
the value is rejected there at build time and by
clock_control_configure().

Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-10-22 18:24:16 +02:00
Sylvio Alves
4ab1d34347 drivers: clock_control: esp32: use console uart clock for baud
After a CPU frequency change the console baud divider was
computed from the APB frequency, except under MCUboot. On
ESP32-C3 and ESP32-S3 the ROM clocks the console UART from XTAL,
so with simple boot the console ran at half the configured baud
until the UART driver reconfigured it, and stayed there when that
driver did not initialize. Read the UART source clock and compute
the divider from its actual frequency.

Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-10-22 18:24:16 +02:00
Sylvio Alves
8dda13eef9 drivers: clock_control: esp32: honor xtal32k calibration retry
CLOCK_CONTROL_ESP32_RTC_XTAL_CAL_RETRY was never read. Both
drivers hardcoded three retries. Use the option, default it to
the count the drivers always used and drop the dependency on the
crystal source, since the crystal can also be selected at runtime
through clock_control_configure().

Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-10-22 18:24:16 +02:00
Sylvio Alves
36ee4eb84a drivers: clock_control: esp32: fall back to rc if 32k xtal fails
When the 32 kHz crystal does not start at boot, the slow clock
selection returned -ENODEV and the clock controller failed to
initialize, leaving every peripheral it clocks unusable. Switch
to the internal RC with a warning instead, as the retry comment
and Kconfig help already describe, and power the crystal down
once the RC is selected. A runtime request through
clock_control_configure() still returns -ENODEV.

Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-10-22 18:24:16 +02:00
Aksel Skauge Mellbye
701e925de9 drivers: counter: silabs_burtc: Do not miss alarms close to the counter
A COMP write takes effect only once it has synchronized to the BURTC
clock, a few cycles later. An alarm a tick or two ahead could be passed
by then and fire only after the counter wrapped.

Raise the compare flag if the counter has already reached the alarm for
relative alarms and absolute alarms configured to expire when late.
Return -ETIME for late absolute alarms.

Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-10-22 18:19:35 +02:00
Aksel Skauge Mellbye
15e7147ed3 drivers: counter: silabs_burtc: Report full range as top value
With CONFIG_COUNTER_SILABS_BURTC_ALARM, COMP holds the alarm and the
counter wraps at its full 32-bit range. Fix get_top_value() to return
the full range of the BURTC when COMP is used for alarms.

Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-10-22 18:19:35 +02:00
Kai Vehmanen
5d0c907ec5 drivers: mm: intel_adsp: tlb: map uncached alias in the MMU
The L2 TLB translates both the cached and the uncached alias of a
virtual page, but the Xtensa MMU page tables hold the two aliases as
separate entries. The SoC MMU table maps both aliases statically only
for the virtual space backed 1:1 by physical L2, while
sys_mm_drv_map_page() mapped just the cached alias in the MMU.

Pages mapped beyond the end of physical L2 were therefore reachable only
through the cached alias. This leads to faults when use of coherent
(uncached) addresses is attempted.

Map and unmap the uncached alias together with the cached one when
mapping, unmapping or updating the flags of a page. The uncached
alias is never made executable. Unmapping it within the statically
mapped range restores the static entry.

Tested on NVL-S with the SOF check-playback test using the
sof-hda-generic-ace3-4ch topology.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2026-10-22 18:19:22 +02:00
Jukka Rissanen
67db4d6562 drivers: ethernet: nxp_enet: Clear checksums before TX insertion
With CONFIG_ETH_NXP_ENET_HW_ACCELERATION the ENET inserts the IPv4
header checksum and the TCP, UDP and ICMP checksum into every IP frame
it sends. It computes them over the checksum fields as they are, so the
fields must be zero.

The stack leaves them zero only when it offloads the checksum for the
interface the packet was built on. Two kinds of frames reach the ENET
with the checksums filled in: frames forwarded by an Ethernet bridge,
which carry the sender's checksums, and frames sent by the bridge
interface itself, which is a virtual interface and so gets software
checksums. The ENET then sent them with wrong IPv4 header and ICMP
checksums, and the receiver dropped them.

Clear the fields in the TX copy of the frame before handing it to the
ENET. Frames with an 802.1Q tag are handled the same way, as the ENET
inserts their checksums too. Frames whose checksums the stack offloaded
are unchanged. IPv4 fragments keep their protocol checksum, which the
stack computes in software before fragmenting.
ICMPv6 is left alone: the ENET does not insert its checksum.

Tested on mimxrt1170_evk@B/mimxrt1176/cm7 bridging ENET and ENET_1G
between two Linux hosts, capturing every frame the board sent. Before:
the bridge's own ICMP replies had IPv4 and ICMP checksums 0xffff, and
the receiving NIC dropped all forwarded IPv4 frames and the forwarded
IPv6 TCP and UDP frames; forwarded ICMPv6 and IPv6 fragments were fine.
After: forwarded ICMP, UDP and TCP over IPv4 and IPv6, ICMP to the
bridge address, and 3000 byte IPv4 and IPv6 fragmented pings all pass,
with no bad checksum in 547 frames. Forwarded ICMP, UDP and TCP frames
tagged with VLAN 100 had 0xffff checksums before and pass after.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2026-10-22 18:18:49 +02:00
Martin Hoff
f9469f9235 drivers: clock_control: siwx91x: gate NWP device lookup on its Kconfig
DEVICE_DT_GET_OR_NULL(nwp) emits a reference to the NWP device even
when the pointer is unused. At -O0 , with debug optimization disabled,
that reference is kept, so builds without CONFIG_SILABS_SIWX91X_NWP fail
to link.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2026-10-22 12:29:55 +02:00
Benjamin Cabé
92f8ec3553 drivers: audio: cs35l5x: use SPI_OP_MODE_CONTROLLER
SPI_OP_MODE_MASTER is deprecated; use SPI_OP_MODE_CONTROLLER.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5.5
2026-10-22 12:29:32 +02:00
Aditya Bhutada
8f2cd66e3b drivers: espi: espi_taf_npcx: Increase RPMC OP2 retry limit
Raise the retry limit from 3 to 100 to allow longer RPMC OP2 busy
periods. Write root key seems to require multiple retries.

Signed-off-by: Aditya Bhutada <aditya.bhutada@intel.com>
2026-10-22 12:26:43 +02:00
Benjamin Cabé
b70dbaf045 drivers: spi: esp32: drop unused SPI_MASTER_FREQ_* macros
Nothing uses them; removing them also drops non-inclusive terminology
from the driver.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5.5
2026-10-22 09:44:52 +02:00
Rob Barnes
5944b590d0 drivers/gpio: ite_it8xxx2_v2: Only submit worker for level interrupts
gpio_ite_isr() and gpio_ite_pin_interrupt_configure() previously
submitted data->interrupt_worker to k_sys_work_q unconditionally on
every GPIO interrupt and configuration call, even when only
edge-triggered interrupts were enabled on the port. Under high-rate
edge interrupts, this floods k_sys_work_q with hundreds of no-op work
submissions per second.

Only submit data->interrupt_worker when the pin is configured for
level-triggered interrupts, clear level_isr_low and level_isr_high
when disabling a pin's interrupt with GPIO_INT_MODE_DISABLED, and skip
pins with disabled IRQs in gpio_ite_interrupt_worker().

TEST=./twister -s drivers.gpio.ite_it8xxx2_v2
TEST=Boot hylia and verify k_sys_work_q is not flooded by edge IRQs

Signed-off-by: Rob Barnes <robbarnes@google.com>
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2026-10-22 09:44:35 +02:00
Pieter De Gendt
7f90aefe77 drivers: memc: sam_smc: fix the mode field macros
COND_CODE_1() strips the parentheses around its code argument, leaving
the ?: of SMC_DATA_BUS_WIDTH(), SMC_BYTE_ACCESS_TYPE() and
SMC_PAGE_MODE() bare in the bank's mode expression, where it binds
looser than the surrounding |. Introduced in commit 0947bcca5a
("drivers: memc: sam_smc: configure SAME70 SMC mode fields").

This drops the NRD/NWE controlled read and write modes: banks get
SMC_MODE_PMEN | SMC_MODE_PS_4_BYTE, or only SMC_MODE_DBW_16_BIT when
atmel,smc-data-bus-width is set. On a SAM4S with an 8-bit device on
NCS0 every read returned garbage.

Select each field with COND_CODE_1() on its enum index or boolean, as
done for the read and write modes, so no ?: is left to expose.

Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-10-22 09:40:10 +02:00
Priyanshu Singh
e60b8649ad spi: rtio: transparent scratch buffer for discard read operations
When decomposing asymmetric SPI transceive buffers where rx_buf is NULL
(discard buffer), unconditional pointer arithmetic (rx_buf += len)
corrupted NULL into an invalid address (e.g. 0x00000003), causing
BusFaults. Furthermore, passing NULL rx buffers directly down to driver
DMA engines risks vector table corruption or controller hangs.

Introduce CONFIG_SPI_RTIO_SCRATCH_BUF_SIZE (default 32 bytes) and route
discard/dummy reads into an internal scratch bit-bucket buffer within
spi_rtio_copy(), chunking larger reads to keep DMA transfers bounded.
Guard all buffer pointer advancements against NULL, and flatten the
tx_len == rx_len branching structure.

Fixes #108313

Signed-off-by: Priyanshu Singh <singhpriyanshu9838@gmail.com>
2026-10-22 09:37:44 +02:00
Benjamin Cabé
cc4d7bc93c drivers: sensor: bma4xx: fix emulator on 64-bit targets
BIT(11) is an unsigned long, so on 64-bit targets multiplying the
signed acceleration by it makes the conversion unsigned and negative
values end up as large positive register values. Multiply by a signed
value.

Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-10-21 15:07:37 -05:00
Benjamin Cabé
a678bfadf9 drivers: sensor: adt7420: fix emulator on 64-bit targets
BIT(31) is an unsigned long, so on 64-bit targets dividing the signed
temperature by it converts negative values to large positive ones and
the emulator reports the wrong temperature. Divide by a signed value.

Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-10-21 15:07:37 -05:00
Benjamin Cabé
4d9331c1bb drivers: sensor: adxl345: track decoded FIFO samples by offset
The stream decoder stored a pointer to the next sample in the uint32_t
fit cursor. On 64-bit targets the pointer is truncated, and the casts
back to a pointer fail to build with -Werror=int-to-pointer-cast.

Store the offset of the next sample in the encoded buffer instead.

Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-10-21 15:07:37 -05:00