Commit Graph

115642 Commits

Author SHA1 Message Date
Krzysztof Chruściński
96e2f8bcd0 tests: lib: Fix zassert string
Fix wrong parameter used in zassert macros.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-05-22 16:17:23 +02:00
Krzysztof Chruściński
6ea6e5704d tests: arch: Fix zassert string
Fix wrong parameters used in zassert macros.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-05-22 16:17:23 +02:00
Krzysztof Chruściński
95737cda54 tests: boards: Fix zassert string
Fix wrong parameter used in zassert macros.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-05-22 16:17:23 +02:00
Krzysztof Chruściński
07a729b480 tests: fs: Fix zassert strings
After introducing compile time argument validation of strings
used in zassert macros multiple warnings appear. Fix all of
them.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-05-22 16:17:23 +02:00
Krzysztof Chruściński
6deca93285 testsuite: ztest: Add validation of zassert strings
Add noncallable printf with string used for ztest assert/assume
macros to ensure printf-like argument validation at compile time.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-05-22 16:17:23 +02:00
Anas Nashif
d8c8333917 toolchain: do not redefine __fallthrough
Do not redefine __fallthrough if already defined by the c library.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-05-22 16:17:12 +02:00
Raffael Rostagno
f6883c4d69 boards: esp32c6_devkitc: Add i2s support and samples
Add default configs for i2s and onboard LED and i2s output samples.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-05-22 15:25:12 +02:00
Raffael Rostagno
d8c6376030 soc: esp32c6: i2s: Add support
Add i2s support to ESP32-C6.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-05-22 15:25:12 +02:00
Piotr Koziar
3c050cfcfd modules: hal_nordic: nrf_802154: emit hfclk_ready with timer on nRF54LM20A
Right now, the power_clock_irq is not available on nRF54LM20A.
Since the onoff mechanism relies on the irq, the timer is used
to emit the hfclk_ready callback.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2025-05-22 15:24:51 +02:00
Raffael Rostagno
fd3cc9b19f samples: boards: esp32c6_devkitc: Add QDEC sample for PCNT
Add QDEC sample for PCNT driver testing.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-05-22 15:23:31 +02:00
Raffael Rostagno
fb2b48fe41 drivers: pcnt: esp32c6: Add support
Add PCNT support to ESP32-C6.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-05-22 15:23:31 +02:00
Pieter De Gendt
280171076e doc: services: storage: settings: Fix kconfig directive
Add CONFIG_ prefix to kconfig directive.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-05-22 13:45:06 +02:00
Pieter De Gendt
6840193071 doc: releases: migration-guide-4.2: Fix kconfig directives
Add CONFIG_ prefix to kconfig directives.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-05-22 13:45:06 +02:00
Pieter De Gendt
24fb7df0f1 doc: kernel: service: interrupts: Fix kconfig directives
Add missing CONFIG_ prefix to kconfig directives.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-05-22 13:45:06 +02:00
Fabio Baltieri
a361c45af6 drivers: dp: use atomic APIs for pin set/reset
Use LL_GPIO_SetOutputPin and LL_GPIO_ResetOutputPin for the STM32
optimized DP functions. This yelds a speedup of the bit-banged interface
from about 585kHz to 640kHz on an STM32C0.

Suggested-by: Mathieu Choplain <mathieu.choplain@st.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-05-22 13:44:55 +02:00
Fabio Baltieri
fd44146ad2 drivers: dp: rework the ARM delay loop
Rework the ARM delay loop to avoid it causing assembler issue in the
rest of the code.

Link: https://github.com/zephyrproject-rtos/zephyr/pull/90211#issuecomment-2894157705
Suggested-by: Mathieu Choplain <mathieu.choplain@st.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-05-22 13:44:55 +02:00
Robert Lubos
6aa8f3fe57 tests: net: socket: tls_ext: Add test case for cert veirfy cb option
Add test case to verify if TLS_CERT_VERIFY_CALLBACK socket option works
as expected.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-05-22 13:44:43 +02:00
Robert Lubos
2bb9aef4b1 net: sockets: tls: Add new option to register certificate verify cb
Add new TLS socket option, TLS_CERT_VERIFY_CALLBACK, which allows to
register an application callback to verify certificates obtained during
the TLS handshake.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-05-22 13:44:43 +02:00
Robert Lubos
0956271bc3 tests: net: socket: tls_ext: Add test case for verify result option
Add test case to verify if TLS_CERT_VERIFY_RESULT socket option works as
expected.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-05-22 13:44:43 +02:00
Robert Lubos
6be66aac60 tests: net: socket: tls_ext: Extract common code into functions
Extract server configuration, client configuration and test shutdown
into separate functions so that they're reusable in other tests.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-05-22 13:44:43 +02:00
Robert Lubos
887e8e0e7e net: sockets: tls: Add new option to retrieve cert verification result
Add new TLS socket option, TLS_CERT_VERIFY_RESULT, to obtain the
certificate verification result from the most recent handshake on the
socket. The option works if TLS_PEER_VERIFY_OPTIONAL was set on the
socket, in which case the handshake may succeed even if certificate
verification fails.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-05-22 13:44:43 +02:00
Jordan Yates
646f08cbb7 samples: shields: npm1300_ek: update GPIO config
Update the nPM1300 GPIO configuration for the sample to match new
requirements.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-22 13:44:31 +02:00
Jordan Yates
4904c27777 regulator: npm1300: convert regulator GPIOs to array
Convert the enable, pwm, and retention `gpios` properties away from the
GPIO specifier space to an integer array.

