Commit Graph

128 Commits

Author SHA1 Message Date
Krzysztof Chruściński
1ec05c4431 tests: drivers: Add dependency to UART runtime configuration
Force enabling of the UART runtime configuration in UART tests.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-11-15 10:02:18 +01:00
Andriy Gelman
6db785404a tests: drivers: uart_async_api: Be more robust to early buf release
Commit eb44414af9 modified
test_single_read for early rx buf release.

The commit assumed that tdata.last_rx_buf points to either &tdata.rx_buf[0]
if the driver releases the first buffer or at &rx_buf[5] if the first
buffer is not released. However, where tdata.last_rx_buf points to depends
on the timeout given to uart_rx_enable(), making the test flaky.

This commit modifies the test by keeping track how many bytes have been
received in the first and second buffers.
The function tdata_check_recv_buffer() validates that the sent data
matches the received bytes which may have been split between first and
second buffer.

This fixes the uart_async_api test on the xmc45_relax_kit.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-11-13 09:41:49 +01:00
Benjamin Deuter
329ef222dd tests: drivers: serial: async: Add support for stm32h735g_disco
On the STM32H735G-DK Discovery kit, when connecting a UART from
pin PF7 to PF6, the test uart_async_api passes now.

Signed-off-by: Benjamin Deuter <benjamin.deuter@gmail.com>
2023-11-10 10:41:23 +01:00
Erwan Gouriou
7b50c38ec9 tests: drivers: serial: async: Add configuration for STM32WBA tests
Add STM32WBA test configuration to enable async API serial tests.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-20 15:05:59 +02:00
Anas Nashif
345735d0a8 tests: remove CONFIG_ZTEST_NEW_API in all tests
Remove all usage of CONFIG_ZTEST_NEW_API from tests and sample as this
is now enabled by default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Dat Nguyen Duy
d4cab4474b tests: drivers: uart_async_api: enable test for mr_canhubk3
Run this test on lpuart10 with internal loopback enabled.
Use DTCM region for this test because in some local
variables are used for dma buffer which requires
non-cacheable

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-29 09:47:57 +02:00
YuLong Yao
1a2a8fd49b tests: drivers: uart: add esp32s3_luatos_core
add overlay and conf for esp32s3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00
YuLong Yao
641a70f3b8 tests: drivers: uart: add esp32c3_luatos_core
add overlay and conf for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
Jeroen van Dooren
772e6fd423 tests: drivers: uart: Adding wide data async tests
Extending async tests with wide data support.

Signed-off-by: Jeroen van Dooren <jeroen.van.dooren@nobleo.nl>
2023-08-30 10:17:17 +02:00
Jeroen van Dooren
930edd8ed4 tests: drivers: uart: Resetting uart state
Resetting uart state before every testcase.

Signed-off-by: Jeroen van Dooren <jeroen.van.dooren@nobleo.nl>
2023-08-30 10:17:17 +02:00
Marc Desvaux
2580728033 tests: drivers: uart: uart_async_api change pin nucleo_l152re
change pins for the test uart_async_api loopback because the old pins
pb10/pb11 are now used for the I2C loopback test.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-08-22 18:11:32 +02:00
Gerson Fernando Budke
cdd949325b uart_sam0: extend async serial tests to more atsamxxx_xpro boards.
This includes new overlays for boards supporting DMA, and one more test
to verify M0 boards both with and without DMA can be built when
requesting CONFIG_UART_ASYNC_API.

Signed-off-by: Diego Elio Pettenò <flameeyes@meta.com>
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-08-21 17:15:29 +02:00
Diego Elio Pettenò
4cada3ecaf uart_sam0: don't consume CONFIG_UART_ASYNC_API directly.
There are situations in which the async API for uart can be provided
by another driver (case in point, uart_rtt), and thus there is no valid
DMA controller for the uart_sam0 driver to talk with.

By separating the configuration, there's no need to exclude samd20-based
boards (that have no DMA peripheral) from the uart_async_api tests.

Signed-off-by: Diego Elio Pettenò <flameeyes@meta.com>
Co-authored-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-08-21 17:15:29 +02:00
Andriy Gelman
524fe7698b boards: arm: xmc47_relax_kit: Configure usic1ch1 as i2c node
It is the arduino_i2c node on the board.
Also remove comment from arduino_r3_connector as the arduino_i2c
node can be used.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-08-16 20:43:50 +02:00
Daniel Leung
121b4d2d62 tests: drivers: rename shadow variables
Renames shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-10 08:14:12 +00:00
Diego Elio Pettenò
762a1f8b42 ev11l78a: initial import of the UPD301C Basic Sink board.
This board is a relatively inexpensive development kit for USB-PD
controllers, using an UPD301C controller.

