Commit graph zephyr/drivers
Author SHA1 Message Date
Nicolas Pitre
f06e4ae964 drivers: timer: add a relative-reload backend to the timer core
TIMER_CORE_BACKEND_RELOAD covers hardware that fires after a relative
delay rather than at an absolute value: down-counters and
compare-match-reset periodics. It is assumed to auto-reload, so a
non-tickless kernel leaves it alone after init and the driver owns the
period.

Programming a reload restarts the counter, which the absolute backends
never have to think about, and that costs two guards the compare path
does not need. timer_core_arm() remembers the tick-aligned deadline it
armed and does nothing while that deadline has not moved, since the
kernel re-evaluates its earliest timeout on every add and abort and
back-to-back calls usually land on the same tick boundary. And a reload
floored at TIMER_CORE_ALARM_MIN_CYCLES is left to expire rather than
rewritten, or a set_timeout() stream arriving faster than the floor
would push the fire point out for as long as the stream lasts and
freeze announced time.

The relative delay is clamped against the budget left before the baseline
would fall TIMER_CORE_ALARM_MAX_CYCLES behind, not against that value
alone, which keeps the same invariant the compare path gets from clamping
its absolute deadline.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-08-12 19:27:28 -04:00
Nicolas Pitre
fbce32ed10 drivers: timer: add an equality-match compare backend to the timer core
TIMER_CORE_BACKEND_COMPARE_EXACT is the same hardware shape as
COMPARE_ORDERED, but the match is on equality only, so a deadline
written after the counter has passed it is lost for a whole counter
period. hpet and mips_cp0_timer work this way.

The core writes such a comparator through a verify loop that re-reads
the counter and pushes the target out, doubling the push, until it is
genuinely ahead. That is a generalisation of what hpet already does
privately, and it is what lets such a driver drop the minimum-delay
floor it would otherwise need: the floor exists to keep a deadline far
enough ahead to be caught, and the loop establishes that directly
rather than by guessing a constant.

Both flavours are reached through one core-side timer_core_set_compare(),
so neither the arming path nor the SMP bring-up branches on which is in
use.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-08-12 19:27:28 -04:00
Nicolas Pitre
03147220dd drivers: timer: add generic tickless system-timer core
Every tickless system-timer driver reimplements the same tick
accounting by hand: the cycle-to-tick division, the announce baseline
(last_cycle/last_tick/last_elapsed), the tick-aligned deadline
computation and the range clamp. The logic is identical across the
free-running-compare drivers (arm_arch_timer, riscv_machine_timer,
hpet, ...) down to the copied overflow-guard constant, and the small
divergences between the hand-rolled copies are a recurring source of
timer bugs.

Add system_timer_generic.h, an implementation header a driver includes
to get that accounting for free. It emits the tick-facing contract the
kernel calls (sys_clock_set_timeout(), sys_clock_elapsed()) and owns
the baseline state, so the driver is left with only cycle-domain
primitives: read the counter, arm the comparator, acknowledge the
interrupt. The emitted sys_clock_set_timeout() ignores the deprecated
idle argument; a converted driver gets the idle handoff through
sys_clock_idle_enter().

The header is included, not linked: the driver defines its constants
and static-inline primitives first, so the core inlines and
constant-folds against them (the per-tick divide becomes a
multiply-shift) on a plain -Os build with no LTO. Because the header
defines the global sys_clock_* symbols, a build that pulls in two
system timers fails at link time, which is the correct outcome. It
lives beside the drivers rather than under include/, as it is private
to them.

This commit covers one hardware shape,
TIMER_CORE_BACKEND_COMPARE_ORDERED: a free-running counter and an
absolute comparator whose match is an ordered comparison, so a deadline
already in the past fires immediately. arm_arch_timer and
riscv_machine_timer work this way. The commits that follow add the other
shapes and the cycle counter getters. The header documents the primitives
a driver provides and the knobs it may set.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-08-12 19:27:28 -04:00
Nicolas Pitre
7fab907cf1 kernel: timeout: add sys_clock_idle_enter() for the low-power idle handoff
Entering idle is signalled to the driver through the idle argument of
sys_clock_set_timeout(), which every driver has to carry whether or not
it has anything to hand off. Give the transition its own interface.

