Commit graph zephyr/drivers
Author SHA1 Message Date
Brett Peterson
b2bb1ab932 drivers: i2s: pse84 adding support for larger block sizes
Adds support to the infineon i2s driver for arbitrary memory block
sizes. The driver was previously limited to block sizes that matched the
hardware FIFOs.

Signed-off-by: Brett Peterson <brett.peterson@infineon.com>
2026-05-05 09:47:55 +02:00
Fabio Baltieri
d46a9afe3a i2c: stm32: use the generic I2C_TRANSFER_TIMEOUT_MS option
Use the generic I2C_TRANSFER_TIMEOUT_MS.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-05-05 09:47:27 +02:00
Fabio Baltieri
172139d31f i2c: npcx: use the generic I2C_TRANSFER_TIMEOUT_MS option
Use the generic I2C_TRANSFER_TIMEOUT_MS.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-05-05 09:47:27 +02:00
Fabio Baltieri
10f3251be4 i2c: nrfx: use the generic I2C_TRANSFER_TIMEOUT_MS option
Use the generic I2C_TRANSFER_TIMEOUT_MS.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-05-05 09:47:27 +02:00
Fabio Baltieri
37fb15e9ea i2c: add a generic I2C_TRANSFER_TIMEOUT_MS option
Add a generic I2C_TRANSFER_TIMEOUT_MS option, not tied to any specific
driver, as well as a I2C_TRANSFER_TIMEOUT helper to handle conversions
and infinite timeout and a helper for driver that only supports finite
timeouts.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-05-05 09:47:27 +02:00
Tanguy Raufflet
8cd2b2cd87 drivers: display: ssd1306: remove i2c_burst_write usage
As mentioned in the i2c_burst_write documentation, this API may not be
supported by all I2C devices. The recommendation from this documentation
is to use i2c_write with a buffer containing the combined address and
data.

The ssd1306 driver was working well when using I2C but not when using
I2C over I3C. In this case, the control command was sent in a separate
transaction, which the SSD1306 does not support. To fix this issue, we
should apply the recommended approach and use i2c_write instead of
i2c_burst_write. The solution implemented uses chunks to avoid stack
overflow when using large buffers (it can be up to 1 kB).

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
2026-05-04 22:07:19 +02:00
Fin Maaß
38463022d1 drivers: ethernet: phy: add condition for the plca related api functions
the plca related api functions are only needed
for T1S ethernet phys, therefore hide them
behind a Kconfig, that is selected from the phy,
so we don't include these if they are not needed.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-04 22:07:16 +02:00
Liam Ogletree
dc0b5efd5b drivers: haptics: Fix CS40L5x multi_write behavior with multiple devices
This fix adds a macro for writing register updates in big endian
at compile-time to fix an issue with multi-device configurations.
Previously, the I2C write function would flip the byte order of
arrays unconditionally, which is problematic if arrays are shared
across instances of a driver. Adds a new "raw write" for I2C
transactions where the uint32_t array to write is already in BE32
format.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-05-04 22:06:55 +02:00
Liam Ogletree
e2104b761e drivers: haptics: Fix checkpatch and other warnings for CS40L5x driver
Addresses checkpatch and related warnings, including:

 - Update select files within Cirrus haptics subdirectory to not have
execute permissions.

 - Fixes identified warnings by adding `const` where appropriate.

 - Add `__maybe_unused` qualifiers where appropriate.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-05-04 22:06:55 +02:00
