Commit graph

28,390 commits

Author SHA1 Message Date
Zhaoxiang Jin
921b522a40 drivers: timer: cortex_m_systick: implement runtime frequency update
Implement z_sys_clock_hw_cycles_per_sec_update() for the Cortex-M
SysTick driver to support runtime system timer frequency changes
when CONFIG_SYSTEM_CLOCK_HW_CYCLES_PER_SEC_RUNTIME_UPDATE is enabled.

Also extend the conditional compilation guard for the external
z_clock_hw_cycles_per_sec declaration to include the runtime update
configuration option.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-02-20 13:31:07 +01:00
Zhaoxiang Jin
df6e6cf0d2 drivers: timer: add runtime system timer frequency update support
Add infrastructure to support updating the system timer frequency at
runtime on platforms where the timer clock rate can change dynamically.

Introduce CONFIG_SYSTEM_CLOCK_HW_CYCLES_PER_SEC_RUNTIME_UPDATE Kconfig
option that enables runtime frequency updates. This option is mutually
exclusive with CPU_FREQ_PER_CPU_SCALING since the system timer frequency
is tracked as a single global value.

Add z_sys_clock_hw_cycles_per_sec_update() API that platforms must call
after applying a system timer clock change. The kernel provides a weak
default implementation that updates the stored frequency value used by
sys_clock_hw_cycles_per_sec().

System timer drivers that cache derived constants or need to reprogram
hardware on frequency changes can provide a strong override of this
function to maintain driver state consistency while ensuring the stored
frequency is also updated.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-02-20 13:31:07 +01:00
Guillaume Gautier
7a7933ad50 drivers: clock: stm32l4-l5-wb-wl: remove all references to pllsai binding
Now that everything uses the generic STM32L4 PLL binding, remove all
references from the the old PLLSAI binding:
- Remove the lines using div_divr (it is now post_div_r)
- Remove the clock source check since it is now done in the driver
- Remove the PLLSAI binding since it is no longer used

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Guillaume Gautier
b600d38363 drivers: clock: stm32l4-l5-wb-wl: update pll configuration
For the STM32L4/L5/WB/WL, update the clock driver to support all PLL
channels.
Also add some BUILD_ASSERT to check that the clock are correctly defined
and configured in device tree.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Guillaume Gautier
897a30036f drivers: clock: stm32f2-f4-f7: fix error message
The property names in error message were not the correct ones (missing
an "-"). This commit fixes them.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Guillaume Gautier
39f046e15c drivers: clock: use concat instead of ##
Use CONCAT macro instead of ## to create the RCC macros.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Guillaume Gautier
779068e5ba drivers: clock: stm32: remove adcxx_prescaler macros
Remove adcxx_prescaler macros. They are unused since commit
914425fafc54bf359e1d7693846e387a1150988d.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Guillaume Gautier
22c9b6b877 drivers: clock: stm32: configure clock source with a single function
Use stm32_reg_modify_bits to configure the clock source, instead of calling
sys_clear_bits then sys_set_bits. Using modifiy makes only one write in
the RCC register instead of two previously.

Incidentally, for H5, clear was missing. It is now replaced by modify.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Sreeram Tatapudi
b9a4fade7c drivers: spi: Infineon: Fix IFX_SCB_ARRAY_SIZE for PSE84
Define IFX_SCB_ARRAY_SIZE for PSoC Edge SoCs to properly
determine the SCB array size.

Without this change, the driver fails to compile on
PSoC Edge platforms

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2026-02-20 07:08:25 +01:00
Sreeram Tatapudi
4a3aaa03ab drivers: spi: Infineon: fix trailing commas in macros
Fix trailing commas in ADVANCED_SPI_FIELDS macro definition
and its usage to ensure clean macro expansion.

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2026-02-20 07:08:25 +01:00
Braeden Lane
044ed89ae9 drivers: clock_control: infineon: Add ADC peripheral clock support
Extend the Infineon peripheral clock control driver to support
ADC peripherals. Adds IFX_RSC_ADC resource type handling and
PSOC4-specific clock destination initialization (set to 0 as
PSOC4 peripherals manage their own clock routing).

