Commit graph zephyr/drivers
Author SHA1 Message Date
Mathieu Choplain
bdb8a8bf30 drivers: gpio: stm32: add missing port "W" to list
This was not noticed because there is currently no STM32 with a GPIOW port,
but adding it to the list is better for future-proofing.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-02-25 13:24:37 +01:00
Fabian Blatz
535dc222ac drivers: i2c: i2c_nrfx_twi_rtio: fix I2C_RTIO_DEFINE macro ordering
Move the I2C_RTIO_DEFINE macro to the beginning of the
I2C_NRFX_TWI_RTIO_DEVICE macro definition, before the
struct that references it.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2026-02-25 13:24:02 +01:00
William Markezana
b2ffb8b7a7 drivers: gpio: bflb: route BL70x PSRAM GPIOs when PSRAM is disabled
On BL70x, pins 23-28 are output-only and must be routed through the
PSRAM IO pads. When PSRAM is not enabled, set GLB_GPIO_USE_PSRAM_IO
so these pins are usable as regular GPIOs.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-02-25 13:17:31 +01:00
William Markezana
e42bc6dc58 drivers: gpio: bflb: fix GPIO output init pin mask
Use BIT(pin) instead of the raw pin number when setting or clearing
GPIO output values. Without BIT(), only the lowest pins were
affected and higher pins were never toggled.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-02-25 13:17:31 +01:00
James Roy
1698ab3643 drivers: counter: max32: Add counter reset and set_value support
Allow the ADI MAX32 platform use `counter_reset` and `counter_set_value`
- `reset` clears the counter
- `set_value` sets it to a given value

Signed-off-by: James Roy <rruuaanng@outlook.com>
2026-02-25 13:15:25 +01:00
Muhammed Asif
d825fb5a68 drivers: clock_control: pic32cm_pl: Adds clock driver
- Adds clock driver for pic32cm_pl devices

Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
2026-02-25 13:14:52 +01:00
Matthias Plöger
bb16624662 drivers: pwm: stm32: Add trigger output configuration
- Add new dts binding for configurable master mode
- Add exception for LP timers (not supported)
- Add required defines for configuration options
- Implement configuration of master mode during device init

Signed-off-by: Matthias Plöger <matthias.ploeger@phoenixcontact.com>
2026-02-25 13:04:05 +01:00
Quy Tran
e35a33a298 drivers: serial: Add support for group interrupt in the serial driver
Apply the grp irq support in serial driver for MCB-RX26T

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2026-02-25 13:02:41 +01:00
Tatsuya Ogawa
7be5c13672 drivers: interrupt-controller: Add support Group interrupt driver on RX
Add support Group interrupt driver on RX

Signed-off-by: Tatsuya Ogawa <tatsuya.ogawa.nx@renesas.com>
2026-02-25 13:02:41 +01:00
Benjamin Cabé
43d4644867 drivers: led: lp3943: fix unsigned integer underflow Coverity
Replace the switch statement with an array-based register lookup and a
modulo operation to resolve a Coverity "integer handling" issue and make
the code simpler.

The original subtractions (*led -= 4U/8U/12U) were guarded by switch cases
making underflow impossible in practice, but the pattern was flagged
nevertheless. The new array-based approach is semantically equivalent and
arguably more readable.

Fixes zephyrproject-rtos/zephyr#84770
Fixes Coverity CID 487606

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-24 16:05:56 -06:00
Liam Ogletree
fe01b09da6 drivers: haptics: Restructure haptics subsystem into subfolders
Placing device drivers in vendor-specific subfolders provides greater
flexibility for approaches like `<vendor/device>-common.c/h` without
cluttering a shared directory. The sensor subsystem provides good
examples of the benefits of this approach -- in particular, the
/drivers/sensor/ti/ina2xx/ subdirectory.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-02-24 16:05:29 -06:00
Manojkumar Konisetty
2565018964 drivers: gpio: Use shared interrupts for PSOC4
Enable CONFIG_SHARED_INTERRUPTS to allow multiple devices
to register handlers on the same IRQ line.