While this is a less specific type than the GPIO property, it has the
advantage of not requiring the PMIC gpios node to be both present and
enabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-22 13:44:31 +02:00
Grzegorz Swiderski
da197fe9ef sysbuild: Import image devicetrees
Make the image devicetrees available to sysbuild for advanced use cases.

This is done by calling `zephyr_dt_import` on each image target. The DT
target properties are all expected to be prefixed with `DT_`, so there
should be no conflicts.

Thus, the DT contents of a given `<image>` can be retrieved using e.g.:

    dt_nodelabel(<var> NODELABEL <label> TARGET <image>)

as noted in `extensions.cmake`.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-05-22 13:44:18 +02:00
Grzegorz Swiderski
7cddb2a5e5 cmake: extensions: Add TARGET arguments to the dt_* API
The CMake dt_* API is backed by target properties. By default, it uses
the target named `devicetree_target` that is initialized in `dts.cmake`.

We should be able to customize this, now that we have a function for
loading those properties into a different target. For example:

    zephyr_dt_import(EDT_PICKLE_FILE /path/to/edt.pickle TARGET target)

    dt_nodelabel(node NODELABEL label TARGET target)

This would make it possible to reference multiple devicetrees in the
same build system, particularly sysbuild.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-05-22 13:44:18 +02:00
Grzegorz Swiderski
468db18389 cmake: modules: Add zephyr_dt_import
Extract the part of `dts.cmake` that invokes `gen_dts_cmake.py`, then
generalize it into a CMake extension, which can be reused by sysbuild.

The Python script itself is also updated, so that the generated CMake
file can accept an input variable DEVICETREE_TARGET, which comes from
the `zephyr_dt_import(TARGET ...)` argument.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-05-22 13:44:18 +02:00
Mirai SHINJO
438ed6d74a boards: nucleo_h753zi: add pyOCD support
This patch adds pyOCD runner configuration for
the nucleo_h753zi board.

Signed-off-by: Mirai SHINJO <oss@mshinjo.com>
2025-05-22 11:32:02 +02:00
Jordan Yates
1abe095b8e tests: net: conn_mgr_nsos: added
Add basic tests for the NSOS Connectivity Manager implementation.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-22 11:31:54 +02:00
Jordan Yates
2203a571bc net: nsos_sockets: conn_mgr support
Add support for using native sockets with the connectivity API. This
allows libraries that use the connectivity API to be tested in an
application with real connectivity, without external hardware.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-22 11:31:54 +02:00
Tom Chang
797779d4c2 mgmt: ec_host_cmd: npcx: remove the SHI enable in the init
This commit removes the SHI enable in the initialization. It can be
enabled by the application explicitly calling it when needed. The SHI
backend relies on the application layer to provide a data buffer for EC
Host Commands. If SHI is enabled before this buffer is initialized,
there is a risk that the driver may access a NULL buffer, leading to a
system panic.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2025-05-22 11:31:47 +02:00
Yau-ming Leung
6dff8dc639 drivers: icm42688: fix accel and gyro frequency in period calculation
When calculating accel and gyro period for 12.5Hz, the frequency value is
incorrect. Updated to correct value.

Signed-off-by: Yau-ming Leung <ymleung314@gmail.com>
2025-05-22 11:31:41 +02:00
Yau-ming Leung
39923e3e19 drivers: icm42688: pin9 function
PIN9 of an ICM42688 can be configured as an interrupt output, external
clock input or frame sync output. Pin function can now be set via a sensor
attribute.

Signed-off-by: Yau-ming Leung <ymleung314@gmail.com>
2025-05-22 11:31:41 +02:00
Andrey Dodonov
b7f046dd10 doc: kernel: services: correct usage example of k_poll_signal_reset
k_poll_signal_reset expects a pointer

Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
2025-05-22 04:53:17 +02:00
Jordan Yates
b212fb91bd net: ip: net_pkt: conditional net_if_get_by_iface
Don't reference `net_if_get_by_iface` if `CONFIG_NET_RAW_MODE=y`, since
`net_if.c` is not compiled in that case, leading to linker errors.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-22 04:53:08 +02:00
Anas Nashif
e80d86ab85 sca: eclair: substitute deprecated service STD.emptrecd
The ECLAIR service STD.emptrecd (which checks for empty structures) is now
deprecated.
Use STD.anonstct (which checks for structures with no named
members, an UB in C99)

Based on a change by Nicola Vetrini in the Xen project:

https://lists.xenproject.org/archives/html/xen-changelog/2024-12/msg00125.html

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-05-22 04:52:56 +02:00
Benson Huang
728a018f86 drivers: gpio: Fix GPIO initial status
The current procedure to initialize the GPIO is:
If the GPIO is configured as GPIO_OUTPUT and also has the
GPIO_OUTPUT_INIT_HIGH flag, set it to output high; otherwise, set it to
output low.

