Commit graph zephyr/drivers
Author SHA1 Message Date
Zafer SEN
02c1f9881a drivers: modem: hl78xx: add GSM KCELL readiness, SINR, and +CTZEU URC
Add hl78xx_on_kcell() to parse +KCELL=0 serving-cell responses for
GSM/HL7812. hl78xx_signal_quality_check_uses_kcell() selects between
AT+KCELL=0 (GSM) and AT+KCELLMEAS=1 (LTE/NB) at runtime.

Add hl78xx_signal_quality_ready() to centralize the socket-readiness
logic previously open-coded in hl78xx_on_kcellmeas(). Add
hl78xx_schedule_signal_quality_retry() to reschedule the 2-second
retry from hl78xx_on_kcellmeas() and hl78xx_on_kcell().

Store SINR from AT+KCELLMEAS in modem_status.sinr and expose it via
struct hl78xx_network_info (HL78XX_NETWORK_INFO_SINR).

Add struct hl78xx_gsm_kcell_status to modem_status for GSM cell data.

Add hl78xx_on_ctzeu() behind CONFIG_MODEM_HL78XX_HAS_CTZEU_URC (HL7812
only). Move AT+CTZU=1 and AT+CTZR=3 into the init script and relocate
AT+KCELLMEAS? outside the LOW_POWER_MODE guard so it always runs.

Dispatch HL78XX_LTE_PHONE_FUNCTIONALITY_UPDATE from hl78xx_on_cfun(),
HL78XX_LTE_AT_CMD_READY once per boot cycle from both
hl78xx_on_await_registered_state_enter() and
hl78xx_airplane_mode_event_handler(), and HL78XX_LTE_DNS_READY from
hl78xx_carrier_on_timeout_handler().

Add MODEM_HL78XX_EVENT_AUTORAT_RAT_CHANGED and handle it in
hl78xx_await_registered_event_handler() to call
cfg_apply_rat_post_select() when AUTORAT switches RAT.

Add HL78XX_NETWORK_INFO_SINR + RSRQ validity threshold
(CONFIG_MODEM_MIN_ALLOWED_SIGNAL_QUALITY) and SINR threshold
(CONFIG_MODEM_MIN_ALLOWED_SINR).

Fix hl78xx_enable_lte_coverage_urc(): remove the spurious
LOW_POWER_MODE guard on the KCELLMEAS=1,<timeout> path.

Update hl78xx_hl7812_on_kstatev_urc() to delegate
AUTORAT_RAT_CHANGED after a RAT transition.

Add gnss_init_status reset on GNSS init entry and guard the
SCRIPT_SUCCESS handler against double-trigger.

Add LTE_RESTORE_REQUESTED handling in GNSS search and airplane-mode
states.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-07-01 23:44:22 -04:00
Zafer SEN
8752a433ec drivers: modem: hl78xx: add KNWSCANCFG network scan timing
Add a menuconfig MODEM_HL78XX_KNWSCANCFG that lets the user tune the
AT+KNWSCANCFG out-of-coverage and initial-scan backoff parameters at
build time.

Two sub-options are exposed:

  MODEM_HL78XX_KNWSCANCFG_OOC (mode 0) - controls how quickly the
  modem retries after losing coverage. Supports linear and exponential
  backoff with configurable min, max, and step values.

  MODEM_HL78XX_KNWSCANCFG_INITIAL_SCAN (mode 1) - controls the scan
  interval on first boot or after a restart. Same linear/exponential
  scheme selection.

Build-time #error guards in hl78xx_chat.h catch a max < min
misconfiguration before the AT string is composed with STRINGIFY.

The matching AT+KNWSCANCFG command strings are injected into the modem
init chat script via conditional MODEM_CHAT_SCRIPT_CMD_RESP entries.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-07-01 23:44:22 -04:00
Zafer SEN
a533828e56 drivers: modem: hl78xx: centralize CxREG parsing and add network info API
Replace the per-variant cxreg_try_parse_rat_mode callback with a
single hl78xx_parse_cereg_info() that decodes all CEREG/CREG fields
(TAC, cell ID, AcT, reject cause, timer strings) into the new public
struct hl78xx_cxreg_status.

