Commit graph

136,983 commits

Author SHA1 Message Date
Tomasz Chyrowicz
26128ab73d mcumgr: Prevent FW loader from self-destruction
The FW loader reports and manages exactly two slots:
 - slot 0: this is the slot for the application code to update
 - slot 1: this is the slot, in which the FW loader is placed

The slot 1 is reported, so tools can fetch metadata about the
FW loader installed on the device.
Unfortunately, currently SMP-based FW loader allows to issue slot erase
command for the slot 1, effectively erasing the FW loader code that is
being executed.

This change correctly identifies the slot 1 as an active one, marking it
as used and blocking erase operation on that slot.

Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
2025-12-11 16:34:55 -05:00
Firas Sammoura
41403cae9e tests: riscv: pmp: Add test case for null pointer access
Adds `test_null_pointer_access` to verify that attempting to write to a
null pointer (address 0x0) correctly triggers a fatal error, confirming
the Physical Memory Protection (PMP) guard functionality.

Signed-off-by: Firas Sammoura <fsammoura@google.com>
2025-12-11 16:34:42 -05:00
Jérôme Pouiller
3fbaa29bba drivers: spi: siwx91x: Drop GSPI_MAX_BAUDRATE_FOR_DYNAMIC_CLOCK
Currently, clk_div_factor is force to 1 if user request more than 110MHz.
However, in this case, gspi_siwx91x_get_divider() will never return 2 or
more, unless the input clock is >= 220MHz. The si91x is not designed for
such high clock frequency. So, this case has never been tested.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-12-11 16:34:33 -05:00
Jérôme Pouiller
0623e6f390 drivers: spi: siwx91x: Simplify gspi_siwx91x_pick_lower_freq()
Since actual_hz is no more needed, we can simplify
gspi_siwx91x_pick_lower_freq().

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-12-11 16:34:33 -05:00
Jérôme Pouiller
918426ff30 drivers: spi: siwx91x: clk_div_factor can't be 0
In gspi_siwx91x_config(), clk_div_factor can't be < 1. Therefore, we can
remove the dead code.

This code has been tested with tests/drivers/spi/spi_loopback, with a PLL
clock configured to 160MHz and a bus clock to 80MHz with success. I have
not found the case where change in GSPI_CLK_CONFIG are required.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-12-11 16:34:33 -05:00
Jérôme Pouiller
1c356d0ed1 drivers: spi: siwx91x: Fix use of GSPI_DATA_SAMPLE_EDGE
Until now, GSPI_DATA_SAMPLE_EDGE was enabled as soon as the user requested
> 40Mhz (even if the actual frequency was in fact 40Mhz). However, at 40MHz
and at 80MHz, use of GSPI_DATA_SAMPLE_EDGE generated read errors on the
last bit of the transaction:

    Buffer contents are different:
     [...],0xaa,0xaa,0xaa,0xaa,
    vs:
     [...],0xaa,0xaa,0xaa,0xab,

I have not found any case where GSPI_DATA_SAMPLE_EDGE is useful, so this
patch just remove this parameter.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-12-11 16:34:33 -05:00
Jérôme Pouiller
115241c645 drivers: spi: siwx91x: Simplify error management
In functions requiring to lock/release resources, it is less error prone to
have only one exit point and user goto to manage errors.

The behavior of the new code is exactly identical to the initial one.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-12-11 16:34:33 -05:00
Jérôme Pouiller
88b39fd6f9 drivers: spi: siwx91x: Simplify gspi_siwx91x_config()
The bit_rate variable does not bring any benefit.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-12-11 16:34:33 -05:00
Dmitrii Sharshakov
1ef630572b MAINTAINERS: add TF-M PSA Settings backend collaborators
Add myself alongside @seankyer and @tomi-font as the engineers
involved in development of this backend.

Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
2025-12-11 16:34:25 -05:00
Keith Short
46a60bb7d9 drivers: i2c: Fix default setting for I2C dump allowlist
The option CONFIG_I2C_DUMP_MESSAGES_ALLOWLIST should automatically be
turned on if the depedencies are satisfied.

