Commit graph zephyr/drivers
Author SHA1 Message Date
Zafer SEN
45e9de9cd8 drivers: modem: hl78xx: harden DNS retry and socket RX parsing
Make DNS reconfigure path report errors and allow retries instead of
silently continuing after failures.

- Change dns_work_cb() to return int and propagate error conditions
- Reschedule DNS work on -EAGAIN in carrier-on timeout handler
- Log DNS update failures from +CGCONTRDP parsing

Improve socket receive robustness and concurrency.

- Move RX ring buffer from global to per-device instance storage
- Replace parser state booleans with atomic bit flags
- Reset parser flags at init and after completed transfers
- Add clearer error logs and propagate specific receive failures
- Use compact initializer style for crafted net_msghdr
- Raise parent mismatch log from warning to error

No functional behavior change expected on success paths, but failures
now surface and recovery can be retried.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-02-03 09:41:36 +01:00
Zafer SEN
6a7a0f4d36 drivers: modem: hl78xx: register PM handler via pm_device_driver_init()
Remove CONFIG_PM_DEVICE guards around the HL78xx PM handler so it is
always compiled. Register the driver PM action with
pm_device_driver_init() during init and return its result. Drop the
manual resume path and pm_device_init_suspended() branch.

This aligns the driver with the Zephyr PM framework and lets the PM core
manage suspend/resume consistently.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-02-03 09:41:36 +01:00
Zafer SEN
200a16d25c drivers: modem: hl78xx: add async dynamic command API
Introduce CONFIG_MODEM_HL78XX_COMMAND_BUFFER_SIZE to control the AT
command buffer size. Add cmd_buffer and cmd_len to modem_buffers and
dynamic_script/dynamic_chat to hl78xx_data to support dynamic scripts.

Add modem_dynamic_cmd_send_async() to send commands asynchronously with
response matching and a user callback. This complements the existing
synchronous path and improves flexibility for non-blocking operations.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-02-03 09:41:36 +01:00
Zafer SEN
0e1abaef77 drivers: modem: hl78xx: correct AT shell script timeout units
The MODEM_CHAT_SCRIPT_DEFINE timeout parameter was mistakenly treated as
milliseconds, but the API expects the value in seconds. Update the
timeout from CONFIG_MODEM_AT_SHELL_RESPONSE_TIMEOUT_MS to a fixed value
of 5 to reflect the correct unit.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-02-03 09:41:36 +01:00
Jordan Yates
9a10cf1d1e charger: charger_gpio: added
Add a basic driver for exposing a GPIO controlled charger through the
charger API.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-02-03 09:38:52 +01:00
Pisit Sawangvonganan
08d4cf1c1f drivers: spi: place API into iterable section
Add the `DEVICE_API` wrapper to the remaining `spi_driver_api` instances,
ensuring that each driver API is placed in its respective linker section.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-02-03 09:36:43 +01:00
Lay Desai
dc15cc165c drivers: clock_control: mspm0: Conditionally set clk0 as MCLK source
The MSPM0 clock control code sets clk0 as the MCLK source without
checking if clk0 is enabled. This seems to cause the CPU to not run.

The changes in this commit will set clk0 as the MCLK source only if the
clk0 is enabled. The clk0 is considered enabled if a user defines the
the clk0-div property for the syspll node in the devicetree.

The mspm0g.dtsi defines the clk2x-div property for the syspll node in
the devicetree. The clock control code as is only allows either the
clk2x-div or the clk0-div property to be set but not both. This
essentially means the syspllclk2x was enabled, but clk0 was set as the
MCLK source.

The fix would also allow users to continue using the syspll node as it
is defined in the mspm0g.dtsi without having to override the node for each
board.

