Commit graph

3380 commits

Author SHA1 Message Date
Pieter De Gendt
8bbb88999b tests: drivers: uart: uart_emul: Fix RX remaining check
The UART interrupt emulation test checks the wrong variable for remaining
RX bytes.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-30 18:28:17 +01:00
Pieter De Gendt
92019b1dac emul: Support UART device emulation
Add support to the existing UART emulated bus, to have a client device
emulator.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-30 18:28:17 +01:00
Miguel Gazquez
26be1da3e7 drivers: sensor: add driver for lsm9ds1 sensor
The LSM9DS1 is a system-in-package featuring
a 3D digital linear acceleration sensor, a 3D digital angular rate
sensor and a 3D digital magnetic sensor.

This driver implements only the linear acceleration sensor and the
angular rate sensor, on the I2C bus.

This driver is without trigger support.

The driver is based on the stmemsc HAL.

link: https://www.st.com/resource/en/datasheet/lsm9ds1.pdf

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2024-07-29 14:21:24 +02:00
Patryk Kuniecki
c227ff3d63 tests: exclude drivers/watchdog/wdt_basic_api from running on it8xxx2_evb
There is problem with running this test in validation,
because of DBGR mode watchdog can't reset board by itself,
and it needs cold reset. This proves that test is not automated,
and should be exluded on this board.

Signed-off-by: Patryk Kuniecki <patryk.kuniecki@intel.com>
2024-07-29 14:13:21 +02:00
Bartosz Miller
0d59c1a780 tests: drivers: add more test cases to the i2c_bme688 test suite
Test NACK handling, bus recovery and FAST speed read.
Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-07-28 07:30:59 +03:00
Fabio Baltieri
32fafc7176 input: analog_axis: add output inversion
The driver right now only allows inverting the input value, which can be
useful for differential channels but is quite confusing for single ended
ones. Implement a simple output inversion flag instead to make up for
that.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-27 20:47:18 +03:00
Yannis Damigos
d2a4522250 tests: uart_elementary: Correct typos
Correct typos in uart_elementary test

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2024-07-15 15:15:36 -04:00
Krzysztof Chruściński
60911a6d5e tests: drivers: spi: spi_controller_peripheral: Fix nrf54h20_cpurad
Add more memory to dma region for cpurad as otherwise it fails
during initialization due to not enough memory for dmm heap.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-12 09:12:35 -04:00
Anas Nashif
83bd3658c3 tests: do not get ZEPHYR_BASE from ENV
find_package() already deals with finding ZEPHYR_BASE, so do not rely on
it being set in ENV, use the variable directly adter find_package() was
called.

Fixes #75387

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-11 13:09:53 -04:00
Brett Witherspoon
c76818d949 dts: bindings: dac: ad569x: Remove unused properties
These properties are not used by the driver at all, but are
inconveniently marked as required. Lets just remove them.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
2024-07-11 16:15:28 +02:00
Krzysztof Chruściński
a575d9bc31 tests: drivers: counter: nrf: fixed_top: Rework nrf54h20 cpuppr config
Rework configuration so that it does not require special treatment
in testcase.yaml.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-10 08:42:03 -04:00
Krzysztof Chruściński
407aa5cc79 tests: drivers: counter: basic_api: Rework nrf54h20 cpuppr config
Rework configuration so that it does not require special treatment
in testcase.yaml.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-10 08:42:03 -04:00
Declan Snyder
6eaadc312f tests: i2s_speed: Fix RT1170_EVK overlay files
Remove an overlay with a wrong name not being picked up,
and change the "A" revision overlay to be used by all revisions.