Signed-off-by: Keith Short <keithshort@google.com>
2025-12-11 16:34:17 -05:00
Chaitanya Tata
d404fa6879 net: lib: shell: Rejig statistics
Use the newly added API to get specific type of stats (if supported) but
also keep the backwards compatibility.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-12-11 16:33:54 -05:00
Chaitanya Tata
f312cc341b tests: drivers: nrf_wifi: Add twister combo for vendor stats
This ensures vendor stats always builds.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-12-11 16:33:54 -05:00
Chaitanya Tata
55c492c7c5 drivers: nrf_wifi: Switch to new stats API
nRF70 queries FW to fet the stats, use the new stats API and filter FW
query depending on the type.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-12-11 16:33:54 -05:00
Chaitanya Tata
f24b902f5e net: l2: ethernet: Add new stats API
Add a new API that takes stat type, the networking stack only needs
NATIVE stats per-packet, it doesn't need to update vendor stats
per-packet. This saves unncessary exchanges in case driver needs to
query the firmware for the vendor stats.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-12-11 16:33:54 -05:00
McAtee Maxwell
d533ef74ea drivers: allow for two different infineon clock init flows
- differentiate fixed_factor init priority based on soc family

Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
2025-12-11 16:33:30 -05:00
Mario Paja
66121b7bb8 drivers: i2s: stm32 sai fix dma_cfg
This change fixes dma_cfg conflict between #99967 and #100223

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2025-12-11 16:33:11 -05:00
Benjamin Cabé
fd24cefd01 doc: spelling/typo fixes
minor spelling/typo fixes, mainly around using proper US English

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-12-11 16:32:58 -05:00
Mathieu Choplain
3be4c4c5a8 soc: st: stm32f0: SRAM vector table CMake Linker Generator compatibility
Add required CMake directives to enable working CONFIG_SRAM_VECTOR_TABLE=y
on STM32F0 series when CONFIG_CMAKE_LINKER_GENERATOR=y.

Builds OK with both ZEPHYR_TOOLCHAIN_VARIANT undefined (uses GNU toolchain
from Zephyr SDK) and set to "iar" (uses IAR toochain from EWARM v9.70.1).

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-12-11 17:06:28 +01:00
Alberto Escolar Piedras
244fe54a6d drivers: wifi: Fix remaining use of sa_family_t
In 55c49cdb8f the mayority of the
Zephyr wifi drivers was changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
will fail to build.

Note that the net_offload struct was updated accordingly in
d45cd6716b

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-11 17:06:04 +01:00
Alberto Escolar Piedras
f81011ee6a net: ip: Rename namespaced type in comment
In d45cd6716b the mayority of the
Zephyr codebased was changed to use the Zephyr native net_ prefixed
types. This comment was fogotten.
Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-11 17:06:04 +01:00
Alberto Escolar Piedras
e19d78e607 drivers: modem: Fix remaining net API use
In b5588ed684 the mayority of the
Zephyr modem drivers were changed to use the Zephyr native
net_ prefixed types, but this one was forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Note that the net_offload struct was updated accordingly in
d45cd6716b

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-11 17:06:04 +01:00
Alberto Escolar Piedras
f0ecb0a17f drivers: ethernet: intel_igc: Use net namespaced APIs
In e6daacf3c9 the mayority of the
Zephyr ethernet drivers were changed to use the Zephyr native
net_ prefixed types, but this one was forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-11 17:06:04 +01:00
Stefan Schmidt
13ce8eac99 drivers: sensor: adi: adxl345: use selected range for conversion
When running the samples/sensor/accel_trig sample with a adxl345 sensor
the logged output values were doubled compared to the expected values.

The sensor_channel_get() path calls adxl345_accel_convert which did not
handle the configured g-range, resulting in invalid sample values except
for the +/-16g range. To fix this issue the configured range is taken
into account and different conversion factors are applied.

adxl345_accel_convert is also made static. It is not used by another file.

