Commit graph

126,787 commits

Author SHA1 Message Date
Michael Zimmermann
e79315de45 tests: net: mqtt_sn_client: test incoming publishes
Until now, only outgoing ones were tested.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-09-29 12:45:15 -04:00
Michael Zimmermann
9735cb313e net: mqtt_sn: handle timestamp being 0
When running just the test mqtt_sn_client::test_mqtt_sn_wait_suback on
native_sim, the current timestamp is still 0. That caused the test to fail,
because 0 is used as an indicator, that the message has never been sent,
thus sending it every time process_work is executed.

Instead of adding additional variables and complexity, the code now simply
treats now==0 special and waits 1ms until doing anything.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-09-29 12:45:15 -04:00
Michael Zimmermann
3289d83dad tests: net: mqtt_sn_client: store expected recv data const
It's never modified anyway and allows API users to make use of that.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-09-29 12:45:15 -04:00
Michael Zimmermann
9b3b5b4447 net: mqtt_sn: scope msg_id to client instance
- The paho client does that, too.
- This allows running single tests, because they don't rely on previous
  ones having incremented the msg_id a certain number of times.
- The variable already existed in the client struct, but wasn't used. I
  guess it was intended that way but never implemented.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-09-29 12:45:15 -04:00
Michael Zimmermann
0e2e3c2ece net: mqtt_sn: implement predefined topics
Making the assumption, that mqtt_sn_connect does not process any incoming
data allows for this to be a very simple, additional API function instead
of adding more complexity to the connect function. This also means that the
user has to re-add predefined topics upon reconnects which don't reuse the
old session though.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-09-29 12:45:15 -04:00
Frederik Wenigwieser
697e7f6189 drivers: spi: spi_esp32_spim: fix rtio include
Add missing include.

Signed-off-by: Frederik Wenigwieser <zephyr@frederik.at>
2025-09-29 12:44:59 -04:00
Bartosz Miller
b60633b3a6 drivers: i2c: Extend i2c testing on nrf54h20 PPR
Enable all possible i2c tests on CPUPPR

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2025-09-29 12:44:50 -04:00
Pablo Bacho
7c175a1664 drivers: i2c: stm32: make transfer timeout configurable
Make the STM32 I2C transfer timeout configurable via Kconfig.

- Add CONFIG_I2C_STM32_TRANSFER_TIMEOUT_MSEC Kconfig symbol.
- Use this Kconfig value in both STM32 I2C drivers.

Tested on STM32WBA55CG.

Fixes: #95819

Signed-off-by: Pablo Bacho <pablobacho@gmail.com>
2025-09-29 12:44:39 -04:00
Daniel Leung
ed0b5605d4 tests: boards: intel_adsp/smoke: update to use new IPC API
This updates the Intel Audio DSP smoke test to use the new
IPC API based on IPC message service. The old API is still
being tested for now until all users of the old API has
moved to the new one.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-09-29 12:42:00 -04:00
Daniel Leung
cf7e2e63c1 soc: intel_adsp: rework host IPC using IPC service
This reworks the Intel audio DSP host IPC driver as a backend of
the IPC service. This is the first step to rework IPC in SOF
(Sound Open Firmware) into using a more generic IPC API instead
of a SoC specific one.

For now, it keeps the old interface to maintain usability
as it is going to be a multiple process to rework IPC
over there.

Also, the structure of the new IPC backend resembles
the SoC specific driver to make it easier to compare
between them at this first iteration. Future optimizations
will probably be needed once we start modifying the SOF
side to utilize the IPC interface.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-09-29 12:42:00 -04:00
Daniel Leung
ec28731c39 tests: boards: intel_adsp/smoke: adds ACE boards
This adds ACE boards to the allowed platforms so they can
be tested.

