Commit graph

16700 commits

Author SHA1 Message Date
Nicolas Pitre
e1eead3925 ring_buffer: shrink size of struct ring_buf
Make struct ring_buf 12 bytes smaller by default. This comes with a 32KB
buffer size limit which covers almost all cases. The previous limit of
2GB can be restored with CONFIG_RING_BUFFER_LARGE=y.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-03-11 08:59:05 +01:00
Emil Gydesen
9d4cc4b49b Bluetooth: BAP: Add a set of suggested intervals to use with BAP
Add a selection of interval values that are suitable for BAP,
which will allow better coexistence between ISO and ACL,
for both broadcast and unicast. Some of these are defined
by the BAP spec, and some are defined by Zephyr, since they
do have a suggested value from BAP.

Samples and tests have been updated to use these new values.
Peripheral samples have also been updated with
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS so that the connection
parameters from the centrals aren't updated to something else
shortly after.

The shell has also been updated to use the LE Audio (BAP) values
if audio is enabled, and the audio.conf file has disabled automatic
updating of the connection parameters as the peripheral, as we rarely
(if ever) want to do that.

Due to the connection interval change, CI hit an issue
with test_bass_broadcast_code in test_main_client_sync, where
the reading of the long receive state did not finish before we
attempted to do another procedure, so the function was updated to have
a retry.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-11 08:58:51 +01:00
Luis Ubieda
052c76b71e tests: icm45686: Add node to Build-All test
Only supported for SPI so far.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-03-11 05:37:06 +01:00
Helmut Lord
a90f9991cc tests: utils: lib: cobs tests
Adds tests for COBS util.

Signed-off-by: Helmut Lord <kellyhlord@gmail.com>
2025-03-11 05:36:49 +01:00
Gerard Marull-Paretas
766bfe7b2e device: introduce struct device_ops
Instead of passing a single init function, create
struct device_ops with the init function inside. This allows to easily
extend device's capabilities in the future without too much breakage,
e.g. to add a de-init call.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-03-10 21:32:40 +01:00
Gerard Marull-Paretas
3f6add69da init: drop device union from struct init_entry
Such union is rather redundant, considering a simple const cast can be
done when initializing the init entry. Note that the init_entry does not
need to be touched now that struct device stores the init call. It is
merely an init entry sorted by linker scripts, so we can intertwine
devices and SYS_INIT.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-03-10 21:32:40 +01:00
Gerard Marull-Paretas
a0a907c90e device: store init function in struct device
Preparation work for device init/de-init functionality.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-03-10 21:32:40 +01:00
Gerard Marull-Paretas
9b5083bb89 init: drop anonymous union
It just complicates things. It is not C99 strandard, and since C11 is
not mandatory, it is better to play safe here.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-03-10 21:32:40 +01:00
Christoph Seitz
80649dadd3 tests: net: ieee802154: Fix sockaddr_ll protocol handling in tests
Convert all sll_protocol fields to use network byte order in the tests.

Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
2025-03-10 15:02:38 +01:00
Christoph Seitz
5340fa49a7 tests: net: socket: Add recvfrom addr validation
Add address length validation and expected source address
checks in packet socket tests.

Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
2025-03-10 15:02:38 +01:00
TOKITA Hiroshi
70fc4a3e57 boards: pimoroni: pico_plus2: Add Pimoroni Pico Plus2 board
Pinoroni Pico Plus2 is an RP2350B based board that has
more rich I/O, RAM, and Flash than the original Raspberry Pi Pico2.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-03-10 11:20:30 +01:00
Khoa Nguyen
47655aa236 tests: drivers: uart: Add support uart_async_api for RA2
Add support uart_async_api for Renesas ek_ra2l1, ek_ra2a1

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-03-10 11:12:20 +01:00
Henrik Brix Andersen
63c24d9d34 soc: neorv32: update to support NEORV32 v1.11.1
Update the NEORV32 SoC, peripheral drivers, and board to support NEORV32
v1.11.1. Notable changes include:

