Commit graph

126,787 commits

Author SHA1 Message Date
Benjamin Cabé
2d153c87e6 include: tracing: doxygen coverage and cleanup
Gets tracing API to 100% coverage as well as some wordsmithing to
improve readability.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-10-24 23:07:48 +03:00
Benjamin Cabé
d2fc3385f1 doc: doxygen: show global _track_list_k_xxx variables in Doxygen
This makes for a not so pretty regex, so there might be better options,
meanwhile this ensures that what are effectively API symbols are
properly documented and visible in the API documentation.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-10-24 23:07:48 +03:00
Stephan Linz
64bf18299a tests: can: api: changing the test thread priority
The test thread and the system workqueue have the same priority,
mostly some specific CAN driver threads a lower preemptive priority,
so it is a bit arbitrary whether the workqueue cleans up the send
context before the next send.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2025-10-24 23:07:37 +03:00
Bill Waters
b35a32b8ae drivers: watchdog: add support for Infineon PSE84 device
Update the driver to support the PSE84 device

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2025-10-24 23:07:28 +03:00
Tim Pambor
473d90ba62 west.yml: Bump TF-M to include fixes for stm32h5
Bump TF-M to fix a linker error and address several warnings
when compiling for STM32H5.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-10-24 23:07:16 +03:00
Kamil Krzyżanowski
1b84618e33 drivers: timer: stm32_lptim: Support all LPTIM instances
The LPTIM timer driver previously had hardcoded assumptions about
using LPTIM1 or LPTIM3, which prevented it from working with other
LPTIM instances like LPTIM2, LPTIM4, LPTIM5, and LPTIM6.

This change makes the driver work with any LPTIM instance by:

1. Adding lptim_enable_autonomous_mode() function that dynamically
   detects which LPTIM instance is in use and enables autonomous
   mode for instances that support it (LPTIM1, LPTIM3, LPTIM4).
   LPTIM2, LPTIM5, LPTIM6 do not support autonomous mode.

2. Adding lptim_freeze_during_debug() function that handles debug
   freeze configuration for all LPTIM instances across different
   APB buses:
   - LPTIM1: APB1_GRP1, APB3_GRP1, or APB7_GRP1
   - LPTIM2: APB1_GRP1, APB1_GRP2, APB3_GRP1, or APB4_GRP1
   - LPTIM3: APB1_GRP2, APB3_GRP1, or APB4_GRP1
   - LPTIM4: APB3_GRP1 or APB4_GRP1
   - LPTIM5: APB3_GRP1
   - LPTIM6: APB3_GRP1

Both functions use DT_REG_ADDR() to compare the base address of the
configured LPTIM instance at compile time, ensuring zero runtime
overhead.

Tested on STM32U5A5 with all four LPTIM instances (LPTIM1-4).

Signed-off-by: Kamil Krzyżanowski <kamnxt@kamnxt.com>
2025-10-24 23:07:05 +03:00
Valerio Setti
26ca2cfd6c drivers: entropy: nrf5: add dependency on MULTITHREADING
The driver internally uses semaphores which are only available if
CONFIG_MULTITHREADING is enabled in the build.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 23:06:47 +03:00
Valerio Setti
25a71f3972 modules: mbedtls: let CSPRNG_AVAILABLE select ENTROPY_GENERATOR
It might happen that some boards have "zephyr,entropy" node set, but under
the hood the driver is not available (ex: entropy_bt_hci not being
available because CONFIG_BT_HOST is not enabled in the build).

This commit changes the behavior so that:
1. if "zephyr,entropy" is set in the DT then CONFIG_CSPRNG_AVAILABLE get
   enabled;
2. CONFIG_CSPRNG_AVAILABLE selects CONFIG_ENTROPY_GENERATOR
3. if there really is a driver available then CONFIG_ENTROPY_HAS_DRIVER
   will be enabled by that driver;