Note that this only adds boards that I have tested to run
correctly with the tests.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-09-29 12:42:00 -04:00
Daniel Leung
6a72cc5435 tests: boards: intel_adsp/smoke: threshold for CPU timing test
The 4th CPU test tries to gauge tight loop performance. However,
it has been observed occasionally that the calculated would go
over just a bit. The threshold was 3, and the observed ratio
has been bouncing between 2.9 and 3.1. So up the threshold
a little bit to account for that.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-09-29 12:42:00 -04:00
Daniel Leung
2afa46d84b tests: boards: intel_adsp/smoke: no CPU halt for ACE
On ACE, the CPU halting requires the cooperation of the PM
subsys to set the CPU to SOFT_OFF. The mechanism has not
been implemented in the smoke test. So skip the halting test
on ACE for now.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-09-29 12:42:00 -04:00
Daniel Leung
ae8ab19dcf tests: boards: intel_adsp/smoke: remove IPC for CPU test
The IPC is only needed for old hardware earlier than CAVS 2.5.
They are no longer supported in the tree as their board configs
have been removed. So there is no need to do IPC anymore.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-09-29 12:42:00 -04:00
Daniel Leung
d910306fd0 soc: intel_adsp: remove IDC dt default for CONFIG_INTEL_ADSP_IPC
The SoC specific IPC driver is for host IPC, and not IDC (which
is between CPUs). So there is no need to use the IDC devicetree
binding to enable the kconfig.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-09-29 12:42:00 -04:00
Daniel Leung
0b3b6f30a3 ipm: remove the Intel Audio DSP CAVS host IPM driver
This IPM driver is not being used by SOF and is there simply for
a test which does not provide much additional value compared to
the existing host IPC tests. That IPM specific test has been
removed so there is no need to keep this driver in the tree.
This is in preparation to rewrite the host IPC driver to utilize
the IPC API. There is no need to maintain another driver that is
not being used in SOF.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-09-29 12:42:00 -04:00
Daniel Leung
28a0d90b46 tests: boards/intel_adsp/smoke: remove IPM test
This removes the IPM test from the intel_adsp smoke test.
The IPM driver is not being used by SOF and is there simply
for this test. The host IPC functionality is also being tested
via test_host_ipc. The additional usage of mailbox in the test
does not provide much value since the mailbox is shared memory
between the DSP and the host. We would have bigger problems if
the shared memory does not work properly.

Removing the test is in preparation to removing the CAVS host
IPM driver. That is also a preparation to rewrite the host IPC
driver to the IPC API, and there is no need to maintain
another host IPC driver that is not used by SOF.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-09-29 12:42:00 -04:00
Lee Trager
e876dee6f2 arch: riscv: Move reg_read()/reg_write() into userspace test
Various drivers have their own static versions of reg_read()/reg_write().
When building for riscv the macros conflict with the driver function
causing compiler failures. Prefix them with riscv_ to avoid conflict
and move them into the unit test which is the only place they are
used.

Signed-off-by: Lee Trager <lee@trager.us>
2025-09-29 12:41:30 -04:00
Gerard Marull-Paretas
4b4dcbbf4a drivers: dma: sf32lb: add initial driver
Add an initial driver for SiFli SF32LB DMAC DMA controller.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-09-29 12:40:15 -04:00
Gerard Marull-Paretas
7e0df361c9 dts: arm: sifli: sf32lb52x: define dmac
Add node for DMAC.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-09-29 12:40:15 -04:00
Gerard Marull-Paretas
5bb6741c67 dts: bindings: dma: add sifli,sf32lb-dmac
Add binding for SiFli SF32LB DMAC DMA controller. Also add defines for
configuring `dmas` cells (requests and config fields).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-09-29 12:40:15 -04:00
Pieter De Gendt
5b2e2afbdc drivers: display: st7701: Add PM actions
Add resume/suspend power management actions.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-09-29 12:39:47 -04:00
Sebastian Bøe
7c9275c891 soc: nordic: uicr: Add support for uicr.PROTECTEDMEM
Add support for PROTECTEDMEM.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2025-09-29 12:39:33 -04:00
Sebastian Bøe
9f45d2ccd7 soc: nordic: uicr: Add support for uicr.SECONDARY.PROCESSOR
Add support for uicr.SECONDARY.PROCESSOR.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2025-09-29 12:39:33 -04:00
Håvard Reierstad
da06e84995 Bluetooth: Host: bsim: Add fixed L2CAP chan test
Adds a testcase to the send on connect test for sending data over a
user-defined fixed L2CAP channel.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2025-09-29 12:38:19 -04:00
Håvard Reierstad
ff17e601d0 Bluetooth: Host: Add userdefined fixed l2cap chans
Adds support for the user defining their own channels within the
fixed L2CAP channel range. To make this possible, the
`bt_l2cap_fixed_chan` struct and `BT_L2CAP_CHANNEL_DEFINE` macro
needed to converted to public API. In the process of doing so, the
`_destroy` parameter was removed from the `BT_L2CAP_CHANNEL_DEFINE`
macro as it was never used (fixed channels will not be destroyed over
the lifetime of the connection). `BT_L2CAP_CHANNEL_DEFINE` is renamed
`BT_L2CAP_FIXED_CHANNEL_DEFINE` to avoid confusion

