Commit graph

126,787 commits

Author SHA1 Message Date
Maximilian Deubel
59a8eebd18 net: lib: tls_credentials: add invalid sec tag value
Add a definition for an invalid secure tag value to be used
as a placeholder. Negative values are reserved for internal use,
but some of them should be considered valid.
To be able to check against a value, we need to define an invalid one.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2025-08-05 13:23:43 -04:00
Tim Pambor
be37d72a40 net: tcp: Avoid casting unaligned address to struct in_addr
This change addresses an alignment problem reported by UBSAN by
using a copy of the address. This avoids the need for extensive
rework to support *_raw variants in the routing layer.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-08-05 13:23:21 -04:00
Seppo Takalo
05dfc7145f net: lwm2m: Fix string truncation on some content formatters
LwM2M engine does not allow strings to be truncated as it would
lead to invalind UTF-8 strings.

However, some content formatters were truncating, so I fixed at least
these
* plain text
* TLV
* SenML CBOR
* SenML JSON
* JSON
* CBOR

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-08-05 13:20:57 -04:00
Seppo Takalo
0c2b771858 tests: net: lwm2m: Add tests for string truncation
lwm2m_get_string() and lwm2m_set_string() API does not allow
strings to be truncated and ensures NUL termination
regardles of using string or opaque resources to store the string.

Add tests to verify that is also true on multi-byte UTF-8
strings.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-08-05 13:20:57 -04:00
Luna Pes
d299ce35d5 drivers: adc: ad7124: fix io control reg len
The IO_CONTROL_1 register is 3 bytes long according to the datasheet.
This fixes the register not being written to correctly.

Signed-off-by: Luna Pes <zephyr@orangemurker.com>
2025-08-05 13:20:41 -04:00
Pieter De Gendt
576b3daffa drivers: regulator: shell: Fix regulator parent name completion
Shell functions targeting regulator parents used the auto-completion of
regulator devices instead.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-08-05 13:20:23 -04:00
Loic Domaigne
2aeac6087d driver: sensor: veml6031 fix untrusted value/array index
Coverity reported potential use of untrusted values / array index. Add
appropriate checks and error reporting when using data->div4, data->gain
and data->itim as value/index.

CID: 516222
CID: 516228
CID: 516248
CID: 516254

Signed-off-by: Loic Domaigne <tech@domaigne.com>
2025-08-05 11:54:27 +01:00
Fabio Baltieri
56a446b4ee modules: cmsis, cmsis_6: only add the intended cmsis module
The current code base is meant to use cmsis for Cortex A and R and
cmsis_6 for Cortex M, but the build system is configured to include the
path for both when Cortex M is selected. This leaves us exposed to PR
using the old headers, that would not get caught in CI but would fail
the build on a project using Cortex M that only has the cmsis_6 module.