Signed-off-by: Lay Desai <lay.desai@he360.com>
2026-02-03 09:33:48 +01:00
Hoang Nguyen
90df4c8118 drivers: timer: renesas: Initialize p_reg in extended configuration
Initialize p_reg with the register base address from devicetree.

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-02-03 09:29:36 +01:00
Hoang Nguyen
52859845c8 drivers: spi: renesas: Initialize p_reg in extended configuration
Initialize p_reg with the register base address from devicetree.

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-02-03 09:29:36 +01:00
Hoang Nguyen
5a9d20b4ed drivers: serial: renesas: Initialize p_reg in extended configuration
Initialize p_reg with the register base address from devicetree.

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-02-03 09:29:36 +01:00
Hoang Nguyen
eaf655126a drivers: pwm: renesas: Initialize p_reg in extended configuration
Initialize p_reg with the register base address from devicetree.

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-02-03 09:29:36 +01:00
Hoang Nguyen
6c918d05dc drivers: mbox: renesas: Initialize p_reg in extended configuration
Initialize the extended configuration and set p_reg using the devicetree
register base address.

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-02-03 09:29:36 +01:00
Hoang Nguyen
6dc7e0429c drivers: i2c: renesas: Initialize p_reg in extended configuration
Initialize p_reg with the register base address from devicetree.

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-02-03 09:29:36 +01:00
Hoang Nguyen
29ddedd57d drivers: dma: renesas: Initialize p_reg in extended configuration
Initialize p_reg with the register base address from devicetree.

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-02-03 09:29:36 +01:00
Hoang Nguyen
4fbfd12946 drivers: counter: renesas: Initialize p_reg in extended configuration
Initialize p_reg with the register base address from devicetree.

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-02-03 09:29:36 +01:00
Hoang Nguyen
6f76f58407 drivers: can: renesas: Initialize p_reg in extended configuration
Initialize p_reg with the register base address from devicetree.

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-02-03 09:29:36 +01:00
Hoang Nguyen
89ad77fc52 drivers: adc: renesas: Initialize p_reg in extended configuration
Initialize p_reg with the register base address from devicetree.

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-02-03 09:29:36 +01:00
Camille BAUD
1df42a1ba2 drivers: flash: Add Netsol S3Axx04 MRAM
Adds a driver for S3Axx04 MRAM on SSPI bus

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-02-03 09:24:36 +01:00
Pete Johanson
53d78468c8 drivers: watchdog: Add MAX42500 driver
Add MAX42500 watchdog driver, including ability to configure voltage
monitors that can also generate reset conditions.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2026-02-02 11:38:49 -06:00
Seppo Takalo
fe67777319 drivers: modem: Improve re-dialing when using nRF91 Serial Modem
The nRF91 Serial Modem application restarts the PPP automatically,
which breaks our re-dialing attempts if network already recovered.

Instead, request to CFUN=4 and PPP to stop, so that rest of dial
script can assume correct ordering of events.

The sequence of
AT#XPPP=1
AT+CFUN=1
AT#XCMUX=2
is very timing sensitive, as the last command switches CMUX channels,
but cannot anymore do it if PPP already started on DLC channel 2.
This is a bad design of AT#XPPP command which we workaround.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-02-02 14:45:51 +01:00
Seppo Takalo
43d36c41c6 drivers: modem: Re-open idling CMUX in DORMANT state as well
If we stay in DORMANT state long enough, the CMUX channel might enter
power saving mode which will then block URC messages unless we deal
with RING event.

Also, change RING log level to DBG. It is too verbose otherwise.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-02-02 14:45:32 +01:00
Seppo Takalo
59374170b3 drivers: modem: Handle PPP disconnect event while connected
If we receive PPP_DEAD event before receiving the DEREGISTERED, we
could directly try to recover connection without waiting in the
dormant state.

If we would stay in the DORMANT state, the PPP_DEAD event is not
going to happen againt, and it would deadblock.

Depends on the modem, which is received first.
There is no guarantee of ordering.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-02-02 14:45:32 +01:00
Seppo Takalo
11407fe908 drivers: modem: Add parser for +CGEV events
When packet domain events are requested with AT+CGEREP=1 we receive
these +CGEV events that indicate the state of data connection.
This might not always be the same as being "registered".

The information could also be used if we want to use the default CID
in the future.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-02-02 14:45:15 +01:00
Chaitanya Tata
7c1cd4c569 drivers: wifi: nrf_wifi: configure GPIO pins early during driver init
Configure all nRF70 GPIO pins (BUCKEN, VDDIO_CTRL, SR RF switch) to
OUTPUT_INACTIVE state during driver initialization to prevent floating
pins from accidentally powering the module or affecting RF switch
before the interface is brought up.

This addresses an issue where GPIO configuration was delayed until
the interface was brought up for the first time, leaving voltage control
pins floating which could result in unintended power supply.