The `bt_l2cap_chan_send` function is updated to be able to send data
on fixed l2cap channels.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2025-09-29 12:38:19 -04:00
Emil Gydesen
881a24270c Bluetooth: BAP: Rename and fix bt_bap_is_x_ep
Rename the bt_bap_is_x_ep functions to better match the
modules where they are implemented.

Additionally modify the check to use IS_ARRAY_ELEMENT
in the broadcast sink and source for a stricter check.
IS_ARRAY_ELEMENT cannot easily be used in the unicast
client and server, as the endpoints are part of another
structure.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-29 12:38:06 -04:00
Emil Gydesen
6c1cd61792 Bluetooth: BAP: Add missing check for unicast server ep
We check for all other roles when checking whether
an endpoint can send or receive, except for the unicast server.
It is technically implied, but if the ep is not a valid pointer,
then we may access invalid memory.

Add check for bt_bap_ep_is_unicast_server (which uses the new
bt_ascs_has_ep function).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-29 12:38:06 -04:00
Alberto Escolar Piedras
9669cc3402 board native_sim: Test sys_reboot and hw_info reporting the reset cause
Add a test of the CONFIG_NATIVE_SIM_REBOOT functionality together
with the hw_info get_reset_cause() logic.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-09-29 12:37:47 -04:00
Tim Pambor
6e048bc068 drivers: hwinfo: native: report reset cause
Support reporting the reset cause for native_sim. The default is to
report POR (Power-On Reset). If CONFIG_NATIVE_SIM_REBOOT was enabled and
the system is rebooted using sys_reboot(), the reset cause is set to
SOFTWARE.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-09-29 12:37:47 -04:00
Tim Pambor
30e5ea0b3f native_simulator: Get latest from upstream
Align with native_simulator's upstream main
4eab13716376e63236d77013f996a897d24dd780

Which includes:
4eab137 Host trampolines: Add getenv/setenv

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-09-29 12:37:47 -04:00
Seppo Takalo
cc4e1d9946 samples: net: cellular_modem: Use static event handler
Use statically registered event handler.
Otherwise we might get stuck waiting for event that has already
happened.

Network events are not keeping the state.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-09-29 12:37:36 -04:00
Felipe Torrezan
74380310de cmake: sca: iar: Add IAR C-STAT
This commit adds support for IAR C-STAT Static Analysis
in the Zephyr's SCA Framework.

By specifying -DZEPHYR_SCA_VARIANT=iar_c_stat in west, a SQLite
database file will be generated under build/sca/iar_c_stat.

Signed-off-by: Felipe Torrezan <felipe.torrezan@iar.com>
2025-09-29 12:37:25 -04:00
Krzysztof Chruściński
c02f904a57 tests: boards: nrf: dmm: Add stress test
Add stress test which validates that allocator is thread safe
and has no memory leaks.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-09-29 12:36:47 -04:00
Krzysztof Chruściński
3d3104207c tests: boards: nrf: dmm: Extend test coverage
Extended test to check usage stats and longer buffer alloc.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-09-29 12:36:47 -04:00
Krzysztof Chruściński
d10ee98ee8 soc: nordic: common: dmm: Add optional usage stats
Add support for getting usage statistics for DMM.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-09-29 12:36:47 -04:00
Krzysztof Chruściński
8cc4da31ca tests: boards: nrf: dmm: Align test to changes in DMM
Align to API changes.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-09-29 12:36:47 -04:00
Krzysztof Chruściński
decdb30b05 soc: nordic: common: dmm: Optimize by using a micro heap
Add micro heap implementation which is using one or more 32 bit masks
to allocate quickly blocks. It is significantly better than using
sys_heap. Difference is especially big on RAM3 heap because heap
control data is in RAM3 space so operations there were extremely
slowly (15 us to allocate a buffer).

