Commit graph zephyr/drivers
Author SHA1 Message Date
Srinivas Edireswarapu
d1ebbfcc30 drivers: sensor: tach: xec: refactor for encoded DT properties and MEC175x
Refactor the Microchip XEC tachometer driver to use DTS-encoded
GIRQ and PCR properties instead of series-specific ifdefs,
enabling a unified driver across MEC150x, MEC172x, and MEC175x.

Fix build error from incorrect PCR devicetree configuration.
Remove duplicate include and add missing static qualifier to
tach_xec_sample_fetch().

Co-authored-by: Andy Chang <andy.chang@microchip.com>
Signed-off-by: Andy Chang <andy.chang@microchip.com>
Signed-off-by: Srinivas Edireswarapu <srinivas.edireswarapu@microchip.com>
2026-05-11 21:03:12 -05:00
Srinivas Edireswarapu
ae3473eb51 drivers: pwm: mchp_xec: fix switch-case break indentation
Fix misaligned break statements in pwm_xec_pm_action() switch-case
block to match the case indentation level.

Signed-off-by: Srinivas Edireswarapu <srinivas.edireswarapu@microchip.com>
2026-05-11 21:02:18 -05:00
Srinivas Edireswarapu
2e5597b09d drivers: pwm: mchp_xec: refactor for encoded DT properties
Refactor the Microchip XEC PWM driver to use DTS-encoded PCR
property via soc_xec_pcr_sleep_en_clear(), replacing per-SoC
ifdefs for PCR init. Move PCR enable before pinctrl apply in
the init sequence.

Signed-off-by: Srinivas Edireswarapu <srinivas.edireswarapu@microchip.com>
2026-05-11 21:02:18 -05:00
Michał Stasiak
b530448c2c drivers: gpio: disable latch detection for nRF92 series
Latch detection is not supported on nRF92 GPIO driver.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2026-05-11 15:29:14 +01:00
Michał Stasiak
cf79aa7c90 drivers: gpio: gpio_nrfx: Add support for latch detection
Added latch detection mode based on DTS property.
Required register is inaccessible in non-secure
builds and on nRF54H20 SoC. Added hidden Kconfig
to guard it.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2026-05-11 15:29:14 +01:00
Håvard Reierstad
a805a054fe Bluetooth: HCI: include addr.h from util_hci_evt
Include `addr.h` in `util_hci_evt.c` as it uses `bt_addr_le_str`.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2026-05-11 13:41:54 +02:00
Gal Raifen
fe88cd598c drivers: ethernet: eth_nxp_s32_gmac: fix start/stop function declaration
Building mr_canhubk3 fails due to improper function declaration.
Fix issue by fixing declaration of eth_nxp_s32_start & eth_nxp_s32_stop.
Fixes issue #108630.

Signed-off-by: Gal Raifen <galraifen15@gmail.com>
2026-05-11 11:02:01 +02:00
Jordan Yates
4f5530057a modem: cellular: group scripts into struct
Rather than passing every possible script into the common modem
instantiation macro, use a struct to hold all the scripts and pass the
struct instead.

The advantage of this approach is that it makes adding new optional
scripts much less invasive. The script only needs to be added to the
struct and populated in the drivers that will use it, no need to modify
the global macro.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-05-11 11:00:47 +02:00
Yuzhuo Liu
5930bd5d60 drivers: input: bee_keyscan: fix timing property usage
Use the correct timing properties for bee_keyscan configuration.

- use common.poll_period_us for manual scan timer
- calculate rel_cnt from release_time_us
- fix autoscan build assert guard
- remove stale debounce_down_us assertion