4. CONFIG_ENTROPY_HAS_DRIVER selects CONFIG_CSPRNG_ENABLED;
4. Mbed TLS can consume the CONFIG_CSPRNG_ENABLED information to
   decide whethere to enable CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG or
   the legacy CONFIG_MBEDTLS_PSA_CRYPTO_LEGACY_RNG.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 23:06:47 +03:00
Aymeric Aillet
b4556ea923 doc: update SDK supported architectures
Architecture list comes directly from SDK readme
This list is accurate since SDK 0.17.1

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2025-10-24 13:29:15 -04:00
Aymeric Aillet
ea1f394b22 doc: centralizes doc for installing SDK for Linux
- rename ubuntu to linux for sdk install
- redirect duplication to linux sdk install guide

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2025-10-24 13:29:15 -04:00
Tony Han
18d8ee51de boards: microchip: sam: enable nodes for GMAC0 to sama7g54_ek dts file
Enable gmac0, gmac0_mdio and gmac0_phy nodes.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-10-24 13:28:18 -04:00
Tony Han
a6a686a259 boards: microchip: sam: remove extra new lines from sama7g54_ek.dts
Remove extra new lines to satisfy the requirement of DevicetreeLinting.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-10-24 13:28:18 -04:00
Tony Han
9b66f72191 drivers: ethernet: sam_gmac: update for support RGMII mode
Update to use the RGMII mode which is supported by SAMA7G54.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-10-24 13:28:18 -04:00
Tony Han
4f75a702a5 soc: microchip: sam: configure the clocks for sama7g5 GMAC0
Configure the generic clocks to 125MHz for GMAC0.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-10-24 13:28:18 -04:00
Tony Han
ed4348dca5 soc: microchip: sam: update MMU for sama7g5 GMAC0
Enable strong ordered access to the GMAC0 registers.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-10-24 13:28:18 -04:00
Tony Han
284d623780 dts: microchip: sam: add nodes for GMAC0 to sama7g5.dtsi
Add gmac1 and gmac1_mdio nodes.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-10-24 13:28:18 -04:00
Tony Han
3036fa88dd drivers: ethernet: phy: ksz9131: save link state for get
Get the link state in the monitor and save it for get_link api
implementation to use.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-10-24 13:28:18 -04:00
Tony Han
034ce6927c drivers: ethernet: phy: ksz9131: add getting status for gigabit mode
Read gigabit status from Master Slave Status Register.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-10-24 13:28:18 -04:00
Tony Han
e7cfa722c4 drivers: ethernet: phy: ksz9131: add support for phy interrupt mode
Enable Link-Up and Link-Down interrupts. On the interrupt handling
the monitor work is scheduled to update the link status and calling
corresponding callback routine.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-10-24 13:28:18 -04:00
Tony Han
d7a78736fb tests: drivers: build_all: ethernet: add KSZ9131 entry
Add build tests for Microchip KSZ9131.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-10-24 13:28:18 -04:00
Tony Han
b3362a335e tests: drivers: build_all: ethernet: add new lines between PHY nodes
New lines are expected between PHY nodes by DevicetreeLinting.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-10-24 13:28:18 -04:00
Tony Han
b305faff1f drivers: ethernet: phy: add Microchip's KSZ9131 PHY support
Add support for KSZ9131 (Gigabit Ethernet Transceiver with RGMII Support).
As first starter, 100MBit/s mode is tested.
https://www.microchip.com/en-us/product/ksz9131

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-10-24 13:28:18 -04:00
Valerio Setti
1962ab564a modules: mbedtls: fix prompts and help messages for Kconfigs
Minor fixes to prompt and help messages for some of the Mbed TLS' Kconfigs.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 13:27:59 -04:00
Valerio Setti
fd932e15c9 doc: migration-guide: add note for Mbed TLS' Kconfigs renaming
Some Mbed TLS' Kconfigs were renamed in order to improve the 1:1 matching
between them and the build symbols used in Mbed TLS. This commit add a note
on the migration-guide document for this change.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 13:27:59 -04:00
Valerio Setti
a60803bebe modules: mbedtls: add a specific file for deprecated Kconfigs
This is to preserve backward compatibility until the deprecation period of
the old names expires. After that time entries from that file can be
removed.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 13:27:59 -04:00
Valerio Setti
315fbc5932 modules: mbedtls: rename MBEDTLS_HMAC_DRBG_ENABLED
Align Kconfig name to the Mbed TLS build symbol.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 13:27:59 -04:00
Valerio Setti
f8c94f2f44 modules: mbedtls: rename MBEDTLS_CTR_DRBG_ENABLED
Align Kconfig name to the Mbed TLS build symbol.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 13:27:59 -04:00
Valerio Setti
69e27673fa modules: mbedtls: rename MBEDTLS_TLS_SESSION_TICKETS
Align Kconfig name to the Mbed TLS build symbol.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 13:27:59 -04:00
Valerio Setti
62f0b2c5c8 modules: mbedtls: rename MBEDTLS_TLS_VERSION_1_3
Align Kconfig name to the Mbed TLS build symbol.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 13:27:59 -04:00
Valerio Setti
fa911df90c modules: mbedtls: rename MBEDTLS_DTLS
Align Kconfig name to the Mbed TLS build symbol.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 13:27:59 -04:00
Valerio Setti
f960db846c modules: mbedtls: rename MBEDTLS_TLS_VERSION_1_2
Align Kconfig name to the Mbed TLS build symbol.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 13:27:59 -04:00
Valerio Setti
851a20481b modules: mbedtls: rename MBEDTLS_LMS
Align Kconfig name to the Mbed TLS build symbol.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 13:27:59 -04:00
Valerio Setti
e1117f18fc modules: mbedtls: rename MBEDTLS_MD
Align Kconfig name to the Mbed TLS build symbol.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 13:27:59 -04:00
Marco Widmer
e2fcd640b7 drivers: gpio: pca953x: add pull-up/pull-down support
Some variants of the PCA953x family support pull-up / pull-down
resistors through registers 0x43 and 0x44 (mostly the TCAL9538 variant).
We already support input latching and interrupt masking (which is also
only present on a few variants), so let's also add support for pull-up
and pull-down resistors.

