Commit Graph

247 Commits

Author SHA1 Message Date
Dat Nguyen Duy
9f9aaf83f4 tests: spi_loopback: enable lpspi + dma testing for mr_canhubk3
This enables lpspi + dma testing by default for mr_canhubk3

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-28 09:31:52 +02:00
Daniel Gaston Ochoa
c870fb70ce drivers: spi: Test rx bigger than tx
Test that SPI works when the rx buffer is longer than
the tx one.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2023-09-27 15:44:50 +02:00
YuLong Yao
676eed840c tests: drivers: spi: 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
Daniel Gaston Ochoa
7c1ec02933 drivers: spi: stm32h7: Add interrupt tests for H7
Add interrupt loopback tests for SPI STM32H7.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2023-09-20 20:19:35 +01:00
Daniel Gaston Ochoa
382eaf7baa tests: drivers: spi: stm32h7: Run 16-bit frames tests for DMA
Run 16-bit frames tests also when DMA is enabled. In addition,
remove the extra code required for the mentioned tests in
favor of config. files, and add test cases for nocache regions
defined in devicetree.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2023-09-20 11:33:28 +01:00
YuLong Yao
27df7aa0ce tests: drivers: spi: 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
Gerard Marull-Paretas
691facc20f include: always use <> for Zephyr includes
Double quotes "" should only be used for local headers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:49:58 +02:00
Sreeram Tatapudi
fd04f8cc81 drivers: spi: Initial version of the Infineon CAT1 SPI driver
Initial version of Infineon CAT1 SPI Driver supporting synchronous
and asynchronous data transfer API

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-09-12 10:55:01 +02:00
Daniel Gaston Ochoa
d8fab9e435 stm32h7: spi: Add SPI loopback tests for 16 bits frames
Enable these tests only for H7 and if DMA is not enabled, as
running them with DMA would require modifying the dmamux
configuration in devicetree to move half-words instead of
bytes.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2023-09-06 11:44:28 +02:00
Bindu S
8350fc2c63 tests: drivers: spi: spi_loopback: Added intel_adl_crb overlay
Added overlay and conf to enable SPI tests on intel_adl_crb board.

Signed-off-by: Bindu S <bindu.s@intel.com>
2023-09-05 11:41:46 +02:00
Daniel Gaston Ochoa
818aa2d0c7 drivers: stm32: SPI: SPI nocache buffers can be in CONFIG_NOCACHE_MEMORY
CONFIG_NOCACHE_MEMORY is a valid way of declaring buffers in
nocache regions. Consider them valid in the stm32 SPI driver
nocache check. Also, don't check NULL buffers as the SPI
interface states that such buffers will result in sending
zeroes.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2023-08-24 15:35:50 +02:00
Julio Cesar
5e15e8cb48 boards: xtensa: Add support for YD-ESP32 board
Add `yd_esp32` board:

- Model name: YD-ESP32
- Manufacturer: VCC-GND® Studio
- Espressif module: ESP32-WROOM-32E

Signed-off-by: Julio Cesar <hi@jcsx.dev>
2023-08-15 11:15:39 +00:00
Johan Hedberg
2b757f1eca boards: x86: Add intel_ prefix to Intel Raptor Lake boards
This is following the same convention that was recently introduced to Alder
Lake boards (intel_adl). Additionally, an "S" suffix is added to the
boards, since what's currently supported is in fact the Raptor Lake S
variant.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-08-11 19:48:32 +00: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
cyliang tw
8474cdcaad tests: drivers: spi: spi_loopback: support numaker_pfm_m467
Add support for Nuvoton numaker board numaker_pfm_m467.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-08-09 08:24:38 +00:00
Manuel Arguelles
565e582b8d boards: arm: mr_canhubk3: enable support for LPSPI
Configure LPSPI instances on this board. All of them are routed with SDI
and SDO data pins inverted.

Enable SPI tests without DMA support for the moment.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-01 09:51:16 +02:00
Marek Matej
3776402f40 boards: xtensa: esp32 board split
Remove virtual esp32 board and replace it with the
real word boards:

- esp32_devkitc_wroom
- esp32_devkitc_wrover (with PSRAM option)

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-07-25 18:12:33 +02:00
Lucas Tamborrino
669407f029 tests: drivers: spi loopback: esp32xx: Use internal loopback
Use pinctrl with internal loopback enabled for ESP32 and ESP32C3.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-07-25 09:17:08 +02:00
Daniel DeGrasse
2ef5eb9772 boards: arm: mimxrt1170_evkb: add support for SPI
Add support for SPI on RT1170 EVKB, verified using SPI loopback sample.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-29 21:05:56 +02:00
Lucas Tamborrino
e562c980ae tests: drivers: spi: spi_loopback: esp32xx: Use internal loopback
Use internal loopback for esp32xx boards, avoiding the use of
external wiring.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-06-22 08:13:36 +00:00
Daniel DeGrasse
cc3ca993ce boards: arm: mixmrt1040_evk: enable SPI support
Add support for SPI on RT1040 EVK, tested using
tests/drivers/spi/spi_loopback sample. Transfers are enabled using DMA
mode, with LPSPI1.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:35:40 -05: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
Tom Burdick
e4b10328b4 rtio: Use mpsc for submission and completion queue
Rather than the rings, which weren't shared between userspace and kernel
space in Zephyr like they are in Linux with io_uring, use atomic mpsc
queues for submission and completion queues.

Most importantly this removes a potential head of line blocker in the
submission queue as the sqe would be held until a task is completed.

As additional bonuses this avoids some additional locks and restrictions
about what can be submitted and where. It also removes the need for
two executors as all chains/transactions are done concurrently.

Lastly this opens up the possibility for a common pool of sqe's to
allocate from potentially saving lots of memory.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-05-10 00:39:43 +09:00
Andriy Gelman
e4d753ba4d tests: drivers: spi_loopback: Adds xmc47_relax_kit overlay/conf
Adds overlay and conf to run the test on xmc47_relax_kit.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-05-02 12:34:55 +02:00
Andriy Gelman
b2d7cf05a9 tests: drivers: spi: spi_loopback: Update xmc45_relax_kit to use dma
Update test to use DMA for spi transfers.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-04-25 12:23:26 +02:00
Gerard Marull-Paretas
1e0028ae3d drivers: spi: add spi_cs_is_gpio(_dt) helpers
Add spi_cs_is_gpio(_dt) helpers to check whether SPI CS is controlled by
GPIO or not. This both improves code readability and isolates SPI
internals.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-24 21:29:55 +02:00
Gerard Marull-Paretas
3f2c2d4130 drivers: spi: make SPI dt-spec macros compatible with C++
As of today it is not possible to use SPI dt-spec macros in C++,
something known and documented. The main reason is because `cs` property
is initialized using a compound literal, something not supported in C++.
This PR takes another approach, that is to not make `cs` a pointer but a
struct member. This way, we can perform a regular initialization, at the
cost of using extra memory for unused delay/pin/flags if `cs` is not
used.

Fixes #56572

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-24 21:29:55 +02:00
Mahesh Mahadevan
e060cdd7be tests: spi_loopback: Enable ASYNC mode for NXP platforms
Turn on ASYNC mode for RT595 and RT685 EVK boards

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-04-24 13:34:29 +02:00
Brandon Del Bel
6bbadb6012 test: drivers: spi: spi_loopback: fix adafruit_itsybitsy_m4_express
tests/drivers/spi/spi_loopback/drivers.spi.loopback on
adafruit_itsybitsy_m4_express fails to build. Fix it by adding
CONFIG_SPI_ASYNC=n.

Signed-off-by: Brandon Del Bel <delbel@umn.edu>
2023-04-21 09:40:53 +02:00
Brandon Del Bel
587f2ec585 test: drivers: spi: spi_loopback: fix test on atsame54_xpro
tests/drivers/spi/spi_loopback/drivers.spi.loopback on atsame54_xpro
fails to build. Fix it by adding a CS pin and DMA channels to the board
overlay. Passes on hardware with spi_loopback fixture after change.