Signed-off-by: Stefan Schmidt <kontakt@stefanschmidt-embedded.de>
2025-12-11 17:05:27 +01:00
Mathieu Choplain
c4d72ac549 dts: arm: st: stm32f723: disable USBPHYC by default
Like other devices, the USBPHYC should be disabled by default. Add missing
property `status` with value `disabled` on the node in DTSI.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-12-11 17:04:55 +01:00
Hank Wang
2ed5e0d608 dts: arm: xilinx: fix zynqmp RPU IPI mailbox base addresses
The RPU0 mailbox node in `zynqmp_rpu.dtsi` used incorrect IPI
message buffer base addresses. According to UG1085 (Table 13-3)[1],
RPU0 should use the channel 1 message buffer region at `0xFF99_0080`
for local request/response and `0xFF99_0400` for remote request/
response. The previous values pointed to the APU channel 0
buffer (`0xFF99_0200`), which does not match the hardware mapping.
The same is true for rpu1.

The IPI buffer base looks something like this:
IPI1 - 0xFF990000
IPI2 - 0xFF990200
IPI0 - 0xFF990400

Fix the DTS by updating the RPU0, RPU1 mailbox nodes to use the correct
base addresses from the documentation.

[1] https://docs.amd.com/v/u/en-US/ug1085-zynq-ultrascale-trm

Signed-off-by: Hank Wang <wanghanchi2000@gmail.com>
Signed-off-by: Harini T <harini.t@amd.com>
2025-12-11 17:04:27 +01:00
Alberto Escolar Piedras
139b7c20c2 drivers: xen: Fix uninitialized variable warning
gcc complains about the posibility of ret and gfn being used
unitialiazed (with the input npages == 0).
Let's fix it by initializing ret to 0.