This fixes mismatched devicetree property usage in the driver.

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-05-11 10:58:36 +02:00
Fin Maaß
069f83431a drivers: virtio: add HEAP_MEM_POOL_ADD_SIZE_VIRTIO
the virtio driver is using k_aligned_alloc and therefore
uses the system heap, add the
HEAP_MEM_POOL_ADD_SIZE_VIRTIO Kconfig,
so we have enought heap for it.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-11 10:57:25 +02:00
Arunprasath P
013c5af00e drivers: dma: mchp_dmac_g1: fix callback invocation and status reporting
Fix two issues in DMA driver:

1. ISR was invoking callback for all interrupts including suspend.
   Add check to invoke callback only for transfer complete (TCMPL)
   or transfer error (TERR) interrupts.

2. dma_get_status returned stale pending_length after config/reload
   because write-back descriptor was not synced with base descriptor.
   Sync write-back in dma_mchp_config and dmac_desc_reload_block.

Also improve type safety by changing void* to dmac_descriptor_registers_t*
in descriptor setup functions.

Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
2026-05-11 10:56:23 +02:00
Fabin V Martin
d4c49f5449 drivers: i2c: microchip: sercom g1: support per-instance DMA mode
Use dt_compat_any_has_prop for CONFIG_I2C_MCHP_DMA_DRIVEN to allow
mixed DMA/interrupt configurations. Added has_dma field and runtime
checks to select transfer mode per I2C instance based on device tree
dmas property presence.

Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>
2026-05-11 10:56:04 +02:00
Aleksandr Senin
5082b60571 retained_mem: gd32: add backup SRAM driver
Add a retained memory driver for GD32 backup SRAM.
The driver exposes the memory region defined by devicetree reg, enables
the BKPSRAM clock gate, and optionally enables a vin-supply regulator
for retention power.

Signed-off-by: Aleksandr Senin <al@meshium.net>
2026-05-11 10:55:04 +02:00
Aleksandr Senin
f8208ac6c3 regulator: gd32: add BLDO regulator driver
Add a regulator driver for the GD32 Backup SRAM LDO (BLDO) controlled via
PMU. This enables modelling BLDO as a standard supply in devicetree
(vin-supply) and allows consumers to request retention power through
the regulator API.

Signed-off-by: Aleksandr Senin <al@meshium.net>
2026-05-11 10:55:04 +02:00
Mark Wang
ff4d6a8d71 drivers: usb: common: buf: Fix net_buf size modification in alloc
keep the allocated net_buf's size as the requested size, avoid
increasing it by USB_BUF_ROUND_UP.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2026-05-11 08:48:33 +02:00
Pieter De Gendt
af4b127d5a drivers: flash: mcux-flexspi: Optional API mutex
Introduce Kconfig symbol to add mutex lock protection to the driver API.
Prevent multi-threaded access from a pre-emptive thread.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-05-11 08:47:54 +02:00
Zhaoxiang Jin
112be6371c dma: mcux_edma: enable clocks from devicetree
Enable the optional clock described in devicetree during eDMA
driver initialization.

Keep RT7xx request-enable programming in board init so this
branch only moves the clock-control portion into the driver.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-05-11 08:47:17 +02:00
Zhaoxiang Jin
01878ffb40 clock_control: mcux_syscon: add RT7xx EDMA gates
Add RT7xx eDMA clock IDs to the MCUX SYSCON clock bindings and
handle them in the shared clock control driver.

This provides the common gate support needed for RT7xx eDMA
instances to be managed through the clock control API.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-05-11 08:47:17 +02:00
Zhaoxiang Jin
bde70f9bfc dma: mcux_edma: add reset controller support
Add optional devicetree reset support to the MCUX eDMA
driver and deassert the reset line during initialization
when a reset specifier is provided.

Boards which do not describe a reset remain unchanged.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-05-11 08:47:17 +02:00
Jamie McCrae
ceb26f67f0 drivers: Add support for dts RAM configuration
Allows using the chosen SRAM node for RAM configuration without
using Kconfig values

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-05-11 08:45:38 +02:00
Fabian Blatz
b017626ca6 drivers: ethernet: eth_wch: pass iface to start/stop callbacks
Align eth_wch with updated ethernet API by passing net_if to
and eth_wch_stop/start() from PHY link state change handling.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2026-05-11 04:05:51 +02:00
Fabio Baltieri
99db9625f9 drivers: wifi: airoc: add missing header
Add a missing log.h error, fixes a build error:

airoc_whd_hal_common.c:14:40: error: expected ')' before numeric

constant airoc_whd_hal_common.c:32:17: error: implicit declaration of
function

Tested with: west build -p -b rpi_pico/rp2040/w samples/net/wifi/shell

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-05-11 04:05:13 +02:00
Philipp Steiner
a108ce1085 drivers: ethernet: nxp_enet_qos: fix PTP over L2
Fix ENET QoS behavior needed for IEEE 802.3 PTP transport.

Strip received Ethernet FCS bytes before packets reach upper layers,
enable store-and-forward mode for reliable PTP timestamps, and only use
RX timestamp context descriptors when the normal RX descriptor reports a
valid timestamp. Also update the PTP clock callback signature to match
the current Ethernet API.

Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
2026-05-11 04:04:52 +02:00
Laurent Varone
32e68a279d drivers: eth_nxp_enet_qos: add net_if *iface to get_ptp_clock()
add struct net_if *iface to eth_nxp_enet_qos_get_ptp_clock() function

Signed-off-by: Laurent Varone <laurent.varone@me.com>
2026-05-11 04:04:42 +02:00
Yongxu Wang
bee70bbfd5 drivers: edac: Add NXP MECC (Memory ECC Controller) driver
Add EDAC driver for NXP MECC64 IP providing ECC functionality
for On-Chip RAM (OCRAM). The driver supports:

- 4 independent OCRAM banks with ECC protection
- Single-bit error correction and double-bit error detection
- Error injection for testing purposes
- Interrupt-driven error reporting
- Device tree based configuration
- Standard Zephyr EDAC API implementation

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2026-05-11 04:02:46 +02:00
Camille BAUD
4acfc0039b drivers: sdhc: Introduce BFLB SDHC driver
Introduce Bouffalolab SDHC. Applies to BL61x currently.

Co-authored-by: William Markezana <william.markezana@gmail.com>
Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-05-11 04:02:01 +02:00
Camille BAUD
12120e6d82 drivers: clock_control: Enable SDHC gate on bl61x
Enable the clock gate for SDHC

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-05-11 04:02:01 +02:00
Carlo Caione
f39ad09bd2 lora: stm32wl: fix RFO_LP paDutyCycle for +15 dBm
For the STM32WL Low Power PA at max_power=15 dBm and frequencies above
400 MHz, the SX1261 datasheet specifies paDutyCycle=0x06. The drivers were
setting 0x07 instead, which is outside the documented range and can lead to
undefined behavior on the PA stage.

Fix the value to 0x06 in both the loramac-node and native SX126x
STM32WL HAL implementations.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2026-05-08 16:06:47 -05:00
Richard Mc Sweeney
6cc00671fe drivers: hwinfo pse84 update to add reset cause
Added reset cause implementation for PSE84

Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
2026-05-08 16:06:15 -05:00
James Growden
7aa4c4d2a6 i3c: drivers: stm32: Don't compile IBI work queue in target mode only
In target mode only, the IBI work queue is unnecessary and doesn't
compile. Take it out of the build chain by only selecting I3C_IBI_WORKQUEUE
if I3C_CONTROLLER is set

Signed-off-by: James Growden <jgrowden@tenstorrent.com>
2026-05-08 16:05:17 -05:00
James Growden
e43a543690 drivers: i3c: store getcaps/crcaps in target
During bus initialization we conditionally execute
GETCAPS and CRCAPS, however we do not store them
in our tracking of that target device.

This stores the information so that we can look at it later
(e.g. via i3c_shell info)

