Commit graph

28,390 commits

Author SHA1 Message Date
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
Anuj Paudel
59b753094a drivers: rtc: pcf8563: Fix year offset conversion
The PCF8563 stores years as 2-digit BCD (00-99 for years 2000-2099)
as specified in the datasheet (Table 17, section 8.4.7):
https://www.nxp.com/docs/en/data-sheet/PCF8563.pdf

However, struct rtc_time uses tm_year as years since 1900 (100-199
for years 2000-2099).

The driver was incorrectly passing tm_year directly to bin2bcd()
without conversion, causing:
1. Invalid BCD values to be written (e.g., 0x7E for year 2026)
2. 100-year offset when reading back (year 2026 read as 1926)

Fix by:
- SET: Use modulo 100 to convert tm_year to chip format
- GET: Add 100 to convert chip value back to tm_year

This follows the same pattern as the DS1307 driver
(drivers/rtc/rtc_ds1307.c).

Tested in Renode simulation with custom PCF8563 peripheral.
All test years (2000, 2026, 2050, 2099) pass with valid BCD values.

Fixes #103971

Signed-off-by: Anuj Paudel <anujpaudel98@yahoo.com>
2026-02-20 14:59:14 +01:00
Erwan Gouriou
e5d5f3eee7 drivers: flash: stm32_q/o/xspi: Add default to reset_gpios_duration
Make use of a default 1ms value to reset_gpios_duration.
Do not put default to dt prop reset-gpios-duration since it should remain
optionnal.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-02-20 14:58:58 +01:00
Erwan Gouriou
f2ed2791f3 drivers: flash: stm32_xspi: Instantiate driver initialization
Now several drivers instances could be enabled at the same time.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-02-20 14:58:58 +01:00
Erwan Gouriou
434ca35827 drivers: flash: stm32_xspi: Minor cleanup
Move around some code before driver instanciation

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-02-20 14:58:58 +01:00
Erwan Gouriou
c40651be07 drivers: flash: stm32_xspi: Rework code relating to some properties
Some DT properties where used directly in the code w/o being put in
instatiable device structs (cfg, data).
Move them in these structs and access it from there.

Change definition of STM32_XSPI_RESET_GPIO to DT_ANY_INST

While I'm at it, simplify use of DT macros, replace
DT_NODE_HAS_PROP(DT_INST(0, st_stm32_ospi_nor), foo)
by DT_INST_NODE_HAS_PROP(0, foo).

Remove DT_XSPI_IO_PORT_PROP_OR, which is unused.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-02-20 14:58:58 +01:00
Erwan Gouriou
8790a72cd3 drivers: flash: stm32_xspi: Remove DT sfdp-bfp support
While there was a small related piece of code in the driver,
it is not handled in the code.
Remove the related code and make clear in the binding that this property
is not supported.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-02-20 14:58:58 +01:00
Erwan Gouriou
eca099fd7f driver: flash: stm32_xspi: Add Kconfig symbol for DMA
Having a dedicated Kconfig symbol will make things easier for next steps.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-02-20 14:58:58 +01:00
Sunil Hegde
33a7ed0179 drivers: watchdog: wdt_ti_rti: add callback support
- Add callback support for the watchdog driver.

Signed-off-by: Sunil Hegde <s-hegde3@ti.com>
2026-02-20 14:58:32 +01:00
Fin Maaß
b83997f20f drivers: ethernet: stm32: HAL_ETH_Init never returns HAL_TIMEOUT
In the V2 hal `HAL_ETH_Init()`  never returns `HAL_TIMEOUT`, so
remove that check.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-20 13:31:24 +01:00
Fin Maaß
4a69098aa9 drivers: ethernet: stm32: don't init hal_ret when not needed
hal_ret doesn't need to be assigned a value twice
before it is being used, so remove the unneeded first ones.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-20 13:31:24 +01:00