Liam Ogletree
0b1929a116 drivers: haptics: Split compiled source files by Kconfig
Because I2C- and SPI-related source files only need to be compiled
if corresponding Kconfig options are enabled, update CMakeLists.txt
accordingly.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-05-04 22:06:55 +02:00
Liam Ogletree
1923fb031f drivers: haptics: Add software reset functionality to CS40L5x driver
Add support for software resets in case no reset GPIO can be provided.
Add a mailbox write to prevent hibernation during bringup because
we can no longer rely on a hardware reset to make sure the device is
not hibernating.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-05-04 22:06:55 +02:00
Liam Ogletree
e1979eda95 drivers: haptics: Logging cleanup in CS40L5x driver
Remove unnecessary debug statements, change warning and error logs
to debug statements where appropriate, add return statements, and
refactor accordingly.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-05-04 22:06:55 +02:00
Liam Ogletree
3875014117 drivers: haptics: Simplify CS40L5x haptics logging function
Rather than return the current logging state on success and an
error code on failure (without real benefit), simplify the
function to return success or failure, which also simplifies
the implementation.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-05-04 22:06:55 +02:00
Liam Ogletree
71d37e0087 drivers: haptics: Add mutex locks to CS40L5x API functions
Add mutex locks and unlocks where appropriate in the CS40L5x driver.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-05-04 22:06:55 +02:00
Liam Ogletree
4cc0912b52 drivers: haptics: Update error message and handling in CS40L5x driver
This interrupt indicates that the current was limited, not that
an overcurrent condition was detected. Since it is not a fatal
error, remove the addition to error_bitmask and correct the
language.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-05-04 22:06:55 +02:00
Liam Ogletree
547a0cb0a2 drivers: haptics: Simplify CS40L5x driver trigger/event logging
The initial driver implementation used ring buffers, kept a private
variable to count "effects in flight", and register GPIO callbacks
to log playback events, but these ultimately bloat the driver and
introduce new issues where a dropped start or complete playback can
force the driver into a bad state. Additionally, the mailbox events
already provide sufficient log information if needed. As a result,
let's simplify the driver's logging mechanisms.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-05-04 22:06:55 +02:00
Liam Ogletree
a58dd72beb drivers: haptics: Add OTP ID check in CS40L5x driver
Add check for OTP ID to ensure a valid device is being used.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-05-04 22:06:55 +02:00
Liam Ogletree
ddb0b1d9df drivers: haptics: Macro cleanup in CS40L5x driver
The register and address width macros are used across files, so
remove duplicates and expose in the private header file.

Ensure macros match the datasheets where appropriate, and
organize the macros more clearly. Add unsigned specifiers for
clarity.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-05-04 22:06:55 +02:00
Liam Ogletree
f8a1ab873f drivers: haptics: Add device-specific compatibles for variants
Split the generic cirrus,cs40l5x compatible into device-specific
variants. Update the driver and Kconfig  accordingly. Update the
CRD40L50 demonstration board's compatible to cirrus,cs40l50. Move
the device ID from the data struct to the config struct. Move uses
of DT_ANY_INST_HAS_PROP_STATUS_OKAY() and similar macros from the
device driver to Kconfig to support new DT_DRV_COMPAT usage in the
driver.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-05-04 22:06:55 +02:00
Liam Ogletree
1bd8d81080 drivers: haptics: Split CS40L5x header into private and public headers
Many structures and functions in the public CS40L5x do not need to be
exposed to userspace. Split the header accordingly into private
and public headers, and remove comments accordingly.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-05-04 22:06:55 +02:00
Liam Ogletree
013af9a021 drivers: haptics: Non-behavioral, style changes to CS40L5x driver
This PR provides non-behavorial changes, including:

 - Removing unused header files.

 - Removing unnecessary (void) casts for void functions.

 - Simplifying devicetree API macros where appropriate.

 - Removing unnecessary variables from config/data structs.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-05-04 22:06:55 +02:00
Fin Maaß
0a58c2a1d6 drivers: ethernet: e1000: select PCIE
devices on the pcie bus should select PCIE,
just like SPI devices select SPI.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-04 21:59:21 +02:00
Guillaume Gautier
725e397e90 drivers: adc: stm32: lock adc during setup
If the channel setup function is called while an ADC conversion is
on-going, it can lead the system to hang indefinitely. Prevent this by
adding a locking mechanism on the setup function, similar to what is
done for the read function.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-05-04 21:57:23 +02:00
Mathieu Choplain
bf9ff00edf drivers: i2s: stm32: sai: don't use legacy "SAI_MASTERDIVIDER_DISABLED"
This macro is now called "SAI_MASTERDIVIDER_DISABLE" (no 'D' at the end);
stop using the old name which only worked thanks to the HAL Legacy
definitions header.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-05-04 21:57:05 +02:00
Nicolas Pitre
75bef580e9 drivers: timer: arm_arch_timer: fix truncation in arch_busy_wait
The custom arm_arch_timer arch_busy_wait() computed the wait duration as:

    cycles_to_wait = sys_clock_hw_cycles_per_sec() / USEC_PER_SEC *
                     (uint64_t)usec_to_wait;