Change the cmsis module setting to only include the module files in the
intended case.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-08-05 11:54:18 +01:00
Fabio Baltieri
8c81d65782 manifest: update ambiq and microchip hals to pickup the cmsis_6 fixes
Update various hals to pickup the cmsis_6 related fixes.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-08-05 11:54:18 +01:00
Fabio Baltieri
a763207962 arch: arm: dwt: use the cmsis_6 macro unconditionally
Always use the cmsis_6 version for DWT_LSR_Present_Msk and
DWT_LSR_Access_Msk, the old ones are not going to be available anymore
when Cortex-M is selected..

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-08-05 11:54:18 +01:00
Michał Stasiak
e538997a20 tests: drivers: counter_nrf_rtc: test fixed top on nRF52832
Added overlay for the board.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-08-05 11:54:06 +01:00
Michał Stasiak
41d56fd4d9 drivers: timer: nrf_rtc_timer: Allow use of custom bit width
Allowed use of counter bit width lower than hardware 24.
In that case, PPI connection is established to trigger
clear task once maximum value is reached.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-08-05 11:54:06 +01:00
Daniel DeGrasse
7765485646 samples: mgmt: mcumgr: add testcase for ramload with revert
Add testcase to build mcuboot and smp_svr application using ramload
with revert mode

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-08-05 11:53:58 +01:00
Daniel DeGrasse
188d78b109 mgmt: update img_mgmt_slot_in_use for ramload with revert mode
We should not block erasing pending images when using ramload with
revert mode, because uploading multiple confirmed images with the same
version would brick the device (preventing future FW updates). Update
the dependencies of img_mgmt_slot_in_use to account for this.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-08-05 11:53:58 +01:00
Daniel DeGrasse
2ed1ec9e33 dfu: boot: mcuboot: fix boot_fetch_active_slot
boot_fetch_active_slot needs to map the slot number to a flash ID, as
this is what the DFU subsystem expects when interacting with the flash
partition.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-08-05 11:53:58 +01:00
Daniel DeGrasse
e1173afe7d dfu: mcuboot: update dependencies for RAMLOAD_WITH_REVERT
Much like in RAMLOAD mode, RAMLOAD_WITH_REVERT requires that mcuboot
subsystem fetch bootloader information via the retention subsystem.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-08-05 11:53:58 +01:00
Daniel DeGrasse
aa0ff3cf4f soc: nxp: flexspi_xip: Update FLASH_MCUX_FLEXSPI_XIP ramload dependencies
CONFIG_FLASH_MCUX_FLEXSPI_XIP should also be disabled when using MCUBoot
ramload mode with revert support.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-08-05 11:53:58 +01:00
Daniel DeGrasse
6439c0c1d7 cmake: mcuboot: prefer confirmed image when one is created
Prefer flashing the confirmed image when one is created with
CONFIG_MCUBOOT_GENERATE_CONFIRMED_IMAGE. This way, the west runner will
flash this image over the signed image if it exists.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-08-05 11:53:58 +01:00
Daniel DeGrasse
77e592c68b cmake: mcuboot: respect alignment size when signing for ramload mode
When signing for ramload mode, respect the write alignment size setting.
This is required when creating a confirmed image, as the BOOT_MAGIC
value changes based on the alignment size in use.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-08-05 11:53:58 +01:00
Daniel DeGrasse
2d2e64af17 scripts: ci: exempt BOOT_RAM_LOAD_REVERT from checks
Add BOOT_RAM_LOAD_REVERT as a defined Kconfig to the whitelist

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-08-05 11:53:58 +01:00
Daniel DeGrasse
879d4ce7f3 modules: mcuboot: add Kconfigs for RAMLOAD_WITH_REVERT mode
Add Kconfigs for RAMLOAD_WITH_REVERT mode in MCUBoot. This mode works in
a manner similar to DIRECT_XIP_WITH_REVERT- namely, mcuboot will only
boot an image that is either confirmed or marked as pending. If both
images are confirmed, mcuboot will still select the one with the higher
version, so downgrading is not possible using this mode.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-08-05 11:53:58 +01:00
Daniel DeGrasse
ace8207f4c samples: subsys: mgmt: mcumgr: add support for ramload on mimxrt1050_evk
Add support for using the ramload mode of MCUBoot on the mimxrt1050_evk

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-08-05 11:53:58 +01:00
Daniel DeGrasse
207211a00d soc: nxp: common: disable FLASH_MCUX_FLEXSPI_XIP if using ramload
MCUBoot RAMLOAD mode relies on CONFIG_XIP=n, but FLASH_MCUX_FLEXSPI_XIP
y-selects this symbol. Disable CONFIG_FLASH_MCUX_FLEXSPI_XIP for the
case where we are using MCUBoot ramload mode.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-08-05 11:53:58 +01:00
Daniel DeGrasse
7b45235545 samples: subsys: mcumgr: rework ram load support for multiple boards
MCUMgr ram load support was hardcoding the overlay file for the
nrf52840dk. To make this support generic, move the _ram_load overlay
file to the MCUBoot repository, as part of the mcuboot application.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-08-05 11:53:58 +01:00
Chun-Chieh Li
1bc008dae3 drivers: misc: ethos_u: support default dcache flush/invalidate
This provides default ethosu_flush_dcache and ethosu_invalidate_dcache
overrides. User application can disable it through Kconfig option if it
needs to provide its own.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-08-05 10:26:54 +01:00
Yuxuan Cai
f6bee983bc drivers: firmware: remove duplicate function definitions
tisci_cmd_get_fwl_region is defined three times
which is causing doc build errors

