Commit graph

16700 commits

Author SHA1 Message Date
Andrej Butok
8f2f97ce32 tests: littlefs: fix large partition mounting
Fixes a large partition mounting error
for flashes with erase size > 32KB
(e.g. s26ks512s0 has 256KB erase size).

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-07 15:18:30 +02:00
Emil Dahl Juhl
1a3dd63dde drivers: sensor: ti: opt3001: add trigger support
The ti,opt3001 ambient light sensor is capable of asserting its interrupt
gpio upon conversion completion. The interrupt gpio can then be used to
trigger a reading of the conversion result automatically.
Due to this, it makes sense for the driver to implement the sensor trigger
functionality.

Add a devicetree property, int-gpios, to the ti,opt3001 bindings to allow
describing the gpio used for getting interrupts from the ti,opt3001.

Implement the sensor trigger functionality with options for using the
global worker thread or letting the ti,opt3001 create its own thread for
servicing the interrupts.
In both cases, when an interrupt is received the driver will read a new
measurement from the chip and clear the interrupt. The sample is then ready
to be read by the user of the sensor.

When manually triggering a sample_fetch, the trigger handler is not
invoked.

Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
2025-04-07 15:18:21 +02:00
Samuel Chee
5b7d1e4129 boards: arm: mps2: add pinctrl support for mps2 board
Migrates mps2 targets away from the pinmux driver to
the new pinctrl driver.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-04-07 15:18:10 +02:00
Remi Buisson
9dc3b757cc dts: bindings: sensor: Add invensense icp201xx properties
Add I2C and SPI variants for icp201xx.

Signed-off-by: Remi Buisson <remi.buisson@tdk.com>
2025-04-07 15:17:44 +02:00
Anas Nashif
5c8cf1c18c tests: fix various test ids and use existing scheme
Fix IDs and match them to what we have in the MAINTAINERS file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-07 11:22:36 +02:00
Anas Nashif
65551f2a99 tests: move NRFS tests under tests/boards/nrf
This is not a Zephyr subsystem. It is unique to NRF.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-07 11:22:36 +02:00
Frank Bintakies
bda045940e boards: kws: Add support for KWS Pico-SPE Boards
Add support for KWS Pico-SPE based on
Raspberry Pi RP2040

Add support for KWS Pico2-SPE based on
Raspberry Pi RP2350

Signed-off-by: Frank Bintakies <fbintakies@kws-computer.de>
2025-04-07 09:59:19 +02:00
Jordan Yates
7a6f0a4928 tests: timer: validate K_TIMEOUT_ABS_SEC
Validate that `K_TIMEOUT_ABS_SEC` works the same way as the other
absolute timeout construction macros.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-07 07:28:00 +02:00
Paul Timke Contreras
9c5abb35b5 tests: drivers: build_all: sensor: i2c.dtsi fix address typo
The address of the last i2c device in the build all test has a wrong
address. This fixes that typo.

Signed-off-by: Paul Timke Contreras <ptimkec@live.com>
2025-04-04 21:17:09 +02:00
Yuval Peress
ba9b4f3734 ztest: Fix confusing SKIP log
When CONFIG_ZTEST_FAIL_ON_ASSUME is set, a failed assumption will
cause the suite to fail, but the individual test will be marked as
SKIPPED. We should fail the test so it's clear what's going on.

Fixes #86611

Signed-off-by: Yuval Peress <peress@google.com>
2025-04-04 21:16:34 +02:00
Ivan Wagner
b5adb4457c drivers: sensor: meas: ms5837 supporting 02 and 30 variants via dt
This patch adds support via dt compatible property.

Signed-off-by: Ivan Wagner <ivan.wagner@tecinvent.ch>
2025-04-04 21:16:20 +02:00
Peter Mitsis
5c36567c56 tests: Add benchmark for IPI performance
Adds tests to better gauge IPI performance on SMP. In each case, one
CPU is used as the source of IPIs while the remaining CPUs are busy
doing "work". Every 30 seconds the benchmark reports on the amount
of "work" done by the busy CPUs and the amount of work done by the
CPU generating the IPIs.

This can be used to ...
 1. Show how enabling IPI optimization affects system performance
 2. Show the cost of spinlock contention as the number of CPUs increase
 3. Measure the relative performance of scheduler changes on SMP.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-04-04 21:15:14 +02:00
