Commit graph

126,787 commits

Author SHA1 Message Date
Rubin Gerritsen
e9abaf435b scripts: compliance: Add basic cmake style checks
It is very common to see a comment stating that the
"No Space Before Opening Brackets" style guide is not followed.
To avoid putting this burdon on reviewers, let the compliance
check catch this instead.

Checking for tab indentation was also very simple, so also added
this.

Running this check on all files finds many violations:
 - Space before opening brackets: 141 violations
 - Tab indentation: 420 violations

Fixing these will not be done as part of this PR. Adding the check
will prevent us from adding new violations.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2025-10-05 06:17:36 -04:00
Fabio Baltieri
28ac3b5a88 ci: set two more ccache-cache-key false flags
These two were introduced after the previous commit, disable the cache
for them as well, reduce some noise from the github caches page.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-05 06:17:16 -04:00
Daniel Leung
4ef1163e39 samples: tracing: fix missing k_event funcs for UART test
With the UART transport test (sample.tracing.transport.uart),
it would fail on qemu_x86_64 complaining about missing
k_event tracing functions. So add them to fix the compilation
error.

Fixes #96818

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-10-03 21:19:57 -04:00
Stefan Gloor
ea499caa25 sys: cbprintf: logging: fix equivalent branches in argify macro
The ((0) ? (arg) : (arg)) compiler trick leads to a codechecker
violation:

"conditional operator with identical true and false expressions"

Replace it by ((0) ? (0) : (arg)) to work around this issue.

Signed-off-by: Stefan Gloor <stefan.gloor@siemens.com>
2025-10-03 21:19:47 -04:00
Ali Hozhabri
4ba658dcc2 west.yml: Update west to point to the recent changes for hal_stm32
Update west.yml to point to the recent changes for hal_stm32.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 21:15:08 -04:00
Ali Hozhabri
20a1ea7835 boards: st: nucleo_wb09ke: Optimize power consumption
Optimize power consumption for the Nucleo-WB09KE board by
implementing correct pull-up/pull-down configurations when the device
enters lower power states.

Disable the SMPS with floating output in suspend-to-ram (deepstop)
power state.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 21:15:08 -04:00
Ali Hozhabri
51fc4405ac drivers: bluetooth: hci: Add PM support to the STM32WB0x HCI driver
Add PM support to the STM32WB0x Bluetooth HCI driver.

Implement PM event register to wake up the device for its BLE events.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 21:15:08 -04:00
Ali Hozhabri
e4a8b272ec drivers: serial: Enable UART wake-up line in STM32
Enable UART wake-up line in STM32 driver.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 21:15:08 -04:00
Ali Hozhabri
85318a9e19 soc: st: stm32: Provide PM support for STM32WB0x
Provide PM support, specifically suspend-to-ram, for STM32WB0x.

Enable STM32_RADIO_TIMER Kconfig parameter when PM is set.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 21:15:08 -04:00
Ali Hozhabri
bdb41c0ebd drivers: timer: Enable STM32WB0_RADIO_TIMER Kconfig parameter
Use radio timer as the system timer when Bluetooth is used.

Modify CMakeLists.txt to compile radio timer driver when
STM32WB0_RADIO_TIMER is enabled.

Remove the common parts from hci_stm32wb0.c that are present
in the radio timer driver.

Set and retrieve the appropriate value for SYS_CLOCK_TICKS_PER_SEC and
SYS_CLOCK_HW_CYCLES_PER_SEC respectively.

Define radio_timer node and its properties.

Enable radio_timer node in nucleo_wb0x boards.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 21:15:08 -04:00
Ali Hozhabri
84f7098f8f drivers: timer: Provide radio timer driver for STM32WB0x SoCs
Provide radio timer driver for STM32WB0x SoCs.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 21:15:08 -04:00
Ali Hozhabri
f9655654ab drivers: Fix the improper use of CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
Fix the improper use of CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC for STM32WB0
drivers due to the misunderstanding of its definition.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 21:15:08 -04:00
Star Sphere
8f34d0fdc0 boards: seeed: xiao_nrf54l15: enable ceramic antenna
Enables the on-board ceramic antenna and vbat_pwr by default

