Commit graph

16700 commits

Author SHA1 Message Date
TOKITA Hiroshi
2953c38948 tests: drivers: build_all: gpio: Add config for AW9523B
Add test configuration for "awinic,aw9523b".

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-12-05 07:44:58 +01:00
TOKITA Hiroshi
ef95203267 tests: drivers: gpio: gpio_basic_api: Add AW9523B test configuration
Add test configuration for Awinic AW9523B.

This device is a GPIO Expander, and no boards currently implement it.
Define the connection that connects it via the Arduino header and
define a fixture to enable it.

This has been confirmed with nucleo_h503rb.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-12-05 07:44:58 +01:00
TOKITA Hiroshi
59a82ab357 tests: drivers: gpio: gpio_api_1pin: Add AW9523B test configuration
Add test configuration for Awinic AW9523B.

This device is a GPIO Expander, and no boards currently implement it.
Define the connection that connects it via the Arduino header and
define a fixture to enable it.

This has been confirmed with nucleo_h503rb.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-12-05 07:44:58 +01:00
Audun Korneliussen
66ccc2e241 drivers: watchdog: npm2100: Add driver for npm2100 pmic
Add watchdog driver for npm2100 pmic.

This pmic has one timer that can be used for multiple functions,
including a watchdog that can reset or power-cycle connected devices.

Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
2024-12-04 14:19:53 -05:00
Audun Korneliussen
439d3b2973 drivers: sensor: npm2100: Add driver for npm2100 pmic
Add sensor driver for npm2100 pmic.

This pmic performs measurements of battery voltage, regulator voltage
and die temperature.

Configurable pmic attributes are also organized under this driver.

Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
2024-12-04 14:19:53 -05:00
Audun Korneliussen
f4443617d8 drivers: regulator: npm2100: Add driver for npm2100 pmic
Add regulator driver for npm2100 pmic.
This pmic has one boost and one ldo regulator.

Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
2024-12-04 14:19:53 -05:00
Audun Korneliussen
7fccb646cd drivers: gpio: npm2100: Add driver for npm2100 pmic
Add gpio driver for npm2100 pmic.

Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
2024-12-04 14:19:53 -05:00
Bansidhar P.M
da90ce571a tests: boards: nrf70: Add ztests for bus library
Add ztests for nrf70 bus lib to help validate functional integrity
of the QPSI/SPI interface to nRF70 device via appropriate reads/writes
from host processor to relevant memory blocks of nrf70 device.
Note that this will NOT serve as a memory test for nrf70 device,
rather just a functional verification of the wiring between the host
processor and the nrf70 device.

Signed-off-by: Bansidhar P.M <bansidhar.mangalwedhekar@nordicsemi.no>
2024-12-04 14:15:13 -05:00
Gerard Marull-Paretas
d4a67e321b samples, tests: remove usage of space-separated lists
Convert them to native YAML lists. Support for space-separated
lists was deprecated in Twister a long time ago.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-12-04 14:14:53 -05:00
Jilay Pandya
c4f044ed81 test: drivers: build_all: stepper: fix gpio stepper
fixes gpio stepper in build_all tests for stepper drivers

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-04 14:14:07 -05:00
Matt Rodgers
ddaeb1379a net: http_server: fix header capture on concurrent http2 streams
Concurrent HTTP POST requests on different HTTP2 concurrent streams
require that the client's header_capture_context is re-used to capture
headers on a second stream before all of the body data has been received
(and sent to the application) on the first stream.

As a result, any captured headers must be sent to the application
callback before any headers can be received on a different stream. In
practice this means that for HTTP2 the application callback is called
for the first time on receiving a headers frame, before any data frames
are received. All subsequent application callbacks will not include the
request header data.

While this mechanism is not necessary for HTTP1, it is also updated to
only send headers in the first application callback for consistency.

