Commit Graph

2100 Commits

Author SHA1 Message Date
TOKITA Hiroshi
3c4e842c90 tests: spi: spi_loopback: add interrupt and DMA tests for rpi_pico
Add interrupt and DMA tests for rpi_pico boards.
Add tests for combination of cases of DMA, interrupt and
DMA is not enabled by dts.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-04-07 13:20:16 +02:00
Siyuan Cheng
6433e204b9 test: spi: update fast test frequecny for em_starterkit
Async test failed in fast test due to too fast spi frequency.
Now it is lowered to 2500000Hz.

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-04-07 13:15:59 +02:00
Caspar Friedrich
ba66f41e21 samples: w1: Update scanner example for ds2482-800 bus driver
The scanner example for 1-wire now supports the DS2482-800 multi channel
bus master.

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2023-04-07 13:11:54 +02:00
Caspar Friedrich
691228ce01 drivers: ds2482-800: Add driver
This adds a driver for the DS2482-800 1-wire multi channel bus driver.
The driver uses a split architecture in order to share a common lock
among all configured channels of a single IC.

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2023-04-07 13:11:54 +02:00
Benjamin Björnsson
193b1ca784 tests: drivers: adc: adc_api: Add min_flash filter
Adding min_flash filter to not build for Nucleo C031C6.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-07 08:18:03 +00:00
Anas Nashif
fcefc27823 tests: remove intel adsp cavs platforms from filters
Remove all filters related to dropped platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-06 18:51:56 +02:00
Sung-Chi Li
d455b6dee0 tests: drivers: gpio: Add test for GPIO_ENABLE_DISABLE_INTERRUPT
Add test for the experimental feature GPIO_ENABLE_DISABLE_INTERRUPT,
which covers APIs gpio_pin_interrupt_enable() and
gpio_pin_interrupt_disable().

Signed-off-by: Sung-Chi Li <lschyi@google.com>
2023-04-06 11:44:07 -04:00
Francois Ramu
0cca0bcfa0 tests: drivers: spi driver testing on the stm32h573i_dk board (dma)
Configure the tests/drivers/spi/spi_loopback to run on the
stm32h573i_dk disco kit with DMA transfer
use gpdma1 or gpdma2.
GPDMA1 or GPDMA2 have the same request for spi2 transfer.
Connect D11 and D12  of the ARDuino CN13 connector to PASS the test.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-06 07:51:09 +00:00
Francois Ramu
263582164f tests: drivers: spi loopback on the stm32h573i_dk (interrupt)
Add the configuration for running the spi_loopback (interrupt mode)
on the stm32h573i_dk disco kit.
The SPI2 is enabled by the board DTS
Connect pin D11 and D12 on the Arduino connector (CN13)

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-06 07:51:09 +00:00
Declan Snyder
f48a1b4f37 tests: regulator: Update RT685 for LPADC rewrite
Update the RT685 sample overlay for the reagulator/voltage
test to work with the recent LPADC driver rewrite, by adding
the properties for the configurable inputs to the channel specs.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-04-05 10:39:40 +00:00
Francois Ramu
b46ecf27d5 tests: drivers: counter basic api running on the stm32h573i_dk
Run the tests/drivers/counter/counter_basic_api on the stm32h573i_dk
disco kit, enabling the counter mode for the GP Timers2 & Timers3
Prescaler is giving a 1MHz freq

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-05 10:39:19 +00:00
Francois Ramu
541a137978 tests: drivers: pwm driver running on the stm32h573 disco kit
Add the overlay to run the pwm_loopback testcase on the
stm32h573i_dk platform.
Connect D3 (pin 4 of CN15) to D10 (pin 3 of CN13) to pass the test

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-05 10:39:19 +00:00
Anas Nashif
a9f3607bf6 tests: ipm: do not use TC_START for debugging
TC_START is used to evaluate output of tests and is used internally by
ztest when a test starts, no need to call this manually here.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-05 10:27:28 +02:00
Bjarki Arge Andreasen
8da512a25b tests/drivers/rtc: Add rtc_api_helpers test suite
This test suite validates the RTC API helper
functions, like currently, and exclusively, the
rtc_time_to_tm() helper function.

It also validates that the struct rtc_time is
member to member compatible with the struct tm
from the tm_sec to and including the tm_isdts
member.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-04 17:03:38 +02:00
Bjarki Arge Andreasen
ae36da516a boards/posix/native_posix: Add emulated RTC device driver
The emulated RTC device driver is used to emulate a real
RTC device. Note that it is not a replacement for the
native_rtc module, which is used to control simulated time,
get time from the host system, etc.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-04 17:03:38 +02:00
Bjarki Arge Andreasen
ac697d153d tests/drivers/rtc: Add unit tests for RTC devices
This test suite adds tests for the following:

- Setting and getting time
- Validating time is incrementing correctly
- Validating behavior of alarms with callback disabled
- Validating behavior of alarms with callback enabled
- Validating update callback

The test suite uses the devicetree  alias rtc to find
the device to test.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-04 17:03:38 +02:00
Pieter De Gendt
5ed03a4153 tests: drivers: build_all: mfd: Add NXP SC18IM704
Add build-only test case for multifunction devices and
add support for NXP's SC18IM704 UART to I2C/GPIO bridge.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-04-03 20:02:51 +02:00
Fin Maaß
cabc30c725 drivers: sensors: Implement MAX31865 sensor
This commit implements the temperature sensor interface for
the Maxim MAX31865 SPI Temperature Sensor.

Signed-off-by: Fin Maaß <fin.maass@haw-hamburg.de>
Co-authored-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-04-03 12:32:50 -04:00
Andrzej Głąbek
5d240edc17 tests: drivers: i2s_api: Fix initialization of the test
- replace device_get_binding() calls that were searching for no longer
  existing I2S device labels with proper DEVICE_DT_GET_OR_NULL() calls
- move initialization of I2S devices that was previously performed
  in the test cases that were executed as first (what is no longer
  valid after moving to the new ztest API) to functions that are called
  before running each test in a given test suite

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-04-03 12:32:34 -04:00
Andrzej Głąbek
aea674e583 tests: drivers: i2s_api: Add DT aliases i2s-node0 and i2s-node1
Add DT aliases that specify I2S devices to be used in the test.
Add new overlays as in fdad738cff
and modify existing ones accordingly.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-04-03 12:32:34 -04:00
Andrzej Głąbek
bfae6449a1 tests: i2s: Use Kconfig defaults instead of overlays for nRF I2S
... so that it is not needed to provide a .conf file for every board
based on an nRF SoC that features I2S.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-04-03 12:32:34 -04:00
Andrzej Głąbek
9bb3ccd28f tests: drivers: i2s_speed: Do not enable debug level logging
Follow-up to commit 7f1f2385d2.

For consistency with the i2s_api test, use the default logging
settings.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-04-03 12:32:34 -04:00
Madhurima Paruchuri
2535b1542b drivers: sbs_gauge: Rename atRate properties to include 'SBS'
Add the term 'SBS' in atRate properties and Battery mode property name,
as they are specific to SBS

Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
2023-04-03 17:53:42 +02:00
Madhurima Paruchuri
9727cafb41 drivers: sbs_gauge: Add support for AtRate properties
BatteryMode(w), AtRate(r/w), AtRateTimeToFull(r), AtRateTimeToEmpty(r)
and AtRateOK(r)

Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
2023-04-03 17:53:42 +02:00
Krzysztof Chruscinski
fc4606da02 tests: drivers: counter: nrf_rtc: Add delay in the test
Some Nordic platforms start counter with the delay and
test_short_relative_alarm test expects very early alarm,
just after starting the counter. Adding the delay which
is applicable only for counter based on Nordic RTC peripheral.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-04-03 11:28:59 +02:00
Krzysztof Chruscinski
3b5c059cf4 Revert "tests: drivers: counter: Relax timing requirement"
This reverts commit 51f452bbf0.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-04-03 11:28:59 +02:00
Tom Burdick
06aa17f716 tests: SPI loopback with RTIO
Adds the equivalent spi loopback tests using RTIO and a testplan that
uses it. Adds a tdk robokit1 overlay to enable the NOCACHE option so
that DMA transfers correctly work.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-04-03 09:51:02 +02:00
Francois Ramu
0b422ed02e tests: drivers: adc for the stm32h573 board
Conifgures the new h573i disco kit board for testing the adc_api driver
on the ADC1 channel0 (on pa0).

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-03 09:50:43 +02:00
Francois Ramu
6e5ee26eb9 tests: drivers: dac api testing on the stm32h573_dk
Run the tests/drivers/dac/dac_api on the stm32h573_dk disco board
The DAC channel1 is used for testing

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-03 09:50:43 +02:00
Lucas Tamborrino
6ee9e72909 tests: drivers: pwm: pwm_loopback: add esp32s3 overlay
Add esp32s3 overlay to pwm_loopback test using mcpwm
peripheral.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-04-02 22:08:57 -04:00
Francois Ramu
c36622daa5 tests: drivers: dma testing on the stm32h573i_dk board
Configure the tests/drivers/dma/loop_transfer
and the tests/drivers/dma//chan_blen_transfer
to run on the stm32h573i_dk : use gpdma1 or gpdma2.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-31 14:02:15 +02:00
Shawn Nematbakhsh
bf46f73510 tests: Remove references to deleted board "beaglev_starlight_jh7100".
beaglev_starlight_jh7100 board was deleted so remove references to it in
tests/.