This Zephyr config includes support for:

 * UART (present on he debug header of the board), tested with the
   hello_world sample application;
 * the one standalone LED (CAP_MIS), tested with the blinky sample
   application;
 * the rotary encoder (PDO_SEL), via ADC, tested with the adc sample
   application;
 * the current sense amplifier (I_SENSE), currently untested;
 * the SPI bus, connected internally in the UPD301C to the UPD350;
 * the I2C bus, exposed on the debug header, currently untested.

Note that the drivers.uart.async_api.rtt has to be disabled, as it is
for other m0 boards with no dma or it fails to build.

Signed-off-by: Diego Elio Pettenò <flameeyes@meta.com>
2023-08-08 19:02:15 +00:00
Marek Matej
6b57b3b786 soc: xtensa,riscv: esp32xx: refactor folder structure
Refactor the ESP32 target SOCs together with
all related boards. Most braking changes includes:

- changing the CONFIG_SOC_ESP32* to refer to
  the actual soc line (esp32,esp32s2,esp32s3,esp32c3)
- replacing CONFIG_SOC with the CONFIG_SOC_SERIES
- creating CONFIG_SOC_FAMILY_ESP32 to embrace all
  the ESP32 across all used architectures
- introducing CONFIG_SOC_PART_NUMBER_* to
  provide a SOC model config
- introducing the 'common' folder to hide all
  commonly used configs and files.
- updating west.yml to reflect previous changes in hal

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-07-25 18:12:33 +02:00
Lucas Tamborrino
ea949d0399 tests: drivers: uart: async: esp32c3: use internal loopback
Use internal loopback for esp32c3 board, avoiding the use of
external wiring.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-06-22 08:13:36 +00:00
Lucas Tamborrino
8cbf1be28e tests: drivers: uart: uart async: Add esp32s3 overlay
Add esp32s3 support for uart async tests.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-06-17 08:00:31 -04:00
Krzysztof Chruscinski
eb44414af9 tests: drivers: uart: async_api: Align test to early RX buffer release
Modify the test to not rely on assumption that RX buffer is released
when it is fully released. RX buffer maybe released after any RX_RDY
event within the buffer, e.g. after each timeout driver may be
switching to the new buffer.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-06-01 06:34:53 -04:00
Anas Nashif
04827ba71f tests/samples: use integration_platforms more where it makes sense
Use integration platforms to limit churn and build time in PR CI .

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-05-26 17:52:02 -04:00
Declan Snyder
dc40131a0e tests: uart_async_api: Support RTXXX
Support mimxrt595_evk_cm33 and mimxrt685_evk_cm33
on the uart_async_api test with a board overlay

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-05-26 13:15:24 -05:00
Francois Ramu
4d4900c311 tests: drivers: uart async testing on the stm32f103 nucleo
Configure the overlay to have DMA transfer with high priority
when running the tests/drivers/uart/uart_async_api on nucleo_f103rb.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-05-16 13:26:28 +00:00
Gerard Marull-Paretas
93b63df762 samples, tests: convert string-based twister lists to YAML lists
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-10 09:52:37 +02:00
Andriy Gelman
5fd71e35a1 tests: drivers: uart_async_api: Add xmc47_relax_kit overlay/conf
Adds overlay and conf files to run the test with the xmc47_relax_kit.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-05-02 12:34:55 +02:00
Andriy Gelman
f8f09300c1 boards: arm: Add xmc47_relax_kit
Adds Infineon xmc47_relax_kit board.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-05-02 12:34:55 +02:00
Andriy Gelman
7a9490b316 tests: uart: uart_async_api: Re-enable tests on xmc45_relax_kit
drivers.uart.async_api.rtt test started failing on xmc45_relax_kit
after f423ec255f which set
CONFIG_SERIAL_SUPPORT_ASYNC=y if uart rtt is enabled. This conflicts
with the xmc4xxx uart driver which sets the same symbol conditionally
if the dma is enabled in the device tree. The conflict created some
warning during compilation causing the CI to fail.

All the uart_async tests were disabled in
71d0394752. This commit re-enables the
test on xmc45_relax_kit and only excludes the rtt test that's failing.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-04-12 08:59:20 +02:00
Kamil Serwus
71d0394752 sam: atsamc2x: dmac enable, fix uart-async
Enable dmac driver for C2x in dtsi file.
Fix tests for atsamc21n_xpro board by adding
overlay.