Add a weak sys_clock_idle_enter() hook, called by the power management
path when the CPU is about to be put to sleep. A driver that can
reconfigure for low power, hand over to a wakeup timer, or stop its
clock does so there; one that cannot needs no implementation at all.
The default forwards to sys_clock_set_timeout() with the deprecated idle
argument set to true, so a driver keying on that argument keeps working
until it migrates. Recovery is sys_clock_idle_exit(), as before.

The decision in pm_system_suspend() mirrors the one reprogram_next()
makes for a running system. Nothing to wake up for, with the uptime
allowed to drift, is handed over as SYS_CLOCK_IDLE_FOREVER so a driver
can stop its clock knowing sys_clock_idle_exit() will follow; anything
else is a wakeup deadline, adjusted for the exit latency as before.

The hook is issued on every suspend. The idle argument it replaces only
reached the driver when the exit latency was non-zero, so a platform
declaring none left a driver no way to learn the CPU was going to sleep,
which is when a handoff to a low-power wakeup timer has to happen. Where
the deadline needs no adjusting the driver is simply asked for the one it
already has.

That condition arrives in its own value rather than as K_TICKS_FOREVER,
which is unusable in an unsigned tick count: it is (int64_t)-1 with
CONFIG_TIMEOUT_64BIT and UINT32_MAX without it, so a driver comparing
against it would be testing two different things depending on the
configuration. SYS_CLOCK_IDLE_FOREVER sits above SYS_CLOCK_MAX_WAIT, the
longest wait the kernel ever asks for, so it cannot alias a deadline.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-08-12 19:27:28 -04:00
Nicolas Pitre
360f4fb1fd kernel: timeout: add sys_clock_no_timeout() for the empty timeout list
An empty timeout list normally still gets the driver a wakeup request.
That is a synthetic timeout: nothing is waiting for it, it is there to
keep the announce baseline moving so uptime stays correct.
CONFIG_SYSTEM_CLOCK_SLOPPY_IDLE is the permission to skip it, which is
why an empty list only becomes visible to a driver when that option is
set, and today it becomes visible as a tick value the driver has to
recognise rather than as a condition of its own.

Add a weak sys_clock_no_timeout() hook, called in place of
sys_clock_set_timeout() when the list is empty and sloppy idle allows the
uptime to drift. Its default asks sys_clock_set_timeout() for UINT32_MAX
ticks, which is what K_TICKS_FOREVER is in the unsigned tick domain this
interface now uses, so an out-of-tree driver that has not migrated still
sees the "no deadline" value it always did. What gets deprecated is the
special meaning, not the call.

next_timeout() no longer decides sloppy idle, so its empty-list and
far-timeout arms collapse into one capped budget. The far-timeout arm no
longer stops a tick short of the cap either: it only did so to stay
distinguishable from the empty case, which now travels out of band.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-08-12 19:27:28 -04:00
Nicolas Pitre
9da75b3eab drivers: timer: mark sloppy idle as experimental
CONFIG_SYSTEM_CLOCK_SLOPPY_IDLE lets the kernel skip the wakeups that
keep uptime accurate while no timeout is pending. No in-tree board
selects it and no test enables it, so the drivers implementing it have
never run. Several stop their time base outright, which freezes
k_cycle_get_32() under a running thread and can hang k_busy_wait(), and
some of those cannot start it again at all.

Mark the option experimental until those drivers have been audited.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-08-12 19:27:28 -04:00
Ryan Erickson
6718a73d6f drivers: can: mcan: set TX/RX FIFO sizes based on CAN mode
Set the MCAN TX/RX FIFO sizes based on CAN_FD_MODE.
This allows more efficient use of MRAM if CAN_FD_MODE is disabled.