Replace irq_connect_dynamic() with IRQ_CONNECT() to configure
interrupts at build time, eliminating runtime setup overhead.

Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2026-02-24 16:04:54 -06:00
Bill Waters
9ac587cc9f drivers: spi: spi_context.h compiler warning
Avoid this warning associated with the spi_context_cs_* functions
when DT_SPI_CTX_HAS_NO_CS_GPIOS is defined.
warning: statement with no effect [-Wunused-value]

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2026-02-24 16:03:00 -06:00
Tobias Kässer
e7d6408a0d drivers: sensor: adxl345: implement proper interrupt configuration
Fix interrupt enable/disable sequence per ADXL345 datasheet
recommendations.

The ADXL345 datasheet (page 19) states: "When initially configuring
the interrupt pins, it is recommended that the functions and interrupt
mapping be done before enabling the interrupts."

Main changes:

1. Remove adxl345_interrupt_config() which incorrectly enabled
   interrupts during driver initialization without proper sequencing.
   It's not clear to me what was the purpose of this function as all
   the required logic (setting gpio interrups, adxl mapping and enabling
   happens already in tigger_set).
   I checked other drivers and this seems to be the common pattern.

2. Implement proper INT_ENABLE disable/enable sequence in
   adxl345_submit_stream() when reconfiguring watermark interrupts:
   - Disable watermark interrupt in INT_ENABLE
   - Configure interrupt mapping in INT_MAP
   - Flush FIFO
   - Re-enable watermark interrupt in INT_ENABLE

3. Add datasheet-based comments in adxl345_trigger.c explaining
   non-obvious register operations:
   - AC/DC coupling modes (ACT_INACT_CTL register)
   - INT_MAP routing logic (0=INT1, 1=INT2)
   - Interrupt clearing by reading data registers

4. Fix bug in adxl345_trigger_set() where ADXL345_INT_MAP_DATA_RDY_MSK
   was hardcoded instead of using the correct int_mask variable.

Fixes #100891

Tested on ebyte_e73_tbb with samples `accel_polling` and `accel_trig`

Signed-off-by: Tobias Kässer <t.kaesser@gmail.com>
2026-02-24 16:01:57 -06:00
Noah Stephens
eb68e58579 drivers: adc: ad7124: added support for pd-switch-enable
Added support for the low side power switch pin used for switching
DUTs attached to the ADC. The switch is configured though the
drivers device tree.

Signed-off-by: Noah Stephens <nstephens78@gmail.com>
2026-02-24 16:01:43 -06:00
Johann Fischer
c052b05415 usb: host: use USB buffer macros
Allow to use DMAable buffers in UHC driver and host support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-02-24 16:01:21 -06:00
Johann Fischer
7158c64690 include: drivers: usb: rename UDC buffer to USB buffer
Rename it to USB buffers so we can use it in host support without
confusion. Keep the UDC_* macros for now, we can deprecate and remove
them later.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-02-24 16:01:21 -06:00
Johann Fischer
e15b514a58 drivers: usb: move UDC net_buf_data_cb implementation to USB common
Move it to USB common so that it can be used on the host side in the
future.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-02-24 16:01:21 -06:00
Fin Maaß
2e5d7620b4 drivers: ethernet: set init prio to the same value
set the init prio of ethernet, mdio and the ethernet phy
to the same value, that way the prio from the dt is used.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-24 15:36:30 +01:00
Tahsin Mutlugun
a36ab08276 drivers: serial: uart_max32: Add runtime power management support
Refactor MAX32 UART driver to use pm_device_driver_init so that the
device is moved to the appropriate power state expected by the system
during initialization.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2026-02-24 13:52:15 +01:00
Tahsin Mutlugun
7d2396d876 drivers: serial: uart_max32: Add PM policy constraints
Add PM policy constraints so that UART driver can prevent the system
going to sleep before all characters are sent or received.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2026-02-24 13:52:15 +01:00
Bernardo Perez Priego
1d12eb64e3 gpio: mchp: Don't skip interrupt enable when IDET is unchanged
`gpio_xec_pin_interrupt_config` returned early when the computed IDET
configuration matched the current CR1 IDET field. On some reset paths
the GPIO control register can retain the same IDET value while the
interrupt aggregator state is reset/reconfigured. In that case, the
early return prevents re-enabling the aggregator and interrupts remain
disabled.