Signed-off-by: Yuxuan Cai <yuxuan.cai@nordicsemi.no>
2025-08-05 10:26:37 +01:00
Piotr Kosycarz
9b92629435 samples: boards: nordic: spis_wakeup: fix boot for h20
Explicit start radio core.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2025-08-05 10:26:13 +01:00
Xiaolu Sun
8b9955057d drivers: spi_sedi: correct CPOL and CPHA mode handling in SPI config
The CPOL and CPHA mode handling logic in the SPI configuration was
corrected to ensure proper evaluation of the SPI mode bits.
Evaluate CPOL and CPHA bits using value of cpol_mode and cpha_mode:
`(SPI_MODE_GET(config->operation) & SPI_MODE_CPOL) != 0` and
`(SPI_MODE_GET(config->operation) & SPI_MODE_CPHA) != 0`.

This fix ensures that the SPI configuration is robust and adheres to
expected behavior when setting CPOL and CPHA modes.

Signed-off-by: Xiaolu Sun <xiaolu.sun@intel.com>
2025-08-05 10:25:48 +01:00
Sylvio Alves
84112df024 MAINTAINERS: update hal_espressif contributors
Add missing contributors to `hal_espressif` area.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-08-05 10:25:34 +01:00
James Smith
6e344ba19e drivers: bluetooth: hci: silabs: Implement hci_close
Implements HCI close support for the silabs efr32 HCI driver.

Calling `bt_disable()` now works as expected, which is particularly
important for multiprotocol applications.

Signed-off-by: James Smith <james@loopj.com>
2025-08-05 10:25:24 +01:00
Luis Ubieda
68afaf5e42 paa3905: Improve error-handling and cleanup during streaming
- Setting IODEV_SQE to NULL to subsequent triggers are rejected.
- Channel all error-resolutions through handle_result_on_error().

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-08-05 10:25:15 +01:00
Alvis Sun
dbc49f04d7 driver: bbram: npcx: update bbram status register bit offset for npck3
Update the bit offset of bit VCC_STS in the BKUP_STS register.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2025-08-05 10:25:09 +01:00
Mathieu Choplain
2881186244 drivers: counter: stm32_timer: use "cc" interrupt if it exists
Currently, the STM32 TIM counter driver will always register itself as ISR
for interrupts[0] of the timer node. This works fine for timers which have
a single "global" interrupt but not for others (e.g., Advanced Timer) which
have separate IRQ lines for various events.

Borrow the pattern from PWM driver: use the "cc" interrupt if it exists on
timer node, otherwise use the "global" interrupt. If neither of those are
found, a build error is raised to ensure silent failures cannot occur.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-08-05 10:24:56 +01:00
Sebastian Głąb
ee89450165 boards: nordic: nrf54l09pdk: Remove obsolete board
Board nrf54l09pdk was renamed to nrf54lv10dk.
Remove obsolete board definition.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2025-08-05 10:24:48 +01:00
Sebastian Głąb
d673851ec8 tests: Remove nrf54l09pdk from supported boards
Remove possibility to run tests on nrf54l09pdk as this is
an obsolete board that is going to be removed.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2025-08-05 10:24:48 +01:00
Sebastian Głąb
e701a8e544 samples: drivers: Remove nrf54l09pdk from supported boards
Remove possibility to run samples on nrf54l09pdk as this is
an obsolete board that is going to be removed.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2025-08-05 10:24:48 +01:00
Sylvio Alves
2aca4ef0c2 soc: espressif: esp32c2: Enable deep sleep support
Adds support for deep sleep mode on the ESP32-C2 SoC, allowing
significant power savings.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-08-04 17:06:38 -04:00
Sylvio Alves
d03550255f soc: espressif: load RTC region into loader process
Only RTC DRAM area is currently being loaded during segment loader.
It means that RTC_IRAM and RTC_DATA is missing, causing
issues when sleep-modes are needed.

This also re-format the segments logging output
to meet with MCUBoot/Simple boot cases.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-08-04 17:06:16 -04:00
Marc Lasch
15048337c4 drivers: net: ppp: Fix link-layer address configuration
Restore setting the ppp link-local address either to CONFIG_PPP_MAC_ADDR or
to a random value 00:00:5e:00:53:XX instead of leaving it uninitialized.

Recently the memory handling for the link-layer addresses was changed from
an approach of copying pointers to managing the memory as a member of the
`net_linkaddr` struct (ref ac3cb9dac0).

The piece of code this patch touches however, relied on the use of the
pointers to function properly.