Move kselacq_syntax and hl78xx_kselacq_rat to the public API header
so application code can set a preferred RAT list without including
driver-internal headers.

Add struct hl78xx_network_info and enum hl78xx_network_info_type to
replace the removed HL78XX_MODEM_INFO_APN, CURRENT_RAT, and
NETWORK_OPERATOR entries from hl78xx_modem_info_type. The new
hl78xx_get_network_info() returns cached values for APN, RAT,
operator (all formats), MCC, MNC, TAC, cell ID, IP, DNS, active band,
and SINR.

Add hl78xx_parse_plmn() to extract MCC and MNC from the numeric
operator string returned by AT+COPS.

Add hl78xx_set_prl_internal() to send AT+KSELACQ from within the
driver and keep the cached PRL in sync.

Update hl78xx_on_cxreg() to use the new parser and gate registration
events on init_sequence_completed. Update hl78xx_on_cops() to
populate network_info.operator. Update hl78xx_on_kselacq() to use
HL78XX_KSELACQ_RAT_CLEAR.

Update hello_hl78xx sample to call hl78xx_get_network_info() for
APN, RAT, and operator queries.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-07-01 23:44:22 -04:00
Zafer SEN
aaa4c35be2 drivers: modem: hl78xx: improve TCP socket error and NO_CARRIER handling
Improve TCP socket reliability by tracking per-socket error state
and surfacing NO_CARRIER as a clean connection-loss signal.

Add enum hl78xx_tcp_state_check_reason and per-socket fields
tcp_state_check_pending, tcp_state_check_reason, and
tcp_pending_err_code[] to defer and coalesce KTCP_NOTIF error
events until the socket read buffer is drained.

Add hl78xx_tcp_notif_to_errno() that maps all documented
KTCP_NOTIF codes to POSIX errnos. Add helper functions
hl78xx_mark_tcp_socket_error(), hl78xx_defer_tcp_socket_error(),
hl78xx_apply_pending_tcp_socket_error_if_drained(), and
hl78xx_wake_socket_waiters() to apply pending errors atomically.

Replace the single ktcp_state_match with a two-entry
ktcp_state_matches array: a partial=true match for the
+KTCPSTAT: line that invokes hl78xx_on_ktcpstat(), followed by a
plain OK terminator. This lets the driver read the full TCP state
response in one script step.

Add NO_CARRIER_STRING to connect_matches and kudpind_allow_match
so a NO CARRIER response during connect or UDP socket setup is
detected and the script terminates cleanly. Add
hl78xx_sockets_allow_matches (OK, NO_CARRIER, CME, ERROR) and
wire it through hl78xx_get_sockets_allow_matches() to replace the
generic hl78xx_allow_match for socket-level commands.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-07-01 23:44:22 -04:00
Manimaran A
c0c0ff702c drivers: espi: microchip: xec: Port V2 driver to MEC174x/5x/165xB
The eSPI creator, Intel has a proposal for a new eSPI driver where
the eSPI driver is a transport layer for events and data. The application
will handle all interpretation of command and data. We expect a clean,
from scratch implementation of the new driver architecture not based
on this driver.

This driver has been heavily modified as follows:
1. Try to meet the latest Zephyr coding standards.
2. Break up the massive and unmaintable register structure into smaller
   structures based on specific hardware functions.
3. Move VWire IRQ handlers into the driver so any changes to VWire
   ordering is more easily handled. We also plan to defeature the GIRQ
   interrupt driver since MEC/XEC GIRQ hardwar is not a real interrupt
   controller.
4. Move Serial-IRQ configuration out of the main part of the driver into
   the peripheral channel device initialization routines. Serial-IRQ and
   BARs are held in reset by nPLTRST active (low). Once the Host
   de-asserts nPLTRST VWire the driver calls functions from a table of
   peripheral channel devices.
5. Some peripheral channel devices have Kconfig's specifying the Host I/O
   address for accessing the peripheral. For most of these if the Kconfig
   is not defined we get the addrees from device tree.
6. A subset of peripheral channel devices can also be mapped to Host
   memory space. If a device tree property exists specifying the address
   we will program the appropriate memory BAR. Be aware this does allow
   both I/O and memory BARs to both be enabled.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2026-07-01 23:44:14 -04:00
