Commit Graph

189 Commits

Author SHA1 Message Date
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
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
Andrzej Głąbek
8cba27aab3 tests: drivers: uart_pm: Fix testing of no-RX case
Instead of checking the `rx-pin` property that got deprecated and
removed, the test needs to check the `disable-rx` property.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-03-23 09:40:11 +01: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
Andrzej Głąbek
28d0789c37 tests: uart_mix_fifo_poll: Use "counter_dev" node label
This test needs a counter device. Introduce a node label that allows
selecting one in dts overlays instead of using hard-coded `timer0`.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-03-22 21:21:06 +01:00
Krzysztof Chruscinski
656b0e6426 drivers: counter: Adapt to use device tree
Modifying counter drivers (rtc and timer) to rely completely on
device tree and not on Kconfig of MDK flags.

Adapting dtsi for all SoCs and adapting test configuration.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-20 16:59:40 +01:00
Katarzyna Giądła
0a16558289 tests: drivers: uart: uart_pm: Unify set of pins on nrf52840dk_nrf52840
Unify set of the pins on `nrf52840dk_nrf52840`, which is used by
`gpio_loopback` fixture.

Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
2023-03-14 10:50:27 +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
Tom Burdick
0a07d80300 tests: Tag uart tests as uart
UARTs are mostly assumed to exist in Zephyr but some hardware wishes
to exclude the tests. Adds a uart tag to the test case to ensure
ignoring is possible.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-10 18:29:35 -05:00
Krzysztof Chruscinski
2164511bb6 tests: drivers: uart: uart_mix_fifo_poll: Add dependency
Add gpio dependency to the test.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-01-09 19:21:48 +01:00
Krzysztof Chruscinski
8931cc22df tests: drivers: uart: uart_mix_fifo_poll: 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
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
Andriy Gelman
eef672ed5b tests: uart: Test pushing more than 1 byte in uart_fifo_fill call
Currently the test only pushes 1 byte in each call to uart_fifo_fill().
This doesn't test cases where the driver can accept more than 1 byte
in the fifo.
Instead, try to push all the bytes in the uart_fifo_fill() call.
Internally the driver may only accept 1 byte, in which case the test
will be equivalent as before the patch.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-12-22 11:06:43 +01:00
Anas Nashif
ba7d730e9b tests/samples: use integration_plaforms in more tests/samples
integration_platforms help us control what get built/executed in CI and
for each PR submitted. They do not filter out platforms, instead they
just minimize the amount of builds/testing for a particular
tests/sample.
Tests still run on all supported platforms when not in integration mode.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-29 16:03:23 +01: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
Michał Barnaś
dae8efa692 ztest: remove the obsolete NULL appended to zassert macros
This commit removes the usage of NULL parameter as message in
zassert_* macros after making it optional

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2022-09-09 07:05:38 -04:00
Enjia Mai
87abb27021 tests: drivers: uart: move the uart basic tests to new ztest API
Migrate the testsuite tests/drivers/uart/uart_basic_api to the
new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-08 15:25:52 +00:00
Enjia Mai
4ec2258f06 tests: drivers: uart: move the uart PM tests to new ztest API
Migrate the testsuite tests/drivers/uart/uart_pm to the
new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-08 15:25:52 +00:00
Enjia Mai
d40b1356e9 tests: drivers: uart: move the uart mix tests to new ztest API
Migrate the testsuite tests/drivers/uart/uart_mix_fifo_poll to the
new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-08 15:25:52 +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
a202341958 devices: constify device pointers initialized at compile time
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).

Automated using:

```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-22 17:08:26 +02: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
Kumar Gala
bfbe1f85ad tests: uart_mix_fifo_poll: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-15 10:03:06 +02: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