Commit graph zephyr/drivers
Author SHA1 Message Date
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
Henrik Brix Andersen
6c7aadb0fc drivers: can: stm32: bxcan: fix assert statement
Use CODE_UNREACHABLE instead of __ASSERT_UNREACHABLE as the latter is only
for test cases.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-05-07 18:15:26 -05:00
Alain Volmat
4f8137d035 video: imx335: test_pattern handling support
This commit adds the handling of test patterns generated
by the sensor.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-05-07 18:14:22 -05:00
Mathieu Choplain
63da9b5dbf drivers: counter: stm32_rtc: manage EXTI line in a proper manner
Instead of hardcoded EXTI line numbers and raw LL API calls, align the
STM32 RTC Counter driver with its Real-Time Clock counterpart:
- obtain EXTI line number from Devicetree
- use the EXTI INTC API instead of raw LL API calls

Fixes the build issue observed on STM32N6.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-05-07 18:12:51 -05:00
Fin Maaß
584d2911cd drivers: net: ppp: add dt dependency
if NET_TEST is not used, we need the
chosen zephyr,ppp-uart in the devicetree,
therefore add that dependency to the
NET_PPP driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-07 18:10:17 -05:00
Fin Maaß
4a1916eba4 drivers: ethernet: ivshmem: set ETH_NIC_MODEL
Even though the ivshmem ethernet driver can't be
directly run in the regular qemu, with west build -t run
we set this here, as we otherwise would get a build error.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-07 18:10:17 -05:00
Egill Sigurdur
a23abac549 kernel: sys_mem_blocks: add SYS_MEM_BLOCKS_DEFINE_TYPE for alignment
Introduces SYS_MEM_BLOCKS_DEFINE_TYPE() and
SYS_MEM_BLOCKS_DEFINE_STATIC_TYPE() helpers to allow the user to declare
mem blocks without having to manually ensure the alignment is correct,
which was very error-prone.

Matches the new K_MEM_SLAB_DEFINE_TYPE.

Signed-off-by: Egill Sigurdur <egill@egill.xyz>
2026-05-07 18:09:41 -05:00
Egill Sigurdur
16ac4a5b78 kernel: mem_slab: add K_MEM_SLAB_DEFINE_TYPE for automatic alignment
Introduces K_MEM_SLAB_DEFINE_TYPE() and K_MEM_SLAB_DEFINE_STATIC_TYPE()
helpers to allow the user to declare slabs for types without having to
manually ensure the alignment is correct.

Manual slab alignment was very error-prone and this change fixes several
instances of misalignment that would be trapped by the undefined
behavior sanitizer when running on 64-bit targets.

Signed-off-by: Egill Sigurdur <egill@egill.xyz>
2026-05-07 18:09:41 -05:00
Zhaoxiang Jin
9bf8689eb7 drivers: nxp_pmc_tmpsns: get calibration data using NVMEM
Read the temperature sensor calibration value through the
NVMEM API instead of the legacy ROM OTP API. The calibration
data is exposed by the OCOTP node as an NVMEM cell, so the
driver no longer depends on fsl_romapi_otp.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-05-07 18:04:59 -05:00
Zhaoxiang Jin
3628126fe5 drivers: otp: Add support for NXP RT7xx OCOTP
Add support for NXP RT7xx OCOTP

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-05-07 18:04:59 -05:00
Matthias Plöger
82acd3ef37 drivers: pwm: stm32: refactor ARR preload generation into device init
Avoids set of ARR value without enabled preload once counter is enabled.

Signed-off-by: Matthias Plöger <matthias.ploeger@phoenixcontact.com>
2026-05-07 18:04:01 -05:00
Matthias Plöger
1853c1a106 drivers: pwm: stm32: Avoid update generation in master-update mode
When the following conditions are met:
- center aligned mode
- trigger generation on update event
an additional update event is avoided during channel activation.
This may cause (depending on the up/down counting direction) a
de-synchronisation between pwm polarity and generated trigger.
Problematic  when e.g. the adc should trigger during high- and
low phase of a pwm signal.