The warnings being:
```
      zephyr/CMakeFiles/zephyr.dir/drivers/xen/gnttab.c.obj
In file included from include/zephyr/logging/log.h:11,
                 from drivers/xen/gnttab.c:31:
include/zephyr/logging/log_core.h: In function 'gnttab_get_pages':
include/zephyr/logging/log_core.h:221:9: warning: 'gfn' may be used
uninitialized [-Wmaybe-uninitialized]
  221 |         z_log_minimal_printk("%c: " fmt "\n", \
      |         ^~~~~~~~~~~~~~~~~~~~
drivers/xen/gnttab.c:202:19: note: 'gfn' was declared here
  202 |         xen_pfn_t gfn;
      |                   ^~~
include/zephyr/logging/log_core.h:221:9: warning: 'ret' may be used
uninitialized [-Wmaybe-uninitialized]
  221 |         z_log_minimal_printk("%c: " fmt "\n", \
      |         ^~~~~~~~~~~~~~~~~~~~
drivers/xen/gnttab.c:199:13: note: 'ret' was declared here
  199 |         int ret;
      |             ^~~
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-11 17:04:05 +01:00
Jukka Rissanen
5dada87def doc: net: Enhance network packet filtering documentation
Add more information to network packet filter documentation to
make it more useful to end users.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-12-11 17:03:54 +01:00
Jamie McCrae
7d7aa2c1d7 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  234c66e66ee39c0f836a57ba805245534be332f2

Brings following Zephyr relevant fixes:

  - 55ae5342 doc: imgtool: Update available options
  - cd96b62f boot: zephyr: Fix comment in banner.c
  - 1357a70f Updates for v2.3.0-rc2 release
  - afcca2c7 boot: zephyr: Fix Espressif build issues
  - d95ca5c7 boot: zephyr: Remove BOOT_MAX_IMG settings
  - 623f0230 boot: zephyr: stm32n657xx: Move overlay to socs
  - 31469b43 boot: zephyr: kconfig: Flip swap move defaults for
    esp32/stm32
  - a2ee0a75 scripts: imgtool: Fix verification with public ed25519
    key file
  - 49bbbabf boot: zephyr: Add watchdog setup/timeout
    configurability options
  - c25d2506 boot: zephyr: Move watchdog code to separate file
  - 9efb9d3f boot: zephyr: kconfig: Move modes to choice Kconfig
  - 92854b7b boot: zephyr: kconfig: Only show signature file when
    needed
  - 716f338a boot: zephyr: Remove weird custom key directory
    handling
  - c52f8af7 boot: zephyr: select `IS_BOOTLOADER`

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-12-11 17:02:54 +01:00
Jamie McCrae
7127ff4be3 kconfig: Remove dependencies from CONFIG_IS_BOOTLOADER symbol
This symbol has no relation to the dependencies it had, thus remove
them

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-12-11 17:02:54 +01:00
Sylvio Alves
16f6f392b4 tests: espressif: rtc_clk: update to keep nominal tests usage
Update the test case to use the nominal clock_subsys and print
calibration deviation.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-12-11 17:02:14 +01:00
Sylvio Alves
889910d7d8 tests: counter_basic_api: esp32h2: remove custom tolerance
ESP32-H2 counter test works with default tolerance.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-12-11 17:02:14 +01:00
Sylvio Alves
d3d2bd2f02 driver: clock: espressif: get frequency default to calibrated value
When clock get_rate() is called, return by default the calibrated
frequency instead of nominal one. This improves accuracy specially
when internal RC SLOW clock is used.

To guarantee that nominal values can be still be retrieved, add a
new type of clock subsys for such scenario.

west.yml is also updated to add fix into calibration sources.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-12-11 17:02:14 +01:00
Qingsong Gou
fc370b8481 drivers: rtc: sf32lb: fix alarm_is_pending error
Fix alarm_is_pending error

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2025-12-11 17:01:35 +01:00
Szymon Janc
09c80e18e6 tests: Bluetooth: Update ICS to TCRL pkg101
Updated to TCRL pkg101.

Security Mode 2 supporte removed (GAP,SM,GATT). Bumped supported
LE Audio profiles versions and enabled implemented features (notably
TMPA UMS)

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2025-12-11 17:00:28 +01:00
Martin Stumpf
ffb046b797 MCUmgr: OS: fix set datetime millisecond handling
According to the docs the millis were in the format `.SSSSSS`. In
reality though, it only accepted exactly `.SSS`, not `.SS` or `.SSSS`
and specifically also not `.SSSSSS`, contrary to the docs. Further, it did
not fail with an error message but simply produced the wrong value.

With this change it accepts everything from `.` to `.SSSSSS` and
produces the correct result. This is compatible with the previous
behavior, with the documentation and with everything in between.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2025-12-11 16:59:35 +01:00
Atilla Filiz
ddd25e81e7 drivers: sensor: add ams as6221 temperature sensor driver support
The as6221 is functionally equivalent to ti tmp108 and ams as6212,
so it is added as a new variant of tmp108.

Signed-off-by: Atilla Filiz <atilla@fi-tech.be>
2025-12-11 16:58:50 +01:00
Mathieu Choplain
aecaeae13e soc: st: stm32: wb0: don't quote section names in Z_GENERIC_SECTION
Don't quote the section names provided to Z_GENERIC_SECTION: the macro
already performs stringification on our behalf.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-12-11 16:57:59 +01:00
Gilles Devillers
7e139d6bfe net: mqtt: fix log typo
Fix typo in a log message and remove a redundant “error” mention.

Signed-off-by: Gilles Devillers <gildev@gmail.com>
2025-12-11 16:57:33 +01:00
Alberto Escolar Piedras
dd7526af49 modules: openthread: Fix network namespace API usage
bcec3bd04b introduced some of the
non-native API names back into this module. Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-11 16:57:22 +01:00
Alberto Escolar Piedras
a90994006a tests: net: all: Also build latmon
Also build the latency monitor support code.

As a sideeffect, we run out of bits in the kernel objects per thread
permissions tracking field. So let's increase it to 6 bytes.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-11 16:57:22 +01:00
Alberto Escolar Piedras
addca1250b samples: net: latmon: Use native networking API directly
This subsystem does not use the POSIX_API, and the sample only used one
call to the POSIX API to close a socket instead of using the native
networking API.
Let's just use the native networking API, so we avoid pulling-in more
dependencies.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-11 16:57:22 +01:00
Alberto Escolar Piedras
cc8bb0427a net: latmon: Fix net API use
In d45cd6716b the mayority of the Zephyr
networking code was changed to use the Zephyr native net_/zsock_
prefixed types, but some symbols were forgotten.
Let's change them.

Without these fixes/changes the code still builds in most cases as we are
by now setting CONFIG_NET_NAMESPACE_COMPAT_MODE.
But when this is not set, things will fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-11 16:57:22 +01:00
Carles Cufi
15716542c2 dts: nordic: Fix ngpios for nRF54L15 (and variants)
The correct number is 7, since the QFN52 (QGAA) variant has P0.00 to
P0.06 present. See:
https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/chapters/pin.html#ariaid-title6

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-12-11 05:51:32 -05:00
Jilay Pandya
aa2a0fbc8a doc: migration_guide: address stepper split
add entry for splitting stepper api in migration-guide-4.4

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-12-11 05:51:17 -05:00
Jilay Pandya
83956260f7 drivers: stepper: split stepper api
- split stepper api into stepper and stepper_drv api
- stepper api now comprises only of motion control apis
- stepper_drv api comprises of apis for configuring stepper
  drivers

- add documentation about stepper and stepper_drv api
- move stepper.rst in a dedicated stepper folder
- add information about stepper_drv api and relevant functions
  in stepper documentation.

- drop motion control functions from all the stepper_drv drivers
- create a common a library for controlling stepper motors by
  toggling gpios via h-bridge or step-dir stepper_drivers

- tmc5xxx devices are a combination of motion controller and
  stepper driver devices. tmc5xxx devices need to be modelled as
  mfds in order to address the split in stepper driver subsystem

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-12-11 05:51:17 -05:00
Sven Ginka
c4a4d8aa87 drivers: ethernet: dsa_nxp_imx_netc: fix zephyr random mac
zephyr,random-mac-address defaults to 0 or 1, which is always
available in generated code. so we can use the value itself.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2025-12-11 05:51:07 -05:00
Simon Piriou
c1091acd09 net: l2: ieee802154: add support for IEEE802154_CFI_DATA_REQUEST
802.15.4 specifies that a device may send a DATA_REQUEST command to the
coordinator after waiting for "macResponseWaitTime", starting after the
acknowledgment to the association request command.

This change adds support to generate DATA_REQUEST frames and sends one
for the association usecase only. The two other usecases, for MLME-POLL
or for beacon-enabled PAN, are not yet supported.

Signed-off-by: Simon Piriou <spiriou31@gmail.com>
2025-12-11 05:50:58 -05:00
Michał Grochala
2a9114af3d soc: nordic: nrf54l: Remove selecting a DTS-type option
Remove selecting `CONFIG_HAS_HW_NRF_RADIO_IEEE802154` that should be
generated from DTS based on the SoC selection.

Signed-off-by: Michał Grochala <michal.grochala@nordicsemi.no>
2025-12-11 05:50:33 -05:00
Holt Sun
6008841b60 tests: counter: add mcux LPTMR alarm mode coverage
Extend the counter_basic_api tests with a dedicated configuration that
enables the MCUX LPTMR driver in alarm mode.

The new testcase:
- Selects CONFIG_COUNTER_MCUX_LPTMR_ALARM
- Runs the existing counter_basic_api suite against nxp_lptmr devices
  when built for a board that instantiates the LPTMR

This verifies that the alarm-only LPTMR configuration passes the common
counter API tests without relying on the TOP callback feature.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2025-12-11 05:50:21 -05:00
Holt Sun
fba7c3ed88 drivers: counter: fix mcux lptmr unit test issue.
The counter alarm irq shall set the match value
to the max top value after stopping the timer, otherwise
the next start of the lptmr counter may shortly match the
the previous match value thus cause test_valid_function_without_alarm
run failed.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2025-12-11 05:50:21 -05:00