Signed-off-by: Braeden Lane <Braeden.Lane@infineon.com>
Co-authored-by: Deepika R <deepika@aerlync.com>
Co-authored-by: Sayooj K Karun <sayooj@aerlync.com>
2026-02-20 07:08:02 +01:00
Braeden Lane
2d650bbf54 drivers: adc: Add Infineon SAR ADC driver
Add driver for the Infineon SAR ADC peripheral with device tree
binding. The driver uses a generic compatible (infineon,sar-adc)
with an infineon,version property to differentiate IP block
revisions (v2, v3). Features include:

- Single-ended and differential channel configuration
- Configurable resolution (8-12 bits)
- Multiple voltage reference sources (internal, VDDA, VDDA/2, external)
- Channel reference validation against block-level vref-src
- Hardware compensation for SAR v2/v3 single-ended channel limitation
- Interrupt-driven conversion completion
- Integration with peripheral clock control

The driver includes a compile-time per-instance API structure to
correctly report reference voltage to the ADC framework for accurate
raw-to-millivolts conversion.

Tested on CY8CKIT-041S-MAX (SAR v2) and CY8CPROTO-041TP (SAR v3) boards.

Signed-off-by: Braeden Lane <Braeden.Lane@infineon.com>
Co-authored-by: Deepika R <deepika@aerlync.com>
Co-authored-by: Sayooj K Karun <sayooj@aerlync.com>
2026-02-20 07:08:02 +01:00
Petr Buchta
68b153831a drivers: flash: mcux_c40: fix partition parent lookup
Use DT_GPARENT() so that protection entries are generated for
partitions under the fixed-partitions node, even when an extra
intermediate node is present. This ensures the C40 protection table
is correctly derived from the flash<x> partitions.

Signed-off-by: Petr Buchta <petr.buchta@nxp.com>
2026-02-20 07:05:50 +01:00
Petr Buchta
42d9b9ed0a drivers: flash: guard flash_shell against NULL api
Handle the case where the chosen zephyr,flash-controller device has
no flash API (api == NULL). This prevents flash_shell from
dereferencing a NULL api pointer and hard-faulting when no usable
default flash device is available.

Signed-off-by: Petr Buchta <petr.buchta@nxp.com>
2026-02-20 07:05:50 +01:00
Jordan Yates
88fa1e2c94 flash: spi_nand: initial generic driver
Initial generic driver for SPI-NAND devices that expose the ONFI
parameter page. Does not support advanced features such as continuous
reads, software ECC, or optional power down modes.

Configuration comes from devicetree in order to support other modules,
but is validated against the loaded ONFI data at boot.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-02-20 07:05:32 +01:00
Marcelo Roberto Jimenez
9c872c664a drivers: ethernet: xmc4xxx: Fixes the checksum of bridged packets
Due to checksum offloading, the checksum field of a packet must be
zero before sending it to packet to the ethernet controller,
otherwise the computed checksum will be incorrect.

If the packet is bridged, it already has the correct checksum in
place, which will cause the automatically computed checksum to
incorrectly become zero.

In this patch we give bridged packets the special attention they
need.

Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
2026-02-20 07:04:25 +01:00
Pete Johanson
9a175efbe6 drivers: serial: Disable async support on MAX32 RV32
MAX32 RV32 core DMA support is still a WIP, so disable async API for now
there.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2026-02-20 07:03:31 +01:00
Pete Johanson
9d22753c46 drivers: hwinfo: Disable MAX32 hwinfo driver on RV32 core.
The flash info blocks needed to provide the device ID are not accessible to
the RV32 core on MAX32 devices, so disable this hwinfo driver there.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2026-02-20 07:03:31 +01:00
Pete Johanson
814c12910f drivers: timer: Add MAX32 RV32 system timer
The RV32 core does not implement RISC-V mtime, so add a new system
timer driver uses a peripheral timer for this functionality.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2026-02-20 07:03:31 +01:00
Pete Johanson
6dc49e9dd6 soc: adi: max32: Add RV32 interrupt controller
Add interrupt controller for the RV32 core of the MAX32 SoC.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2026-02-20 07:03:31 +01:00
Mathieu Choplain
a32d97033f drivers: pinctrl: stm32: move F1-specific SWJ-CFG to SoC-specific init
A special SYS_INIT() callback with hardcoded PRE_KERNEL_1 level 0 priority
inside the STM32 pinctrl driver was configuring the SWD-JTAG ports on
STM32F1 series.