Some Bosch M_CAN IPs (e.g. the ones used in certain STM32 families) use a
fixed Message RAM layout, where RX/TX buffer elements are always of a fixed
size. These drivers must now select CONFIG_CAN_MCAN_FIXED_MRAM_LAYOUT.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2026-08-12 19:26:30 -04:00
Benjamin Perseghetti
9a420255ed drivers: counter: mcux_ctimer: migrate inputmux capture to mux subsystem
The mux subsystem rework converted the PWM and qdec INPUTMUX consumers
to mux-states and deleted the #inputmux-cells specifier space, but this
driver was left behind on inputmux-connections, so enabling capture now
fails at devicetree parse time (counter_capture on frdm_mcxa153).

Convert it the same way as pwm_mcux_ctimer: mux-states in the binding
and test overlay (same cells, renamed), a mux_state_apply() loop in the
driver with its error propagated out of init, select MUX in Kconfig,
and the missing Counter entry in the 4.5 migration guide.

Fixes #115616

Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2026-08-12 19:25:43 -04:00
Jake Jonggeun Park
3fece6d23d drivers: reset: stm32: specify RCC in RESET_STM32 prompt
Change the RESET_STM32 prompt from "STM32 reset driver" to
"STM32 RCC reset driver" for clarity, per reviewer feedback.

Signed-off-by: Jake Jonggeun Park <ndamin221@gmail.com>
Co-authored-by: Mathieu CHOPLAIN <mathieu.choplain-ext@st.com>
2026-08-12 19:25:35 -04:00
Jake Jonggeun Park
73d1fbdd87 drivers: reset: align Kconfig prompts with style guide
Use the "<name> reset driver" form for reset driver prompts, per
doc/contribute/style/kconfig.rst. "reset" is the driver type, matching
the RESET_ symbol prefix, like "<name> ADC/PWM driver" in other subsystems.

Prompt-only; no symbol renames.

Part of #7272

Signed-off-by: Jake Jonggeun Park <ndamin221@gmail.com>
2026-08-12 19:25:35 -04:00
Shan Pen
d9ca53d502 drivers: i2s: max32: fix DMA transfer widths
The I2S FIFO must be accessed with 32-bit DMA transfers even when
samples are 8 or 16 bits wide. Use the configured sample width on the
memory side and word width on the peripheral side for both stream
directions. This preserves FIFO sample packing and matches the MAX32
HAL implementation.

Fixes: 4409ba8655 ("drivers: i2s: add i2s driver for max32 mcu")
Signed-off-by: Shan Pen <bricle031@gmail.com>
2026-08-12 19:25:21 -04:00
Mathieu Choplain
94d4dbfd5a soc: st: stm32: drop the old wake-up pins driver
Now that all series (with wake-up pins) have been migrated to the new
binding, drop the old driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-08-12 19:24:53 -04:00
Mathieu Choplain
971ddd1f51 soc: st: stm32: common: add new driver for wake-up pins/lines management
Add a new STM32 SoC-specific driver for management of wake-up pins at
Power Controller level. The more generic terminology "wake-up lines" is
used for consistency across all series, but the driver currently focuses
only on wake-up lines connected to GPIO pins. This driver is designed to
handle nodes with the new `st,stm32-pwr-wkupctrl` compatible as well as
derivatives (`st,stm32f1-pwr-wkupctrl` and `st,stm32f7-pwr-wkupctrl`).

The old driver is retained for backward compatibility; selection is done
automatically based on whether a node with the new compatible is present
and active in the Devicetree or not.

While at it, also update the STM32 GPIO driver to use the new driver
when appropriate by introducing a new (private) API. The old driver is
considered as deprecated and will be removed in a future commit.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-08-12 19:24:53 -04:00
John Batch
35a83251a8 drivers: comparator: Add Infineon HPPASS CSG comparator driver
Adds the comparator driver for the Infineon HPPASS CSG comparator.  Each
instance of the device represents one slice within the CSG device.  Each
instance registers a dispatch callback with the CSG MFD parent to handle
it's portion of the shared comparator interrupt.