Signed-off-by: Star Sphere <starsphere@foxmail.com>
2025-10-03 21:14:46 -04:00
Firas Sammoura
2d1cfe8911 include: util: Applied clang-formatting
This commit applies clang-format to file include/zephyr/sys/util.h
to align them with the latest Zephyr coding style guidelines.

Signed-off-by: Firas Sammoura <fsammoura@google.com>
2025-10-03 21:14:29 -04:00
Fabio Baltieri
d906376640 sys: util: add Z_INTERNAL_MAX and Z_INTERNAL_MIN
Add two internal Z_INTERNAL_MAX and Z_INTERNAL_MIN macros and use those
for implementing the actual MIN and MAX. This allows a downstream
application to undefine and redefine MIN and MAX, for example to define
them to min and max, which is useful if it relies on MIN and MAX to be
the single call version.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-03 21:14:11 -04:00
Fabio Baltieri
7e0d8f9119 sys: util: add min3 and max3 single evaluation macros
Add three argument variants of the single evaluation min and max, seems
like there's few of these in the code we may as well have them.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-03 21:14:11 -04:00
Fabio Baltieri
c576b090b0 sys: util: add support for nested min/max
Add support for nested min/max by using unique automatic variables. This
is heavily inspired by the Linux implementation, just reimplemented from
scratch using the Zephyr internal APIs.

Link: https://elixir.bootlin.com/linux/v6.16.8/source/include/linux/minmax.h#L314-L315
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-03 21:14:11 -04:00
Fabio Baltieri
37717b229f sys: util: rename Z_MIN Z_MAX Z_CLAMP to min max and clamp
Rename these three macros to an unprefixed lower-case variant. This is
normally not done for Zephyr macros (see container_of) but in this case
it seems like a good idea to adopt the lowercase names to:

1. have the same convention as the equivalent Linux macros, helping devs
   working cross project recognizing (mis)use patterns.
2. make it somewhat intuitive that the lowercase ones are meant to be
   used in functions while the uppercase ones are to be used for static
   evaluation.

Add few c++ guards to avoid colliding with std::min and std::max.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-03 21:14:11 -04:00
Fabio Baltieri
056f3b07ce west.yml: update few modules to pickup min/max define guards
Update the few modules to pick up some redefinition fixes.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-03 21:14:11 -04:00
Fabio Baltieri
25578a0413 sys: util: move Z_MIN, Z_MAX, Z_CLAMP into util.h
These three are single evaluation versiono of MIN, MAX and CLAMP, they
are defined in toolchain headers as they use typeof [1] and statement
expressions [2], which are compiler extensions, but given that these are
used by other macros in util.h as well, it seems to be fair to assume
that these are supported by all compilers used with Zephyr today.

[1] https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
[2] https://gcc.gnu.org/onlinedocs/gcc/Typeof.html

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-03 21:14:11 -04:00
David Boullie
a0b6ec66ff modules: hal_silabs: Add shim for sl_memory_manager_pool APIs
Add shim layer for sl_memory_manager_pool APIs that utilizes
kernel memory slabs.

Signed-off-by: David Boullie <David.Boullie@silabs.com>
2025-10-03 21:14:00 -04:00
Loic Domaigne
0dddf35b40 drivers: mfd: axp192 fix EXTEN switch control value
Currently, EXTEN switch control (mapped to GPIO5) is always 0, due to a bug
in the shift value. This has been reported in Coverity CID 353647.

Following the AXP192-X Datasheet, the EXTEN switch control status is
given by bit 2 of the register 10h. If "GPIO5" corresponds to EXTEN
Switch control (AXP192_GPIO5_OUTPUT_MASK is 0x04U), then the shift
AXP192_GPIO5_OUTPUT_SHIFT should be 2, not 3.

Signed-off-by: Loic Domaigne <tech@domaigne.com>
2025-10-03 21:13:31 -04:00
dependabot[bot]
3165d3c617 ci: github: bump the actions-deps group with 2 updates
Bumps the actions-deps group with 2 updates: [github/codeql-action](https://github.com/github/codeql-action) and [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions).


Updates `github/codeql-action` from 3.30.3 to 3.30.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](192325c861...3599b3baa1)