Since this is the only series which requires such configuration, move this
code to the SoC-specific init hook instead (which has almost the same
priority as PRE_KERNEL_1 level 0 - it runs just slightly earlier).

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-02-19 10:05:55 -06:00
Bjarki Arge Andreasen
cb8bf90f77 drivers: clock_control: nrf: K32SRC_RC_CALIBRATION depend on HFXO
The CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION calibration feature uses
HFCLK (hfxo in devicetree) as reference to calibrate the internal RC.
If the hfxo is not present, calibration is not possible, and if the
driver attempts to do it anyway, HFCLK will be requested wasting
power, and the calibration will never complete.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-02-19 10:05:19 -06:00
Fin Maaß
a25f99ae16 drivers: mdio: ethernet: integrate the mdio area into the ethernet area
integrate the mdio driver area into the
ethernet driver area. mdio itself is defined as part
of the ethernet specification.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-19 10:03:31 -06:00
Fin Maaß
3d11848ce9 drivers: mdio: use rsource in Kconfig
Use rsource to include the mdio Kconfig files.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-19 10:03:31 -06:00
Remi Buisson
9c9ee1b116 drivers: sensor: icm45686: update drivers
Use official TDK Invensense driver for icm45686 sensor in tdk_hal module.
Supports icm456xx variants.

Signed-off-by: Remi Buisson <remi.buisson@tdk.com>
2026-02-19 09:59:54 -06:00
Cliff Brake
baafb791c4 drivers: gpio: mcp23xxx: fix drive mode validation for input pins
The drive mode validation added in commit ede19a4337 was rejecting
valid configurations for input pins. The validation ensures that
GPIO_SINGLE_ENDED and GPIO_LINE_OPEN_DRAIN flags match the hardware
capabilities of each MCP23xxx variant (push-pull vs open-drain).

However, this validation was applied to all pin configurations,
including input pins. Input pins do not have a drive mode, so
applications typically configure them without setting drive mode flags.
This caused the validation to incorrectly reject input pin configurations
with -ENOTSUP.

Fix by only validating drive mode flags when GPIO_OUTPUT is set.
Input pins now configure successfully, while output pins still receive
proper validation to ensure the requested drive mode matches the
hardware capabilities.

Fixes: ede19a4337 ("drivers: mcp23xxx: add support for open-drain ...")
Signed-off-by: Cliff Brake <cbrake@bec-systems.com>
2026-02-19 09:59:41 -06:00
Ricardo Cañuelo Navarro
3821d323f9 drivers: mbox: Add Raspberry Pi Pico mailbox driver
This adds a driver for the interprocessor mailbox in the Raspberry Pi
Pico SoCs (RP2040/RP2350).

The SIO subsystem contains a set of low-latency peripherals, including a
pair of mailboxes (FIFOs) for inter-processor communication. One of the
FIFOs can only be written by core 0 and read by core 1, the other can
only be written by core 1 and read by core 0.

According to the datasheets [1] [2], the register interface is the
same in both SoCs and the only functional differences are that the
mailbox in the RP2040 is 8 entries deep vs 4 in the RP2350, and that the
RP2350 defines the same core-specific interrupt number, while the RP2040
defines two different IRQ numbers.

Tested on a Raspberry Pi Pico 2W (RP2350).

[1]: https://datasheets.raspberrypi.com/rp2350/rp2350-datasheet.pdf
[2]: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf

Signed-off-by: Ricardo Cañuelo Navarro <rcn@igalia.com>
2026-02-19 09:59:29 -06:00
Fin Maaß
04f652c4bd drivers: gpio: add macro to set common config struct
use macro to set common config struct.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-19 09:25:11 +01:00
Sunil Hegde
945894c8fa drivers: i2c: i2c_omap: fix inconsistent register type definitions
This commit fixes the inconsistent type usage. Functions which
initialised i2c registers as uint16_t, changed to uint32_t to
match with register definition struct.

Signed-off-by: Sunil Hegde <s-hegde3@ti.com>
2026-02-19 09:19:58 +01:00
Sunil Hegde
809ca435a7 drivers: i2c: i2c_omap: improve timeout handling in message transfers
The driver used a decrement loop to check for time out during message
transfer, which was not sufficient. The newer implementation uses a
fixed time of 1000ms for timeout to be consistent with the Linux
kernel.