Jordan Yates
5b4b30456c sensor: st: lps22hh: one-shot mode unless CONFIG_LPS22HH_TRIGGER
Transition the driver over to one-shot operation by default unless
`CONFIG_LPS22HH_TRIGGER` is enabled to actually make use of periodic
measurements. By using one-shot mode and polling on the status register,
this fixes the following code flow, which is currently broken due to
no periodic samples being available immediately after resuming.
```
pm_device_runtime_get(dev);
sensor_sample_fetch(dev);
sensor_channel_get(dev, ...);
pm_device_runtime_put(dev);
```

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-07-01 14:31:41 -04:00
Amneesh Singh
272fe35dbd drivers: sdhc: add TI AM654 SDHCI driver
Add the driver for TI's interrupt based AM654 SD Host Controller that can
be used with both eMMC and SD cards.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
2026-07-01 14:31:30 -04:00
Fabrice DJIATSA
50cd54c80f drivers: pwm: stm32: guard slave trigger against missing LL_TIM_TS_ macros
Some STM32 series (e.g. WB0) do not provide all LL_TIM_TS_ITRx macros,
causing build failures when the timer is configured in disabled slave
mode. Introduce PWM_SLAVE_TRIGGER() which conditionally expands to the
LL_TIM_TS_* token only when slave mode is actually enabled, and falls
back to 0 otherwise.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2026-07-01 15:28:35 +01:00
Benjamin Jurewicz
7993f4b343 usb: host: uhc: make max3421e driver work with multiple instances in dts
Make the max3421e driver work with multiple max3421e nodes present in the
dts.

Previously, one thread stack was defined, and the driver defaulted to the
device 0.

Now, each instance in dts with status okay gets its own thread, driver
data, and config.

Signed-off-by: Benjamin Jurewicz <bjurewicz@internships.antmicro.com>
2026-07-01 15:26:30 +01:00
Krzysztof Chruściński
6bfff0ee7e drivers: debug: nrf_etr: Fix possible bus fault when shell is used
When shell is used then log_output_func may be called with a
buf argument which is not the log_output buffer. In that case
buffer may not be word aligned and optimized copying cannot
be used. Add additional check for alignment before using
double word copying.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-07-01 15:25:23 +01:00
Kapil Bhatt
290eed0341 drivers: wifi: Move NRF70 from Experimental to Supported for 54LM20A/B
Move the Config WIFI_NRF70 from Experimental to Supported for
NRF54LM20A and NRF54LM20B boards.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-07-01 15:25:00 +01:00
Kapil Bhatt
2d41b91811 drivers: wifi: Move TX injection mode from Experimental to Supported
Move the TX injection mode feature from Experimental to Supported.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-07-01 15:25:00 +01:00
Kapil Bhatt
07e468ec68 drivers: wifi: Move Monitor mode from Experimental to Supported
Move the Monitor mode feature from Experimental to Supported.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-07-01 15:25:00 +01:00
Kapil Bhatt
5661ff82f1 drivers: wifi: Move Promiscuous mode from Experimental to Supported
Move the Promiscuous mode feature from Experimental to Supported.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-07-01 15:25:00 +01:00
Kapil Bhatt
6c0a8ffb69 drivers: wifi: Move RPU recovery from Experimental to Supported
Move the RPU recovery feature from Experimental to Supported.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-07-01 15:25:00 +01:00
Kapil Bhatt
c9f7f144f9 drivers: wifi: Move Zero copy TX from Experimental to Supported
Move the Zero copy TX feature from Experimental to Supported.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-07-01 15:25:00 +01:00
Ryan McClelland
e87e7e2ac7 i3c: ibi: add spinlock to protect IBI work node free-list
The IBI work node free-list uses a sys_slist_t which has no built-in
locking. Since the enqueue functions are called from ISR context
and the work handler returns nodes from the workqueue thread, this
is a data race on the shared list.