Signed-off-by: Kamil Serwus <kserwus@gmail.com>
2023-04-07 18:58:24 +02:00
Andrzej Głąbek
2cbe097b29 tests: drivers: uart: Use "dut" node label to select UART to be tested
... to limit #if chains in these tests and make it easier to add new
boards.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-03-23 09:40:11 +01:00
Joel Guittet
63e9e37fc3 boards: Add support for Wio Terminal
Add support for the Wio Terminal board, including support of its
sensors, MicroSD and LCD. Tested with samples already available.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2023-03-09 15:18:25 -06:00
Andriy Gelman
eb5fd177d1 tests: drivers: uart_async_api_api: Add overlay for xmc45_relax_kit
Adds overlay and config for xmc45_relax_kit.
The Kconfig entry CONFIG_SPEED_OPTIMIZATIONS=y must be set
to pass the test at baudrate 921600 bps.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-02-21 21:15:53 +01:00
Francois Ramu
6ff19d77ce tests: drivers: use stm32 dma driver binding macro to configure channel
Use the macro as defined by the
include/zephyr/dt-bindings/dma/stm32_dma.h to configure the
dma channel.
Use the STM32_DMA_PERIPH_TX or STM32_DMA_PERIPH_RX value.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-01-23 09:15:21 -06:00
Lucas Tamborrino
a64d3d388f tests: drivers: uart: uart async: Add ESP32C3 support
Add ESP32C3 support for uart async api test

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-01-12 19:09:01 +01:00
Lucas Tamborrino
41b431a01a drivers: uart: esp32c3: Add async support
Add UART async support for ESP32C3

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-01-12 19:09:01 +01:00
Krzysztof Chruscinski
6a7db6def9 tests: drivers: uart: Align nrf52840dk configuration
Align configuration for nrf52840dk to use the same loopback pins
for uart_async_api and uart_mix_fifo_poll tests.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-01-09 19:21:48 +01:00
Krzysztof Chruscinski
f33765dec5 tests: drivers: uart: uart_async_api: Add nrf5340_cpuapp
Add configuration for nrf5340_cpuapp.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-01-09 19:21:48 +01:00
Katarzyna Giądła
58c924ec56 tests: drivers: uart: Add GPIO dependency to tests
Add gpio dependency to the tests, which require fixture
`gpio_loopback`.

Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
2023-01-03 19:20:36 -05:00
Fabio Baltieri
7db1d17ee3 yamllint: fix all yamllint line-length errors
Fix all line-length errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(line-length)'

Using a limit is set to 100 columns, not touching the commandlines in
GitHub workflows (at least for now).

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Francois Ramu
d8093cda7b tests: drivers: uart async api test case on stm32u575 nucleo board
This commit configures the testcase to run on the
stm32u5x5 target boards. USART2 is selected
Pins Tx and Rx (PD5 PD6 on CN9) must be connected on the HW board
to pass the test.
The USART transfer uses the GP DMA transfer with request
27 and 26 on 2 DMA channels (0-15).

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-23 11:32:27 +01:00
Francois Ramu
0c4cff9cda tests: drivers: uart async on stm32u585 disco kit
This commit configures the testcase to run on the
stm32u585 target boards. USART3 is selected
Pins Tx and Rx (PD8 PD9 on CN14) must be connected on the HW board
to pass the test.
The USART transfer uses the GP DMA transfer with request
28 and 29 on 2 DMA channels (0-15).

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-23 11:32:27 +01:00
Anas Nashif
67e8d03280 tests/samples: fix some missing tags
Many driver samples or tests only had 'drivers' as the tag, without a
tag indicating what driver that is exactly, so add some missing tags.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-14 07:08:04 -05:00
Francois Ramu
5857b7ea41 tests: drivers: uart async on nucleo_wb55rg with DMA
Configure through an overlay file, the nucleo_wb55rg board
for running the tests/drivers/uart/uart_async_api.
DMAMUX is used for transfer on channels 0 & 1 with
LPUART peripheral request 17 & 16.
No hw flowcontrol for this test.
Connect pin A0 & A1 of CN8 to PASS the test.
Note that I2C3 pin assignment might conflict (PC0 & PC1).

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-09 10:43:35 +01:00
Miguel Dardenne
cf175b3f6f boards: Add support for Adafruit Feather M0 with LoRa radio
Add support for the Feather M0 LoRa board, including support of its
Semtech Lora radio. Tested the radio using a pair of boards.

Signed-off-by: Miguel Dardenne <miguel.dardenne@gmail.com>
2022-11-04 08:53:49 +00:00
Enjia Mai
8995a58702 tests: drivers: uart: move the uart async tests to new ztest API
Migrate the testsuite tests/drivers/uart/uart_async_api to the
new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-08 15:25:52 +00:00
Gerard Marull-Paretas
e8b79e5b34 tests: drivers: uart: initialize devices at compile time
Initialize devices at compile time. Also fix some ready check problems
(e.g. in async test readiness failure just resulted in a printk, but
test continued...).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Fabio Baltieri
def230187b test: fix more legacy #include paths
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
Kumar Gala
b97a9ee21c tests: drivers: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from tests.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-22 16:44:08 +00:00
Attie Grande
adeb181a72 boards: arm: atsamr34: Add SAMR34 Xplained board
Implement support for SAMR34 Xplained Pro dev board.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-07-18 10:35:46 +00:00
Attie Grande
876dc19d27 boards: arm: atsaml21: Add SAML21 Xplained board
Implement support for SAML21 Xplained Pro dev board.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-07-18 10:35:46 +00:00
Anas Nashif
02f2896586 tests: add mising braces to single line if statements
Following zephyr's style guideline, all if statements, including single
line statements shall have braces.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-06 11:00:45 -04:00