Signed-off-by: James Growden <jgrowden@tenstorrent.com>
2026-05-08 16:04:12 -05:00
James Growden
29687bf12b drivers: i3c: fix logger issues for TARGET_MODE_ONLY
User configurations can select to build with
CONFIG_TARGET_MODE_ONLY=y. This doesn't link because
the source file i3c_common registers the i3c log, and
is only compiled when CONFIG_I3C_CONTROLLER is set.

Instead, compile that file always. Take out compilation of the
(presumably unused) functions present in that file when compiling
for TARGET.

Signed-off-by: James Growden <jgrowden@tenstorrent.com>
2026-05-08 16:03:42 -05:00
Tim Pambor
a8371b0d47 drivers: disk: ftl: fix null pointer dereference
find_last_checkblock() passes a NULL error pointer to
find_checkblock(), which is forwarded to dhara_nand_read().
If a read error occurs, dhara_nand_read() attempts to write
to the NULL pointer, causing a crash.

Fix this by guarding all error assignments and using
dhara_set_error(), which safely handles NULL error pointers.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-05-08 16:02:38 -05:00
Hake Huang
33524cc9b0 drivers: counter: restore mcux lptmr period after cancel
Restore the mcux LPTMR compare period to the default top value
when an alarm is cancelled.

The counter basic API alarm-capability probe can arm and cancel
a short LPTMR alarm before test_valid_function_without_alarm()
runs. Without restoring the compare period, a later
counter_start() may still use the previous short match value.
That causes the FRDM-MCXC444 test to fail with counter ticks not
in tolerance.

Reset the timer period back to max_top_value and clear the
compare flag during cancel so the device is left in the expected
state for subsequent starts.

Keep a clarifying code comment near the cancel path to note that
LPTMR uses one CMR register for both the period and alarm value.

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2026-05-08 16:00:58 -05:00
William Markezana
b4193f101a drivers: bluetooth: add BL60x on-chip BLE HCI driver
Extend the shared BFLB HCI driver with BL60x (BL602) support: BL60x
include paths, controller init macros, IRQ setup, and platform shim
forward declarations.

Kconfig adds BT_BFLB_BL60X with two controller variant choices
(m1s1, m8s1) and smart defaults based on enabled BT roles.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-05-08 16:00:22 -05:00
William Markezana
1ca2d97d69 drivers: sensor: add TE Connectivity MS5637 sensor driver
Add a driver for the MS5637-02BA03 digital pressure & temperature
sensor from TE Connectivity (Measurement Specialties).

The driver implements the Zephyr sensor API with support for
SENSOR_CHAN_PRESS (kPa) and SENSOR_CHAN_AMBIENT_TEMP (degrees C).
Oversampling ratio (OSR) is configurable at build time via Kconfig
and at runtime via SENSOR_ATTR_OVERSAMPLING.

Includes full PROM CRC-4 validation per AN520 and second-order
temperature compensation per the MS5637 datasheet.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-05-08 15:58:49 -05:00
Zhiyuan Tang
cdaa7f8021 drivers: dts: entropy: add Realtek Bee TRNG driver
Add TRNG driver support for Realtek Bee family SoCs.

Signed-off-by: Zhiyuan Tang <zhiyuan_tang@realsil.com.cn>
2026-05-08 15:58:29 -05:00
Michał Stasiak
e547706430 drivers: pwm: pwm_nrfx: handle uninitialized period cycles
If first PWM sequence is set to 100% glitch free duty
cycle, period_cycles will remain uninitialized while
all used channels will use PWM. If following
sequences request non-100% duty cycle, period
cycles will have to be changed. Improve error
condition to allow changing period cycles for
running PWM if these are equal to 0.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2026-05-08 14:42:52 +01:00
Sergei Ovchinnikov
5d62f0f3d0 drivers: gpio: npm10xx GPIO driver
Nordic's nPM10 Series PMICs' GPIO driver and Devicetree bindings

Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
2026-05-08 06:49:40 -05:00
Adam Kondraciuk
98395af2b2 drivers: timer: nrf_grtc_timer: Add Kconfig options for uninit behavior
Add Kconfig options to control whether the GRTC timer is stopped
and/or cleared when the driver is uninitialized (e.g. when
sys_clock_disable() is called).

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2026-05-08 06:45:11 -05:00
Fiona Behrens
a20f4aea7e drivers: wdt: numaker: use clock controller to get clock frequency
Use the Clock controller to get the frequency of the WDT clock instead
of hand roling with some defines owned/intendet for the clock
controller.