Add a k_spinlock around all sys_slist_get and sys_slist_append
operations on the free-list to ensure safe access from both ISR
and thread contexts.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-07-01 15:24:30 +01:00
Peter Wang
7fd275e800 drivers: clock_control: mcux_syscon: fix I3C freq for MCXAXX7
The MCXAXX7 series (e.g. MCXA577) changed the signature of
CLOCK_GetI3CFClkFreq() to take an instance id argument, unlike
the earlier MCXA1xx/MCXA2xx families where the function takes no
arguments. Guard the MCXAXX7 case before the generic
CONFIG_SOC_FAMILY_MCXA fallback so the I3C clock rate is queried
correctly on MCXA577.

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
2026-07-01 05:36:11 -04:00
Holt Sun
b25b70cec7 drivers: counter: add NXP TSTMR counter driver
Add a counter driver for the NXP Time Stamp Timer (TSTMR), a 56-bit
free-running, read-only up-counter. The driver exposes it through the
Zephyr counter API (get_value/get_value_64 and get_freq); start/stop,
alarm, and top-value operations are unsupported as the hardware is
free-running with no compare or interrupt capability.

The frequency is SoC-specific and taken from the clock-frequency
devicetree property. A coherent 56-bit read is obtained by sampling the
low/high registers twice under an IRQ lock and handling low-word
rollover.

Add the binding, Kconfig, and build glue.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-07-01 05:35:57 -04:00
Tim Lin
f5976bd43c drivers/bbram: it8xxx2: Add VBAT reset status check API
Implement the BBRAM check_invalid() API for IT8XXX2 devices.
The API reports VBAT power rail failures by returning -EFAULT
when a VBAT reset event is detected.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2026-07-01 05:25:06 -04:00
Eden Uhde
02a4aea153 drivers: display: ls0xx: fix releasing SPI bus too soon
Moves a semaphore I added to lock the SPI bus during VCOM inversion
commands down one line in three places, so that we can ensure the
bus is ready before allowing display writes to be attempted.

Co-authored-by: snoyer <noyer.stephane@gmail.com>
Signed-off-by: Eden Uhde <eden@rainbowtree.house>
2026-07-01 05:24:27 -04:00
Swamidas Nampalli
680a351c7d drivers: wifi: siwx91x: fix TX net_pkt double unref
siwx91x_send() incorrectly unrefs a caller-owned TX net_pkt after
transmit. In the TX path, the packet is owned by the networking/L2
stack, while the driver only borrows it long enough to read or copy the
frame data.

As a result, the packet may be returned to the pool prematurely while
upper layers still consider it valid. Once released, the same memory can
be reused for a different allocation, creating a packet lifetime bug
similar to a use-after-free condition. This memory reuse can lead to
unexpected behavior and explain hangs in the transmit path.

Signed-off-by: Swamidas Nampalli <Swami.Das@silabs.com>
2026-07-01 05:23:13 -04:00
Ayush Singh
e50eae5b01 drivers: rtc: ti_mspm0: Fix month and year
- According to the zephyr rtc_time struct docs:
  tm_mon = MON - 1
  tm_year = YEAR - 1900
- MSPM0 RTC registers expect the actual month (1 to 12) and year (0 to
  4095)
- So perform the expected conversion on both sides.
- Fixes test_y2k in `tests/drivers/rtc/rtc_api`.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2026-07-01 05:22:54 -04:00
minyuan xue
0f66ecd398 drivers: counter: add ameba counter driver
Add realtek ameba counter driver.

Signed-off-by: minyuan xue <minyuan_xue@realsil.com.cn>
2026-07-01 05:21:51 -04:00
Himanshu Seth
441d734e0a drivers: ethernet: microchip: Add G1 Ethernet Driver
Add G1 Ethernet driver for Microchip Ethernet Peripherals.

Signed-off-by: Himanshu Seth <himanshu.seth@microchip.com>
2026-07-01 05:21:40 -04:00
Himanshu Seth
900b43641b drivers: mdio: microchip: Add G1 MDIO Driver
Add G1 Mdio driver for Microchip MDIO Peripherals.

Signed-off-by: Himanshu Seth <himanshu.seth@microchip.com>
2026-07-01 05:21:40 -04:00
Jun Lin
043b965ecf drivers: timer: npcx: fix potential elapsed cycle underflow
Fix a potential underflow bug in npcx_itim_evt_elapsed_cyc32() that
occurs when cyc_evt_timeout is 1. The timer register is programmed with
MAX(cyc_evt_timeout - 1, 1), but the elapsed calculation used
cyc_evt_timeout - cnt2 - 1, causing an off-by-one mismatch.