fixes: #56398

Signed-off-by: Shawn Nematbakhsh <shawn@rivosinc.com>
2023-03-31 07:13:24 -04:00
Peter Fecher
924ac2265d drivers: sensor: Add tmd2620 driver
Adds tmd2620 driver and devicetree bindings to work in
trigger and polling mode supporting Power management.

Signed-off-by: Peter Fecher <p.fecher@phytec.de>
2023-03-31 09:20:36 +02:00
Lucas Tamborrino
a482390d21 tests: drivers: pwm: pwm_api: add esp32xx boards
Add esp32xx boards overlay to pwm_api test

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-03-31 09:19:56 +02:00
Keith Short
0d342989cf test: bc12: add test for pi3usb9201 device
Verify the operation of the pi3usb9201 USB charging detector driver.

Signed-off-by: Keith Short <keithshort@google.com>
2023-03-30 17:34:36 -04:00
Martin Jäger
a7791270e5 tests: drivers: dac_api: build for all tagged boards
The platform_allow selector is deleted, such that CI is run for all
boards tagged with dac support.

The board-specific defines had to be fixed/amended.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-03-30 17:34:03 -04:00
Martin Jäger
5075210bda tests: drivers: build_all: dac: add dac_mcp4728
The driver for this DAC was previously not covered in the tests.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-03-30 17:34:03 -04:00
Guillaume Gautier
3a0b00272b tests: drivers: clock_control: stm32_devices: split test
Split STM32 device clock configuration file so that each driver has its
own tests in its own file

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-03-30 13:47:55 +02:00
Guillaume Gautier
6f525f33a4 tests: drivers: clock_control: stm32_common_devices: add i2s test
Add a test for testing STM32 I2S domain clock on STM32F401 board.
Add an ifdef on I2C test as F4 does not have a domain clock for I2C.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-03-30 13:47:55 +02:00
Andrei Emeltchenko
db2ebed78d tests: smbus: Cleanup CMakeLists files
Remove "-machine Q35" from QEMU_EXTRA_FLAGS since this is now the
default qemu_x86_64 configuration.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-30 09:45:02 +00:00
Andrei Emeltchenko
1679faaa0e smbus: Move smbus_utils.h from includes to driver area
Move smbus_utils.h header from generic includes to the driver's area
in order to have in include/zephyr/drivers only smbus.h header.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-30 09:45:02 +00:00
Armin Brauns
1de52f501c tests: drivers: clock_control: stm32: clock selection with dirty registers
This makes sure clock selection works even if the registers aren't in their
default (reset) state.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-03-29 15:53:08 +00:00
Francois Ramu
c3e9879d95 tests: drivers: clock control for the stm32H5 serie core
Adds the configurations for testing the clock controller driver
of the stm32H5 serie coreon stm32h573i disco kit

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-29 10:04:39 +02:00
Francois Ramu
951c9e3caf tests: drivers: watchdog testing on the stm32h573i_dk
Run the tests/drivers/watchdog/wdt_basic_api on the stm32h573i_dk
for both IWDG and WWDG of the stm32h5 device

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-29 10:04:39 +02:00
Fabio Baltieri
2586fec484 test: kscan: add tests for kscan_input
Add a test for the zephyr,kscan-input driver.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-28 20:57:53 -04:00
Patryk Duda
69226e96e9 drivers: flash: Add tests for STM32 extended operations
Introduced tests covers following features:
- Write protection - enabling, disabling, confirming that it works.
- Readout protection - checking current status.

These features are implemented on STM32F4 boards, so we only allow these
boards.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2023-03-28 15:43:16 +00:00
Patryk Duda
32fbe27054 test: drivers: Move existing flash tests to flash/common directory
After 'flash_ex_op' syscall was added we are able to expose vendor
specific features to the user.

This patch moves existing tests to 'tests/drivers/common'. New tests for
vendor specific operations should go to vendor directory under
'tests/drivers/flash'.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2023-03-28 15:43:16 +00:00
Fabian Blatz
1a132fabc0 tests: drivers: uart: add uart_emul test
Add test of the uart emulator polling API.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-03-27 09:50:44 +02:00
Hein Wessels
641722afab tests: drivers: adc_dma: stm32h7: use auto generated linker section
Change this test to use the automatically generated linker section
to place the buffer in SRAM4, instead of using the manually created
region added in 088d38f. This is in preperation of removing the
manually created section.

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-03-24 17:37:06 +00:00
Hein Wessels
b208fc52c7 tests: drivers: dma: stm32h7: use auto generated linker section
Change this test to use the automatically generated linker section
to place the buffer in SRAM4, instead of using the manually created
region added in 088d38f. This is in preperation of removing the
manually created section.

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-03-24 17:37:06 +00:00