Fixes #82273

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-04 14:13:24 -05:00
Alberto Escolar Piedras
9a66eb5cbe tests/bsim: For nrf52bsim use full board name with qualifiers
So when building with twister we get the same executable name
as with compile.sh

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-12-04 16:12:18 +01:00
Alberto Escolar Piedras
77fd5f4ecc tests/bsim conn_stress/scripts/_conn_stress.sh: Fix
This custom test script had rotten and was not working.
Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-12-04 16:12:06 +01:00
Alberto Escolar Piedras
8310017dd3 tests/bsim/bluetooth/ll/_compile_permutate_kconfigs: Update
This test was starting to rot: BOARD should have been replaced
with BOARD_TS. Let's also remove a few duplicate checks
and definitions.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-12-04 16:12:06 +01:00
Alberto Escolar Piedras
7cd64a33a4 tests/bsim: Fix host/gatt/notify_multiple _notify-debug
This custom debug script had rotten, let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-12-04 16:12:06 +01:00
Sergey Korotkov
2ee0e38929 Bluetooth: Host: more secure defaults for key size and legacy pairing
Default the Minimum encryption key size to 16.
Key with reduced size is easier to brut force.
Disable LE legacy pairing by default since it's not secure.

These defaults should suite majority of newly developed applications.
It's better to use sensible more secure defaults,
so applications that really need less secure option consciously change it,
not the other way around.
This may help to prevent downgrade attacks.

Signed-off-by: Sergey Korotkov <sergey.korotkov@nordicsemi.no>
2024-12-04 12:10:54 +01:00
Stine Akredalen
6c0306622e Bluetooth: fix GATT service reregistering
* Fixed issue with reregistering of GATT services.
* Added unit tests covering the GATT reregistering scenario.

Signed-off-by: Stine Åkredalen <stine.akredalen@nordicsemi.no>
2024-12-04 12:10:22 +01:00
Jilay Pandya
af68d97507 drivers: stepper: api: rename enable_constant_velocity_mode to run
rename enable_constant_velocity_mode to run in following files:
- include/zephyr/drivers/stepper.h
- include/zephyr/drivers/stepper/stepper_fake.h
- doc/hardware/peripherals/stepper.rst
- doc/releases/migration-guide-4.1.rst
- drivers/stepper/adi_tmc/adi_tmc5041_stepper_controller.c
- drivers/stepper/fake_stepper_controller.c
- drivers/stepper/gpio_stepper_controller.c
- drivers/stepper/stepper_shell.c
- tests/drivers/stepper/shell/src/main.c

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-04 09:24:05 +01:00
alperen sener
b78eea256b Tests: Bluetooth: Tester: Mesh DFUM and BLOB should have own elements
Moving the blob client, dfd server and dfu server to their own
elements and increasing the CONFIG_BT_MESH_TX_SEG_MAX to 8 to fit
new composition data into composition data page status message.

Standalone mesh blob client and DFU distributor/update server models
requires one element and those elements only contain the main models
and the models they extend to.

Referring to MshMBT_v1.0 Section 6.1:
The BLOB Transfer Client model defines the messages listed in Table 6.1
, and requires one element: the BLOB Transfer Client Main element. The
BLOB Transfer Client Main element contains the BLOB Transfer Client
main model.

And referring to MshDFU_v1.0 Sections 6.1.1 and 6.2.1:
6.1.1
The Firmware Update Server model adds the state instances listed in
Table 6.1 and Table 6.2 and the messages listed in Table 6.3 to the
model it extends, and requires one element: the Firmware Update Main
element. The Firmware Update Main element contains the Firmware Update
Server main model and all the models that the main model extends.
6.2.1
The Firmware Distribution Server model adds the state instances listed
in Table 6.7 and Table 6.8 and the messages listed in Table 6.9 to the
model it extends, and requires one element: the Firmware Distribution
Main element. The Firmware Distribution Main element contains the
Firmware Distribution Server main model and all the models that the
main model extends.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2024-12-04 09:23:44 +01:00
Fabio Baltieri
98ecf25873 tests: threads_ext: move min_flash and min_ram parameters to test level
One of the tests is failing since it was split out in 1a633609a0
triggering an assertion:

ASSERTION FAIL [((((size_t)(16)) << 10) - (((uintptr_t) (&_end)) -
0x20000000)) >= 8192] @
WEST_TOPDIR/zephyr/lib/libc/newlib/libc-hooks.c:139