Signed-off-by: Sunil Hegde <s-hegde3@ti.com>
2026-02-19 09:19:58 +01:00
Sunil Hegde
7eb1cf2133 drivers: i2c: i2c_omap: fix FIFO byte count extraction
The driver was not correctly extracting FIFO byte counts
from the BUFSTAT register, causing multi-byte I2C transfers
to fail.

The BUFSTAT register layout is:
 - Bits [13:8]: RX FIFO byte count
 - Bits [5:0]: TX FIFO byte count

Also, the driver didnot update the remaining bytes after
each transfer which is fixed by decrementing the remaining
message length after each transfer.

This fix aligns the driver implementation with Linux.

Signed-off-by: Sunil Hegde <s-hegde3@ti.com>
2026-02-19 09:19:58 +01:00
Dave Joseph
2f3af507e9 drivers: firmware: tisci: Fix semaphore cleanup
- Add proper semaphore cleanup in error paths where it was missing

Signed-off-by: Dave Joseph <d-joseph@ti.com>
2026-02-19 09:14:55 +01:00
Dave Joseph
3ad7b47071 drivers: firmware: tisci: Add secure path support
Add support for secure TISCI communication paths to enable
message exchange with secure contexts on TI SoCs.
- Add secure header wrapping for outbound messages on secure path
- Add secure header parsing for inbound messages on secure path

Signed-off-by: Dave Joseph <d-joseph@ti.com>
2026-02-19 09:14:55 +01:00
Dave Joseph
b1bc08eb5a drivers: firmware: tisci: Add secure property
- Add ti,is-secure device tree property to indicate secure host entities
- Add is_secure field in device config

Signed-off-by: Dave Joseph <d-joseph@ti.com>
2026-02-19 09:14:55 +01:00
Dave Joseph
2581dd286e drivers: firmware: tisci: Reorganise macros
- Add missing TISCI message type macros in tisci.h
- Clean macro organisation
- Add Secure indicator for message that require secure thread

Signed-off-by: Dave Joseph <d-joseph@ti.com>
2026-02-19 09:14:55 +01:00
Ryan Erickson
37eb5ad031 drivers: modem: hl7800: do not restore sockets on boot
HL7800 only supports restoring 1 socket on boot. This means,
only the first socket created can be restored.
This isn't very useful, so never restore sockets on boot.
The driver already handles recreating sockets when
low power modes are used.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2026-02-18 16:36:59 +00:00
Scott Coleman - wsl
6c5004e468 drivers: modem: hl7800: unlock before closing all sockets
iface_status_work_cb() calls notify_all_tcp_sockets_closed() while
holding hl7800_lock(). The close-all path can re-enter hl7800 via
socket callbacks, causing a lock inversion deadlock.

Signed-off-by: Scott Coleman - wsl <scott@sjcdev.com>
2026-02-18 16:36:59 +00:00
Scott Coleman - wsl
f6846c5650 divers: modem: hl7800: treat TCP_CONN notif as per-socket error
TCP connect refused triggers +K**P_NOTIF ,5.
The current handler falls through to default, marks network_dropped,
and later closes all sockets, taking down unrelated
connections (e.g., MQTT).

Signed-off-by: Scott Coleman - wsl <scott@sjcdev.com>
2026-02-18 16:36:59 +00:00
Fabrice DJIATSA
d37e4da41c watchdog: drivers: stm32: fix timeout validation using absolute difference
The WWDG timeout check used a signed comparison between the requested
and computed timeout, causing valid configurations to be rejected when
the computed timeout was slightly lower than the requested one.

Replace the comparison by an absolute‑difference check so that the
configured timeout is accepted as long as it stays within the allowed
error margin.
This fixes spurious -EINVAL returned by install_timeout() on STM32.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2026-02-18 16:36:44 +00:00
Adam Kondraciuk
38c736295a drivers: spi: spi_nrfx_spi: use standard instantiation
Switched nrfx_spi API to standard instantiation.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2026-02-18 10:31:16 +00:00
Adam Kondraciuk
6d14ea188c drivers: i2c: i2c_nrfx_twi: use standard instantiation
Switched nrfx_twi API to standard instantiation.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2026-02-18 10:31:16 +00:00
Krzysztof Chruściński
f3cbc13912 drivers: timer: nrf_rtc: Align to nrfx 4.1
Align to change in nrf_rtc HAL.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-02-18 10:31:16 +00:00
Aleksandr Senin
4c7d61ba26 drivers: hwinfo: add GD32 support
Add a hwinfo backend for GD32 providing:
- device unique ID readout from the 96-bit UID registers
- reset cause reporting via the RCU_RSTSCK reset status register