Signed-off-by: Brandon Del Bel <delbel@umn.edu>
2023-04-21 09:40:53 +02:00
Anas Nashif
511348801d tests: spi_loopback: fix some identifiers in testcase.yaml
driver -> drivers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-19 08:57:57 -04:00
Scott Worley
5c00a83b99 drivers: spi: Microchip XEC QMSPI-LDMA fix spi buffer usage
Zephyr SPI driver model for full-duplex operation assumes
data will be transmitted and received during each clock period.
The QMSPI driver for the XEC family also supported dual and
quad I/O use cases which are inherently half-duplex. To
support dual/quad the driver incorrectly processed spi buffers
as all transmit buffers first then all receive buffers. This
worked if only the SPI driver was used. It did not work with
the Zephyr flash SPI NOR driver which assumes SPI drivers
follow the SPI driver model. This commit implements a QMSPI
driver that follows the Zephyr SPI driver model resulting in
a slightly smaller driver. Dual/quad SPI transactions are
supported if the experimental SPI extended mode Zephyr
configuration flag is enabled. We also remove the QMSPI full duplex
driver added previously to support the flash SPI NOR driver.
Added board to spi loop-back test and spi_flash sample.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2023-04-11 16:57:56 +02:00
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
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
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
Ramesh Babu B
5df7d93c82 tests: drivers: spi: Enable spi_loopback on RPL CRB
Configure through an overlay file, the rpl_crb board
for running the tests/drivers/spi/spi_loopback.

Signed-off-by: Ramesh Babu B <ramesh.babu.b@intel.com>
2023-03-21 13:39:33 +01:00
Lucas Tamborrino
9015f23b75 tests: spi_loopback: Add esp32s3
Add esp32s3 to spi_loopback test

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-03-13 14:02:06 +01:00
Andriy Gelman
2b6c970716 tests: spi_loopback: Add configuration for xmc45_relax_kit
Adds configuration for xmc45_relax_kit.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-03-03 17:20:17 +01:00
Siyuan Cheng
c6d6a60d50 test: spi_loopback: add emsdp board support
Add emsdp board in spi_loopback test

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-02-23 10:51:06 -06:00
Anas Nashif
0bc4fd4cb9 tests: fix various test identifiers
lib -> libraries to be consistent with everything else.
And fix identifier for a few stray tests that were wrongly
labeled/tagged.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-02-06 10:06:10 +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
TOKITA Hiroshi
2af7d728e2 tests: spi: spi_loopback: add interrupt and DMA tests for GD32 boards
Add interrupt and DMA tests for GD32 boards.
Use overlay-gd32-spi-interrupt.conf when testing interrupt based transfer,
use overlay-gd32-spi-dma.conf when testing DMA transfer,

Add overlay file for GD32 boards for these tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-01-11 08:50:56 -08: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
Bartosz Bilas
e077fb73ec drivers: tests: replace usage of spi_is_ready with spi_is_ready_dt
`spi_is_ready` function is being deprecated in favor of
`spi_is_ready_dt` so let's replace the old usage in the tree.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2022-12-07 09:40:23 -06:00
Francois Ramu
8a6642af8a tests: drivers: spi_loopback on stm32f3_disco
Configure through an overlay file, the stm32f3_disco board
for running the tests/drivers/spi/spi_loopback.
The SPI1 is selected: MOSI/MISO output pins are available
on the board.
Connect pin PA6 & PA7 of connector P1 to PASS the test.
Add the spi_loopback fixture.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-12-01 13:12:41 +00:00
Francois Ramu
553afbef47 tests: drivers: spi loopback on nucleo_l152 with DMA
Configure through an overlay file, the nucleo_l152re board
for running the tests/drivers/spi/spi_loopback with DMA.
Limit the spi speed freq to run the test correctly.
The SPI1 is selected: MOSI/MISO output pins are available on the platform.
DMA1 channel 2 & 3 are selected for SPI1.
Connect pin D11 & D12 of CN5 to PASS the test.
Add the spi_loopback fixture.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-12-01 13:12:41 +00: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
Dat Nguyen Duy
3d36e5999a tests: spi_loopback: add support this test for NXP S32
Update overlay files to support the test for 2 boards:
s32z270dc2_rtu0_r52 and s32z270dc2_rtu1_r52

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2022-11-24 09:37:24 +01:00