Fix it by making the min_flash and min_ram parameters up to overall
test level.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-12-04 02:02:29 +01:00
Jeppe Odgaard
c41570871b drivers: sensor: tmp116: support set sample frequency
Add support for setting the sample frequency via `attr_set` and the
output data rate from device tree source.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-12-03 19:57:06 +01:00
Tim Lin
e7b7356dc4 tests: drivers: build_all: Add IT8801 mfd drivers test
Add build tests for the IT8801 MFD drivers, including GPIO,
Input and PWM functionalities.

GPIO, Input test: west build -p always -b native_sim
PWM test: west build -p always -b it82xx2_evb

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-12-03 19:56:50 +01:00
Chaitanya Tata
537b52e7fe tests: drivers: nrf_wifi: Add a build all test
This helps maintaining of various modes in nRF Wi-Fi driver.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-03 15:49:11 +00:00
Georgios Vasilakis
28bd478a0b tests: arm_thread_swap: Add overlay for nRF54H20
Disable the IPC communication between the domains
for the arm_thread_swap test since it is not needed
and it causes a flash oveflow for the no opmitization
test case.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
2024-12-03 13:07:03 +01:00
Ioannis Karachalios
221c4d3e4d tests: pwm_loopback: Fix inverted pulse measurement deviation
For the inverted pulse measurements, that should reflect
the duty-cycle off interval, the 1% deviation in test_capture
should be adjusted so it reflects duty-cycle off.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-12-03 13:06:53 +01:00
Ioannis Karachalios
b1e863e3e7 tests: pwm_loopback: Capture disable omission issue
As per the PWM API definition, -EBUSY should be returned
when pwm_enable_capture is called and capturing
is already enabled. This commit deals with adding
a ztest_suite_before_t function that should disable
capturing at the end of a single test. Some tests, though,
such as test_pulse_capture, execute two sub-tests
and so, capturing is disabled in between. In fact, the omission
of pwm_disable_capture should not only result in aborting
a single test, but it can also raise system exception
due to invalid context. This is the case for
z_impl_pwm_capture_cycles where z_pwm_capture_cycles_callback
can be fired whilst the routine has already aborted and so
struct z_pwm_capture_cb_data data, defined within function
declaration, should not longer be valid.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-12-03 13:06:53 +01:00
Iacopo Moles
bd69ae46bc boards: waveshare: rp2040_zero: Initial support
This PR adds supports for Waveshare RP2040 Zero

Signed-off-by: Iacopo Moles <iacopo@icpmol.es>
2024-12-03 10:17:49 +01:00
Johan Hedberg
8b02141ca7 Bluetooth: Controller: Replace BT_CTLR with HAS_BT_CTLR
Deprecate BT_CTLR, and add a new HAS_BT_CTLR as a virtual option which
specific users (like BT_LL_SW_SPLIT) select. This also means that we can
remove all places that were forcefully enabling the BT_CTLR option, and
instead we now depend on devicetree to get some local LL HCI driver
enabled which in turn also enables the HAS_BT_CTLR option.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-12-03 10:16:44 +01:00
Pieter De Gendt
856f4f8b59 drivers: edac: Place API into iterable section
Add wrapper DEVICE_API macro to all edac_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-03 10:16:29 +01:00
Neil Chen
80361b8fe0 tests: dac: frdm_mcxa156: add dac test support
add frdm_mcxa156 defines in source

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-12-03 08:27:08 +01:00
Marvin Ouma
1a633609a0 tests: posix: common: separate posix threads_ext to standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves pthread_attr into a singular
testsuite at tests/posix/threads/ext app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-12-03 04:01:56 +01:00
Akaiwa Wataru
1bb5c34f98 tests: kernel/sched: 32-bit tick wraparound during k_sleep() execution
This test reproduce the issue: https://github.com/zephyrproject-rtos/zephyr/issues/79863

In this test, instead of waiting the 32-bit tick wraparound for several
days, patching the kernel internal tick with the test API.