Signed-off-by: Fiona Behrens <me@kloenk.dev>
2026-05-08 06:44:14 -05:00
Fiona Behrens
a4c4d6ad67 driver: clock_control: init nuvoton numicro m4 scc
Add System Clock Controller for the M480 nuvoton MCU.
This only adds the base driver to setup HIRC, HXT, LIRC, LXT and
PLL. Configuring the PLL driver from a target frequency with
calculating values to best match this frequency.

Signed-off-by: Fiona Behrens <me@kloenk.dev>
2026-05-08 06:44:14 -05:00
Andrej Butok
4288af5244 drivers: counter: mcux_ctimer: add reset API support
Implement the counter_api reset callback for the NXP LPC CTimer
driver to zero the timer counter register
while keeping the timer running.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2026-05-08 11:27:43 +02:00
Ryan McClelland
2e8a2c6d36 drivers: i3c: cdns: fix detach
Don't report an error if the private data is empty when detaching.
This can happen if a device was attached, and then it didn't go
though entdaa, and was then detached.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-05-08 11:26:35 +02:00
Fengming Ye
ce012d07a0 drivers: wifi: nxp: fix build errors caused by eth api update
Fix build errors caused by eth api update.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2026-05-08 11:22:47 +02:00
Yuzhuo Liu
f72d13174f drivers: i2c: bee: disable only when bus is inactive
Only disable the i2c and give the semaphore after the bus becomes
inactive.

Otherwise, software may observe that the transfer is complete while
data is still pending in the hardware fifo. Disabling the controller
too early can cut off the transfer and cause communication failure.

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-05-08 08:05:54 +02:00
Fengming Ye
3c0fe6a829 drivers: wifi: nxp: add promisc mode capability
Add promisc mode capability for bridge.
There's no filtering really so enabling promisc is a noop but
pretending to have support is needed to allow these
to be added to a bridge.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2026-05-08 08:05:24 +02:00
Svitlana Drozd
f015afe65d firmware: scmi: add support for base protocol
This patch adds support for SCMI Base protocol.
It provides helpers if ARM_SCMI_BASE_HELPERS is enabled for:
- obtaining SCMI firmware revision information
- agent management helpers
  scmi_base_discover_agent()
  scmi_base_device_permission()
  scmi_base_reset_agent_cfg()

Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
2026-05-08 08:05:01 +02:00
Svitlana Drozd
2b4b1dc857 firmware: scmi: util: add macros for base proto
DT_SCMI_PROTOCOL_DEFINE_NODEV previously failed for the base SCMI protocol,
as it relied on DT_REG_ADDR_RAW to fetch protocol IDs. The base protocol is
not represented as a separate child node in the devicetree, but is enabled
by default when the transport node is present.

Modify DT_SCMI_PROTOCOL_DEFINE_NODEV and DT_SCMI_PROTOCOL_DEFINE to
handle protocol IDs correctly for all SCMI protocols, including the base
protocol.

Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
2026-05-08 08:05:01 +02:00
Fin Maaß
ee8ea9a9ce drivers: disk: sdmmc: fix return value if sd card not present
according to the api in include/zephyr/storage/disk_access.h
a negative errno value should be returned on fail.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-08 08:04:49 +02:00