Integer division applied first. When the timer frequency is not an
integer multiple of USEC_PER_SEC (e.g. 62.5 MHz on Cortex-A53), the
fractional cycles-per-microsecond are silently dropped, making every
call to k_busy_wait() return short by up to 0.8% of the requested
duration -- breaking the API contract that busy_wait() is guaranteed
to wait at least the requested number of microseconds.

Replace the open-coded conversion with k_us_to_cyc_ceil64(), which
multiplies first and rounds up, so the resulting cycle count always
covers at least the requested microseconds.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-05-04 21:55:33 +02:00
Bernardo Perez Priego
e1c8270123 drivers: peci_espi: Add PECI over eSPI controller driver
Introduce a PECI transport driver that operates over the eSPI bus,
enabling platforms without a native PECI controller to communicate
with the host CPU via an embedded controller.

This driver:
- Implements the PECI transaction layer on top of eSPI OOB channel
- Serializes PECI transactions to ensure protocol correctness
- Integrates with the existing PECI core infrastructure
- Allows PECI consumers (e.g. DTT, thermal, power management) to remain
  transport-agnostic

A corresponding devicetree binding enables PECI-over-eSPI by defining
a PECI child node under the eSPI controller node.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2026-05-04 13:33:05 -05:00
Zhaoxiang Jin
3c16651862 drivers: adc: mcux_lpadc: set BUF21 mode after enabling regulator
set BUF21 mode after enabling regulator, to ensure the buffered
output is available for the LPADC's VREFI reference.
This fixes an issue where the LPADC would produce inaccurate
conversion results due to BUF21 being left disabled.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-05-04 15:00:39 +02:00
Andrew Yong
d679768628 drivers: input: gpio_qdec: add invert-direction property
Add an invert-direction boolean DT property that negates the axis value
reported by the event worker. This handles boards where the physical
encoder orientation produces a direction opposite to what the quadrature
state machine reports without swapping the A/B GPIO wires.