Also fix the "clocks" property in the overlay causing a fault with sai4.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-10 11:38:39 +02:00
Mathieu Choplain
1fd9dc85b2 tests: drivers: adc_api: use proper printf format
This commit changes the adc_api test to use the proper printf
format specifier when printing the ADC samplings. This ensures
that all values are printed on 16-bit. Without this specifier,
negative values are sign-extended and printed on full integer
size (e.g., 0x8000 -> "0xFFFF8000").

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-07-09 17:23:30 -04:00
Luis Ubieda
1f3a0910d7 tests: sensor: generic: Set thread priorities for back-to-back readings
In order to support back-to-back readings, it's required that the
RTIO workq threads priority is higher than the caller issuing the
back-to-back requests, otherwise the requests will fail as P4WQ won't
have the opportunity to clear the is_done semaphore, and the subsequent
request will be rejected.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Bjarki Arge Andreasen
cdff2575a7 tests: rtc: time_incrementing: set nsec member
The rtc test suite uses timegm to convert a unix
timestamp to datetime, specifically struct tm which has no
nsec field, so the nsec field is not initialized properly.

Update tests to init nsec and isdst members of struct rtc_time.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-07-09 19:03:49 +02:00
Francois Ramu
f3c70b4ab8 tests: drivers: clock control testing on the stm32h7 serie
Disable the pll2 when clearing the clock config prior to
testing the clock_control driver for the stm32h7

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-07-09 19:03:10 +02:00
Zhaoxiang Jin
5b8bac37d0 tests: adc: Add 'zephyr,vref-mv' property.
Add 'zephyr,vref-mv' property to frdm_mcxn947 overlay file.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
599fddc867 tests: Add frdm_mcxn947 into regulator and adc test scope
Add frdm_mcxn947 into regulator and adc test scope

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Alberto Escolar Piedras
bf53b06a06 tests/drivers pwm_clock: Build fix sam_v71_xult
Fix build error due to cmake requiring a separate
overlay for each of this target's SOCs.

Error being fixed:
```
-- Board: sam_v71_xult, qualifiers: samv71q21
CMake Error at cmake/modules/extensions.cmake:2742 (message):
  Board sam_v71_xult defines multiple SoCs.

  Shortened file name (sam_v71_xult.overlay) not allowed, use
  '<board>_<soc>.overlay' naming
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-08 14:55:15 -04:00
Mathieu Choplain
38ab4b38db tests: dma/chan_blen_transfer: place TX buf in RAM
This commit removes the const qualifier from TX (source) buffer
of the chan_blen_transfer DMA test to ensure it gets placed in
RAM rather than flash. This ensures the test can pass on hardware
where the DMA controller is unable to access flash.

Fixes #75125.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-07-03 15:27:26 +02:00
Tahsin Mutlugun
700ebe1b55 tests: drivers: i2c: i2c_target_api: Use address-width property
Boards that use 1024 byte EEPROM buffers need 16-bit address widths
otherwise eeprom_target driver will cause build failure.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-07-02 19:24:13 -04:00
Tahsin Mutlugun
223447262c tests: drivers: i2c: i2c_target_api: Support 16-bit word addresses
Existing tests fail when 16-bit address width is used. Adjust the code
to support 16-bit addresses as well.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-07-02 19:24:13 -04:00
Gerson Fernando Budke
768b8bbca3 scripts: west robot & simulation: Fix OOT
The current version of scipts do not consider OOT boards use cases and
the tests with robot now are strict to only one robot file, which is
not realistic for real environment. This address those issues and allow
multiple testsuits at command line and lists at tests entries. It add
another test parameter to allow configure robotframework options.

Fixes: #74563

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2024-07-01 16:10:35 -04:00
Krzysztof Chruściński
e367231f29 drivers: uart: uart_elementary: Add missing pull-ups to nrf54h20dk
Add missing pull-up for RX pin in nrf54h20dk dual uart configuration.
Lack of pull-up was causing test failures.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 09:05:33 -04:00
Bjarki Arge Andreasen
5343ae6817 tests: drivers: rtc: rtc_api: add config for alarm time mask
RTCs support a variety of combinations of alarm time fields, set
by the alarm time mask. Until now, alarm tests have selected
only the minute and hour fields, as these are always supported,
but some RTCs require setting every supported field when setting
the alarm time, while other RTCs don't support setting every field.

To support all RTCs in the test suite, a configuration has been
added which makes the alarm time mask configurable. Boards can now
define the specific alarm time mask they want to test within
their boards .conf files.

Additionally, the alarm tests have been refactored to not depend
on the time.h library to determine the struct rtc_time times to
set as these are constant, so they are now provided as const
structs instead.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-28 20:58:22 -04:00
Johann Fischer
a79700623d tests: drivers: udc: add build_only test case
nRF54H20 USB device controller cannot be enabled without VBUS, but the
device should not be connected to the host during testing. Add it to
build_only section.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:56:47 -04:00
Johann Fischer
ef512305fb tests: drivers: udc: updates to pass testing on supported platforms
Do not halt control endpoint, control endpoint may not be enabled when
there no host is connected. Yield after buffer is queued to allow the
driver to work.

Tweak pool size and number of buffers to pass the test with high-speed
drivers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:56:47 -04:00
Henrik Brix Andersen
1c0f241b92 tests: drivers: can: api: restore default bitrates
Restore the default CAN bitrates after having tested setting bitrate and
timing. This ensures the arbitration phase bitrate is proportional to the
data phase bitrate, allowing CAN FD transmission tests to complete.

Fixes: #73723

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-28 20:55:53 -04:00
Jordan Yates
91f8c1aea9 everywhere: replace #if IS_ENABLED() as per docs
Replace `#if IS_ENABLED()` with `#if defined()` as recommended by the
documentation of `IS_ENABLED`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:20:32 -04:00
Alex Fabre
648f6dcac4 boards: st: add adc1 peripheral for nucleo_h533re
This nucleo board inherit from the root `h5` dts some special nodes:
- `vbat` on adc1 channel 2
- `vref` on adc1 channel 17
- `die_temp` on adc1 channel 16