Fixes #100993.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2026-02-02 14:44:30 +01:00
Pascal Bodin
01a86ffd18 drivers: serial: uart_cc13xx_cc26xx: make irq_tx_ready check interrupt
Make cc13xx_cc26xx_irq_tx_ready check that the TX Ready interrupt
occurred, instead of checking whether there is some free space in
the UART TX FIFO. This prevents a race condition from occurring in
OpenThread Spinel protocol implementation, when a UART RX interrupt
is received right after otPlatUartSend was called, between the
assignement of 1 to ot_uart.tx_busy and the initialization of
write_length.

Signed-off-by: Pascal Bodin <pbodin@baylibre.com>
2026-02-02 14:43:24 +01:00
Tim Lin
319b8cf828 drivers/i2c: it51xxx: Refactor read and write buffer handling
Use internal buffer pointers for I2C read and write paths instead of
advancing i2c_msg->buf directly. This avoids unintended pointer side
effects while keeping the read and write data flow unchanged.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2026-02-02 12:57:02 +01:00
Tim Lin
451c2a4f40 drivers/i2c: it8xxx2: enhance: Refactor read and write buffer handling
Use internal buffer pointers for I2C read and write paths instead of
advancing i2c_msg->buf directly. This avoids unintended pointer side
effects while keeping the read and write data flow unchanged.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2026-02-02 12:57:02 +01:00
Tim Lin
67cdfc40d4 drivers/i2c: it8xxx2: Refactor read and write buffer handling
Use internal buffer pointers for I2C read and write paths instead of
advancing i2c_msg->buf directly. This avoids unintended pointer side
effects while keeping the read and write data flow unchanged.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2026-02-02 12:57:02 +01:00
James Walmsley
069141e487 drivers: adc: ads79xx: implement adc driver for ti-ads79xx
Initial implementation of an adc driver for the ads79xx series of
spi-adc chips.

This driver sets the device in auto-1 mode, and supports devices
in the series, with different resolutions (12/10/8-bit),
and number of channels.

Signed-off-by: James Walmsley <james@fullfat-fs.co.uk>
2026-02-02 12:56:29 +01:00
Fin Maaß
9934d7e82d drivers: spi: litex: litespi: make the rxtx size a define
make the rxtx size a define, as this driver
does not support any other value and it's
also not configureable in litex.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-02 12:56:11 +01:00
Holt Sun
d73e311f4a drivers: serial: uart_mcux_lpuart: fix async RX race condition
Fix race condition between DMA ISR and work queue that caused RX
length underflow when calculating len = counter - offset.

Both mcux_lpuart_async_rx_timeout (work queue) and dma_callback
(ISR) modified rx_dma_params without locking, causing the ISR to
update counter/offset mid-calculation, resulting in integer
underflow and system crash.

Solution: Add irq_lock() protection around all rx_dma_params
accesses in async_evt_rx_rdy(), mcux_lpuart_async_rx_flush(),
and async_evt_rx_buf_release().

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-02-02 12:55:52 +01:00
Holt Sun
b07ed4bf93 drivers: serial: uart_mcux_lpuart: improve rx_enable error reporting
Split error handling in mcux_lpuart_rx_enable() to distinguish
between DMA status query failures (error) and busy status (debug).

- Use LOG_ERR for get_status failures with specific error code
- Use LOG_DBG for busy status (expected condition, valid -EBUSY)
- Improves debuggability by providing clearer diagnostic messages

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-02-02 12:55:52 +01:00
Pete Johanson
adb65bce2d drivers: flash: Allow configuring dummy byte count for RDID request
Different flash parts have different requirements on the number of dummy
bytes to send when issued a RDID request, so allow configuring the read ID
dummy byte count in devicetree for the MAX32 SPIXF flash driver.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2026-02-02 10:00:36 +01:00
Liu Gavin (CSS ICW ENG WFS SW WFSW 1)
85d353d450 drivers: wifi: infineon: fix channel and bandwidth configuration
Pass the selected channel and bandwidth to WHD, so the AP
enables on the requested channel/width.

Signed-off-by: Liu Gavin (CSS ICW ENG WFS SW WFSW 1) <Gavin.Liu@infineon.com>
2026-02-02 09:59:58 +01:00
Gaetan Perrot
4f3478391a drivers: wifi: nrf_wifi: remove redundant vif_ctx_zep initialization
Fix redundant initialization of vif_ctx_zep where the variable was
initialized at declaration and immediately overwritten before being
read.

Remove the redundant initialization to improve code clarity.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-31 17:30:30 +01:00
Grygorii Strashko
db1bea3ae2 drivers: xen: add XEN_EVENTS Kconfig option
The Xen events channel driver consume 72K of RAM, but may not be
required in all use cases.

