Commit graph zephyr/drivers
Author SHA1 Message Date
Fin Maaß
da7671ae7d drivers: ethernet: native: tap: remove intermediate ll_addr
Remove unneeded intermediate ll_addr.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-04 15:18:35 +00:00
Wilfried Chauveau
0d48949589 drivers: serial: uart_cmsdk: apply clang-format
Following the last change, a clang-format pass is required.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2026-02-04 13:56:48 +01:00
Wilfried Chauveau
f63344cf4f drivers: serial: uart_cmsdk: remove code duplication
This change makes the driver rely on DT_INST_FOREACH_STATUS_OKAY(...)
rather than copy-paste the same code several time.
This also has the advantage of allowing more that 5 instances of this
uart driver.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2026-02-04 13:56:48 +01:00
Pisit Sawangvonganan
bfff5cf098 drivers: counter: stm32: remove duplicate reset implementation
Drop `counter_stm32_reset_timer`, introduced in PR #94189 (01a00d5),
as it duplicates the existing `counter_stm32_reset` functionality.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-02-04 13:56:29 +01:00
Jeremy Truttmann
9f2844341f drivers: ethernet: eth_native_tap: set the link address on interface
Calling net_if_set_link_addr() is needed to update the link address
information of the interface.

Signed-off-by: Jeremy Truttmann <jetstreeam.code@outlook.com>
2026-02-04 13:56:16 +01:00
Albort Xue
807f5e8f1f drivers: pwm: nxp_flexio: Add clock configuration and enable
Add explicit clock configuration and enable calls during driver
initialization.

Note: -ENOSYS is temporarily ignored as not all clock control
drivers currently implement the configure API. This handling
should be removed once all clock drivers support configure.

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2026-02-04 13:55:30 +01:00
Albort Xue
df3b494c61 drivers: counter: mcux_tpm: Add clock configuration and enable
Add explicit clock configuration and enable calls during driver
initialization.

Note: -ENOSYS is temporarily ignored as not all clock control
drivers currently implement the configure API. This handling
should be removed once all clock drivers support configure.

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2026-02-04 13:55:17 +01:00
Sylvio Alves
4c197048a2 drivers: counter: esp32: fix relative alarm diff calculation
Fix incorrect diff calculation for relative alarms that caused alarm
callbacks to never fire. The original code calculated diff as
(alarm_cfg->ticks - now), which caused unsigned underflow when
now > alarm_cfg->ticks, resulting in a huge diff value that
incorrectly triggered the late alarm path and set callback to NULL.

For relative alarms, the diff should simply be the ticks value since
it already represents the delay from the current time.

Also add channel validation to return -ENOTSUP for chan_id > 0 since
ESP32 timer hardware only supports one alarm comparator per timer.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-02-04 13:54:57 +01:00
Gaetan Perrot
bef6b24918 drivers: wifi: nrf: wifi_mgmt: remove invalid range check
Remove the negative value check on bss_max_idle_period, which is
defined as an unsigned type and can never be less than zero.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-02-04 13:54:01 +01:00
Madhab Sharma
6ffbe8bf83 drivers: wifi: esp32: retrieve scan results iteratively
Refactor scan_done_handler to retrieve Access Point (AP) records one
by one rather than pre-allocating a large buffer for the entire list.

Previously, the driver attempted to k_malloc space for all detected APs
simultaneously. In environments with high AP density or under system
memory pressure, this allocation would often fail, resulting in no
scan results being reported.

Improvements:
- Switched to stack-allocated wifi_ap_record_t to process entries.
- Replaced esp_wifi_scan_get_ap_records with a while-loop using
  esp_wifi_scan_get_ap_record to reduce peak heap usage.
- Added esp_wifi_clear_ap_list() to ensure hardware resources are
  freed after the loop completes.
- Added warning log on unexpected scan fetch failures.

This makes Wi-Fi scanning significantly more robust in memory-constrained
scenarios.

Signed-off-by: Madhab Sharma <madhabsharma94@gmail.com>
2026-02-04 13:53:34 +01:00
Bernardo Perez Priego
9ae9d167e3 serial: uart_mchp_xec: fix TX complete status check
Fix the logic in `uart_xec_irq_tx_complete` when evaluating the UART line
status register against the TX-empty mask. The previous condition could
report "TX complete" even when the TX path was not fully empty, which can
cause flush users to loop or make incorrect progress decisions.