Simplified implementation of the heap requires DMM API change as
release functions need to know the length of the allocated buffer as
simple heap requires that (buffer address is enough for the standard
heap).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-09-29 12:36:47 -04:00
Krzysztof Chruściński
ff3e0180ad soc: nordic: common: dmm: Optimize memcpy
Default memcpy used in zephyr is not optimized and performs simple
byte by byte copying. Using double word or word access can significantly
reduce copying time especially for RAM3 (slow peripheral RAM).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-09-29 12:36:47 -04:00
Krzysztof Chruściński
f06e05097f tests: boards: nrf: dmm: Add timing measurements
Add timing measurement to the test to allow DMM profiling.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-09-29 12:36:47 -04:00
Tim Pambor
6633ed5782 logging: Disable used but marked unused warning
Clang's -Wused-but-marked-unused warns when variables marked as
__unused are actually used. Logging macros can trigger this warning
depending on CONFIG_LOG_* settings, leading to noisy builds.

This change suppresses those warnings, allowing the warning flag to
be used alongside logging functionality.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-09-29 12:36:15 -04:00
Emil Gydesen
f00dd19a79 doc: Bluetooth: Update CAP Commander status
Update the CAP commander status to being feature complete with
BSIM test after implementing the last missing procedures
(Handover).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-29 12:36:00 -04:00
Emil Gydesen
55a72f6103 Bluetooth: CAP: Implement broadcast to unicast handover
Implement the broadcast to unicast handover procedure,
as per the Bluetooth CAP specificiation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-29 12:36:00 -04:00
Andrew Featherstone
d7176c729a tests: kernel: gen_isr_table: Add support for hazard3
Extend the gen_isr_table test to support the Hazard3 cores on the
RP2350A. This allows some testing when building and running using flash,
but it seems like Twister builds with different flags. It's unclear if
this is intended or not.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-09-29 12:30:28 -04:00
Andrew Featherstone
b0b58e445b boards: pico_plus2: Add initial support for the Hazard3 cores
As with the initial board support, only a single Hazard3 core is
available for use.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-09-29 12:30:28 -04:00
Andrew Featherstone
e22935da51 tests: rp2350: hazard3: Extend tests to support the Hazard3 core
All tests should pass using both the Cortex-M33 and Hazard3 core.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-09-29 12:30:28 -04:00
Andrew Featherstone
29b3ba55d8 samples: rp2350: hazard3: Extend test to the Hazard3 core
All samples should pass on both the Cortex-M33 and the Hazard3 core.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-09-29 12:30:28 -04:00
Andrew Featherstone
1776d69ce8 boards: rp2350: Correct comments to reflect Hazard3 support
Now that there's support for the Hazard3 cores these comments are
incorrect. Remove them.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-09-29 12:30:28 -04:00
Andrew Featherstone
e7cd7e4f2d soc: rp2350a: Extend tests and samples for the Hazard3 cores
All the samples and tests are applicable to both the Cortex-M33 and
Hazard3 cores, so most of these additions are thin shims.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-09-29 12:30:28 -04:00
Andrew Featherstone
20aedb9fe3 boards: rpi_pico2: Add initial support for Hazard3 cores
Update Kconfig.rpi_pico2, add a new .dts and associated files to support
building an image targeting the RP2350A on the Raspberry Pi Pico 2 which
excutes on the Hazard3 core(s).

Tested using
```
west build -p -b rpi_pico2/rp2350a/hazard3 .\samples\hello_world
```
and programming onto the board using the generate .uf2 file, which gives
the following example output:
```
*** Booting Zephyr OS build v3.7.0-5943-g2db5e4dec7bd ***
Hello World! rpi_pico2/rp2350a/hazard3
```

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-09-29 12:30:28 -04:00