- Optional RISC-V ISA Kconfigs are now selected on the board level.
- Peripheral registers are now automatically reset in hardware, no need for
  software initialization code.
- The NEORV32 GPIO controller now supports 32 pins, not 64. Interrupt
  support will be submitted in a separate PR.
- Default board configuration has 64k RAM and is clocked at 18 MHz.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-03-10 11:11:22 +01:00
Camille BAUD
77dae8bf3c tests: drivers: Introduce Sitronix ST7567 Test
Introduce Sitronix ST7567 Test

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-03-10 11:10:48 +01:00
Graham Wacey
fb620ef59c tests: bluetooth: tester: Implement BAP/BSRC/SCC/BV-38-C
- Make ext_adv and per_adv into arrays for multiple BIGs
 - Create bap_broadcast-source_setup_v2 command
  - Handles broadcast_id as an input

Signed-off-by: Graham Wacey <graham.wacey@nordicsemi.no>
Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
2025-03-10 11:09:57 +01:00
Alberto Escolar Piedras
ab7a6de5bb drivers/counter/counter_native_sim: Rename from counter_native_posix
Including renaming the DTS binding and kconfig options
deprecating the old one.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-10 06:52:37 +01:00
Alberto Escolar Piedras
659af7280a tests: Stop using native_posix/sim transitional headers
As native_posix has been removed, these tests do not need to support
anymore both native_sim and _posix targets, so we can stop using
the transitional headers, and APIs.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-08 08:46:34 +01:00
Alberto Escolar Piedras
4338122248 drivers entropy: fake_entropy_native_posix rename to _native_sim
Rename the driver files, binding and kconfig options, while deprecating
the old binding and kconfig options.

Uses in tree are replaced.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-08 03:38:13 +01:00
Jari Tervonen
3b1e60da90 lib: posix: Fix NULL pointer to strcmp in posix mqueue.
When a queue has been unlinked but not removed the name pointer is set to
NULL. The queue is still in the list when adding new queues and the name
pointer is passed to strcmp.

Signed-off-by: Jari Tervonen <jari.tervonen@nordicsemi.no>
2025-03-08 03:37:48 +01:00
Krzysztof Chruściński
8ce291dfd8 tests: drivers: counter: basic_api: Fix failing build
nrf52_bsim target was failing to compile when ZLI configuration
was used. This target should never be used for that configuration
because:
- bsim does not support Zero Latency Interrupts
- this configuration is strictly for nrf52840dk (dedicated overlay)

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-03-08 03:37:04 +01:00
Jilay Pandya
11d1a9033f tests: stepper: build-all sort entries alphabetically
sort stepper driver entries alphabetically‚

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-03-07 21:29:31 +01:00
Jukka Rissanen
c53d02439b tests: net: dns: Add tests for joining mDNS multicast group
Make sure that if mDNS resolver is enabled, we join the mDNS
multicast group so that query responses can be received.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-07 20:28:03 +01:00
Peter Mitsis
abb5f11134 tests: Update ipi_optimize for x86_64 directed IPIs
Updates the ipi_optimize test to use 4 CPUs for qemu_x86_64.
This provides enough CPUs for the test to verify the recently
added directed IPI support for x86_64.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-03-07 20:22:40 +01:00
Carlo Kirchmeier
4eb917f884 test: net: http: Add compression support in HTTP server
Add tests verifying the functionality of the newly added
accept-encoding based compression support.

Signed-off-by: Carlo Kirchmeier <carlo.kirchmeier@zuehlke.com>
2025-03-07 20:19:44 +01:00
Jilay Pandya
1f1bec86f3 drivers: stepper: shell: add stop function
Add stop function to stepper shell. align the function order to match
the one in __subsystem stepper_driver_api struct

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-03-07 20:17:38 +01:00
Alberto Escolar Piedras
78f800642a drivers/ethernet/eth_native_posix: Rename to eth_native_tap
Rename this driver to eth_native_tap, including renaming all its
options.
The old options remain until v4.4, but as deprecated.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-07 20:10:38 +01:00
Jukka Rissanen
33cf7dc78a net: http: server: The detail length of wildcard detail was wrong
The path length of the detail resource was not set properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-07 20:03:27 +01:00
Troels Nilsson
8373f19bc2 Bluetooth: Controller: Add tests covering ticker without remainder support
Update Kconfig to not select BT_TICKER_REMAINDER_SUPPORT for nrf54L