Assisted-by: Github Copilot:claude-opus-4.7
Signed-off-by: John Batch <john.batch@infineon.com>
2026-08-12 19:24:28 -04:00
John Batch
7f61bd8ea4 drivers: mfd: hppass_csg: add comparator IRQ lock and intr helpers
Add helpers to arm the combined comparator interrupt and add a critical
section around it.  Reduce callback register critical section from
irq_lock to irq_disable of the comparator interrupt.

Assisted-by: Github Copilot:claude-opus-4.8
Signed-off-by: John Batch <john.batch@infineon.com>
2026-08-12 19:24:28 -04:00
Benjamin Cabé
4bb78e7eca drivers: i2s: nrf_tdm: Check TX buffer prepare result
The return value of dmm_buffer_out_prepare() was immediately
overwritten by the queue put, so a failed preparation went
unnoticed and an invalid buffer could be handed to the TDM
peripheral. Propagate the error like the RX path does.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-08-12 13:19:05 -04:00
Peter van der Perk
129d27ae39 drivers: ethernet: nxp_imx_netc: add NETC get_stats support
Report per-SI hardware statistics through the Ethernet .get_stats API.
netc_eth_get_stats reads the SI transmit discard counter (SITDFCR) into
tx_dropped and is shared by the PSI and VSI. The PSI additionally reads
the port-level receive-discard counter (rx_missed_errors) through
EP_GetPortDiscardStatistic, which only the PSI can access. All of this is
gated on CONFIG_NET_STATISTICS_ETHERNET.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2026-08-12 13:11:17 -04:00
Peter van der Perk
4d8904725f drivers: ethernet: nxp_imx_netc: add NETC VSI driver
Add a NETC Virtual Station Interface (VSI) driver and its binding so Zephyr
can drive an ENETC virtual function while a separate OS owns the PSI/PF.
The driver brings the SI up off the boot path in a service thread, gating
first access on the NETC clock and the PF's SR-IOV VF-enable bit so it
can't fault on a not-yet-decoding SI. It programs its own unicast MAC and
multicast-promiscuous mode through VSI->PSI messages.

Note: the current Zephyr NETC PSI driver implements neither SR-IOV nor
PSI<->VSI messaging, so only the Zephyr-VSI-to-Linux-PSI path is tested.

Rework the shared Tx datapath for throughput: coalesced Tx-completion
interrupts (frame-threshold + timer), a per-slot buffer ring so frames
aren't serialised on one buffer, and backpressure that blocks on a full
ring instead of dropping. PTP egress timestamps are read with a bounded
busy-wait.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2026-08-12 13:11:17 -04:00
Peter van der Perk
273eecc107 drivers: ethernet: nxp_imx_netc: use net_eth_mac_load for MAC setup
Load the MAC address through the new net_eth_mac_load() /
NET_ETH_MAC_DT_INST_CONFIG_INIT() helpers instead of the driver-specific
NETC_GENERATE_MAC_ADDRESS macro.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2026-08-12 13:11:17 -04:00
Peter van der Perk
525c8e32de drivers: firmware: scmi: add clock CONFIG_GET and clock_control get_status
Implement the SCMI CLOCK_CONFIG_GET command (scmi_clock_config_get) and
wire it into the ARM SCMI clock_control driver as a .get_status callback.
This lets a consumer query a clock's enabled state over SCMI.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2026-08-12 13:11:17 -04:00
Laura Carlesso
4862fbd310 drivers: flash: Use unified SOC_NV_FLASH_NODE logic on infineon_qspi
With PR #112952 the FLASH_NODE logic was unified to use a common
handler.
Use the same logic in flash_infineon_qspi now that the memory map has
been updated to remove the fixed partition compatible.
Additionallly clean up the KConfing to only check for mapped partition
and remove the fixed partition check.

Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
2026-08-12 13:10:05 -04:00
Andrej Butok
839b525e14 hwinfo: nxp: unify driver naming
- Unify the naming of all NXP hwinfo drivers to use a consistent
  HWINFO_NXP_* Kconfig prefix and hwinfo_nxp_*.c source file naming,
  replacing the previous inconsistent mix of symbols.