When cyc_evt_timeout=1:
- Register is set to MAX(0, 1) = 1
- If read before first tick (cnt=1), elapsed = 1 - 1 - 1 = -1
- This underflows to 0xffffffff (~36 hours worth of cycles)

This can trigger a watchdog reset: the massive elapsed value causes
sys_clock_announce() to run all scheduled tasks in a tight loop,
starving the watchdog feeder.

Fix by mirroring the same MAX(cyc_evt_timeout - 1, 1) logic used when
programming the timer, ensuring the elapsed calculation matches the
actual start value.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2026-06-30 18:22:31 -04:00
Sylvio Alves
e65faf5d6e drivers: serial: esp32 lp_uart irq and optional flow control
Add interrupt-driven API support to the esp32 lp_uart driver and make
RTS/CTS hardware flow control optional, enabled only when the device
tree sets hw-flow-control. Add a loopback property that ties TX to RX
inside the peripheral for self-test without external wiring.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-06-30 18:22:25 -04:00
Sylvio Alves
98518707fa drivers: serial: esp32 lp_uart support on esp32c5 and esp32p4
Extend the esp32 lp_uart driver to the esp32c5 and esp32p4. On the
esp32p4 the LP UART signals are routed through the LP GPIO matrix and
the controller is clocked from the precise XTAL_D2 source instead of
the uncalibrated RC_FAST, so the baud-rate framing is reliable.

Relax the fixed-pin bindings, describe the lp_uart node pins on the
c5/c6/p4 HP and LP cores, and extend the echo_ulp sample. Update
hal_espressif for the esp32p4 LP GPIO matrix and clock-tree helpers.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-06-30 18:22:25 -04:00
Fin Maaß
d37c847222 drivers: ethernet: esp32: align dt structure
align the devicetree structure
with the recently added more generic
Synopsys ethernet driver, as the esp32
also uses the same IP from Synopsys, so we
can add support for the esp32 in that driver
easier.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-06-30 18:22:15 -04:00
S Swetha
d4e1a56873 drivers: interrupt_controller: intc_ioapic: Add x2APIC physical dest mode
This commit adds physical destination mode for IOAPIC interrupt delivery
on x2APIC platforms. Without this, interrupts were not routed to the
correct APIC ID, causing failures on platforms with non-zero APIC IDs.

On x2APIC platforms, the default RTE destination broadcasts to all
CPUs, but LDR is read-only and uses the cluster model, so interrupts
are not correctly delivered when the physical APIC ID is non-zero,
causing drivers to fail.

Under CONFIG_X2APIC, use runtime APIC ID detection to route interrupts
directly to the current CPU. The existing xAPIC code remains unchanged.

Signed-off-by: S Swetha <s.swetha@intel.com>
2026-06-30 18:22:00 -04:00
Erwan SZYMANSKI
5ef4eaea55 drivers: ethernet: eth_stm32_hal_common: cleanup clang-format
Pass the file in clang-format to clean it up

Signed-off-by: Erwan SZYMANSKI <erwan.szymanski@st.com>
2026-06-30 18:21:43 -04:00
Erwan SZYMANSKI
c8340837d8 drivers: ethernet: eth_stm32_hal_common: multi instances support
Adapt the driver to support Ethernet controller multi instances.
This adaptation is aligned with Zephyr method used for other
drivers.
Now, for each MAC node in DT targetting this driver, a probe
will be processed while a single one was done before.

Signed-off-by: Erwan SZYMANSKI <erwan.szymanski@st.com>
2026-06-30 18:21:43 -04:00
Erwan SZYMANSKI
6908e87bde drivers: ethernet: eth_stm32_hal_common: switch REF_CLK macro to generic
The STM32 ETH HAL for STM32MP13 will be corrected in the following PR:
https://github.com/zephyrproject-rtos/hal_stm32/pull/366

As we want to have a "instance agnostic" approach on each Ethernet
controller device reference, we need to avoid to point on ETH1, ETH2
or more generally ETHx registers. This is up to the HAL to handle it.

