Commit graph zephyr/drivers
Author SHA1 Message Date
Pete Johanson
4f1956a130 drivers: serial: More complete TX errata fix for MAX32
Some MAX32 targets may fail to raise TX half/almost empty interrupts,
so add an optional workaround for those scenarios to ensure no missed
TX completion when using the interrupt API.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2026-02-27 21:09:31 +00:00
David Jewsbury
eb318914c2 drivers: flash_mspi_nor: Add DMA transfer mode selection
Add CONFIG_FLASH_MSPI_NOR_DMA_DATA_XFER and
CONFIG_FLASH_MSPI_NOR_DMA_CONTROL_XFER as Kconfig options for MSPI
NOR Flash driver. These options are used to select whether data and
control transfers should be performed using DMA or PIO modes.

Update flash_mspi_nor to store choices and apply them accordingly:
use data-xfer-mode for read/write data transfers, and control-xfer-mode
for command/register/configuration traffic. This selection is due to DMA
transfer's having a larger setup overhead so is less beneficial for
short control transfers.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2026-02-27 15:30:31 +01:00
Glenn Andrews
812933e7e9 w1: Adjustable baud rate for Overdrive mode
Modifies 1-wire serial driver to accept configurable baud rates for
Overdrive mode.

In testing with DS2488, which are Overdrive-only, it was found that
both the baud rate and zero bit pattern needed to be adjusted for
stability. This commit allows the user to define their own baud
rates for OD mode, and modifies the zero bit in OD mode.

It is assumed that most testing has been done with standard-speed
devices, so the timings and bit patterns have not been changed or
made user-modifiable.

Signed-off-by: Glenn Andrews <andrewsglenn@meta.com>
2026-02-27 15:30:18 +01:00
Chin-Yao Hung
29640a77c6 drivers: video: shell: fix incorrect endptr usage in strtoll
The current implementation of video_shell_set_ctrl() incorrectly
passes &arg_value as the endptr to strtoll(), while attempting
to validate the result using an uninitialized end_value pointer.
This causes the check (*end_value != '\0') to always trigger
shell_error.

Update the code to pass the address of end_value to strtoll()
correctly, ensuring it points to the first invalid character
within the input string for proper validation.

Signed-off-by: Chin-Yao Hung <cy.hung@guc-asic.com>
2026-02-27 15:30:02 +01:00
Tomasz Moń
2bdfd14637 drivers: usb: buf: Do not add empty library
Change CMakeLists.txt to register Zephyr library only if respective
source code is compiled.

Fixes CMake Warning:
  No SOURCES given to Zephyr library: drivers__usb__common__buf

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-02-27 13:56:50 +01:00
Alberto Escolar Piedras
0003f896ae drivers: ethernet: Fix net API use
In e6daacf3c9 the mayority of the
ethernet drivers code was changed to use the Zephyr native net_
prefixed symbols, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-02-27 13:56:24 +01:00
Alberto Escolar Piedras
e157ddb3d2 drivers: wifi: esp_at: Fix net API use
In 55c49cdb8f wifi
drivers were changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-02-27 13:56:08 +01:00
Alberto Escolar Piedras
c5f7d5d4f6 drivers: modem: hl78xx: Fix includes
Add missing includes and missing source macro definition to expose the
C library prototypes used by this code.

Background:
In general code which uses extensions to the C library (in this case
POSIX extensions) should set the appropriate macro so the C library
headers expose those. Instead of relaying on the C library always
exposing them or those macros being set from the cmake side.