This may fail if the GPIO is simply configured as GPIO_OUTPUT without
specifying either INIT_HIGH or INIT_LOW, which means it is intended to
preserve the previous status. But in this case, we are currently setting it
to output low.

Fix this by explicitly initializing the GPIO to high or low according to
the configuration:
If the GPIO is configured as GPIO_OUTPUT and also with the
GPIO_OUTPUT_INIT_HIGH flag, set it to output high.
If the GPIO is configured as GPIO_OUTPUT and also with the
GPIO_OUTPUT_INIT_LOW flag, set it to output low.
If the GPIO is configured as GPIO_OUTPUT only,
do not set the output value.

Signed-off-by: Benson Huang <benson7633769@gmail.com>
2025-05-22 04:51:57 +02:00
Alvis Sun
9cf6d66062 soc: npcx: npcx9: disable CCDEV_SEL in early initialization.
Enabling CCDEV_SEL_EN may interfere with the expected behavior of
VCC1_RST#.
To prevent potential issues, this commit sets CCDEV_SEL_EN
to be disabled by default, ensuring reliable VCC1_RST# behavior.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2025-05-22 04:51:44 +02:00
jhan bo chao
98478189f2 drivers: adc: rts5912: clear pending irq when setup
clear pending irq when setup.

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-22 04:51:36 +02:00
Felix Moessbauer
0f818e3e6b dts: lilygo/ttgo_tbeam: add axp2101 fuel-gauge node
The board has the axp2101 chip and we now have a matching driver.

Signed-off-by: Felix Moessbauer <felix.moessbauer@gmail.com>
2025-05-22 04:51:27 +02:00
Felix Moessbauer
84ebbdcd4b fuel_gauge: add basic support for AXP2101 chip
The AXP2101 chip is a multi functional power chip offering a regulator,
charge controller and a fuel gauge (battery percentage and voltage).
Hereby, the fuel gauge provides much more reliable data compared to using
an ADC.

We implement minimal support for this chip (connected state, voltage and
gauge) and bind it to the fuel gauge subsystem.

Closes: #89158
Signed-off-by: Felix Moessbauer <felix.moessbauer@gmail.com>
2025-05-22 04:51:27 +02:00
Philipp Steiner
9a8e4663ac drivers: fuelgauge: Add missing property values
Adds missing property values for battery connect and present state

Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
2025-05-22 04:51:27 +02:00
Fabio Baltieri
ac1dec0498 led: drop led_context.h
led_context.h contains a single struct with max and min period, current
drivers that use it have hardcoded values and they set it at init.

This data is not used anywhere, and it makes very little sense to use
some SRAM for it.

Hardcode the limit for each driver and drop the struct and file.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-05-22 02:21:51 +02:00
Peter van der Perk
3d024e0953 modules: hal_nxp: Include TPM HAL driver for QDEC
Include TPM hal layer in case CONFIG_QDEC_TPM is enabled

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2025-05-22 02:21:39 +02:00
Peter van der Perk
49e33d38c1 drivers: sensor: qdec_tpm: Add QDEC support for NXP TPM
Allows to run the NXP Timer/PWM Module (TPM) in Quadrature
Decoder Mode.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2025-05-22 02:21:39 +02:00
Vit Stanicek
0d73b53310 samples: Add i.MX RTxxx AMP samples
Add common structure for RTxxx AMP samples. Add amp_blink, amp_mbox,
amp_audio_output and amp_audio_loopback samples.

These samples are now configured only for the mimxrt685_evk, but are
intended to support other NXP microcontrollers with Xtensa-family cores
at a later date.

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2025-05-22 02:21:29 +02:00
Lin Yu-Cheng
1e38f94473 drivers: timer : fix rtmr timer.
RTMR clear the interrupt status bit in the init and isr function.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-05-22 02:21:12 +02:00
Keith Packard
843d661b82 modules: Update picolibc to version 1.8.10
Switch to latest picolib release, version 1.8.10

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-05-22 02:21:01 +02:00
Keith Packard
47f2136e3c tests/kernel: Adapt to picolibc 1.8.10 symbol changes
Picolibc changed things like _WANT_MINIMAL_IO_LONG_LONG to
__IO_MINIMAL_LONG_LONG in an attempt to regularize the exposed names and
eliminate names that weren't prefixed with even a single underscore.

Adapt to this change by looking for both old and new symbols.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-05-22 02:21:01 +02:00
Keith Packard
627f0ef565 posix: Use picolibc's limits.h when building POSIX code
When building POSIX code, we need to use picolibc's limits.h instead of
manually defining the POSIX values. This avoids duplicate definitions of
these symbols.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-05-22 02:21:01 +02:00
Vit Stanicek
9367592240 boards: Add mimxrt685_evk/mimxrt685s/hifi4
Add definitions and init code for mimxrt685_evk/mimxrt685s/hifi4 (i.MX
RT685's HiFi 4 DSP core on MIMXRT685-EVK).

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2025-05-21 20:11:19 +02:00