The issue is discussed here:
https://github.com/zephyrproject-rtos/zephyr/issues/72914

Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
2024-06-27 08:49:49 -04:00
Oleksii Moisieiev
7c64a8b1a7 drivers: tee: optee: handlde GET_THREAD_COUNT call
Optee driver should handle GET_THREAD_COUNT call. This limitation is
set in Optee-OS during build and limits number of symultanious calls
to optee. Add sym to handle this limitation.

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Oleksii Moisieiev
97ec5548bd tests: drivers: optee: handle exchange capabilities call
Capabilities should be set correctly or optee will show error message:
[00:00:00.000,000] <err> optee: OPTEE does not support dynamic shared
memory

Test suite should set optee UID or the following error message should
be displayed:
[00:00:00.000,000] <err> optee: OPTEE API UID mismatch

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Oleksii Moisieiev
3301c450e0 tests: drivers: tee: Fix normal_call behaviour in tests
During SMC_RPC_FUNC_ALLOC call optee driver puts new shm object to a4
and a5 variables and then expects this object to be in a1 and a2 from
OP-TEE OS. Fixed behaviour so normal_call callback will act the same
way as OP-TEE OS

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Oleksii Moisieiev
92408c02d9 tests: drivers: optee: Introduce unit tests for the OP-TEE driver
This should test OP-TEE driver basic functionality without
communication with real OPTEE OS.

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
2024-06-26 14:14:25 -04:00
Tom Burdick
c6830034d6 tests: Remove vmu_1170 from spi_loopback tests
The board didn't have a proper overlay for the test and failed to build
the test case causing CI failures.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-26 14:13:21 -04:00
Tom Burdick
058253b4b6 icm42688: Follow st's devicetree bindings
Fix the devicetree bindings to actually be used as the default
configuration, following the example set by various ST sensor devices.

This requires sadly dropping enums and using #defines for various
options as well as repeating many numbers, but presumably is the way to
do it given the precedent set by ST with sensors like the lsm6dso.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-26 14:13:21 -04:00
The Thanh. Nguyen
f93f801c65 driver: serial: Add serial driver support for Renesas RA8 devices
Add implementation of sci_b_uart for Renesas RA device