- Consolidate the per-driver Kconfig fragments into a single
  Kconfig.nxp file.
- No functional change.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2026-08-12 13:09:50 -04:00
Liam Ogletree
73837c12e7 drivers: flash: Unify runtime PM log messages
Propagates #113545 to flash drivers.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-08-12 13:09:27 -04:00
Sergei Ovchinnikov
24c6f18c36 drivers: mfd: npm10xx: use _SAFE slist walk macro in events_handler
Using the unsafe walk might result in some handlers being silently dropped
when one of the callbacks removes itself from the list breaking the loop.
Use the safe walk instead to avoid this.

Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
2026-08-12 13:09:17 -04:00
Hsiu-Chi Tsai
0ecc5d7a93 drivers: i2s: esp32: return the TX block when the DMA fails
Two TX paths take a block off the queue, record it in mem_block, and
then return without giving it back when the DMA call fails: the start
in i2s_esp32_tx_start_transfer(), and the restart in
i2s_esp32_tx_compl_transfer(). transferring is never set either, so
nothing downstream treats the stream as owning anything, and the next
attempt overwrites mem_block. The slab drains one block per failure.

i2s_esp32_rx_callback() already meets the identical failure at its own
restart and frees the block, clears mem_block and mem_block_len, and
stops. Do on TX what RX already does, at both sites.

Requeuing would not be equivalent: k_msgq_put() appends, so a retry
would play the block after samples that were queued later.

Both TX blocks reach the driver through i2s_write(), which does not
reject NULL, so both sites check before freeing. RX needs no check:
its block comes straight from k_mem_slab_alloc().

Both sites also clear dma_pending explicitly, so the failure state
they leave behind does not depend on the stop path clearing it.

Fixes #115504

Signed-off-by: Hsiu-Chi Tsai <hctsai@linux.com>
2026-08-12 13:06:59 -04:00
Mark Wang
8e9533fb09 drivers: usb: udc: mcux: report VBUS detection capability
The MCUX EHCI and IP3511 hs controllers can detect VBUS state before
udc_enable (which pulls up DP) is called when the underlying MCUX USB
device hal drivers are built with USB_DEVICE_CONFIG_DETACH_ENABLE.
Set the can_detect_vbus capability accordingly so the USB device stack
can rely on hardware VBUS detection when available.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2026-08-12 13:06:40 -04:00
Keith Short
0f521cd8df soc: ite: Add deep sleep time measurement support for ITE ECs
Track the time spent in deep doze / sleep states on ITE EC SoCs
(IT8xxx2, IT51xxx) by capturing the 32.768 kHz free-run timer timestamp
before entering deep sleep and accumulating elapsed cycles upon waking.

Add ite_ec_clock_get_sleep_ticks() to convert total deep-sleep cycles
to kernel ticks.

Signed-off-by: Keith Short <keithshort@google.com>
Assisted-by: Antigravity:gemini-1.5-pro
2026-08-12 13:00:41 -04:00
Keith Short
f968be4a80 soc: ite: it8xxx2: Rename ite_ec_timer_block_idle
Rename ite_ec_timer_block_idle() to ite_it8xxx2_timer_block_idle() to
reflect that this DMA clock synchronization idle check is specific to
the IT8XXX2 SoC family. Remove the unnecessary header guard around its
prototype in soc_timer.h.