Add BSim tests to cover using a ticker without BT_TICKER_REMAINDER_SUPPORT
and expire info enabled

Signed-off-by: Troels Nilsson <trnn@demant.com>
2025-03-07 20:02:49 +01:00
Aksel Skauge Mellbye
b25acabb70 drivers: flash: silabs: Add DMA read support
Enable support for using DMA to read from flash.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-03-07 20:02:26 +01:00
Aksel Skauge Mellbye
dba1c4bbbe drivers: flash: silabs: Add low power write support
Add low-power-write property to MSC device tree node, set
MSC_WRITECTRL_LPWRITE if enabled.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-03-07 20:02:26 +01:00
Aksel Skauge Mellbye
4970e2a196 drivers: flash: silabs: Add DMA write support
Enable support for using DMA to write to flash.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-03-07 20:02:26 +01:00
Aksel Skauge Mellbye
84d97372ff tests: drivers: comparator: Add support for xg24_rb4187c
Enable the gpio_loopback comparator test on xg24_rb4187c.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-03-07 20:02:07 +01:00
Emil Gydesen
44c5c1da3d Bluetooth: Host: Add API for reading LE controller features
The function supports reading multiple controller-based values.
It is effectively a copy of struct bt_dev_le but in a more
application-oriented definition.

It was chosen to keep the features as an array rather than a
64-bit value, as the comparison macros work on arrays and that
there already exists new bits > 64 in the core spec which is not
yet supported by Zephyr.

It is being smoke tested in a generic GATT client test,
as the individual values may depend on several Kconfig options.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-07 19:58:23 +01:00
Alexander Svensen
6d19fc2b86 tests: bluetooth: tester: Make brcst_source_stop synchronous
- Add semaphore to make sure source is stopped before proceeding
- This ensures source can be released after this command is finished

Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
2025-03-07 19:53:44 +01:00
Andrej Butok
b826d46632 tests: zms: allow to build & run on real platforms
- Allows to build and run ZMS tests on real platforms.
- Enables ZMS tests designed for a flash-simulator only when
  built for qemu_x86 or native_sim targets.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-03-07 19:53:27 +01:00
Lars-Ove Karlsson
aad6b6c33e tests: kernel: Fixed disabling of __deprecated macros
When disabling the __deprecated macros in tests/kernel/pipe/deprecated,
the macros was set to ''. For IAR tools this was expanded to '' which
caused a compilation error.

I have replaced them with /* deprecated */ which should work for all
toolchains.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
2025-03-07 19:53:17 +01:00
Johann Fischer
72899645bf tests: udc: expand the list of integration platforms
Add four platforms with unique controllers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-03-07 19:53:08 +01:00
Johann Fischer
eb25101c3b tests: udc: fix the test for controllers with maximum number of endpoints
Do not use FALSE_EP_ADDR in API calls to enable/disable an endpoint as
we already support controllers with the maximum possible number of
endpoints where FALSE_EP_ADDR is a valid endpoint address.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-03-07 19:53:08 +01:00
Pavel Vasilyev
14b35e2df3 tests: bsim: Fix command execution with quoted string
When running a bsim test where an option's argument is a quoted string,
using $@ to execute the arguments of the Execute function causes
incorrect quote handling.

To correctly pass all arguments, add extra quotes around $@. This
ensures that quoted strings remain intact when passed to the executable.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-03-07 19:52:55 +01:00
Utsav Munendra
2b48ef62ba portability: cmsis: Implement osThreadJoin using Zephyr k_thread_join
Bugfix previous `osThreadJoin()` implementation where a thread which
exited with `osThreadExit()` could not be joined upon by other threads.