Signed-off-by: The Thanh. Nguyen <the.nguyen.yf@renesas.com>
2024-06-26 13:36:14 -04:00
Duy Nguyen
ee4613a3a6 boards: arm: Add initial support for EKRA8M1
Add support for the EK RA8M1 board
This board is using Renesas RA8M1 MCU.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-06-26 13:36:14 -04:00
Jordan Yates
243eb36b18 everywhere: reindent .overlay files with tabs
`checkpatch.pl` requires that dts sources are indented with tabs,
fix all the spaces that slipped in while checkpatch wasn't watching.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-26 15:59:44 +02:00
Manuel Argüelles
123f99c87b tests: drivers: counter: fix skip tests check
When running this test with multiple counter instances enabled that
support different capabilities, if one of the instances does not
support the test required capabilities, the test will be
immediately skipped not giving the chance to run to the subsequent
instances.

Fix this by marking the test as skipped, only of all counter instances
under test were skipped.

Fixes #74358

Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
2024-06-25 06:06:19 -04:00
Jordan Yates
07870934e3 everywhere: replace double words
Treewide search and replace on a range of double word combinations:
    * `the the`
    * `to to`
    * `if if`
    * `that that`
    * `on on`
    * `is is`
    * `from from`

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-22 05:40:22 -04:00
Mathieu Choplain
3ffa56fd7e tests: drivers: counter: support STM32 w/o RTC
This commit adds a missing #ifdef check which prevents building the
'counter_basic_api' test for boards under the following conditions:
 * RTC node is defined in device tree (compatible = "st,stm32-rtc")
 * RTC node is disabled in device tree (status = "disabled")
 * Kconfig "CONFIG_COUNTER_RTC_STM32=n" is specified

This check matches the ones done a few lines above for NXP MCUs.

Without this check, building the test under the conditions listed above
failed with the infamous `undefined reference to '__device_dts_ord_N'`
linker error, because the test attempts to obtain RTC's `struct device`
despite CONFIG_COUNTER_RTC_STM32=n, which ultimately fails because the
RTC driver is not built unless there is an enabled RTC node in DT.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-06-21 15:04:20 -04:00
Anke Xiao
7076f33988 tests: drivers: i2c: i2c_target_api: update testcase.yml
Added frdm_ke17z512 platform to allow testing single_role.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-20 17:02:12 -04:00
Luis Ubieda
51ad3d34bd sensor: vcnl36825t: fix: Address CID 347083
Coverity found this legitimate issue: the datasheet specifies PS_IT
being 2-bits long (1, 2, 4, 8) and this driver assumes more steps are
available. Remove extraneous fields so the Proximity integration
setting fits in the expected 16-bit value.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-20 12:05:07 -04:00
Francois Ramu
deaa40aeb9 tests: drivers: spi loopback testing on the nucleo_h743/h753 boards
Reduce the spi1 clock freq to pass the testcase on the nucleo
_h753zi or nucleo_h743zi boards
Connect D11 & D12 pins on the board to pass the test

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-19 13:23:06 -04:00
Dawid Niedzwiecki
cda3baf10c tests: drivers: counter: counter_basic_api: run on google_dragonclaw
Add google_dragonclaw board definition and allow running the
drivers.counter.basic_api.stm32_subsec test on the board.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-06-18 19:59:42 -04:00
Swift Tian
beef60df65 samples: tests: dts: mspi: update ambiq specific MSPI dts
Updated apollo3p_evb overlay files for MSPI peripheral devices.

Signed-off-by: Swift Tian <swift-tian@qq.com>
2024-06-18 19:55:35 -04:00
Manuel Argüelles
989a30807f tests: drivers: counter: nxp s32: test all PIT channels
Make sure that all PIT channels are tested.

Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
2024-06-18 19:55:20 -04:00
Bjarki Arge Andreasen
1fc26b8974 drivers: rtc: api: Add helper for determining calibration
Add helper function which calculates the required calibration to
1 Hertz from the actual frequency of an RTC. This helper is both
functional and adds to the documentation of the RTC calibration
API.

The rtc.h header now includes zephyr/kernel.h instead of
zephyr/types.h as __ASSERT_NO_MSG is now referenced in the header.

The commit additionally extends the rtc_api_helpers test suite
with a test to validate the conversion function itself.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-18 14:35:55 -04:00