Signed-off-by: Erwan SZYMANSKI <erwan.szymanski@st.com>
2026-06-30 18:21:43 -04:00
Erwan SZYMANSKI
b9dc330f6d drivers: ethernet: eth_stm32_hal_common: remove unused random MAC
To prepare the multi instances implementation of eth_stm32_hal
drivers, singletons implementations are cleaned.
Removes this portion of code handling the
zephyr,random-mac-address DT property because it is unused and
managed directly in the framework now.

Signed-off-by: Erwan SZYMANSKI <erwan.szymanski@st.com>
2026-06-30 18:21:43 -04:00
Erwan SZYMANSKI
aa991e8330 drivers: ethernet: eth_stm32_hal: Rework static buf, desc and phy
To prepare the support of the second Ethernet port, need to
remove some static declarations of phy_dev, dma_buf or dma_desc
present in the original code.
The best option here is to pass more elements in
eth_stm32_hal_dev_cfg and eth_stm32_hal_dev_data to better
handle it in v1 and v2 APIs.

When multi instance will be completed, we will have to get
the ressources owned by each eth device reference, this is the
reason of this implementation.

Important: for SoC reference supporting multiple Ethernet ports
(this is the case for the STM32MP13), some HAL functions
prototypes differs. This is what is managed in the original
driver by using STM32_ETH_ARGS macro. We complete this by
implementing ETH_STM32_HAL_GET_CB_DEVDATA macro. The goal of
this one is to point either on the right dev_data reference
in multi instance API case, or to point on a static dev_data
reference if singleton API is used.

Signed-off-by: Erwan SZYMANSKI <erwan.szymanski@st.com>
2026-06-30 18:21:43 -04:00
Laura Carlesso
4fbf56d6cb drivers: flash: update infineon SMIF driver
Correct serial memory qspi init to skip serial memory setup
when not explicitly needed, to avoid SMIF init in XIP mode.
The full fix for this issue will be finalized with issue 112066.

Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
Signed-off-by: Davide Di Lello <Davide.Dilello@Infineon.com>
2026-06-30 18:21:29 -04:00
Laura Carlesso
a00c17fbfd drivers: flash: add infineon RRAM driver
Added RRAM driver support.

Signed-off-by: Davide Di Lello <Davide.Dilello@Infineon.com>
Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
2026-06-30 18:21:29 -04:00
Fabrice DJIATSA
05e3f0a644 drivers: adc: stm32: skip buffer check in stream mode
In streaming mode the application does not supply a buffer in the
adc_sequence; sample data is written into a buffer allocated from the
RTIO mempool inside the ISR. Skip the sequence buffer size validation
in start_read() when CONFIG_ADC_STREAM is enabled, which otherwise
fails with a spurious -ENOMEM "Provided buffer is too small" error.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2026-06-30 11:54:37 -04:00
Etienne Carriere
5ac025caa8 drivers: ethernet: stm32: Clean MAC address size assertions
Remove the assertion in eth_stm32_hal_v1.c recently introduce between byte
array sizes storing MAC address value. It was useless since both byte
array sizes are based on NET_ETH_ADDR_LEN macro. Moreover the assertion
may produce a build warning as reported (and fixed) in eth_stm32_hal_v2.c
by commit 0ee22dc998 ("drivers: ethernet: stm32: fix clang error").

Factorize the 2 build assertions in eth_stm32_hal2.c with an explicit
comment why it's used.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-06-30 11:54:09 -04:00
Etienne Carriere
b0b25c35c9 drivers: use <> to include Zephyr headers instead of ""
Use <> operator to include a Zephyr header file instead of "" that
is intended to local header files, not header files relative to
specifically defined search paths.

This change was made running the sed shell command below:
$ sed -i -E 's/#include "zephyr\/([^"]+)\.h"/#include <zephyr\/\1.h>/g' \
    `grep -rsl "#include \"zephyr/" drivers/`

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-06-30 06:49:18 -04:00
Guillaume Gautier
af71b820a7 drivers: spi: stm32: fix h7 stuck in interrupt
This commit deploys a workaround for errata 2.21.3 from ES0491 (and similar
for other H7 SoCs).
This prevent the SPI interrupt to fire when SPI is disabled, by disabling
the EOT and TXP interrupt before disabling the SPI.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-06-30 06:49:00 -04:00
The.Thanh Nguyen
1741ac46e3 drivers: udc: fix udc_renesas_ra mutiple instances issue
Update to use the device instance's private message queue instead
of the singleton global message queue.