Remove the IDET equality early-return so the driver always updates the
level/edge bookkeeping and programs the interrupt aggregator enable
state.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2026-02-24 10:39:09 +01:00
Laurentiu Mihalcea
c92c8ab461 firmware: scmi: core: merge send_message() logic
Currently, scmi_send_message()'s logic is split across two functions,
each of which handling either polling or interrupt-based reply waiting.
Since the two functions are pretty much similar, merge them together in
a single scmi_send_message() function, which is able to handle both wait
startegies.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2026-02-24 10:35:07 +01:00
Laurentiu Mihalcea
28575ad1c0 firmware: scmi: move polling logic to transport layer
So far, the SCMI core has been in charge of enabling/disabling the "poll
for message reply" logic by directly using functions from MBOX/SHMEM.
This behavior should be abstracted away by a simple transport layer
send_message() function, with the SCMI core not having to know (or care)
about which kind of transport is being used.

To fix this problem, move the polling logic to the transport layer. Now,
based on the value of the "use_polling" parameter propagated from the SCMI
core, SHMEM will set/clear the interrupt-related bit from the flags
portion of the SHMEM area.

Note that now we only alter the state of the SHMEM flags with the MBOX
interrupts being enabled at all times. This should be enough to signal
the SCMI platform that the agent is not interested in receiving interrupts
whenever polling is enabled.

This commit is part of #102904.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2026-02-24 10:35:07 +01:00
Laurentiu Mihalcea
d9db1a9516 firmware: scmi: shmem: add "use_polling" parameter
Add a new parameter to SHMEM's write_message() functon, which is meant to
allow it to perform the required configuration whenever the SCMI stack
(via the SCMI transport layer) wishes to poll for the reply.

For now, don't implement any logic related to this. Thus, no functional
change.

This commit is part of #102904.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2026-02-24 10:35:07 +01:00
Laurentiu Mihalcea
aad91d7fe9 firmware: scmi: transport: add "use_polling" parameter
Add a new parameter to the transport layer's send_message() function,
which is meant to allow it to perform the required configuration whenever
the SCMI stack user (via the SCMI core layer) wishes to poll for the
reply.

For now, don't implement any logic related to this. Thus, no functional
change.

This commit is part of #102904.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2026-02-24 10:35:07 +01:00
Jilay Pandya
6ccef4d773 drivers: stepper: rename dt-bindings
stepper-ctrl is used as suffix for motion control drivers
stepper-driver is used as suffix for stepper drivers in mfd devices

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2026-02-24 10:32:31 +01:00
Jilay Pandya
dc934c36be drivers: stepper: split stepper.h and rename apis
rename stepper_drv_driver_api to stepper_driver_api
rename stepper_driver_api to stepper_ctrl_driver_api

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2026-02-24 10:32:31 +01:00
Gaetan Perrot
5787423351 drivers: audio: Check return value of reset GPIO configuration
Verify the return value of gpio_pin_configure_dt() when configuring
the codec reset GPIO.

Previously, failures during GPIO configuration were ignored, which
could leave the codec in an undefined state while the initialization
sequence continued.

Propagate the error to the caller to ensure proper failure handling.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-02-23 13:35:58 -06:00
Filip Stojanovic
52ec4ad339 drivers: sensor: adi: Add ADE7978 polyphase energy metering IC support
Add initial support for Analog Devices ADE7978 isolated energy
metering IC for polyphase shunt meters.

The driver implements the Zephyr sensor API and provides:
- SPI communication (read/write 8/16/32-bit registers)
- Phase A RMS current measurement (SENSOR_CHAN_CURRENT)
- Phase A RMS voltage measurement (SENSOR_CHAN_VOLTAGE)
- Device Tree bindings