Signed-off-by: Keith Short <keithshort@google.com>
Assisted-by: Antigravity:gemini-1.5-pro
2026-08-12 13:00:41 -04:00
Hake Huang
2c132efaf0 drivers: entropy: mcux_trng: fix buffer overflow on odd lengths
TRNG_GetRandomData() writes random data in 32-bit word granularity.
With TRNG_SW_HEALTH_TESTS enabled, the SDK always copies full words,
overflowing a caller buffer whose length is not a multiple of four.
This clobbered the guard byte in tests/drivers/entropy/api on
mimxrt685_aud_evk.

Use a bounce word for an unaligned prefix, pass the aligned bulk
directly to the SDK, and use the bounce word for the remaining tail.
This avoids unaligned SDK stores and buffer overruns while preserving
a single SDK call for the common aligned, four-byte-multiple case.

Fixes #115591

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2026-08-12 12:59:28 -04:00
Aksel Skauge Mellbye
5404dda994 drivers: wifi: siwx91x: Correctly limit SSID length
SSIDs have a maximum length of 32 bytes, and the buffer used
by the HAL has this size. Ensure the length field matches the
data stored in the buffer.

The HAL does not expect the buffer to be null terminated, so
it is safe to use strnlen to compute the length.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-08-12 12:59:05 -04:00
Hsiu-Chi Tsai
0d82dbbe72 drivers: i2s: esp32: reject an unsupported trigger direction
i2s_esp32_trigger_check() validates the direction for I2S_DIR_BOTH and
then does not validate it for either single direction. The BOTH branch
checks all four pointers and returns -ENOSYS when the instance does not
have both directions; the I2S_DIR_RX and I2S_DIR_TX branches read
->configured straight out of a stream that may not exist.

The instantiation macro gives a direction the devicetree does not
describe a null conf and a null data, so on an instance that enables
only one direction, triggering the other one dereferences NULL rather
than returning an error.

Add the guard the BOTH branch already has, and return the same -ENOSYS
for the same reason: the hardware this instance describes cannot do
what the caller asked. -EINVAL a few lines below stays for a direction
that is not one of the enumerators, which is a different mistake.

Signed-off-by: Hsiu-Chi Tsai <hctsai@linux.com>
2026-08-12 12:57:27 -04:00
Hsiu-Chi Tsai
ea7af2e597 drivers: i2s: esp32: cancel the deferred TX timer on stop
The deferred-completion timer is started when the TX queue runs dry and
CONFIG_I2S_ESP32_ALLOWED_EMPTY_TX_QUEUE_DEFERRAL_TIME_MS is non-zero,
but nothing ever cancels it. If it is still armed when the stream ends,
it fires afterwards and runs the completion path against whatever state
the device is in by then. After a DROP that is a device already back in
READY, and the block it consumes belongs to the next stream.

Cancel it in i2s_esp32_tx_stop_transfer(), which is the one boundary
every path that ends TX ownership goes through: DROP, a fatal callback,
a completed STOP or DRAIN, and the rollback when starting the second
direction of an I2S_DIR_BOTH transfer fails. Putting it in the trigger
cases instead would miss the callback paths.

k_timer_stop() is marked ISR-safe and stopping an inactive timer is a
documented no-op, so both contexts this helper runs in are fine. The
timer's own expiry function ends by calling this helper, so it can also
stop itself; that is safe because the abort of an in-flight timeout is
suppressed on the announcing CPU, and the timer is one-shot, so nothing
re-arms.

It does not wait for an expiry function already running on another CPU.
That is not stated in the API documentation, only in the implementation,
and k_timer_cleanup() cannot be used here because it asserts it is not
called from an ISR. This does not make the situation worse than leaving
the timer armed, but it is not a full barrier either.

Fixes #115505

Signed-off-by: Hsiu-Chi Tsai <hctsai@linux.com>
2026-08-12 12:57:19 -04:00
Fin Maaß
530e47b9d3 dts: bindings: ethernet: mdio: infineon: xmc4xxx: use snps,dwmac-mdio
As per our documentation, we have to
reuse bindings from Linux, there they use
"snps,dwmac-mdio", so let's use the same one
here in zephyr.