Signed-off-by: The.Thanh Nguyen <the.nguyen.yf@renesas.com>
2026-06-30 06:48:16 -04:00
Khai Cao
ba4c5bfc48 drivers: crc: fix issue CRC16 ITU_T is not accepted
Fix issue CRC16 ITU_T is not accepted by Renesas RA driver.

Signed-off-by: Khai Cao <khai.cao.xk@renesas.com>
2026-06-30 06:48:07 -04:00
Zhaoxiang Jin
0b736efc05 drivers: otp: add NXP OTPC eFuse driver
Add a read-only Zephyr OTP driver for the NXP OTPC eFuse controller
found on MCX N SoCs. Only otp_read is implemented; fuse programming is
not supported. The OTP API is byte addressed while the controller reads
32-bit words; the driver handles unaligned offsets and lengths
internally.

Read verified on real hardware on frdm_mcxn236, frdm_mcxn947, mcxn947 evk,
and mcxn547 evk

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-06-30 06:47:59 -04:00
Hongquan Li
40c00ce2c5 drivers: sdhc: ambiq: fix R2 response word ordering
Fix R2 (CID/CSD) response ordering for the Ambiq SDHC driver.

The Ambiq HAL packs 136-bit R2 responses as a big-endian 128-bit
value with bits 127:96 in ui32Resp[0].  Zephyr's SD stack expects
cmd->response[3] to hold the highest 32 bits, matching the SDHCI
register layout used by other SDHC drivers.  The existing memcpy
therefore placed the response words in reverse order, causing
sdmmc_decode_csd() to read sector_count and block_size as zero.

Replace the memcpy with a conditional copy that reverses the word
order for R2 responses and clears the unused response words for
all other response types.

Fixes #111443

Signed-off-by: Hongquan Li <hongquan.li@processmission.com>
2026-06-30 06:47:19 -04:00
Ryan McClelland
b9c925c8e6 drivers: counter: native_sim: add capture emulator
The native_sim counter driver did not implement the counter capture API,
so the capture path could not be exercised on native_sim / in CI. There
was also no software way to inject a capture edge, unlike gpio_emul which
provides gpio_emul_input_set() for emulating GPIO events.

Implement the capture API in the native_sim counter driver and add a
test-only backend, analogous to gpio_emul:

- counter_capture_emul_input_set()/_get() (+ _dt variants) in the new
  include/zephyr/drivers/counter/counter_capture_emul.h drive/read an
  emulated capture input level. On a configured, enabled and matching
  edge the capture callback is invoked synchronously with the current
  counter value, honoring single-shot vs continuous mode.
- Supported edges are declared in devicetree via rising-edge/falling-edge
  boolean properties and enforced in capture_configure(), mirroring
  GPIO_EMUL_INT_CAPS.

The counter_capture test is reworked so the edge trigger is provided by a
small "trigger source" interface (trigger_src.h) with two CMake-selected
backends: gpio_src.c (GPIO loopback on real hardware) and
counter_capture_emul_src.c (emulated input on native_sim). The test body,
edge/single-shot/continuous coverage and assertions are unchanged. A
native_sim overlay and integration platform are added so the suite runs
on native_sim.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-06-30 06:46:41 -04:00
Jordan Yates
deb92718cc flash: remove select FLASH_PAGE_LAYOUT from drivers
Remove `select FLASH_PAGE_LAYOUT` from any flash drivers doing so, as
this is an option to enable an API into the flash driver, not something
the flash driver itself needs.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-06-29 22:18:24 -04:00
Michael Zimmermann
e10af22991 tree-wide: replace usages of k_work_q thread with thread_id
The `thread` field is not initialized, if it's being animated via
k_work_queue_run instead of k_work_queue_start.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-06-29 22:17:45 -04:00
Fin Maaß
60f93b475d ethernet: dwc_mac: 1000: add hardware checksum offloading
add support for hardware checksum offloading for the
dwc_ether_mac10_100_1000_universal core.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-06-29 14:04:40 -05:00