This is an initial minimal working implementation. Future enhancements
will include:
- Multi-phase support (Phase B, C, Neutral)
- Active and reactive power measurement
- Interrupt support
- Calibration API

Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
2026-02-23 13:35:01 -06:00
Philémon Jaermann
88dec6661f drivers: gnss: Add a u_blox folder
To move the u_blox* related drivers.

Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
2026-02-23 13:33:51 -06:00
Philémon Jaermann
14eecbfced drivers: gnss: Simplify NMEA output proto disabling
For the F9P, we can use the UBX_KEY_UART1_PROTO_OUT_NMEA rather than
individually disabling all the messages.

For the m8, the NMEA output is already disabled when the CFG-PRT is done
from the u_blox_iface_init.
But this is not necessarily done in case the expected baudrate is already
set.
Let's keep the individual NMEA disabling for M8.

Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
2026-02-23 13:33:51 -06:00
Philémon Jaermann
10e3c840be drivers: gnss: MODEM_UBX is selected by U_BLOX_PROTOCOL
Be consistent and use that.
Only select the U_BLOX_PROTOCOL, the MODEM_UBX comes from the indirection.

Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
2026-02-23 13:33:51 -06:00
Philémon Jaermann
740c56d750 drivers: gnss: Use the common interface for the f9p/m8 drivers
The common interface can now be used by both drivers, use it.

select GNSS_U_BLOX to have access to the GNSS_U_BLOX_SATELLITES_COUNT
and the GNSS_U_BLOX_RESET_ON_INIT.

Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
2026-02-23 13:33:51 -06:00
Philémon Jaermann
82785b7092 drivers: gnss: Extend the cfg struct to handle the reset gpios
And add the reset on init if the Kconfig switch is selected.

Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
2026-02-23 13:33:51 -06:00
Philémon Jaermann
496e8c4b34 drivers: gnss: Add a GNSS_U_BLOX switch and a u_blox_common
GNSS_U_BLOX should be selected by u-blox receiver to have access to the
common configuration, which for now is only the number of satellites to
store and the reset on init functionality.

Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
2026-02-23 13:33:51 -06:00
Philémon Jaermann
f8b074f2c8 drivers: gnss: Do a version poll before trying to reconfigure baudrate
No point in doing the baudrate configuration dance if the receiver is
already in the desired baudrate.
Only do the baudrate_configuration if trying to get the version failed.

Introduce a private msg_get() API which can take the timeout/retry_count
because the previously existing u_blox_iface_msg_get() hardcodes the
timeout to 3s with some retries which would be very wasteful to use if
the receiver is not in the expected baudrate as we would timeout.

Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
2026-02-23 13:33:51 -06:00
Philémon Jaermann
795cfce286 drivers: gnss: Extend the iface_init with valset_supported
Used to configure the baudrate with the more modern UBX-CFG-VALSET
if supported, and falling back on UBX-CFG-PRT otherwise.

Adding the UART1 related configuration keys.
Just using the baudrate one, relying on the other default parameters.

Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
2026-02-23 13:33:51 -06:00
Philémon Jaermann
bbc1cb0b70 drivers: gnss: Introduce gnss_u_blox_iface.c/h
This gnss_u_blox_iface will be used by the gnss_u_blox_f9p.c and
gnss_u_blox_m8.c drivers.
Those two drivers currently define their own APIs which are
extremely similar.

The struct u_blox_iface_config is taken from the m8 flavor, as it allows
for baudrate configuration (while the f9 flavor requires the UART and the
receiver configuration to be the same).

The struct u_blox_iface_data is taken from the f9 flavor, which uses one
lock for logically separated resources (req_buf_lock and lock).