The feature can be enabled with the has-pud property in the device tree.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2025-10-24 13:27:49 -04:00
BUDKE Gerson Fernando
a7fbbb00d3 docs: services: tfm: Add note about confirmed images
Extend the Signing Images section in the build documentation to
highlight the differences between confirmed and unconfirmed images
with respect to the PSA Certified Firmware Update API.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
97e4ec9e62 docs: migration-guide-4.3: Add TF-M sign note
Add a note about BL2 (MCUboot) signing updates when the board is built
as TF-M NS.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
bbc73af78f trusted-firmware-m: Generate tfm_merged.bin
When CONFIG_TFM_MCUBOOT_IMAGE_NUMBER is 1, all images are merged.
Currently, there is no tfm_merged.bin file for use in FOTA. This
adds file generation to fulfill that requirement.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
d1534c5395 trusted-firmware-m: Prepare to generate tfm_merged.bin
When CONFIG_TFM_MCUBOOT_IMAGE_NUMBER is 1, the process to create the
final tfm_merged.bin file is more complex. This prepares the content
to introduce the generation of tfm_merged.bin for use in FOTA
applications.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
6334838cdb scripts: build: mergehex: Add --output-bin parameter
The optional --output-bin parameter instructs the IntelHex class to
save the content as a binary file instead of the Intel Hex format.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
7fe5574fa2 trusted-firmware-m: Use cmake_parse_arguments in tfm_sign
Use cmake_parse_arguments() for more idiomatic code. This makes the
code more readable and easier to extend with new options.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
5b4cd27f55 trusted-firmware-m: Create multi image bin files
A fundamental use of Trusted Firmware-M is to provide security for
IoT applications, where firmware upgrades (FOTA) are almost always
mandatory. The current file signing process does not produce the
necessary binaries for multi-image S/NS FWU, since hex images are
not suitable for this use case. This introduces the missing signed
binary files for use by the FWU partition. The changes were tested
in multi-image FWU scenarios, and support for single-image scenarios
can be easily added in the future.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
69f277cdcb trusted-firmware-m: Make hex files variables explicit
Make variables that define output files explicitly include 'HEX' in the
name. This refactoring step allows for the introduction of BIN file
generation.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
6cee10c5b9 trusted-firmware-m: Set --confirm when signing
The current behavior when signing an image adds --pad but does not
confirm the image. This appears to be a mistake, as the user should
inspect the image status in the Firmware Upgrade software. If an image
is not --confirmed, the FSM cannot infer the correct states. This sets
the image as confirmed to resolve the issue.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
b21ea79784 trusted-firmware-m: Define header and trailer options
The current behavior when signing an image is to always set --pad and
--pad-header for all images unless TFM_USE_NS_APP is set. This does not
allow for easy creation of signed images for FOTA applications. Rewrite
the PAD parameter as HEADER and TRAILER to simplify the setup of more
signing options.