Signed-off-by: Matthias Plöger <matthias.ploeger@phoenixcontact.com>
2026-05-07 18:04:01 -05:00
Mohammad Odeh
a98f0fdba2 drivers: sdhc: stm32: add SDMMC support using LL-implementation
Extend the STM32 SDHC driver to support SD memory cards in
addition to SDIO. This adds handling for the following commands:
- SD_SEND_IF_COND (CMD8)
- SD_APP_CMD (CMD55)
- SD_APP_SEND_OP_COND (ACMD41)
- SD_ALL_SEND_CID (CMD2)
- SD_SEND_CSD (CMD9)
- SD_APP_SEND_SCR (ACMD51)
- SD_SET_BLOCK_SIZE (CMD16)
- SD_READ_SINGLE_BLOCK/SD_READ_MULTIPLE_BLOCK (CMD17/CMD18)
- SD_WRITE_SINGLE_BLOCK/SD_WRITE_MULTIPLE_BLOCK (CMD24/CMD25)
- SD_ERASE_BLOCK_START/END/OPERATION (CMD32/CMD33/CMD38)
- SD_SWITCH (CMD6)
- SD_SEND_STATUS (CMD13)

Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Sarah Younis <zephyr@exalt.ps>
Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
2026-05-07 18:03:20 -05:00
Mohammad Odeh
a1a60fc99c drivers: sdhc: stm32: replace HAL_SDIO with LL-based implementation
Replace STM32 HAL SDIO API calls with custom LL-based wrapper
functions. This removes the dependency on the STM32 HAL SDIO driver.

Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Sarah Younis <zephyr@exalt.ps>
Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
2026-05-07 18:03:20 -05:00
Mohammad Odeh
75ddd2276c drivers: sdhc: stm32: Rename SDHC polling config option
Renamed the Kconfig and code references from SDHC_STM32_POLLING_SUPPORT
to SDHC_STM32_DMA_MODE for clarity.

Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Sarah Younis <zephyr@exalt.ps>
Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
2026-05-07 18:03:20 -05:00
Sara Touqan
766e06adb4 drivers: sdhc: stm32: drop 1.8V support check
Remove 1.8V capability check from
sdhc_stm32_switch_to_1_8v() since this
validation is expected to be handled by
zephyr subsystem.

Signed-off-by: Sara Touqan <zephyr@exalt.ps>
2026-05-07 18:03:20 -05:00
Mohammad Odeh
59ffd1269e drivers: sdhc: stm32: use data timeout for rw_extended
Replace CONFIG_SD_CMD_TIMEOUT with the actual timeout value
from the sdhc_data structure (data->timeout_ms) for waiting
on DMA completion semaphore.

Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Sarah Younis <zephyr@exalt.ps>
Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
2026-05-07 18:03:20 -05:00
Mohammad Odeh
ff7d4a207f drivers: sdhc: stm32: refactor error logging
- Replace multiple individual if statements in sdhc_stm32_log_err_type()
with a static const array of error masks and messages.
- Add some error log messages to improve visibility of SDMMC error
conditions.

Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Sarah Younis <zephyr@exalt.ps>
Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
2026-05-07 18:03:20 -05:00
Mohammad Odeh
e073330766 drivers: sdhc: stm32: Refactor SDMMC ISR
- Extracted SDMMC interrupt flag clearing into a new helper function.
- Enhanced the event ISR to log errors, call error logging helpers.
- Deferred PM release to ISR only when a DMA-based command is
  successfully launched

Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Sarah Younis <zephyr@exalt.ps>
Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
2026-05-07 18:03:20 -05:00
Mohammad Odeh
09453bb181 drivers: sdhc: stm32: refactor request error handling and code organization
- Consolidate sdmmc_res error handling into a single check
  at the end of the switch block, removing redundant per-case checks
- Rename goto label 'out' to 'end' in sdhc_stm32_set_io()
- Move DEVICE_API definition after sdhc_stm32_init() for better
  code organization

Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Sarah Younis <zephyr@exalt.ps>
Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
2026-05-07 18:03:20 -05:00
Mohammad Odeh
1c811ecd8b drivers: sdhc: stm32: improve code formatting
Fix whitespace, indentation, and alignment issues throughout
the driver

Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
2026-05-07 18:03:20 -05:00
Mohammad Odeh
81626ed71d drivers: sdhc: stm32: remove unused cmd_index from data struct
Remove unused cmd_index from sdhc_stm32_data structure

Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
2026-05-07 18:03:20 -05:00