Updates `zgosalvez/github-actions-ensure-sha-pinned-actions` from 3.0.25 to 4.0.0
- [Release notes](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases)
- [Commits](fc87bb5b5a...9e9574ef04)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.30.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-deps
- dependency-name: zgosalvez/github-actions-ensure-sha-pinned-actions
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-03 21:13:05 -04:00
Adam Mitchell
02c129369b soc: st: st: h7: Add missing definition for STM32H742xx
Adds stm32h742xx to stm32h7x family

Signed-off-by: Adam Mitchell <adam.mitchell@brillpower.com>
2025-10-03 21:10:43 -04:00
Sylvio Alves
86a63faa0d tests: build_all: led_strip: split uart test case
Make sure this test filters out UART peripherals that
do not support ASYNC operation.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-10-03 21:07:33 -04:00
Sylvio Alves
b96687170f driver: led_strip: do not set uart supported
Let the vendor driver defines whether ASYNC is supported.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-10-03 21:07:33 -04:00
Michał Stasiak
ccef0cf132 drivers: pinctrl: nrf: use HAL defines
Replaced MDK symbols with defines from HAL.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-10-03 21:07:13 -04:00
Kevin ORourke
f5a783c1df net: mqtt: Remove misleading comment
Setting the peer hostname to NULL does not skip hostname verification.
After discussion in the issue it was agreed that it's better to remove
this comment than to implement skipping hostname verification.

Also fixed a typo in the remaining part of the comment.

Fixes: #96853

Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
2025-10-03 21:05:01 -04:00
Aksel Skauge Mellbye
e09a13dfd0 dts: arm: silabs: Clean up xg22 dts files
Reformat devicetree files according to
<https://docs.zephyrproject.org/latest/contribute/style/devicetree.html>
and <https://docs.kernel.org/devicetree/bindings/dts-coding-style.html>:

 * Sort nodes by unit address or name
 * Sort properties by category and name

Add missing MPU, hfrdodpllrt, hfxort and prortcclk nodes.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-10-03 21:04:35 -04:00
Aksel Skauge Mellbye
0ee07b4774 dts: arm: silabs: Clean up xg23 dts files
Reformat devicetree files according to
<https://docs.zephyrproject.org/latest/contribute/style/devicetree.html>
and <https://docs.kernel.org/devicetree/bindings/dts-coding-style.html>:

 * Sort nodes by unit address or name
 * Sort properties by category and name

Add missing MPU node.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-10-03 21:04:35 -04:00
Aksel Skauge Mellbye
3ee0de40a7 dts: arm: silabs: Clean up xg24 dts files
Reformat devicetree files according to
<https://docs.zephyrproject.org/latest/contribute/style/devicetree.html>
and <https://docs.kernel.org/devicetree/bindings/dts-coding-style.html>:

 * Sort nodes by unit address or name
 * Sort properties by category and name

Add missing I2C1, MPU and vdac1clk nodes.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-10-03 21:04:35 -04:00
Aksel Skauge Mellbye
9d199d84f1 dts: arm: silabs: Clean up xg28 dts files
Reformat devicetree files according to
<https://docs.zephyrproject.org/latest/contribute/style/devicetree.html>
and <https://docs.kernel.org/devicetree/bindings/dts-coding-style.html>:

 * Sort nodes by unit address or name
 * Sort properties by category and name

Add missing VDAC, MPU and prortcclk nodes.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-10-03 21:04:35 -04:00
Aksel Skauge Mellbye
b4491eb485 dts: arm: silabs: Clean up xg29 dts files
Reformat devicetree files according to
<https://docs.zephyrproject.org/latest/contribute/style/devicetree.html>
and <https://docs.kernel.org/devicetree/bindings/dts-coding-style.html>:

 * Sort nodes by unit address or name
 * Sort properties by category and name

