Commit graph zephyr/drivers
Author SHA1 Message Date
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
Venkatesh Odela
712e30e3c7 drivers: ethernet: phy: Fix missing configurations
Add indirect read/write method for accessing extended register
set beyond 0x1F. Implement configuration for strap quirk, reset
and restart ensures reliable PHY initialization and operation.

Signed-off-by: Abin Joseph <abin.joseph@amd.com>
Signed-off-by: Venkatesh Odela <venkatesh.odela@amd.com>
2026-02-23 11:35:14 +00:00
Carlo Caione
ed7f33df6e drivers: lora: sx126x: add STM32WL sub-GHz radio support
Add support for the STM32WL integrated sub-GHz radio to the native
SX126x driver. The STM32WL has an SX126x-compatible radio core but
uses internal peripherals instead of external GPIOs.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2026-02-23 11:34:35 +00:00
Carlo Caione
ea3fa9a819 drivers: lora: sx126x: factor out common HAL code
Extract common HAL functions shared between different SX126x
implementations into sx126x_hal_common.c, this prepares the driver for
supporting additional platforms like the STM32WL integrated radio.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2026-02-23 11:34:35 +00:00
Shontal Biton
4f66943327 drivers: counter: Add counter driver for BURTC in Silabs s2 and s3
Add support for using BURTC as regular counter,
without overriding the sleeptimer.

Signed-off-by: Shontal Biton <shontal1005@gmail.com>
2026-02-23 11:32:26 +00:00
William Markezana
03286aad00 drivers: watchdog: add Bouffalo Lab BL70x watchdog driver
Add a watchdog timer driver for all Bouffalo Lab SoC families.

Tested on Sipeed M0Sense (BL702) with tests/drivers/watchdog/wdt_basic_api.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-02-23 08:52:12 +01:00
William Markezana
8f7cef3898 drivers: i2c: bflb: refactor transfer to reduce complexity
Extract five helpers from i2c_bflb_transfer to reduce cognitive
complexity from ~45 to ~15:

- i2c_bflb_check_msgs: validate message lengths and 10-bit addressing
- i2c_bflb_wait_idle: busy-wait for bus idle
- i2c_bflb_wait_completion: wait for transfer end with error checks
- i2c_bflb_do_read: read path with scatter into msg buffers
- i2c_bflb_do_write: write path with 0-length probe workaround

Also check return values of i2c_bflb_read/i2c_bflb_write that were
previously ignored, and fix num_msgs <= 0 to == 0 (uint8_t).

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-02-23 08:51:02 +01:00
William Markezana
a895bd6ba4 drivers: i2c: bflb: fix timeouts
Fix uninitialized k_timepoint_t in read/write paths that caused
undefined timeout behavior. Add early NAK/error detection in the
transfer loops to fail fast instead of spinning until timeout.
Remove unnecessary __no_optimization attributes.

Tested on Sipeed M0Sense (BL702) with I2C peripherals across
PDS sleep/wake cycles.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-02-23 08:51:02 +01:00
William Markezana
0ab817a08e drivers: hwinfo: add Bouffalo Lab BL70x hardware info driver
Add a hardware info driver for the Bouffalo Lab BL70x SoC family
that reads the unique device ID from the on-chip efuse.

Tested on Sipeed M0Sense (BL702).

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-02-23 08:49:54 +01:00
Pieter De Gendt
b606996c29 drivers: lora: sx126x: Put driver API into iterable sections
Use DEVICE_API to put driver API into the correct linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-02-23 08:49:10 +01:00
Fiona Behrens
e4068f8757 soc: nuvoton m48x: use numaker reset driver for uart
Use the numaker reset driver for the reset in the numicro uart driver.

Signed-off-by: Fiona Behrens <me@kloenk.dev>
2026-02-23 08:48:43 +01:00
Henrik Brix Andersen
7651a2f4c5 drivers: can: tcan4x5x: add support for configuring nWKRQ pin voltage rail
Add support for configuring the voltage rail used for the nWKRQ
pin. Previously, the driver hard-coded this to VIO, open-drain.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-02-22 22:05:14 +01:00
Henrik Brix Andersen
22cfdb3e63 drivers: can: tcan4x5x: allow for VCCOUT to stabilize on local wake-up
Allow for VCCOUT to stabilize when issuing a local wake-up.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-02-22 22:05:14 +01:00
Henrik Brix Andersen
d1f50f29d0 drivers: can: tcan4x5x: do no busy wait for an entire millisecond
Switch to use k_usleep() instead of k_busy_wait() in tcan4x5x_reset()
function, waiting for the reset to complete.

Initially, the tcan4x5x_reset() function was only ever called during driver
initialization, where busy waiting for 1000 microseconds was not an issue,
but since adding device power management support, this function can now
also be called during device resume.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-02-22 22:05:14 +01:00
Sayed Naser Moravej
251fe8177b drivers: ethernet: add support for WIZnet w6100
This PR adds support for W6100 spi ethernet controller.
This driver is tested on the w6100-evb-pico
https://docs.wiznet.io/Product/Chip/Ethernet/W6100

Signed-off-by: Sayed Naser Moravej <seyednasermoravej@gmail.com>
2026-02-22 16:13:25 +00:00
Pieter De Gendt
2121daa8ee drivers: clock_control: Put API into iterable section
Update the driver to use DEVICE_API to put it into the correct iterable
section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-02-22 16:13:03 +00:00
Camille BAUD
e1bf32d7d1 drivers: adc: fix Infineon SAR PR removing bflb adc
Please check your rebases
Fixes deletion of driver unrelated to PR.

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-02-20 21:54:38 -08:00
Adam BERLINGER
da95dcdbd2 driver: flash_stm32_xspi: Remove HSLV configuration
HSLV now handled by stm32_iocell driver and board device tree.
LL_PWR_EnableXSPIM2 called already in SoC initialization:
soc/st/stm32/stm32h7rsx/soc.c

Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
2026-02-20 10:32:44 -08:00
Mathieu Choplain
b779a2b03f drivers: gpio: stm32: use device as ISR argument instead of data
The GPIO ISR needs both a pointer to the device object and its data block
(because the callback linked list is stored in the data block). Sicne the
device object has a built-in pointer to the data block, using that as the
ISR's argument allows obtaining all we need "for free" whereas the current
approach wastes 4 bytes of RAM per GPIO port instance.

Note that once compiled, the reworked ISR is effectively identical to the
old one (only the offset of one `ldr Rt, [Rn, #off]` changes).

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-02-20 10:31:46 -08:00
Fabin V Martin
4f95b4d152 drivers: uart: microchip: sercom g1: refactor code
Changes added to make g1 driver to be used across multiple
SoC's and also avoids use of multiple SOC symbols in the
source file for selecting between the similar but differently
named macros and reg definitions across multiple DFP's.

Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>
2026-02-20 10:31:08 -08:00
Dev Joshi
925224a98e drivers: fuelgauge: add support for SOH property
This commit adds support for State-of-Health (SOH) property in the
fuel_gauge subsystem.

Signed-off-by: Dev Joshi <devbhave@qti.qualcomm.com>
2026-02-20 10:28:42 -08:00
Christoph Schnetzler
7ffbc237c9 drivers: mipi_dbi: add mipi_dbi_rpi_pico_pio
Add mipi_dbi driver for MIPI_DBI_MODE_8080_BUS_8/9/16_BIT using PIO and DMA

Signed-off-by: Christoph Schnetzler <schnetzler.christoph@gmail.com>
2026-02-20 10:25:45 -08:00