Commit graph zephyr/drivers
Author SHA1 Message Date
Alexander Kozhinov
14991c1e3a drivers: opamp: implement stm32 opamp driver
implement operational amplifier driver for stm32
add KConfig options for stm32 opamp driver
add conditional source target to cmake file

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2026-02-03 14:21:28 -06:00
Jakub Topic
7a86136610 Revert "drivers: rtc: check PORF flag before clearing alarm flags at init"
This reverts commit e55a505989.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2026-02-03 08:23:48 -06:00
Alain Volmat
7561fb46bf drivers: display: ltdc: ensure to flush buffer into memory
When dealing with full frame write, ensure that the buffer content
is well flushed into memory so that the LTDC is able to access to the
correct data.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-02-03 08:21:00 -06:00
Alain Volmat
c5a8e70342 drivers: display: ltdc: rework write function for ease of readability
Rework the way stm32_ltdc_write function is written, splitting
into several functions in order to gain in readibility.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-02-03 08:21:00 -06:00
Ha Duong Quang
12ae881233 drivers: flash: add NXP S32 XSPI flash hyperRAM driver for K5
add NXP S32 XSPI flash hyperRAM driver for K5

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2026-02-03 08:20:27 -06:00
Ha Duong Quang
6313d3d6f7 drivers: memc: add NXP S32 XSPI controller for K5
add NXP S32 XSPI controller for K5

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2026-02-03 08:20:27 -06:00
Hoang Nguyen
3bd8612490 drivers: i2c: Initial support for RZ/A2M
Add I2C driver support for Renesas RZ/A2M

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2026-02-03 08:19:39 -06:00
Peter Wang
bb8ef5dd75 boards: frdm_mcxa577: add watchdog support
1. enable watchdog support
2. verified tests/drivers/watchdog/wdt_basic_api

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2026-02-03 12:13:16 +00:00
Marcelo Roberto Jimenez
ebdbab5b52 drivers: serial: uart_shell.c: Enhance the uart shell
This patch enhances the UART shell by:

- Adding a config command to display the UART configuration;
- Displaying the current configuration when the command misses the last
  parameter (usefull for command line editing).

Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
2026-02-03 12:12:53 +00:00
Krzysztof Chruściński
6e65fbe585 drivers: serial: nrfx_uarte: Refactor byte counting with TIMER
Some time ago a receiver mode for newer SoCs was introduced. It is
using TIMER to count RX bytes via PPI. Due to changes in the system
behavior it is not the same implementation as the one used on
legacy targets (nRF52x, nRF53x and nRF91x). New implementation is
using the Device Tree to assign a TIMER instance and old feature was
using Kconfig which is now obsolete and error prone since it is
easy to get resource usage conflict is some instances are managed
in Device Tree and some in Kconfig.

As a result to reliably receive data without HWFC user had to use
different configuration depending on the target.

Legacy implementation was using nrfx_timer and new one used HAL.

Patch attempts to align better those two similar but different
implementations by:
- deprecating Kconfig symbols for selecting TIMER instance in favor
  of the Device Tree
- extracting common part like PPI initialization and some control
 block fields
- Using TIMER HAL in both implementations.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-02-03 12:12:41 +00:00
Krzysztof Chruściński
7979d37f42 drivers: serial: nrfx_uarte: Fix short RX buffers handling
Interrupt handler was handling events in a following order:
ENDRX, RXSTARTED, RXTO. This could lead to error if RX buffer
is short then with high baudrate RXSTARTED for the current
buffer could be handled together with ENDRX and in that case
uart_rx_buf_rsp called from RXSTARTED would return error as
reception is already finished due to handled ENDRX.

Reworking the driver to change that order to RXSTARTED, ENDRX,
RXTO.

Additionally, driver is optimize to only check HW events for
enabled interrupts. To achieve that, RX path interrupts are
all disabled then RX is disabled.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-02-03 12:12:41 +00:00
Krzysztof Chruściński
dba9997a50 drivers: serial: nrfx_uarte: Cleanup
Remove parts of implementation which are no longer in use.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-02-03 12:12:41 +00:00
Fin Maaß
a06e4b271f spi: litex: litespi: move spi_context_update_tx
With writing to `master_rxtx_addr` the transfer starts
and with that the interrupt for rx can also come at any time after it.
If that interrupt happens during
spi_context_update_tx, it can lead to some undefined behavior.
In my case I got a `Load access fault` due to some later code,
then wanting to read a write only area. Probably
`tx_count` in `struct spi_context` being decremented one to many,
so it would be the max value of size_t.

Also we don't want to do `spi_context_update_tx`
before `spi_context_wait_for_completion()`. As
it contains `spi_context_total_tx_len()` and that
needs the not incremented `current_tx`.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-03 13:08:46 +01:00
Hake Huang
78cb3b421c drivers: clock_control: mcux: fix RW6xx syscon clock rates
RW6xx syscon clock rates fixes

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2026-02-03 13:06:27 +01:00
Pierre-Henry Moussay
1fd1b30b53 drivers: intc: plic: add option to disable priority init
In case of a warm boot, e.g., a boot in Asymmetric MultiProcessing
(AMP), the responsability of the priority initialisation should be
on the host only, as the priority are not set per context.