Signed-off-by: Utsav Munendra <utsavm@meta.com>
2025-03-07 19:51:50 +01:00
Robert Budai
c55204f761 drivers: gpio: extend max14916 to max14915
The MAX14915 has eight high-side switches specified to deliver up to
700mA continuous current with simlar register map and diagnostics
parameters to MAX14916.

Documentation:
https://www.analog.com/en/products/max14915.html

Signed-off-by: Robert Budai <robert.budai@analog.com>
2025-03-07 19:51:07 +01:00
Florijan Plohl
cfae3d7174 tests: drivers: build_all: ethernet: Add DP83867 entry
Add build tests for TI DP83867.

Signed-off-by: Florijan Plohl <florijan.plohl@norik.com>
2025-03-07 19:51:02 +01:00
Sebastian Głąb
22d9f0c13f tests: drivers: audio: dmic_api: Enable test on nRF54L20pdk
Add test configuration on DMIC nodes that are compatible
with 'nordic_nrf_pdm'.
Add missing DTS definitions in a board overlay.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2025-03-07 19:49:55 +01:00
Noah Olson
b2e29fe0d7 net: tcp: fix ECONNREFUSED not reported by zsock_connect
When a TCP connection is refused during zsock_connect, errno is set
to -ENOTCONN, but errno should be set to -ECONNREFUSED. This change
causes the ECONNREFUSED status to be propagated from tcp_in to
net_tcp_connect, which eventually causes errno to be set
to -ECONNREFUSED.

Signed-off-by: Noah Olson <noah@wavelynx.com>
2025-03-07 19:48:10 +01:00
Lauren Murphy
e7786914c9 tests: lib: multi_heap fix up_squared test failures
Fixes test failures on up_squared caused by ACPI adding to
heap size (K_HEAP_MEM_POOL_SIZE). The test assumed the heap size
always matched the Kconfig CONFIG_HEAP_MEM_POOL_SIZE=256.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2025-03-07 19:48:00 +01:00
Francois Laplante
4086f06c3d test: drivers: spi: silabs: Add loopback test support.
Add silabs spi eusart driver Async/dma,no-dma test cases.
With required configuration files.

Signed-off-by: Francois Laplante <frlaplan@silabs.com>
2025-03-07 19:47:21 +01:00
Phuc Pham
df9f04bd36 tests: drivers: mbox: Add support for RZ/G3S-SMARC
Add test support for MBOX driver of RZ/G3S-SMARC

Signed-off-by: Phuc Pham <phuc.pham.xr@bp.renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
2025-03-07 19:45:30 +01:00
Hoang Nguyen
8ec898f93b tests: drivers: i2c: Add support for RZ/G3S-SMARC
Add test support for I2C driver of RZ/G3S-SMARC

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
2025-03-07 19:45:11 +01:00
Eric Ackermann
7293f59a05 tests: llext: Test RISC-V non-paired relocation
Tests an edge case in the RISC-V PSABI: In the medany and the medlow code
models, the compiler emits auipc/lui (U-type) and ld/sw (I-type/S-type)
instruction pairs for accessing a non-local symbol.
The U-type instruction sets the upper 20 bits, the I/S-type the lower 12.
The U-type and I-type/S-type instruction pairs are often adjacent in code.
This is also what the current llext architecture-specific relocations
expect.
However, this need not be the case - compilers can re-use the upper 20
bits set by the U-type instruction with multiple I/S-type instructions,
which is a useful optimization for multiple loads/stores of or within
the same symbol.
This commit adds a unit test for this behavior, which currently fails
for RISC-V.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2025-03-07 19:44:54 +01:00
Lothar Felten
1c50c3a12b drivers: regulator: add support for AXP2101 power management IC
Add initial support for the AXP2101 power management IC from X-powers.
Remark: only DC/DC1 and ALDO have been tested on real hardware.

Co-authored-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Co-authored-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
2025-03-07 19:43:05 +01:00