This change corrects the comparison against the TX-empty mask so that the
function only reports completion when the hardware indicates the expected
empty state.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2026-02-04 13:53:23 +01:00
Benjamin Cabé
226029aa89 drivers: i2c: use proper essential type for boolean variables
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
initialized and used with proper essential type (true/false).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-04 13:52:38 +01:00
Benjamin Cabé
422710bcf8 drivers: intc: use proper essential type for boolean variables
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
initialized and used with proper essential type (true/false).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-04 13:52:38 +01:00
Benjamin Cabé
aa99fda10a drivers: sensor: use proper essential type for boolean variables
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
initialized and used with proper essential type (true/false).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-04 13:52:38 +01:00
Benjamin Cabé
b295fe1bc5 drivers: memc: use proper essential type to initialize boolean variables
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
initialized with true/false, not 1/0.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-04 13:52:38 +01:00
Benjamin Cabé
2013be3024 drivers: counter: use proper essential type to initialize boolean variables
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
initialized with true/false, not 1/0.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-04 13:52:38 +01:00
Jamie McCrae
ff212ba22e dts: nordic: Fix missing ranges properties and relative addresses
Adds these properties which are missing, and fixes instances of
wrongly using relative addresses when they are already absolute

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-02-04 13:51:57 +01:00
Benjamin Cabé
ba97ed1ad0 drivers: fpga: adopt SHELL_HELP in FPGA shell
Use SHELL_HELP macro for help strings to ensure consistency across
various shell modules.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-04 13:49:51 +01:00
Darcy Lu
59a6e3592f drivers: watchdog: add watchdog driver for RTS5817
Add watchdog driver for RTS5817

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
2026-02-04 13:49:21 +01:00
Darcy Lu
b0b5dc7ff6 drivers: pinctrl: add pinctrl driver for RTS5817
Add pin controller driver for RTS5817

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
2026-02-04 13:49:21 +01:00
Darcy Lu
7960519458 drivers: reset: add reset driver for RTS5817
Add reset driver for RTS5817

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
2026-02-04 13:49:21 +01:00
Darcy Lu
cff7b7a5af drivers: clock_control: add clock control for RTS5817
Add clock control driver for RTS5817

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
2026-02-04 13:49:21 +01:00
Venkatesh Odela
0c770e9177 drivers: ethernet: eth_xilinx_axienet: remove unused variable
remove unused variable

Signed-off-by: Venkatesh Odela <venkatesh.odela@amd.com>
2026-02-03 14:32:49 -06:00
Seppo Takalo
f9483e3568 drivers: modem: cellular: Add shutdown script for nRF91
Add shutdown script for nRF91 Serial Modem.

Also, set unused timeout values to zero.
Only the reset_ms is used when the switch from
CMUX back to AT mode UART happens.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-02-03 14:31:19 -06:00
Albort Xue
23cdd0f374 drivers: flash: flexspi_nor: Update page program LUT for 4-byte addressing
When 4-byte addressing is enabled, update the page program LUT entry
to use the appropriate 4-byte page program command (SPI_NOR_CMD_PP_4B).

For octal mode (1S-8S-8S), select the correct page program command
based on address width:
- Use SPI_NOR_CMD_PP_1_8_8_4B for 32-bit addressing
- Use SPI_NOR_CMD_PP_1_8_8 for 24-bit addressing

This ensures the flash controller uses the correct command sequence
for page programming operations in both standard and octal modes with
extended addressing.

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2026-02-03 14:27:07 -06:00
Albort Xue
8dd7b20f84 drivers: flash: spi_nor: Add octal page program command definitions
- 1-1-8 and 1-8-8 page program commands for 3-byte addressing
- 1-1-8 and 1-8-8 page program commands for 4-byte addressing

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2026-02-03 14:27:07 -06:00
Juliusz Sosinowicz
005598c100 drivers: timer: hpet: add checks to not crash at init
Zephyr was crashing in hpet when the base address
wasn't set yet when using MMU and when
`cyc_per_tick` was not defined yet.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
2026-02-03 14:23:01 -06:00
Zacck Osiemo
690660f8f6 drivers: gpio: Introduce SC18IS606 GPIO Controller
Added a driver implementation for the GPIO Controller
on the sc18is606

Signed-off-by: Zacck Osiemo <coderv63@gmail.com>
2026-02-03 14:22:34 -06:00
Zacck Osiemo
41a6f3ebce drivers: mfd: Add base support for NXP SC18IS606
Add support for base sc18is606  device and move dependencies to
mfd header rather than the SPI device.

Signed-off-by: Zacck Osiemo <coderv63@gmail.com>
2026-02-03 14:22:34 -06:00
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