Signed-off-by: Akaiwa Wataru <akaiwa@sonas.co.jp>
2024-12-03 02:37:03 +01:00
Pieter De Gendt
29c9b91340 drivers: serial: Place API into iterable section
Add wrapper DEVICE_API macro to all uart_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:56 +00:00
Pieter De Gendt
9dd07da0a1 drivers: flash: Place API into iterable section
Add wrapper DEVICE_API macro to all flash_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:48 +00:00
Pieter De Gendt
d0d8158280 tests: drivers: regulator: Test not implemented APIs with dummies
Instead of writing to existing fake APIs, use dummy devices with empty
APIs. This allows us to place APIs in ROM.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:08:41 +00:00
Pieter De Gendt
0668151a2f drivers: ipm: Place API into iterable section
Add wrapper DEVICE_API macro to all ipm_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:07:08 +00:00
Manuel Argüelles
4ab9172c92 dts: bindings: rename nxp,imx-lpspi compatible
Rename "nxp,imx-lpspi" compatible to "nxp,lpspi" to remove the
device family from its name.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-02 22:06:47 +00:00
Manuel Argüelles
dbd20bd039 dts: bindings: rename nxp,kinetis-wdog32 compatible
Rename "nxp,kinetis-wdog32" compatible to "nxp,wdog32" to remove the
device family from its name.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-02 22:06:39 +00:00
Pieter De Gendt
6d178f9cd9 drivers: gpio: Place API into iterable section
Add wrapper DEVICE_API macro to all gpio_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:05:59 +00:00
Pieter De Gendt
a553af738d drivers: sensor: Place API into iterable section
Add wrapper DEVICE_API macro to all sensor_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:04:55 +00:00
Pieter De Gendt
d76d7115d5 drivers: ptp_clock: Place API into iterable section
Add wrapper DEVICE_API macro to all ptp_clock_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 23:04:22 +01:00
Arkadiusz Balys
6464ea88fe net: openthread: Allow a platform to select a Settings backend.
Removed implying of NVS by the NET_L2_OPENTHREAD, and from now a
platform can choose between ZMS and NVS as a settings backend.
NET_L2_OPENTHREAD still requires NVS or ZMS backend so the config
depends on one of those.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2024-12-02 18:18:20 +01:00
Krzysztof Chruściński
51b6f66fce tests: kernel: timer: timer_behavior: Reduce tick frequency(nrf54l20pdk)
Test test_one_tick_timer_train was failing due not being able to
execute enough 1 tick timeouts. Decrease system ticks frequency
to make the test pass.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-02 14:23:22 +01:00
Jordan Yates
3a9e693087 tests: lib: devicetree: api: test DT_ANY_INST_HAS_BOOL_STATUS_OKAY
Add tests for the new `DT_ANY_INST_HAS_BOOL_STATUS_OKAY` macro.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-12-02 11:13:52 +01:00
Dominik Ermel
3cd862e62d tests/storage/flash_map: Support for no flash_area_open
The commit removes flash_area_open usage from tests, where it is not tested
and only used to obtain area.
The commit adds tests for flash_area_device_is_ready.
The commit adds test for flash_area_sectors, which is equivalent
of flash_area_get_sectors but takes flash area object instead of flash
area index.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-12-02 09:43:00 +01:00
Piotr Kosycarz
91dfe8f076 tests: drivers: gpio: gpio_basic_api: restore support for nrf54l15 flpr
Missing after PDK->DK.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-12-02 01:33:15 +01:00
Flavio Ceolin
4f33729ee0 tests: mem_protect/stackprot: Use __noinline attribute
Use Zephyr definition for noinline attribute.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-11-30 01:04:11 +01:00
Flavio Ceolin
f9d17b4233 tests: mem_protect/protection: Use __noinline attribute
Use Zephyr definition for noinline attribute.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-11-30 01:04:11 +01:00
Pieter De Gendt
122eb71dda tests: drivers: build_all: Add CMake linker test for ADC
Add a test case where CONFIG_CMAKE_LINKER_GENERATOR is enabled.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-29 14:50:40 +01:00
Francois Ramu
1680887051 tests: drivers: clock control stm32 adc device clock setting
Tests the ADC clock domain on the stm32g0 serie
Possible ADC clock sources are SYStem clock (default) or PLL_P.
No clock source HSI for the ADC tested here.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-29 14:50:29 +01:00