The init is done according to the m8 logic, which reconfigures the
baudrate of the receiver.
This is done with the UBX-CFG-PRT message, but the F9 could do that with
the more modern valset configuration mechanism.
This will be added in the following commit.

Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
2026-02-23 13:33:51 -06:00
Mathieu Choplain
0f6b8c19ab drivers: clock_control: stm32_common: fix wrong register name for LSEDRV
In a few series managed by the common driver, the LSEDRV field is not in
RCC_BDCR but a different register.

Use proper register name when obtaining the shift to ensure a non-zero
driving capability can be used on these series.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-02-23 16:59:56 +00:00
Xavier Razavet
204952a8f0 samples: openthread: shell: mcxw .conf files updated
Enabling the IEEE802154 CSL endpoint to support MCXW72 as a SEED role.
prj-ot-host.conf and sample.yaml corrected for compilation purpose.

Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
2026-02-23 16:59:43 +00:00
Xavier Razavet
3cd56a424c drivers: ieee802154: mcxw ieee802154 CSL receiver correction
CSL receiver is managed as follows:
	- Started in mcxw_tx() when CSL period is configured
	- Synchronized in set_csl_sample_time() for RX slots
	- Stopped after PHY operations in SAP handlers

Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
2026-02-23 16:59:43 +00:00
Michal Smola
f5c65899dc drivers: nxp: Allow usage of clocks without subsystem name
Several NXP drivers require clock control subsystem name definition in
Devicetree. It prevents usage of clock control without subsystem such
as fixed-clock. fixed-clock can be used for early SoC enablement when
complete clock controller is not available or not required.
Allow optional usage of clock control without subsystem by using 0 as
subsystem name if the name is not defined in devicetree. Add the option
for port, i2c, spi and serial drivers.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2026-02-23 16:59:01 +00:00
Seppo Takalo
df9b5f9faa drivers: modem: cellular: Change default boot time of nRF91 SM
Change default boot time of nRF91 Sip running Serial Modem
application.

If reset-line is toggled, we need to wait for the boot. Otherwise,
the init script starts too soon.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-02-23 16:58:32 +00:00
Seppo Takalo
b3fb7b7980 drivers: modem: cellular: Allow defining reset GPIO behavior
Some modems enter a power-up sequence if reset line is held active,
so we need a way to alter the GPIO behavior.

Define a "zephyr,mdm-reset-behavior" enum in device tree to allow
choosing one, or all of the supported behaviors

* hold_on_suspend
* toggle_on_resume
* toggle_on_recovery

By default, all of the behaviors are enabled, so it matches the
previous implementation.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-02-23 16:58:32 +00:00
Afonso Oliveira
ce3f07a47d arch: riscv: csr: lock IRQs around indirect CSR (micsr) access
The micsr_* helpers use a two-step MISELECT+MIREG sequence that is not
atomic. If an interrupt fires between writing MISELECT and accessing
MIREG, the handler could modify MISELECT, causing the MIREG operation
to target the wrong indirect register.

Wrap the MISELECT+MIREG sequence in each micsr_* helper with
irq_lock/irq_unlock to prevent preemption during the two-step access.
This ensures all callers are automatically protected without needing
to add locking at each call site.

Move the micsr_* helpers from csr.h into a new icsr.h header to avoid
pulling zephyr/irq.h into csr.h, which causes circular dependencies
on some SoCs. Code that needs indirect CSR access now explicitly
includes icsr.h.

Signed-off-by: Afonso Oliveira <afonso.oliveira707@gmail.com>
2026-02-23 11:36:07 +00:00
Fin Maaß
eaccc7a84a gpio: litex: fix setting oe
set oe (output enable) correctly and not always to 1.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-23 11:35:54 +00:00
Fin Maaß
6cd2923835 gpio: litex: clear all pending irq before enabling
clear all pending irq before enabling.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-23 11:35:54 +00:00
Fin Maaß
44b1f1b5df gpio: litex: enable the irq via ev_enable at the end
when configureing the irq, do the enableing at last.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-23 11:35:54 +00:00
Pieter De Gendt
747eeeb384 drivers: otp: Add shell commands
Add shell support for reading/programming One Time Programmable (OTP)
devices.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-02-23 11:35:33 +00:00