Signed-off-by: Fin Maaß <info@finmaass.de>
2026-08-12 09:47:10 -07:00
Fin Maaß
4de795958d drivers: ethernet: infineon: xmc4xxx: allign devicetree structure
Allign the devicetree structure of the wch ethernet
nodes wich the other existing nodes, that also use the
Synopsys Designware IP.

With that also move the "mdi-port-ctrl" from the
mdio node to the ethernet node, wich is now the
parent of the mdio node.

Signed-off-by: Fin Maaß <info@finmaass.de>
2026-08-12 09:47:10 -07:00
Fin Maaß
2b254cf94c drivers: ethernet: wch: allign devicetree structure
Allign the devicetree structure of the wch ethernet
nodes wich the other existing nodes, that also use the
Synopsys Designware IP.

Signed-off-by: Fin Maaß <info@finmaass.de>
2026-08-12 09:47:10 -07:00
Fin Maaß
82fc84fca0 dts: bindings: ethernet: mdio: wch: use snps,dwmac-mdio
As per our documentation, we have to
reuse bindings from Linux, there they use
"snps,dwmac-mdio", so let's use the same one
here in zephyr.

Signed-off-by: Fin Maaß <info@finmaass.de>
2026-08-12 09:47:10 -07:00
Fin Maaß
ef6cd990e6 dts: bindings: ethernet: mdio: nxp: s32: use snps,dwmac-mdio
As per our documentation, we have to
reuse bindings from Linux, there they use
"snps,dwmac-mdio", so let's use the same one
here in zephyr.

Signed-off-by: Fin Maaß <info@finmaass.de>
2026-08-12 09:47:10 -07:00
Fin Maaß
f7c505e058 dts: bindings: ethernet: mdio: nxp: qos: use snps,dwmac-mdio
As per our documentation, we have to
reuse bindings from Linux, there they use
"snps,dwmac-mdio", so let's use the same one
here in zephyr.

Signed-off-by: Fin Maaß <info@finmaass.de>
2026-08-12 09:47:10 -07:00
Fin Maaß
13fe0a115e dts: bindings: ethernet: mdio: esp32: use snps,dwmac-mdio
As per our documentation, we have to reuse bindings from Linux, there
they use "snps,dwmac-mdio", so let's use the same one here in zephyr.
The esp32 itself is not in Linux, but the ethernet IP from Synopsys is.

Signed-off-by: Fin Maaß <info@finmaass.de>
2026-08-12 09:47:10 -07:00
Fin Maaß
7db1cfdc66 dts: bindings: ethernet: mdio: stm32: use snps,dwmac-mdio
As per our documentation, we have to reuse bindings from Linux, there
they use "snps,dwmac-mdio", so let's use the same one here in zephyr.

Signed-off-by: Fin Maaß <info@finmaass.de>
2026-08-12 09:47:10 -07:00
John Batch
df98114028 drivers: adc: infineon: hppass: Refactor ADC register access
Updates the HPPASS SAR ADC driver to remove PDL runtime calls where
possible and replace with direct register operations instead.  Calls to
Cy_HPPASS_SAR_Init() and Cy_HPPASS_SAR_CrossTalkAdjust() are retained to
manage hardware calibration that isn't well documented in hardware
documentation.

Aligns the ADC driver with the new HPPASS MFD driver by removing AC
startup sequence that is now managed by MFD driver for all HPPASS
devices.

Assisted-by: Github Copilot:claude-opus-4.7
Signed-off-by: John Batch <john.batch@infineon.com>
2026-08-12 09:41:36 -07:00
Eva Klejmova
ed742007ec dts: arm: nxp: rt7xx: add MICFIL node support
Add the MICFIL devicetree node for the RT7xx common DTSI and
update MCUX SYSCON clock control.