Added a XEN_EVENTS Kconfig option so that Xen events can be gracefully
disabled if not required. Updated the relevant CMakeLists.txt and
Kconfig files to guard the inclusion of the Xen events driver and its
source files by this option.

Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
2026-01-30 16:56:52 -06:00
Pieter De Gendt
df62d2ac5b drivers: otp: Remove MCUX from NXP OCOTP compatible
MCUX should not be used as part of the compatible.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-01-30 18:04:46 +01:00
Gaetan Perrot
e819733d0f drivers: crypto: smartbond: fix typos in comments
Fix spelling and wording issues in comments.

No functional change.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-30 18:04:31 +01:00
Missael Maciel
9cbc6616c1 drivers: pwm: sctimer: Add PowerManagement support
pwm_mcux_sctimer driver doesn't support power management actions.
PM Actions added, as well support to save/restore for pwm channels
configurations after exitig from PM3.

Signed-off-by: Missael Maciel <davidmissael.maciel@nxp.com>
2026-01-30 18:02:27 +01:00
Aksel Skauge Mellbye
54bc3154e3 drivers: serial: silabs: Fix async race condition
When an async transfer finished quickly, the internal state of
the driver could come out of sync with the hardware. The tx/rx
enabled flag and PM lock was taken after starting the DMA
transaction, which caused issues if the DMA complete callback
was called before the flags were updated. Set the flag and take
the PM lock prior to starting the DMA transaction to avoid this.

Also release the PM rx lock upon successful completion of a
transfer. The lock was previously only released when the user
manually called `uart_rx_disable()`.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-01-30 06:00:41 -06:00
Alberto Escolar Piedras
4921a09793 drivers serial native_pty: Add DT property to connect to stdin/out
Add a device tree property to request connecting an instance to stdin/out
(on top of the command line option, and the kconfig option).

And clarify that the kconfig option applies to whichever is the
first instance in whatever order the DT logic happens to order them.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-01-30 06:00:04 -06:00
Mathieu Choplain
2c51d3a783 drivers: clock_control: stm32u3: enable MSIx PLL mode only if requested
PLL mode on MSIK/MSIS should be enabled only if property `msi-pll-mode` is
present on the generator's DT node. However, the STM32U3 clock driver did
not check this property and unconditionally enabled PLL mode. This is an
issue because PLL mode requires an LSE generator to be provided, which was
asserted at build time, preventing usage of MSIS/MSIK without an LSE even
if the target application did not need the accuracy provided by PLL mode.

Fix by enabling PLL mode for each MSIx generator only if the `msi-pll-mode`
property is enabled on the corresponding DT node.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-01-30 05:58:35 -06:00
Arthur Gay
b6e40c34bd drivers: memc: stm32_xspi_psram: make refresh configurable in dt
Limit a transaction to a maximum length. Each PSRAM may specify
different configuration.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2026-01-30 05:57:34 -06:00
Arthur Gay
89b5151851 drivers: memc: stm32_ospi_psram: make refresh configurable in dt
Limit a transaction to a maximum length. Each PSRAM may specify
different configuration.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2026-01-30 05:57:34 -06:00
Camille BAUD
8edddc5ab2 drivers: clock_control: Improve overclock support for bl61x
Add more description, and a new overclock setting

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-01-30 05:56:02 -06:00
Camille BAUD
2d2bc6af01 drivers: regulator: driver for BFLB internal regulators
Drivers to manage BFLB SoC internal LDO11 regulators

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-01-30 05:56:02 -06:00
Qingsong Gou
afef16e841 drivers: spi: add spi driver support for sf32lb
Add spi driver for sf32lb platform

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2026-01-30 05:55:24 -06:00
Fin Maaß
1501ce3719 spi: litespi: correct max word size to 8
this driver wasn't really supporting
other word sizes than 8, so remove it.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-30 11:06:38 +01:00
Guillaume Gautier
6809092944 drivers: spi: stm32: use dfs for data frame size
Harmonize the variable names frame_size, bytes_per_frame or word_size_bytes
by replacing them all with dfs, which is already used in the Zephyr SPI
driver.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-01-30 11:06:19 +01:00
Guillaume Gautier
c85e063607 drivers: spi: stm32: replace register read by ll function
Replace the direct read from the registers by dedicated LL functions
since that they are now available.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-01-30 11:06:19 +01:00