Withtout these, one gets the following warnings when building with glibc:
`implicit declaration of function ‘strnlen’`
`implicit declaration of function ‘strtok_r’`
```
implicit declaration of function ‘snprintf’
note: include ‘<stdio.h>’ or provide a declaration of ‘snprintf’
implicit declaration of function ‘sscanf’
include ‘<stdio.h>’ or provide a declaration of ‘sscanf’
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-02-27 13:56:08 +01:00
Alberto Escolar Piedras
7149790b64 drivers: modem: hl78xx: Use native networking naming
Use the Zephyr prefixed naming when refering to the networking
functions, macros or types.
This ensures this code builds when
CONFIG_NET_NAMESPACE_COMPAT_MODE=n

This is a plain rename without function impact, that otherwise
is done thru macros given by net_compat.h

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-02-27 13:56:08 +01:00
Alberto Escolar Piedras
125d8900dd drivers: modem: st87mx: Use native networking naming
Use the Zephyr prefixed naming when refering to the networking
functions, macros or types.
This ensures this code builds when
CONFIG_NET_NAMESPACE_COMPAT_MODE=n

This is a plain rename without function impact, that otherwise
is that thru macros given by net_compat.h

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-02-27 13:56:08 +01:00
Sudan Landge
fe4383b842 drivers: intc_gicv3: avoid setting GICD_CTRL_NS
Arm documentation (ddi0601) for GICD_CTRL_DS is as follows:
```
If the Distributor only supports a single Security state, this bit is
RAO/WI.
```

Since CONFIG_GIC_SINGLE_SECURITY_STATE suggest GIC has single security
state, the DS bit should not be touched and the assert should be enough
to make sure that GICD_CTRL_NS (DS bit) is set to 1.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/102239

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2026-02-27 13:55:08 +01:00
Zhaoxiang Jin
e986daabd5 drivers: clock_control: enable sema42 clock control
enabled sema42 peripheral clock control through
clock_control (syscon) driver.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-02-27 11:51:20 +01:00
Zhaoxiang Jin
b61ae973d4 drivers: hwspinlock: enable nxp sema42 based on hwspinlock API
This commit implemented nxp (Semaphores2) sema42 peripheral
based on zephyr hwspinlock device driver API.

The hardware information can be find in MCXN947 RM chapter 27.
https://www.nxp.com/webapp/sps/download/preDownload.jsp?render=true

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-02-27 11:51:20 +01:00
Braeden Lane
4f5d97e671 drivers: i2c: infineon: configure SCB oversampling clock for PSOC4
The I2C driver relies on the SCB oversampling clock (clk_scb) being
within specific frequency ranges for each I2C data rate. On PSOC4, the
peripheral clock dividers default to a division of 1, passing the full
HFCLK (48 MHz) directly to the SCB — far outside the valid range for
any I2C speed. This causes all I2C transfers to fail with -EIO.

Add _i2c_set_peri_divider_psoc4() which calculates the appropriate
divider from HFCLK and configures the peripheral clock using the
Zephyr utility wrappers (matching the UART driver convention).

SCB oversampling clock frequencies (from device reference manuals,
analog filter config AF_in=1, AF_out=0, DF_in=0):

Controller mode:
  Standard (100 kHz):   2 MHz
  Fast (400 kHz):       8 MHz
  Fast Plus (1 MHz):   24 MHz

Target mode:
  Standard (100 kHz):   8 MHz
  Fast (400 kHz):      12 MHz
  Fast Plus (1 MHz):   24 MHz

Tested on CY8CKIT-041S-MAX and CY8CPROTO-041TP in both target and
controller roles.

Signed-off-by: Braeden Lane <Braeden.Lane@infineon.com>
2026-02-27 11:51:11 +01:00
Peter Wang
8a0b4d715a boards: nxp: frdm_mcxa577: enable flash driver
enable flash driver for frdm_mcxa577
tested tests/drivers/flash/common/

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
2026-02-27 08:00:30 +01:00
Ayush Singh
f5e5e5f4f1 serial: cc13xx_cc26xx: Fix TX interrupt
In cc13xx_cc26xx, the TX interrupt seems to be generated once initially on
enable and subsequently, when buffer goes from full to empty (since we are
operating in 1-byte buffer mode).

Due to this, if the TX interrupt is cleared in the configure function, a
new TX interrupt will not be generated untill we transition from a full to
empty buffer, even though the buffer itself is empty.

When using Zephyr Interrupt-driven UART API, one first needs to enable TX
interrupts `uart_irq_tx_enable()`, and then write data from the interrupt
callback, after checking `uart_irq_tx_ready()`. In case of cc13xx_cc26xx,
calling `uart_irq_tx_enable()` unmasks the TX interrupt, however, it will
not generate a new TX interrupt. Thus the callback will not be called
unless we first write something to the uart (using polling-API), causing a
transition in buffer state.

According to TI docs, writing 1 byte to the buffer will also clear the
TX interrupt, so it does not make sense to try clearing the interrupt
manulally in `configure` function.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2026-02-27 07:58:45 +01:00
Stefan Schmidt
27241985fe drivers: audio: tlv320dac310x
This PR routes the DAC output to the mixer amplifier (not headphone output)
so that volume control via registers 0x24/0x25 on page 1 has any effect

Signed-off-by: Stefan Schmidt <kontakt@stefanschmidt-embedded.de>
2026-02-27 07:58:29 +01:00
Jilay Pandya
788177da93 drivers: stepper_shell: split stepper shell
create stepper_ctrl_cmds in order to reflect api split

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2026-02-27 07:56:51 +01:00
Alvis Sun
61d3da1b8a drivers: i3c: npcx: fix DMA read when received data is less than expected
When the received data is less than expected, DMA timeout error may occur.
This happens because the DMA transfer is not completed and the TC
(Transfer Complete) flag is never set.

This change adds support for handling cases where the received data length
is smaller than the requested length, preventing false timeout errors.

The CL covers the following scenarios:
1. received < expected  (e.g. requested 10 bytes, got 9 bytes)
2. received = expected  (e.g. requested 10 bytes, got 10 bytes)
3. received > expected
(e.g. requested 10 bytes, got 10 bytes, but more data is coming, T-bit = 1)

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2026-02-27 07:56:00 +01:00
Brett Peterson
08f93f3fb0 drivers: i2s: add support for Infineon PSE84 device
Adds PDL-based I2S interface using the E84 TDM hardware.

Signed-off-by: Brett Peterson <brett.peterson@infineon.com>
2026-02-26 21:24:20 +00:00
Brett Peterson
c901b174b1 drivers: spi: update for dma
Updating SPI driver to work with recent dma driver changes.

Signed-off-by: Brett Peterson <brett.peterson@infineon.com>
2026-02-26 21:24:20 +00:00
Brett Peterson
cd4e2c88c0 drivers: serial: uart update for dma
Updating UART driver to work with recent dma driver changes.

Signed-off-by: Brett Peterson <brett.peterson@infineon.com>
2026-02-26 21:24:20 +00:00
Brett Peterson
ef44326a03 drivers: dma: infineon driver config update
Modifying DMA configuration to be more specific about when to use
software triggeres and the single elmeent input trigger type.

Signed-off-by: Brett Peterson <brett.peterson@infineon.com>
2026-02-26 21:24:20 +00:00
Brett Peterson
5f2178e27e drivers: clock_control: fractional divider support
Adding support for fractional dividers and removing unused code.

Signed-off-by: Brett Peterson <brett.peterson@infineon.com>
2026-02-26 21:24:20 +00:00
Jack Lee
a6e71a4861 drivers: sdhc: add support for cmd52 and cmd53 commands
Currently, the Xilinx SDHC driver does not support data
transmission with SDIO devices, requiring the addition
of CMD52 and CMD53 related functionalities.

Signed-off-by: Jack Lee <lhjhit@126.com>
2026-02-26 16:53:26 +00:00
Fin Maaß
e1520eec5b drivers: ethernet: ETH_IVSHMEM: add missing depends on DT_HAS_*
add missing depends on DT_HAS_* for the
ETH_IVSHMEM driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-26 16:52:49 +00:00
Bjarki Arge Andreasen
b217c3cdc4 soc: timer: nrf: patch init order of grtc and nrf54l
The nrf54l soc init configures power and clock properties like
applying trims, capacitance and setting up regulators. This must
precede the grtc driver initializing the sys clock, as it depends
on these clocks being initialized on the nrf54l series socs.

Update the nrf54l soc init to be EARLY 0, and set grtc sys clock
driver init to EARLY 1. Additionally add comments explaining why
these specific init levels where chosen.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-02-26 08:45:06 -06:00
Bjarki Arge Andreasen
f53928fdb5 drivers: spi: nrfx_spim: only spi_context_release if !SPI_LOCK_ON
Update driver to follow this, stated in the documentation of the
spi_context_release: "appropriate time to call this would be at the
end of a transfer that was initiated by a transceive API call, except
in the case that the SPI_LOCK_ON bit was set"

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-02-26 08:44:31 -06:00
Bjarki Arge Andreasen
9c287c64a5 drivers: spi: nrfx_spim: move buffer setup and check earlier
The SPI loopback test suite passes up transfers nop and null buffers
to the device drivers, expecting them to return early with -EINVAL
or -ENOTSUP, before setting the CS pins. Currently the NRFX based
nRF SPIM device driver sets CS unconditionally, without checking
the buffers, resulting in no transfer while toggling CS.

Add a check of the provided buffers in the transceive() function and
return early if buffers are invalid (result in 0 lenght transfer).

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-02-26 08:44:31 -06:00
Phuc Hoang
868f21f13f drivers: counter: silabs: Add counter driver for timer on Silabs Series 2
Add counter driver for timer on Silicon Labs series 2.
Tested by building and running the sample on realboard
slwrb4180b and xg24_rb4187c.

Signed-off-by: Phuc Hoang <donp172748@gmail.com>
2026-02-26 08:43:59 -06:00
Fengming Ye
a45507d87e drivers: wifi: nxp: add SD zero copy support
Add SDHC zero copy support for wifi.
This depends on SDHC host requirement
1. CONFIG_SDHC_SUPPORTS_SCATTER_GATHER_TRANSFER=y.
2. CONFIG_NET_BUF_DATA_SIZE to be 256 multiples.
3. CONFIG_NET_BUF_ALIGNMENT=32 (host cache line size).
4. CONFIG_NET_L2_ETHERNET_RESERVE_HEADER=y (to 4 bytes align net buffer).

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2026-02-26 08:43:11 -06:00
Muhammed Asif
e99a2a9359 drivers: counter: microchip: g1 driver for counter with tc
Adds support for g1 counter driver with tc peripheral

Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
2026-02-26 08:42:44 -06:00
Tony Han
7cff6281d7 drivers: rtc: microchip: introduce G2 rtc driver
Add G2 RTC driver for Microchip RTC Peripherals.

Signed-off-by: Tony Han <tony.han@microchip.com>
2026-02-26 08:41:54 -06:00
Fin Maaß
4ec0a7ceb5 regulator: tps55287: implement count and list of the current limit
implement count and list of the current limit

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-26 12:29:08 +01:00
Fin Maaß
75ed7ae6c2 regulator: tps55287: use linear_range_get_win_index
use linear_range_get_win_index instead of
linear_range_group_get_win_index because it is only
one range.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-26 12:29:08 +01:00
Fin Maaß
69d4e5c79d regulator: tps55287: make r_is unsigned
make r_is unsigned and use 0 as the invalid
value, as in the code we divide by r_is and we don't
want to divide by 0.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-26 12:29:08 +01:00
Jordan Yates
08f9b85d3d flash: simulator: PM support
Add support for the PM API to the flash simulator. This enables testing
the PM behaviour of higher level libraries that use PM in CI to ensure
there are no missing/excessive calls to `pm_device_runtime_put` by the
library. For example:

```
ZTEST(library_pm, test_pm_calls)
{
    const struct device *flash = DEVICE_DT_GET_ONE();

    zassert_equal(0, pm_device_runtime_usage(flash));
    some_complex_flash_user();
    zassert_equal(0, pm_device_runtime_usage(flash));
}
```

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-02-26 10:35:44 +01:00
Seppo Takalo
bc1366af85 drivers: modem: cellular: Move driver macros into internal header
To allow cellular modems to be declared outside of modem_cellular.c
file, move all structure definitions and macros into internal header
zephyr/drivers/cellular_internal.h

This allows out-of-tree modem to be defined with
MODEM_CELLULAR_DEFINE_INSTANCE() macro.

Remove Devicetree dependency from CONFIG_MODEM_CELLULAR

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-02-26 10:31:36 +01:00
Braeden Lane
bf4f8994e2 drivers: watchdog: wdt_infineon: clamp match count for S8SRSSLT
On CY_IP_S8SRSSLT devices (PSOC 4), the WDT match register is 16-bit.
When Cy_SysClk_IloCompensate returns a compensated count that exceeds
UINT16_MAX (e.g. for a ~2000ms timeout at ~32768 Hz), passing it to
Cy_WDT_SetMatch triggers a HAL assertion that causes a HardFault on
Cortex-M0+.

Clamp ilo_compensated_counts to UINT16_MAX in the setup path, matching
the existing clamp in the feed path (ifx_wdt_timeout_to_match).

Signed-off-by: Braeden Lane <Braeden.Lane@infineon.com>
2026-02-26 10:30:16 +01:00
Fin Maaß
283c5dcc68 regulator: tps55287: fix list_voltage
Fixes list_voltages for the tps55297
regulator driver. We can't use
`linear_range_get_value()`here, as it
subtracts `min_idx` from `idx` and we don't want that.
It lead to for some idx in the middle and the beginning
that no value is written to `volt_uv`.
It first occours for the idx between 0 and 0xf0.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-26 10:26:07 +01:00
gregory planchon
786765db2f drivers: clock_control: add stm32mp13 SPI clocks
Add SPI clocks rate reading to the STM32MP13 clock driver

Signed-off-by: gregory planchon <gregory.planchon@st.com>
2026-02-25 18:09:59 -06:00
Fin Maaß
f560003e4f regulator: tps55287: get current enabled state durring init
If we don't use the gpio to reset the chip, we don't
really know the current state, so we are going to
fetch it via i2c. For the en gpio case we already know,
that it won't be enabled.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-25 18:04:43 -06:00
Andrew Perepech
cd1d8b4d42 drivers: timer: Add support for MT8365 timer
Make changes to the timer driver to support MT8365 SoC.

Signed-off-by: Andrew Perepech <andrew.perepech@mediatek.com>
2026-02-25 18:04:10 -06:00
Brandon Hurst
15b94c3ac6 drivers: usb: udc: max32: Handle deferred endpoint transfers
Issue was corrected where transfers waiting on a busy
endpoint were not being serviced. This was causing some transfers
to never complete.

Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
2026-02-25 18:46:39 +01:00
Brandon Hurst
d66cb34d82 drivers: usb: udc: max32: Minor function movements
Move xfer_in_done and xfer_out_done to after xfer_in
and xfer_out. This is because they will need to call
these functions in the next commit to handle deferred
traffic.

Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
2026-02-25 18:46:39 +01:00
Brandon Hurst
a5516ce3c6 drivers: usb: udc: max32: Reduce spurious resume events
UDC driver was submitting spurious resume events
when receiving DPACT events while the device was not
suspended.

- Change udc_max32_event callback to only respond to
DPACT events when suspended

Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
2026-02-25 18:46:39 +01:00
Brandon Hurst
1880f0938b drivers: usb: udc: max32: Fix ISR context issues with MAX32 USB
MAX32 USB had some functions in ISR context allocating memory &
acquiring mutexes. This commit fixes this by separating the
transfer completion events into ISR-safe / non ISR-safe steps.

Additionally, some apparent swapping of devicetree configuration
for in/out endpoints is resolved.

- Rename UDC_MAX32_EVT_XFER to UDC_MAX32_EVT_START_XFER
- Add MAX32 UDC events for XFER_IN_DONE and XFER_OUT_DONE
- Refactor xfer_in/out callbacks to only submit messages to a
message queue
- Provide xfer_in_Done and xfer_out_done to handle transfer
completions from UDC thread context.
- Add XFER_IN_DONE and XFER_OUT_DONE events to thread handler
- Fix swapping in devicetree macros of num_of_in_eps /
num_of_out_eps and ep_cfg_in / ep_cfg_out

Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
2026-02-25 18:46:39 +01:00
Mori Fumita
4e5ddc96dc drivers: ethernet: nxp: return -EINVAL when disabling promiscuous mode
Promiscuous mode is enabled during initialization and cannot be
disabled at runtime.
Return -EINVAL when a request attempts to disable promiscuous mode.

Signed-off-by: Mori Fumita <mfumita@electromag.com.au>
2026-02-25 18:45:03 +01:00
Mori Fumita
5425bb5b01 drivers: ethernet: nxp: Advertise ETHERNET_PROMISC_MODE capability
ETHERNET_PROMISC_MODE is not advertised in
eth_nxp_enet_get_capabilities() even though promiscuous
mode is enabled during initialization when
CONFIG_NET_PROMISCUOUS_MODE=y.

Advertise ETHERNET_PROMISC_MODE in
eth_nxp_enet_get_capabilities() and accept
ETHERNET_CONFIG_TYPE_PROMISC_MODE in
eth_nxp_enet_set_config().

Signed-off-by: Mori Fumita <mfumita@electromag.com.au>
2026-02-25 18:45:03 +01:00
Pete Johanson
8892875d61 drivers: spi: Add DMA support for RTIO on MAX32 devices
Implement support for using DMA for SPI RTIO transfers.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2026-02-25 18:44:29 +01:00