Another important reason for this change is that the NS image, when
signed without --pad, runs on the hardware but does not perform the
MCUboot test, and the FWU never upgrades the image. This fixes the NS
image signing process to correctly support TF-M FWU using the PSA API
functions.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
99a2e4931e trusted-firmware-m: Set --max-sectors when signing
The --max-sectors option helps catch problems with flash overlap when
merging images. If there is a misalignment in flash partitions, the
merge process usually fails. This uses information from Zephyr flash
partitions and the flash controller to automatically determine the
max sectors value and apply it when signing an image.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
debb59830b trusted-firmware-m: Set --align when signing
The current version of TF-M script that sign MCUboot image uses a
default alignment of 1. This value varies between flash devices
and not all accept the default 1. This improve the script picking
the write-block-size property from the current flash controller
and pass as the --align parameter when signing an image.

Note: This solution works out-of-box for the vast majority of
devices in the Zephyr tree and an exception will throw when
a device is not supported.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
332ebc3be5 boards: st: stm32l562e_dk: ns: Align partitions
The partitions for the stm32l562e_dk/stm32l562xx/ns board are not aligned
with TF-M. This fixes the partition alignment.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
35cae82033 boards: st: stm32l562e_dk: Move external partitions
The external partitions are defined dependent from S and NS images. This
move the external partitions from common to the S image. The NS image
will be defined in future to allow correct usage of MCUboot.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
803d817be6 boards: arm: mps3: Fix NS flash layout and SRAM size
The mps3/foo/ns configuration defines flash layouts in TF-M to support
CONFIG_TFM_MCUBOOT_IMAGE_NUMBER values of 1 or 2. In the Zephyr
project, when building samples, the selected value is 2.

The layout changes are necessary to support the --max-sectors option
when signing images, ensuring that the flash layout is respected. To
enable this, the compatible "soc-nv-flash" was added to the reserved
memory, and fixed-partitions were defined.

Additionally, the ISRAM was redefined to expose the correct size and
values for both S and NS firmware, clarifying memory selection for the
user.

For example, see general details in:
https://git.trustedfirmware.org/plugins/gitiles/TF-M/trusted-firmware-m.git/%2B/refs/heads/main/platform/ext/target/arm/mps3/corstone310/common/partition/region_defs.h#116
https://git.trustedfirmware.org/plugins/gitiles/TF-M/trusted-firmware-m.git/%2B/refs/heads/main/platform/ext/target/arm/mps3/corstone310/common/config.cmake#13

Note:
 - Not all mps3 ISRAM have the same size and design should take that
   in consideration.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
691aa5e6e0 boards: arm: mps3: Remove mps3/corstone300/an547/ns QEMU
Exclude mps3/corstone300/an547/ns from PSA tests because QEMU does not
model the QSPI flash in MPS3 boards as real QSPI flash, but only as
simple ROM. Attempting to rewrite the flash from the guest will fail.

https://github.com/zephyrproject-rtos/zephyr/pull/94470#issuecomment-3197729501

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00