With the recent change, the MAC address was copied to the new member
location before it was even set (either from Kconfig or selected randomly).
As a result, the link-layer address was kept initialized to zero, which
resulted in a IPv6 address of fe80::ff:fe00:0 which is exactly the
link-local EUI-64 representation of the MAC address 00:00:00:00:00:00
(without flipping the "universal/local" bit).

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
2025-08-04 17:05:35 -04:00
Michele Sardo
958bec0df4 arch: arm: add Cortex-M MPU context save/restore API
Add struct z_mpu_context_retained and parameterized functions
z_arm_save_mpu_context() and z_arm_restore_mpu_context() to allow
saving and restoring MPU configuration to/from retained RAM.

This enables preserving MPU state across deep sleep or power-down
modes on Cortex-M devices.

The API is exposed under include/zephyr/arch/arm/mpu/arm_mpu.h
and implemented in arch/arm/core/mpu/arm_mpu.c.

Signed-off-by: Michele Sardo <msmttchr@gmail.com>
2025-08-04 17:04:01 -04:00
Marek Matej
fa1840268b scripts: update the CI requirements for Espressif port
Updated twister.yaml workflow to fetch esptool for the CI.
Fix format of the arguments used in the esptool-5.0.2.
Check that esptool is available on build time.
Update runners for esp32.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-08-04 17:02:52 -04:00
Marek Matej
298ff71795 manifest: update hal_espressif
* Brings changes in how esptool is istalled in the environment.
* Update bluetooth and C2 support files.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-08-04 17:02:52 -04:00
Vinayak Kariappa Chettimada
43232215a4 samples: Bluetooth: peripheral_hr minimal configuration update
Updated peripheral_hr sample to use separate Zephyr
Controller overlay for minimal configuration.

For bbc_microbit:
Memory region         Used Size  Region Size  %age Used
           FLASH:       96268 B       256 KB     36.72%
             RAM:       16296 B        16 KB     99.46%
        IDT_LIST:          0 GB        32 KB      0.00%

For nrf54l15dk/nrf54l15/cpuapp:
Memory region         Used Size  Region Size  %age Used
           FLASH:       95012 B      1428 KB      6.50%
             RAM:       17744 B       188 KB      9.22%
        IDT_LIST:          0 GB        32 KB      0.00%

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-08-04 17:02:19 -04:00
Vinayak Kariappa Chettimada
c8d4016e04 Bluetooth: Controller: Fix minimal Kconfig depends and defaults
Fix default value of BT_TICKER_REMAINDER_GET, it will be
selected based on enabled Controller features. This is not
needed by minimal peripheral role.

Fix depends on for BT_CTLR_CONN_RANDOM_FORCE as it is
applicable when more than one simultaneous connections is
supported. Again, this is not needed by minimal peripheral
role.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-08-04 17:02:19 -04:00
Raymond Lei
33e1b869b9 drivers: nxp : flexspi: add GD nor flash support
Fix a bug in quad bit enablement.
Add LUT for Giga Device nor flash GD25Q256x.

Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
2025-08-04 19:58:07 +01:00
Sreeram Tatapudi
600e86d475 drivers: serial: Adding PDL based UART driver
Adding a basic UART driver based on the PDL API

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-08-04 19:57:57 +01:00
Sreeram Tatapudi
6928218421 drivers: Implement initial version of ifx_cat1 pdl clock_control
- Shift ifx_cat1 clock_control driver to using pdl instead of hal calls
- add soc.c file containing call to SystemInit()
- Update board's dts files
- add binding for peri divs
- update system_clocks.dtsi for psc3
- add new peri clock_control driver

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-08-04 19:57:57 +01:00
Sreeram Tatapudi
b8fd4cd55f drivers: pinctrl: pincontrol driver updates to support PSC3
Update pincontrol driver to support PSC3

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-08-04 19:57:57 +01:00
Sreeram Tatapudi
ba144130ce drivers: gpio: GPIO driver updates to support PSC3
Update GPIO driver to support PSC3

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-08-04 19:57:57 +01:00
Sreeram Tatapudi
b3e165e455 boards: infineon: psc3m5_evk: Adding folder structure for PSC3M5_EVK
* Adding folder structure and first pass config for PCS3M5_EVK
    * Adding dtsi, kconfig, and other files for KIT_PSC3M5_EVK
      evaluation board.

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-08-04 19:57:57 +01:00