Reset cause mapping uses the hal_gigadevice RCU_RSTSCK flag definitions
and reports supported causes based on the macros available in the HAL.

Signed-off-by: Aleksandr Senin <al@meshium.net>
2026-02-17 17:38:27 -06:00
Jeremy Thompson
bf8749007b drivers: sensor: ti_hdc302x: Fix mask on temp alert threshold
Correct a bitmask issue on the temperature alert threshold
as per the datasheet (Section 7.5.7.4.2).

Signed-off-by: Jeremy Thompson <jthompson@blackberry.com>
2026-02-17 13:20:03 -06:00
Zafer SEN
628f28ed13 drivers: modem: hl78xx: add NB-NTN support and positioning
Add initial NB-NTN RAT support to the HL78xx driver:

* Enable RAT selection for NB-NTN (SET_RAT_NBNTN_CMD_LEGACY).
* Configure NTN positioning via +KNTNCFG("POS", provider, dynamic).
* Query +KNTNCFG at init and cache into modem_status.ntn_rat.
* Handle +KNTNEV:"POSREQ" and raise MODEM_HL78XX_EVENT_NTN_POSREQ.
* If MANUAL position source is enabled, push +KNTNCMD("POS") with
  Kconfig-provided latitude/longitude/altitude.
* Kconfig updates:
  - Add MODEM_HL78XX_ADDRESS_FAMILY_IP and default it for NB-NTN.
  - Add NTN_MANUAL_{LATITUDE,LONGITUDE,ALTITUDE} under MANUAL source.
* For NB-NTN, program PDP context without explicit AF in +KCNXCFG and
  use address family "IP".
* Extend socket connect and TLS handshake timeout ranges to 120 s to
  tolerate higher RTT on NTN links.

Non-NTN builds keep previous behavior.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-02-17 13:19:52 -06:00
Marek Maškarinec
fe789226d6 drivers: tmag5273: Add device PM support
Adds device power manager support to TMAG5273 driver.
Suspending the device will put it into its SLEEP mode, resuming will
restore it to the mode configured in devicetree.

Before communicating with a device in sleep mode, an extra I2C transfer
is needed. Something like this is briefly mentioned in the datasheet,
but without any more specific details. The wake up has also been added
to the init function, even in case PM is disabled.

The device is marked as busy for the whole sample_fetch function.

Signed-off-by: Marek Maškarinec <marek.maskarinec@hardwario.com>
2026-02-17 13:19:19 -06:00
Seppo Takalo
5c31ef18df drivers: modem: Allows modems to use default PDP context or APN
LTE modems typically support default PDP context (cid 0) which
is activated when network is attached.

Allow driver to choose whether this CID 0 is used by default, and
skip the whole APN state.

Some modems require PDP context to be defined by AT+CGDCONT=1 command
but do not necessary need the APN name.

Add both options as a Devicetree settings as an enum value so that
specific DTS bindings may change the default while allowing user
to override. Booleans with "default: true" would not work.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-02-17 13:19:03 -06:00
Manojkumar Konisetty
e2bb8efb9a drivers: flash: Add Infineon PSOC4 flash driver and CMakeLists
- Implement flash read, write and erase APIs.
- flash rows are automatically erased during Cy_Flash_WriteRow()
  operation.
- Implement erase by writing the erased value (0xFF) to maintain
  compatibility with the Zephyr flash API.i

Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2026-02-17 13:18:35 -06:00
Manojkumar Konisetty
d48b688dcb drivers: flash: Add Flash Kconfig for PSOC4 series
- Introduce FLASH_INFINEON_PSOC4 to enable the flash driver for the
  Infineon PSoC4 family.
- This option selects required flash capabilities.

Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2026-02-17 13:18:35 -06:00
Yuzhuo Liu
08bad54b32 drivers: gpio: add realtek bee gpio driver
Add realtek bee gpio driver.

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-02-17 15:22:38 +00:00