Add missing MPU and prortcclk nodes.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-10-03 21:04:35 -04:00
Mathieu Choplain
33a7b65f69 scripts: ci: check_compliance: use correct error when author didn't sign
Commit e4650bc349 modified check_compliance
to avoid false negatives when a commit has multiple signoff lines and the
author's signoff line isn't the first one. To avoid this, a signoff line
which matches exactly the author's name and email is searched instead of
matching any line with the proper syntax and checking the fields.

While this solved the original issue, this also introduced a new issue:
whereas the old script would distinguish a properly formed signoff line
with the wrong author from a malformed signoff line, the new method now
checks both the syntax and the author name/email at the same time. As
such, the script will report "signoff line does not follow the syntax"
for both situations, but the signoff line DOES follow the syntax in the
latter case: the error message is then only a misleading red herring.

Fix this issue - and improve the check - by verifying every signoff line
in a commit's message body. Invalid syntax on any line is reported as a
"does not follow syntax" failure, whereas inability to find the commit
author is reported as a separate "no signoff entry matches commit author"
failure as it should always have...

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-10-03 21:03:29 -04:00
Mathieu Choplain
82fd615aad scripts: ci: check_compliance: fix potential unbound variable access
When checking for emails/sign-off, if parsing of the commit information
using 'git show' fails, the 'auth_name', 'auth_email' and 'body' variables
are unbound but accessed right afterwards, which would cause an error.

Skip straight to next iteration of the loop when such an error occurs to
ensure access to the unbound variables is never performed.