Signed-off-by: Román Cárdenas Rodríguez <rcardenas.rod@gmail.com>
Signed-off-by: Pierre-Henry Moussay <pierre-henry.moussay@microchip.com>
2026-02-03 13:02:01 +01:00
Pierre-Henry Moussay
c5a007406c drivers: intc: plic: add riscv_plic_irq_complete
Add riscv_plic_irq_complete and make it available for kernel.
This is useful for Asymmetric MultiProcessing (AMP) configuration,
where the platform can be rebooted from the host side and the request
is processed in a interruption context.

Signed-off-by: Román Cárdenas Rodríguez <rcardenas.rod@gmail.com>
Signed-off-by: Pierre-Henry Moussay <pierre-henry.moussay@microchip.com>
2026-02-03 13:02:01 +01:00
Fabian Blatz
935a8f7cee drivers: flash: renesas_ra_hp: Replace Z_OOPS with K_OOPS
Replace usage of Z_OOPS with K_OOPS.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2026-02-03 09:46:03 +01:00
Fabian Blatz
6486a378fa drivers: haptics: Fix userspace handlers
Replace usage of Z_OOPS with K_OOPS.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2026-02-03 09:46:03 +01:00
Zafer SEN
d5482a55b5 drivers: modem: hl78xx: centralize AT command and script timeouts
Replace hardcoded numeric timeout values with named HL78XX_CMD_TIMEOUT_*
and HL78XX_SCRIPT_TIMEOUT_* constants. These values follow the HL78xx
AT Command Reference Guide recommended timing ranges.

Update all chat script definitions to use the new timeout groups:
- FAST, SHORT, MEDIUM, LONG, VERY_LONG, EXTENDED command timeouts
- INIT, POST_RESTART, PERIODIC, NETWORK, POWEROFF, GNSS script timeouts

This improves maintainability, avoids duplicated magic numbers, and
aligns timing behavior across the driver and chat scripts.

No functional changes intended aside from consistent timeout handling.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-02-03 09:41:36 +01:00
Zafer SEN
2599451754 drivers: modem: hl78xx: add optional A-GNSS assistance support
Introduce optional Assisted GNSS (A-GNSS) support for HL78xx GNSS using
AT+GNSSAD commands (MODEM_HL78XX_12 only).

Add Kconfig to enable the feature, extend the GNSS driver state to keep
A-GNSS validity/expiry, and add chat parsing for +GNSSAD responses.

New public APIs allow applications to:
- query assistance status (AT+GNSSAD?)
- request assistance download for supported day values
  (AT+GNSSAD=1,<days>)
- delete stored assistance data (AT+GNSSAD=0)

The feature is guarded by CONFIG_HL78XX_GNSS_SUPPORT_ASSISTED_MODE and
adds no behavior changes when disabled.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-02-03 09:41:36 +01:00
Zafer SEN
50a8efb8f6 drivers: modem: hl78xx: Add GNSS support
Add comprehensive GNSS functionality to the HL78xx modem driver,
enabling GPS/GLONASS positioning for Sierra Wireless HL78xx modules.

Key features:
- GNSS data acquisition via NMEA0183 and proprietary GNSSLOC
- Automatic RF path management (GNSS requires airplane mode)
- State machine integration for LTE ↔ GNSS mode switching
- Configurable NMEA sentence output and satellite tracking
- Search timeout and configuration safety checks
- Event-based position updates and satellite info

Architecture:
The implementation uses explicit mode switching APIs
(hl78xx_enter_gnss_mode/hl78xx_exit_gnss_mode) to manage the
shared RF path between LTE and GNSS. The HL78xx hardware shares
RF components between the LTE and GNSS radios, preventing
simultaneous operation.

Currently, GNSS mode requires entering airplane mode (CFUN=4) to
disable the LTE radio. This approach is necessary because the
driver does not yet implement PSM (Power Saving Mode) or
Idle-eDRX, which would allow GNSS operation during LTE idle
periods. Future enhancements can leverage these power-saving modes
to enable GNSS searches without fully disabling LTE connectivity.

A pending request mechanism handles early GNSS mode requests that
arrive before modem initialization completes, ensuring reliable
startup behavior in both fully-functional and airplane boot modes.

The driver integrates with Zephyr's GNSS subsystem and provides
HL78xx-specific extensions through a dedicated API header.

New files:
- drivers/modem/hl78xx/hl78xx_gnss.c/h: Core GNSS driver
- drivers/modem/hl78xx/hl78xx_gnss_parsers.c/h: NMEA/GNSSLOC parsing
- include/zephyr/drivers/modem/hl78xx_apis.h: Extended public APIs

Tested on HL7802/HL7812 modules with various GNSS scenarios.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-02-03 09:41:36 +01:00
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