Andrej Butok
d4682ff5c9 tests: littlefs: fix test_lfs_basic for medium and large partitions
Fixes failed test_lfs_basic for medium partition > 960KB
and for large partition > 3MB.
Flashes with large erase size require larger test partition sizes
(e.g. s26ks512s0 has 256KB erase size).

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-04 18:17:48 +02:00
Lyle Zhu
00ffb5ba97 Tests: Bluetooth: Classic: Bumble power_on() will fail on Linux
On Linux, the function `power_on()` of Bumble will fail when executing
even-numbered test cases.

From the `btmon` log, the controller will not reply the `HCI Command:
Reset` when the issue occurs.

Add a try-except to catch the exception of the function `power_on()`,
and retry to call the function `power_on()` until issue no longer
occurs. Or, the test will fail due to the timeout.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-04 14:56:48 +02:00
Peter Mitsis
83f877ae4b tests: intel_adsp/test: Disable test logging defaults
Disables test logging defaults for the intel_adsp/ssp as it
has been found that when they are enabled they interfere
with the proper functioning of the test.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-04-04 07:42:44 +02:00
Peter Mitsis
1df4f6b6b5 tests: intel_adsp/ssp: Improve error checking
Improves error reporting in the intel_adsp/ssp test so that
errors are caught and flagged by the test infrastructure.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-04-04 07:42:44 +02:00
Jun Lin
5e54a64060 tests: kernel/sleep: exclude npcx platforms from the test
According the specification, in extreme cases, the deviation of the APB
clock and LFCLK clock can reach up to +/-1% (+/- 10ms).
Therefore, exclude npcx platforms from the test because it required 1ms
accuracy.

fixes: #66185

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2025-04-04 07:42:30 +02:00
Andrew Featherstone
f289e47ca5 docs: raspberrypi: Avoid abbreviating to RPi
Prefer to use more descriptive terms.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-04-03 15:27:50 -07:00
Emilio Benavente
26a2478c24 tests: drivers: i2s: Added I2S Testing for RW612
Added Internal pin connection for
I2S Loopback testing when I2S is enabled.
Added I2S testing support for RW612.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2025-04-03 21:06:14 +02:00
Tom Hughes
11e3aa8952 tests: mgmt: mcumgr: Disable clang warning
When building with clang it reports:

tests/subsys/mgmt/mcumgr/settings_mgmt/src/main.c:69:22: error: variable
'test_response_read_data_start' is not needed and will not be emitted
[-Werror,-Wunneeded-internal-declaration]
static const uint8_t test_response_read_data_start[5] = {
                     ^
tests/subsys/mgmt/mcumgr/settings_mgmt/src/main.c:73:22: error: variable
'test_response_read_data_end' is not needed and will not be emitted
[-Werror,-Wunneeded-internal-declaration]
static const uint8_t test_response_read_data_end[1] = {
                     ^

The values of test_response_read_data_start and
test_response_read_data_end are not actually used anywhere in the tests.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-04-03 21:06:02 +02:00
Riadh Ghaddab
e8e7290aba tests: zms: decrease verbosity
disable by default the LOG_DBG messages

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2025-04-03 17:48:09 +02:00
Dmitrii Golovanov
315ff5dadc tests: logging: logging.thread: add missed LF in logs
Add missed line feed chars at the test's output to fix Ztest's
following status messages corrupted.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-04-03 13:16:26 +02:00
Dmitrii Golovanov
125de99433 tests: logging: logging.thread: fix Ztest log corruption
Flush test log messages before waiting for the processing
thread to avoid delayed log output messing with the Ztest's
log output on the test complete.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-04-03 13:16:26 +02:00
Dmitrii Golovanov
fc2ea3027d tests: logging: logging.thread: fix race condition
Fix race condition in tests/subsys/logging/log_core_additional
logging.thread test configuration released semaphore before
log message output.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-04-03 13:16:26 +02:00
Matthias Hauser
941a5489d3 dts: boards: we: add board Ophelia-IV
add new board Ophelia-IV

Signed-off-by: Matthias Hauser <matthias.hauser@we-online.de>
2025-04-03 13:16:05 +02:00
Krzysztof Chruściński
24c01a99c9 tests: drivers: uart: uart_pm: Disable device runtime PM
Explicitly disable device runtime PM since this test is expecting
it to be disabled and there are SoC now that turns on it by default.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-04-03 11:07:55 +02:00
Sai Santhosh Malae
9594af85f0 drivers: dma: siwx91x: Enable scatter-gather transfer support
Implement support for scatter-gather DMA transfers in the siwx917 driver.
This enhancement allows the driver to handle multiple non-contiguous memory
buffers in a single DMA transaction

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-04-03 11:07:12 +02:00
Sai Santhosh Malae
ab57d54bb0 drivers: dma: siwx91x: Fix burst length processing
1. Corrected the burst length processing to be handled in bytes
   for the siwx917 DMA drivers.
2. Removed overlay and configuration files associated with the
   chan_blen_transfer test application. The chan_blen_transfer
   test application attempted to use 8 and 16 byte bursts, which
   are not supported by the siwx91x UDMA.

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-04-03 11:07:12 +02:00
Lyle Zhu
eba356d56b Bluetooth: shell: Support HFP HF and AG
Support HFP HF and AG in shell.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-03 06:24:32 +02:00
Jilay Pandya
d18f49132c drivers: stepper: refactor enable(dev,flag) to enable & disable
refactoring enable function into enable and disable increasing readability
and increasing coherence with other stepper apis in terms of
nomenclature

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-04-03 00:03:29 +02:00
Martin Hoff
cb9c27e7ad tests: driver: uart: add xg23_rb4210a board overlay
Add xg23_rb4210a board overlay to test asynchronous api with eusart
driver

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-04-02 13:04:19 +02:00
Andrej Butok
172811b69c tests: nvs: allow to build & run on real platforms
- Allows to build and run NVS tests on real platforms.
- Enables NVS tests designed for a flash-simulator only when
  built for qemu_x86, mps2_an385 or native_sim targets.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-02 12:55:33 +02:00
Andrej Butok
a12f71d5e5 tests: littlefs: fix test_fs_mkfs_custom littlefs_init_cfg() fail
Fixes the littleFS test_fs_mkfs_custom test fail
in littlefs_init_cfg(): "erase size must be multiple of write size".
It happens for platforms with erase size < 2*write size (e.g. lpc55s).

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-02 12:55:18 +02:00
Andrej Butok
b477a60a9c tests: littlefs: fix false negative test_lfs_basic
Fixes the false negative littlefs.test_lfs_basic test that can occur
if the small_partition size > 64KB, and for
platforms with CONFIG_FS_LITTLEFS_PROG_SIZE > 64 (e.g. lpc55s, mcxn).

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-02 12:55:12 +02:00
Jeppe Odgaard
0dffe7cc7e drivers: dac: Add TI DAC161S997 driver
Initial DAC driver for TI DAC161S997. This is a 1 channel 16 bit
DAC designed for 4-20 mA loops.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-04-02 12:53:03 +02:00
Quang Le
da076a9924 drivers: gpio: Add support for RZ/T2M
Add GPIO driver support for RZ/T2M

Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
2025-04-02 12:52:54 +02:00
Mohith Potluri
c1edfbcf4b drivers: reset: Add generic reset MMIO driver
Introduce a generic reset MMIO driver to be used for devices with a
single memory mapped reset bit required to take them out of reset.

Signed-off-by: Mohith Potluri <saimohith@google.com>
2025-04-02 10:31:12 +02:00
Luis Ubieda
662b75b32a tests: pat9136: Add node to Build-All test
Enabled for basic functionality.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-04-02 05:29:23 +02:00
Nicolas Pitre
ea7a969204 tests: benchmarks: sys_kernel: add k_malloc() test
Useful to evaluate malloc performance changes.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-04-01 22:13:04 +02:00
Konrad Sikora
8ad2cac1b5 drivers: sensor: Add support for LTR329 sensor
Add support for Liteon LTR329 Digital Ambient Light Sensor

Signed-off-by: Konrad Sikora <kontakt@konradsikora.pl>
2025-04-01 22:12:01 +02:00
Konrad Sikora
85e9cef24e drivers: sensor: Change vendor prefix from 'ltr' to 'liteon'
The vendor prefix has been changed from 'ltr' to 'liteon'.
This change is made to better reflect the actual name of
the vendor, which is LiteOn. The previous prefix 'ltr'
was referring to the LiteOn Optical Sensor family, which
could lead to misunderstandings.

Signed-off-by: Konrad Sikora <kontakt@konradsikora.pl>
2025-04-01 22:12:01 +02:00
Johan Hedberg
39c2605930 Bluetooth: Fix deadlock with settings and bt_hci_cmd_send_sync()
We can't do synchronous HCI command sending in any settings commit()
callback, since we don't know what context the callback is being called
from. One particular deadlock can happen if settings_load() is called from
the preemptible main thread:

main()
 |--> settings_load() (aquire settings_lock mutex)
       |-->commit callback A that defers to system wq
       |-->commit callback B that calls bt_hci_cmd_send_sync()

system wq from the previous deferral from within settings_load():
 |--> work item
       |--> settings_save_one()
             |--> attempt to aquire settings_lock mutex

In the above scenario, the bt_hci_cmd_send_sync() call from the main thread
depends on the system workqueue being processed (since that's what does HCI
command processing by default), while at the same time holding the settings
subsystem's mutex. At the same time, a system wq item tries to store
something into settings, however it deadlocks waiting for the settings
mutex.

The actual scenario that we have in the Bluetooth subsystem is where
"commit callback A" is commit_settings() in host/settings.c, and "commit
callback B" is keys_commit() in host/keys.c.

The solution to the deadlock is to take advantage of deferred bt_id_add()
handling which already exists, i.e. set a flag and deferre the actual
adding to the system workqueue.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-04-01 16:28:00 +02:00
Ryan Chu
c9240cc99f bluetooth: host: Report status of Channel Sounding complete events
If the HCI status of a complete event is not BT_HCI_ERR_SUCCESS,
the remaining parameters could be invalid.

In this case, the params is passed as NULL pointer to the callbacks.
- LE CS Read Remote Supported Capabilities Complete event
- LE CS Read Remote FAE Table Complete event
- LE CS Config Complete event
- LE CS Security Enable Complete event
- LE CS Procedure Enable Complete event

This change avoids forwarding the invalid fileds to the applications.

Signed-off-by: Ryan Chu <ryan.chu@nordicsemi.no>
2025-04-01 16:26:58 +02:00
Ryan McClelland
19c2c33be6 tests: drivers: spi: add build all for cadence spi
As there is no currently known board that has the cadence spi,
add a test to just build it under the qemu cortex m3.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-04-01 16:26:38 +02:00
Håkon Amundsen
1fac1b917f boards: nordic: add 'iron' board variant
This is needed for next generation Secure Domain firmware.

Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
2025-04-01 11:54:30 +02:00
Tom Hughes
785e36520f tests: subsys: usb: bos: Remove dummy_descriptor struct
When building with clang, it warns:

tests/subsys/usb/bos/src/test_bos.c:24:22: error: variable
'dummy_descriptor' is not needed and will not be emitted
[-Werror,-Wunneeded-internal-declaration]
static const uint8_t dummy_descriptor[] = {
                     ^

Only the size of dummy_descriptor is used, not the contents. Replace the
struct with a constant for the size.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-04-01 11:54:20 +02:00
Andrej Butok
efbe756b62 tests: ext2: reduce ram disk size for small.overlay
- Reduces the ram disc sector count from 400 to 220.
- Saves about 90KB of RAM. All tests still passed.
- Allows platforms with less RAM to run
  the ramdisc_small.overlay test.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-01 11:52:34 +02:00
Declan Snyder
2eb8cfb7f5 tests: spi_loopback: Fix synchronization mistakes
There are a couple things going wrong in this test code right now.

First of all, there is no syncrhonization of when the async polling
thread should start polling, causing sometimes the poll to fail on tests
before the async test ran. Add a semaphore to fix this.

The lock test was setting up a nonsense NOP transfer of 0 length.
This might cause unexpected behavior and is not the point of
this test case.
But, still we should add a seperate test case specifically for
testing this instead.

Also add a teardown function to release the locks to allow other test
cases to run in case of some failures.

Also a minor change to remove some ARG_UNUSED invocations for some
arguments that are actually used.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-01 04:15:31 +02:00
Emil Gydesen
26e74f75b6 tests: Bluetooth: Tester: Fix typo in PBP announcement
Fixes typo in the event name.
Changes the struct to also use _ev instead of _rp as it
is an event and not a response.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-31 19:48:25 -04:00
Aleksandr Khromykh
69c5c6f40e Bluetooth: Mesh: make corresponding group ID unique
Commit fixes bug when corresponding group ID was never
incremented for independent corresponding relationships.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2025-03-31 22:01:11 +02:00