This error was reported by the VS Code Pylance analyzer.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-10-03 21:03:29 -04:00
Daniel Baluta
54545430e4 drivers: sai: Fix compile time error with clang
After commit 524b72ce40 ("toolchain: llvm: Provide working
BUILD_ASSERT macro") when compiling with clang we have actual
checks and a real assert check using _Static_assert.

Now, when compiling with clang (used by Xtensa internal toolchain)
we get the following error.

$ zephyr/drivers/dai/nxp/sai/sai.c:968:29: error: static_assert expression
 is not an integral constant expression

We get this in asserts like this:

BUILD_ASSERT(SAI_DLINE_COUNT(inst) != -1, "...").

This expands to (reduced the macro to easier understand the context):

_Static_assert(((((((I2S_Type *)(uintptr_t)(1493499904U))) ==
((I2S_Type *)(0x59040000u)))

... and clang complains that this is not a constant expression.

So, in order to fix the compile time error remove the compile time
asserts and replace them with runtime checks.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Fixes: commit 524b72ce40 ("toolchain: llvm: Provide working
BUILD_ASSERT macro")
2025-10-03 21:02:45 -04:00
Detlev Zundel
abd0919bc9 samples: modules: lvgl: demos: Increase memory pool on native
Due to the added overhead on 64 bit native, we also need to increase
the memory pool size to fix crashes as described in here:

https://github.com/lvgl/lvgl/issues/7648

Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
2025-10-03 21:00:40 -04:00
Detlev Zundel
e05a272817 samples: modules: lvgl: demos: Increase main stack to fix crash
The increased complexity of the LVGL code now overruns the 4 KiB stack
of the main thread. Increase it to 6 KiB to fix the error.

Fixes: #94473

Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
2025-10-03 21:00:40 -04:00
Martí Bolívar
0907a05baf scripts: dts: fix CMake DT API helper for compatible properties
Our build system DT API has a dt_comp_path() function used to look up
paths of nodes with a given compatible. This relies on the generated
edt.pickle.cmake file in the build directory to look inside the
concrete devicetree for the current application build.

The script gen_dts_cmake.py is responsible for generating
edt.pickle.cmake. It currently generates the data needed by
dt_comp_path() by looking inside each edtlib.Node object's "props"
attribute. This attribute in turn is fed by the "properties:" key in
the node's YAML binding. This leads to an edge case which is breaking
the dt_comp_path() API.

In most cases, we don't notice this edge case because base.yaml, which
is included by nearly all bindings, has a definition for "compatible"
in its "properties:" map. However, bindings are not required to
include base.yaml, and bindings do not have to explicitliy define a
"compatible" entry in their "properties:". An example of a binding
that does neither is fixed-partitions.yaml: it only has #address-cells
and #size-cells in its "properties:".

Nonetheless, "compatible:" is always a valid property name because
it's defined in the DT spec, and we should make the CMake API robustly
detect all nodes with a given compatible, regardless of whether that
node's binding explicitly defines it or not.

To make this happen, rely on the edtlib.Node.compats attribute instead
of edtlib.Node.props. The compats attribute is always defined even if
the node's YAML binding doesn't have an explicit entry for
"compatible".

Signed-off-by: Martí Bolívar <marti.bolivar@oss.qualcomm.com>
2025-10-03 21:00:29 -04:00
Fin Maaß
e88be20d52 sd: sdmmc: only with to 4 bit, if supported by host
only switch to 4 bit mode, if it is supported
by the host. for MMC it is already checked,
but not for the sd card.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-10-03 20:59:01 -04:00
Martin Koehler
cd2a38cc2e logging: Fixes #96880
Now only deletes old log files if more data is needed than is available.

Signed-off-by: Martin Koehler <koehler@metratec.com>
2025-10-03 20:58:34 -04:00
Iuliana Prodan
6a3ccab892 linker: nxp: imxrt6xx: hifi4: add missing include
Add the #include <snippets-sections.ld> directive
to include a linker file automatically.
This file defines additional linker sections that
are dynamically added during the build process.

It is placed at the very end of the SECTIONS block,
ensuring that any sections it defines appear after
all standard sections.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2025-10-03 20:58:12 -04:00
Michael Estes
590b6ae968 boards: st: nucleo_g431kb: fix lptim1 domain clock
The domain clock configuration for lptim1 node in nucleo_g431kb.dts has a
conflict between the source and the peripheral. The source is specified
as STM32_SRC_LSI - low speed internal, but `LPTIM1_SEL(3)` will actually
configure the low speed external clock as the source, which the Nucleo
G431KB does not have. Update this to actually use the LSI clock. See
RM0440 Rev 9 page 322 - LPTIM1SEL[1:0] for more details.

Signed-off-by: Michael Estes <michael.estes@byteserv.io>
2025-10-03 20:57:26 -04:00
Supper Thomas
e9e6b81fbc doc: fix peripheral to peripheral_hr
Just fix the bin to right name

Signed-off-by: Supper Thomas <78900636@qq.com>
2025-10-03 20:57:14 -04:00
Stephanos Ioannidis
c44cb7309b ci: Switch to CI image v0.28.6
This commit updates the CI workflows to use the CI image v0.28.6, which
adds libfuse3 and additional Clang dependencies such as libclang-rt.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2025-10-03 16:53:41 -05:00
Anas Nashif
3d7aa4a407 ci: errno: use action-zephyr-setup action
Do not use docker image, use action for setting up zephyr instead.
We need the SDK here to check the headers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-03 16:50:13 -05:00
Stephanos Ioannidis
36bc2f38b7 ci: Switch to CI image v0.28.5
This commit updates the CI workflows to use the CI image v0.28.5, which
adds Node.js runtime and the TF-M Python dependencies.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2025-10-03 04:57:55 -05:00
Ali Hozhabri
9a440ec18f drivers: bluetooth: hci: Introduce bt_spi_close to support bt_disable
Introduce bt_spi_close function to support bt_disable implementation
in applications.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-10-03 12:52:30 +03:00
Pierrick Guillaume
27b0e47f3b drivers: hwspinlock: sqn: add reg-width dts property
The size of each spinlock register might vary depending on the SoC.
Make it configurable in the devicetree.

Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
2025-10-03 12:52:18 +03:00
Pierrick Guillaume
2c86e65e71 drivers: hwspinlock: sqn: use cluster id instead of core mpidr
Using the mpidr of the core to lock the hwspinlock meant it acted as
a spinlock in the cluster itself, which is exactly the opposite of what we
tried to achieve.
Additionally, this tied the driver to the arm architecture, even though the
HW was not.

Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
2025-10-03 12:52:18 +03:00