Signed-off-by: Andrew Yong <me@ndoo.sg>
2026-05-04 14:59:00 +02:00
Etienne Carriere
aaf1c39145 drivers: flash: flash_shell.c: fix size argument on erase command
Fix the test on the number of arguments in the erase command
to get the optional size argument that was mistakenly increased by
cb2382d25b ("drivers: flash: flash_shell.c: Requires device on
destructive ops") and made the argument never considered.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-05-04 14:55:44 +02:00
Fin Maaß
a76f06a9fa drivers: wifi: esp32: implement 2 ifaces on one dev
implement 2 ifaces on one device in the
esp32 wifi driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-04 14:55:03 +02:00
Fin Maaß
1bb2215a45 net: wifi: also add struct net_if to struct wifi_mgmt_ops
as the ethernet api already includes
struct net_if as a argument for its
functions also add it to struct wifi_mgmt_ops.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-04 14:55:03 +02:00
Fin Maaß
db984ee196 net: l2: ethernet: add struct net_if to arguments
add struct net_if to arguments

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-04 14:55:03 +02:00
Alexios Lyrakis
1cf1de81a1 arch: riscv: add Supervisor-mode (S-mode) support
Introduce CONFIG_RISCV_S_MODE to select Supervisor-mode execution.
Add depends on !RISCV_S_MODE to RISCV_PMP since PMP CSRs are
inaccessible from S-mode.

Add an M-mode SBI shim (reset.S + sbi.S) that configures exception
delegation, PMP, and counter access before dropping to S-mode via mret.
The shim handles SBI_SET_TIMER ecalls from S-mode and forwards MTIP to
STIP so the supervisor timer driver works without a full SBI firmware.

Introduce privilege-level abstractions in isr.S (RV_CAUSE, RV_EPC,
RV_STATUS, RV_TVAL, etc.) and update all runtime code that previously
accessed M-mode-only CSRs (mcause, mtval, mstatus, mie, mip) to use the
S-mode equivalents when CONFIG_RISCV_S_MODE is set.

ARCH_EXCEPT in kernel context uses ebreak (cause=3, Breakpoint) instead
of a direct z_riscv_fatal_error() call.  In S-mode, ecall (cause=9) is
kept in M-mode for SBI and never reaches the S-mode exception handler;
a direct call with NULL esf caused the stack unwinder to crash into an
infinite fault loop.  ebreak is delegated to S-mode by our medeleg
configuration; isr.S treats ebreak with t0=RV_ECALL_RUNTIME_EXCEPT the
same way M-mode treats ecall-based ARCH_EXCEPT.

Signed-off-by: Alexios Lyrakis <alexios.lyrakis@gmail.com>
2026-05-04 14:54:52 +02:00
Vinit Mehta
42ac32c9da drivers: bluetooth: Add BT IR support for NXP hosted SoC
-Add inband independent reset support for IW612, IW416 and IW610
-Add kconfig option to enable/disable IR support

Signed-off-by: Vinit Mehta <vinit.mehta@nxp.com>
2026-05-04 14:53:51 +02:00
Thomas Decker
04f8b1b86f drivers: power_domain: gpio_monitor: Add option to read init state
Add function to read the state of the monitored external power at startup.
Needed when controller can startup with monitored external power rails
beeing powered or not. The actual read of the state is not done during
init but deferred to a later stage after all child devices of this power
domain are also initialized and are able to receive a PM action callback.

A Kconfig switch CONFIG_POWER_DOMAIN_GPIO_MONITOR_INITIAL_READ is
introduced to optionally turn on this feature.

Signed-off-by: Thomas Decker <decker@jb-lighting.de>
2026-05-04 14:53:35 +02:00
Ren Chen
4994644cff drivers: i2c: it51xxx: add support fifo mode for all channels
The new hardware supports fifo mode for all i2c channels. This commit
adds support for fifo mode across all i2c channels.

Additionally, the compilation fails when the `I2C_IT51XXX_FIFO_MODE`
option is disabled because the isr function is behind this option.
This change also resolves this issue.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2026-05-04 09:00:48 +02:00
Jordan Yates
18a491c1d6 modem: hl78xx: remove hl78xx_config casting
Explicitly casting a `const void *` to an end data type is unnecessary,
introduces the opportunity to mis-cast the `const` qualifier and goes
against the direction decided in:
    https://github.com/zephyrproject-rtos/zephyr/issues/37616

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-05-04 08:59:29 +02:00
Jordan Yates
12b601ae3b modem: cellular: remove modem_cellular_config casting
Explicitly casting a `const void *` to an end data type is unnecessary,
introduces the opportunity to mis-cast the `const` qualifier and goes
against the direction decided in:
    https://github.com/zephyrproject-rtos/zephyr/issues/37616

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-05-04 08:59:29 +02:00
Tien Nguyen
32c506176d drivers: dma: update to support for Renesas RZ/V2x
- Handles IRQSEL
- Update p_extend->external_detection_mode for common use

Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2026-05-04 08:58:09 +02:00
Quang Le
6d2b6de690 drivers: spi: Initial support for RZ/V2H, V2N
Add SPI driver support for Renesas RZ/V2H, V2N.

Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
2026-05-03 20:30:58 -05:00
Quang Le
d75577d307 drivers: spi: Update SPI driver for RZ/N2L, T2L, T2M
- Add DMA support for SPI on RZ/N2L, T2M since the previously supported
  had not support DMA.
- Add initial support SPI driver for board RZ/T2L.

Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
2026-05-03 20:30:58 -05:00
Shreehari HK
19b588e10f drivers: i2c: dw: add support for I2C core clock optimization
- Introduce support for the DesignWare I2C specific core clock frequency
  optimization feature (IC_CLK_FREQ_OPTIMIZATION).

- This feature reduces the internal latency cycles required to generate
  the SCL high and low periods, allowing the controller to achieve target
  bus speeds with a lower input clock (ic_clk) frequency.

- The driver now supports both standard calculation (optimization=0) and
  the new optimized mode, selectable via Kconfig. This ensures
  compatibility with existing hardware while enabling the optimization
  on platforms that support it.

Signed-off-by: Shreehari HK <shreehari.hk@alifsemi.com>
2026-05-03 20:30:20 -05:00
Shreehari HK
0945cc6cbe drivers: i2c: dw: use macros for minimum scl counts
- Replace hardcoded magic numbers for SCL High and Low Count register
  minimum values with descriptive macros.

- The DesignWare I2C controller requires specific minimum values
  (Section 2.14.1 of DW Spec) for IC_*_SCL_HCNT and IC_*_SCL_LCNT
  registers based on the spike length (SPKLEN) configuration.
  Specifically:
  - HCNT must be at least IC_*_SPKLEN + 6
  - LCNT must be at least IC_*_SPKLEN + 8

- Using macros improves readability and maintainability by documenting
  the source of these constraints and ensuring consistency across the
  driver.

Signed-off-by: Shreehari HK <shreehari.hk@alifsemi.com>
2026-05-03 20:30:20 -05:00
Shreehari HK
aac12c9b8a drivers: i2c: i2c_dw: move spike length config to common init
Previously, the spike length suppression was only configured in the
master mode. This resulted in the slave mode
missing this configuration.

Move the spike length setting to the common initialization function
to ensure it is applied for both master and slave modes.

Signed-off-by: Shreehari HK <shreehari.hk@alifsemi.com>
2026-05-03 20:30:20 -05:00
Chris Ruehl
dcbace98e2 Display: ssd1306: Add software reset command 0xE4
This patch applies a software reset command under the condition that no
gpio reset pin is assigned and the new introduced boolean softreset-on
had been set for the device in the device tree or overlay.

Signed-off-by: Chris Ruehl <chris@gtsys.com.hk>
2026-05-03 21:41:40 +02:00
Sameer Srivastava
6b83c0a1c2 drivers: fpga: fpga_slg47910: driver for Renesas SLG47910
- Add FPGA driver for Renesas SLG47910
- Add Kconfig option to enable SLG47910 FPGA driver

Signed-off-by: Sameer Srivastava <l1zard78@proton.me>
2026-05-03 21:40:40 +02:00
Zhaoxiang Jin
abf8033953 usb: udc_mcux_ehci: enable clocks before setting rates
Check that the controller and PHY clock devices are ready, then
enable the clocks with clock_control_on() before calling
clock_control_set_rate().

This lets the EHCI driver bring up RT7xx USB clocks from the
devicetree clock description.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-05-03 21:40:02 +02:00
Zhaoxiang Jin
39eaad9646 drivers: clock_control: add RT7xx USB clock support
Add RT7xx USB controller and PHY clock IDs to the MCUX SYSCON
bindings and handle them in the shared clock control driver.

This allows RT7xx USB clocks to be enabled through the common
clock control API.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-05-03 21:40:02 +02:00
Michael Zimmermann
c98321cbfe drivers: ethernet: adin2111: increase OA buffer size
The comment is correct, the code was wrong. Each chunk can be 64 bytes of
data, but they also have 4 byte headers. So to be able to read 255 chunks
with 64 bytes of data each, The buffer has to be 255 * 68.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-05-01 16:22:55 -05:00
Michael Zimmermann
158df8d088 drivers: ethernet: adin2111: reset state when the read packet it too big
Add a bounds check to prevent a chunk from being written outside the
buffer.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-05-01 16:22:43 -05:00