Signed-off-by: Eva Klejmova <eva.klejmova@nxp.com>
2026-08-12 09:40:51 -07:00
Camille BAUD
530022cbf1 bluetooth: bflb: Harmonize interrupts settings where possible
Pick IRQs from DTS when possible

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-08-12 10:03:22 -04:00
Camille BAUD
33579adbfe drivers: bluetooth: wifi: Add BLE and WIFI support for BL616CL
Add support for BLE and WIFI on BL616CL.
Harmonize WiFi6 Blob/HW pair.

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-08-12 10:03:22 -04:00
Flavio Ceolin
0d65ce46dd drivers: fuel_gauge: reject oversized len
The userspace verifiers for fuel_gauge_get_props() and
fuel_gauge_set_props() declared two variable-length arrays sized by the
caller-supplied len argument:

  union fuel_gauge_prop_val k_vals[len];
  fuel_gauge_prop_t k_props[len];

Both VLAs were allocated before any validation, including before the
K_SYSCALL_DRIVER_FUEL_GAUGE() object check. Fix it removing the kernel
copy of these data. That is safe becasue there is no embbeded pointers.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-08-11 20:56:21 -04:00
Muhammad Waleed Badar
0449ece02e drivers: input: virtio: add Kconfig choice for device type
Add INPUT_VIRTIO_DEVICE_TYPE choice (tablet/keyboard) to select the
VIRTIO input device type at build time instead of hardcoding tablet.

Update qemu/cortex_a53, qemu/riscv64, and qemu/x86 board.cmake to
pick virtio-keyboard-device/-pci when keyboard is selected.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-08-11 20:56:13 -04:00
Mohamed Azhar
882d6507be drivers: spi: microchip: Update g1 driver
Updated to complete peripheral transfer on TXC
Fixed dummysize calculation for multi-buffer transfers

Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
2026-08-11 20:55:54 -04:00
Holt Sun
efa8637ac7 soc: nxp: keep mcux lptmr as an explicit per-SoC default
The MCUX LPTMR system-timer driver previously defaulted to enabled
whenever the /chosen/zephyr,system-timer node was compatible with
nxp,lptmr. On SoCs whose devicetree points zephyr,system-timer at an
LPTMR instance (e.g. frdm_mcxw71/mcxw716c), this forced every build,
including non-power-management builds, to select the 32.768 kHz LPTMR
and disable the Cortex-M SysTick. Tests that rely on the high-resolution
SysTick clock (tests/kernel/timer/timer_api) then failed because the
1024 tick/s LPTMR does not provide the required timing resolution.

Restore the explicit per-SoC policy: the generic driver no longer
defaults MCUX_LPTMR_TIMER on, and each SoC opts in on its own terms.
MCXW7xx, KE1xF and MCXC enable the LPTMR only when power management is
enabled (default y if PM); i.MX95 and i.MX952 M7 enable it only when the
LPTMR is not claimed by the counter driver (default y if
!COUNTER_MCUX_LPTMR). This keeps SysTick as the system timer for plain
builds while preserving the low-power LPTMR configuration for PM builds.

Update the 4.5 migration guide accordingly.

Fixes #115491

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-08-11 20:54:32 -04:00
Benjamin Cabé
365ebbd28a drivers: ethernet: move NETC internal header next to its drivers
include/zephyr/drivers/ethernet/nxp_imx_netc.h only holds definitions
shared between the NXP i.MX NETC Ethernet and DSA drivers, which both
live under drivers/ethernet. Move the header to the NETC driver
directory so that it is no longer part of the public include tree.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-08-11 17:03:16 -04:00
Hsiu-Chi Tsai
38e1dd9ee6 drivers: dma: esp32: refuse an oversized reload before resetting
dma_esp32_reload() resets the channel and rebuilds the descriptor list
before it can discover that the transfer does not fit. When it does not,
the list is memset to zero and -EINVAL returned, so a reload that was
refused has already destroyed the transfer that was configured before
it.

Compare the requested size against the pool the descriptors can cover
first, and return before the reset. The walk keeps its own check as a
backstop.

Signed-off-by: Hsiu-Chi Tsai <hctsai@linux.com>
2026-08-11 17:02:38 -04:00