Commit Graph

185 Commits

Author SHA1 Message Date
Kumar Gala ac50f8a99e tests: spi_loopback: Rework test
* Move test to using devicetree for various "device" params.
* Move test to using spi_dt_spec to simplify code

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-08 10:45:14 +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
Thomas Stranger 9a6ba3f6bc tests/drivers/spi/spi_loopback: add overlay for nucleo_u575zi_q
SYSCLK frequency is 160MHz therefore w/o overlayfile the
slow frequency can only be reached with the divider added
by this commit in the overlay.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-20 11:08:42 +02:00
Gerard Marull-Paretas 2cfb5012db drivers: spi: nrfx_spim: move rx delay to DT
Move the RX (MISO) delaying capability information to Devicetree. It is
done using 2 properties:

- rx-delay-supported: enabled on SPI nodes that support delaying RX.
  This property can be used by the driver to determine if this
  capability is supported or not on a given instance.
- rx-delay: the actual RX delay value

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-19 13:20:00 -07:00
Gerard Marull-Paretas 3c6649f631 drivers: spi: spi_nrfx_spi(m|s): move ORC to DT
Specify the overrun character in Devicetree. Since 0xFF is the most
common value, DT property contains such default.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-19 13:20:00 -07:00
TOKITA Hiroshi 8e330cfcd6 tests: exclude arduion_mkrzero from uart_async and spi_loopback tests
uart_async test and spi_loopback test require UART and SPI
with an ASYNC option.
The SAM0 UART/SPI driver requires configuring DMA support.
Arduino MKRZero is not DMA configured like other SAM0 boards.
We exclude it from the tests.

ea36f9b and f4c5bdf already exclude other SAM0 boards from these tests.
Arduino MKRZero also followed these PR policies.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-07-04 16:00:56 +02:00
Chay Guo 77a0bc2135 boards: mimxrt595: Add SPI support
Enable access to the HS_SPI pins(JP26) on the mimxrt595_evk board.
Using DMA mode, tested with spi_loopback testcase.

Signed-off-by: Chay Guo <changyi.guo@nxp.com>
2022-06-13 12:10:57 +02:00
Sebastien Bourdelin 52ac180fe4 tests: spi: spi_loopback: rename SPI_SLAVE to SPI_SLAVE_NUMBER
As the SPI_SLAVE define is used by some HAL (e.g. the gigadevice HAL),
SPI_SLAVE has been renamed to SPI_SLAVE_NUMBER.

Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@rtone.fr>
2022-06-05 14:28:11 +02:00
Keith Packard b6f51c70e2 tests/spi_loopback: Fix buffer sizes to avoid buffer overflow
The initialized test buffers tx_data and tx2_data were not given a
specific size, but were initialized with one more byte than the
uninitialized buffers they get copied to. As a result, the memcpy found
a buffer overflow. Fix this by setting the source buffer sizes to match
the destination.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-05-27 15:34:34 -07:00
Erwan Gouriou d9b9e12cd3 dts/bindings/clocks: stm32: 'clock-names' optional for source clock setting
Since implementation of clock source selection in consumer device drivers
could be achieved without usage of a clock-names property and no
example of usage is provided up to now, remove this property from existing
examples.
Additionally, make it clear in stm32 clock control binding that it is
driver's responsibility to correctly access clock source information
and use it as required.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-05-10 18:42:30 +02:00
Erwan Gouriou 3f503e87cc boards: nucleo_h723zg: Enable SPI
Enable SPI on nucleo_h723zg board

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-05-10 18:42:30 +02:00
Gerard Marull-Paretas ade7ccb918 tests: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all tests to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 20:02:14 +02:00
Henrik Brix Andersen dcf833d971 tests: drivers: spi: loopback: add olimex_esp32_evb configuration
Add configuration for testing SPI loopback on the Olimex ESP32-EVB
board.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-04-28 10:26:40 +02:00
Jordan Yates 1d189487b4 tests: spi: spi_loopback: use gpio_dt_spec fields
Use the gpio_dt_spec fields of `struct spi_cs_control`, instead of the
deprecated individual fields.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-04-23 21:11:29 +02:00
Jordan Yates d6c3b0a40a tests: spi: spi_loopback: cleanup code formatting
Cleanup split lines and invalid whitespace.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-04-23 21:11:29 +02:00
Bartosz Bilas 2d3011c9b4 tests: drivers: spi: don't use deprecated spi_cs_control struct members
gpio_dev is being deprecated in favor of gpio_dt_spec gpio member
so let's use it instead of that one.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2022-04-21 13:00:35 +02:00
Maureen Helm e7a010de4e tests: drivers: spi: Add test for the SPI_DT_SPEC initializer macro
Adds a new test for the SPI_DT_SPEC initializer macro to reproduce the
XCC build failure reported in #43745 on the intel_adsp_cavs15 board.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-04-04 14:40:19 -07:00
Flavio Ceolin 6b56fcd07e tests: spi_loopback: Make test name consistent
By convention tests are using the name "drivers" and not "driver".

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-02 09:21:07 -05:00
Gerson Fernando Budke 58936e7639 soc: arm: atmel_sam: samv71: Fix SPI build dependency
The SAM spi driver depends on GPIO driver to work. It seems that this
dependency chain it is not handled. This select GPIO driver when SPI
driver is enabled. It rework GPIO and SPI Kconfig to select driver by
devicetree and drop entries at Kconfig.defconfig.series file.

Fixes #41525

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-01-18 12:12:52 -05:00
Francois Ramu f6c0362664 tests: drivers: spi loopback remove conf for most of the stm32 boards
The testcase is including a generic configuration conf
for the stm32 target boards when running the SPI loopback in
interrupt and DMA mode. Thus, the board specific conf file is useless.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-01-14 10:09:00 -06:00
Francois Ramu a7d2b2a9f9 tests: drivers: spi loopback testcase on spi2 for stm32 boards
Overwrites the overlay for testing the SPI2 when running on
nucleo_f302r8 and 96b_carbon targets.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-01-14 10:09:00 -06:00
Francois Ramu a3680c1b00 tests: drivers: spi loopback testcase yaml for stm32 dma
This commit adds two stm32 config to execute the testcase
when the SPI is using interrupt mode for transfer.
when the SPI is using DMA for transfer (not Interrupt nor ASYNC mode).
to run the on some specific (listed) stm32 boards on SPI instance.
Note the hw fixture (physical connection on the board)

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-01-14 10:09:00 -06:00
Francois Ramu e5554d741c tests: drivers: spi loopback with DMA testing on stm32h743 nucleo
with this config, the testcase PASSED on the nucleo_h743zi
using DMA for SPI transfer (through DMAMUX request)
Connect pins D11 and D12 on the ARDUIno connector CN7

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-01-07 15:06:28 -06:00
Francois Ramu 8f8830e22a tests: drivers: spi loopback on the stm32wl55jc nucleo board
connect SPI1 MISO pin D12 (pa6) on SPI1 MOSI pin D11 (pa7)
on the ARDuino connector CN5 of the nucleo board

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-01-04 09:12:32 -05:00
Daniel DeGrasse 0aeb69ee8c boards: mimxrt10xx: Added support for LPSPI DMA on RT10xx series
Add support for LPSPI DMA mode on RT1064, RT1060, RT1050, RT1024,
RT1020, RT1015, and RT1010 evaluation boards. Update tests to match.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-30 10:57:17 -06:00
Francois Ramu eeb6921f34 tests: spi: spi loopback test running on the stm32f767zi nucleo
Add support of the tests/drivers/spi/spi_loopabck
with dma (V1).
Connect MISO pin (D12) to MOSI (D11) pin on the board
to pass the test.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-11-16 10:12:39 -05:00
Francois Ramu dfc6611a31 tests: spi: loopback testing with NOCACHE MEMORY buffers for DMA
This patch is defining Tx buffers in NON CACHE memory for using
with DMA transfers. This requires the CONFIG_NOCACHE_MEMORY=y
flag when mcu is using CACHE.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-11-16 10:12:39 -05:00
Bartosz Bilas 203b474c4b tests: spi_loopback: enable GPIO driver for cy8ckit_062_ble_m0 board
Enable GPIO driver which is needed to handle CS GPIOS in SPI driver.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2021-11-11 07:25:45 -05:00
Bartosz Bilas 587d207244 tests: spi_loopback: enable GPIO driver for sam_v71* boards
Enable GPIO driver which is needed to handle CS GPIOS in SPI driver.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2021-11-11 07:25:45 -05:00
Felipe Neves 0a0fed7879 drivers: spi: esp32: add esp32c3 support
to the esp32 spi unified driver

Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
2021-11-01 21:47:26 -04:00
Daniel DeGrasse 430224eacb boards: mimxrt1020_evk: Added support for SPI on RT1020
Adds support for LPSPI1 on RT1020. This peripheral is exposed on J19, as
pins 3, 4, 5, and 6

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-10-13 10:12:25 -04:00
Daniel DeGrasse ab9f95e92b boards: mimxrt1010_evk: Add SPI support for RT1010
Adds SPI support on LPSPI1 to the RT1010. LPSPI1 is available on pins
6, 8, 10, and 12 of J57 on the evaluation board

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-10-13 10:12:25 -04:00
Daniel DeGrasse 97b138e8c9 boards: mimxrt1015_evk: Enable SPI on RT1015
This commit enables the LPSPI1 peripheral on the RT1015 EVK. LPSPI pins
are not populated by default, but headers can be added to J19 on the EVK
to access these signals

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-10-13 10:12:25 -04:00
Daniel DeGrasse a474066288 boards: mimxrt1024_evk: Add SPI support
Add support for LPSPI to mimxrt1024_evk. LPSPI1 is exposed on pins
6,8,10, and 12 of J19 of the evaluation board

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-10-13 10:12:25 -04:00
Daniel DeGrasse da57f024da boards: mimxrt1060_evk: Added SPI support for RT1060
SPI support is available on LPSPI1 and LPSPI3. Both of these require
board modifications to expose headers. LPSPI1 is used for testing,
and requires that the board have solder jumpers R278, R279, R280,
and R281 bridged.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-10-13 10:12:25 -04:00
Daniel DeGrasse d7a947a872 boards: mimxrt1064_evk: Added SPI support for RT1064
SPI support is available on LPSPI1 and LPSPI3. Both of these require
board modifications to expose headers. LPSPI1 is used for testing, and
requires that the board have solder jumpers R278, R279, R280, and R281
bridged.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-10-13 10:12:25 -04:00
Daniel DeGrasse 4c81289a83 boards: mimxrt1050_evk: Added support for LPSPI1 peripheral
RT1050 has multiple LPSPI peripherals. The simplest to access is LPSPI1,
which can be connected by bridging solder jumpers on the board. Enable
this SPI peripheral, and set it as default for SPI tests.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-10-13 10:12:25 -04:00
Glauber Maroto Ferreira 7468121f19 esp32s2: drivers: spi: add driver support
and hooks to spi_loopback test.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-10-10 14:52:41 -04:00
Francois Ramu c44eae80c3 tests: drivers: spi loopback running on stm32u585 disco kit
Configure the target board to PASS the test case.
The PCLK2 clock feeding the SPI1 is reduced by 2 (apb2 prescaler)
to accept the slow freq config.
The SPI1 MISO and MOSI pins are linked on the HW board
(on arduino CN13, D11 & D12)

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-10-05 19:23:37 -04:00
Hake Huang 6232ade277 tests: add spi dma loop test on frdm_k64f
add spi edma loop mode test

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-09-02 15:50:52 -05:00
Torsten Rasmussen 1cccc8a8fe cmake: increase minimal required version to 3.20.0
Move to CMake 3.20.0.

At the Toolchain WG it was decided to move to CMake 3.20.0.

The main reason for increasing CMake version is better toolchain
support.

Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-20 09:47:34 +02:00
Yuriy Vynnychek 87018c50cc drivers: spi: introduce new Telink B91 SPI driver
SPI driver basic support for Telink B91 SoC.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2021-08-19 17:18:23 -04:00
Francois Ramu d36cdd5a27 tests: drivers: spi loopback test running on the stm32l152re nucleo
add configuration for testing the spi through the dma1
on the nucleo_l152re target. This test requires the MOSI pin
to be connected to the MISO pin on the board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-08-16 19:35:36 +02:00
Francois Ramu a720712441 tests: spi: spi loopback test running on the stm32l5xx boards
add support of the dma (V2) for the stm32l5 for spi transfer.
on all available target boards

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-07-22 04:52:53 -04:00
Francois Ramu ee7a17282b tests: drivers: spi loopback test with overlay for each stm32 board
Based on the new bindings for the stm32 dma feature,
the overlay for enabling the dmamux on spi client is modified.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-07-22 04:52:53 -04:00
Krishna Mohan Dani 1fe292dfaf tests/drivers: nucleo_l552ze_q: Configuration for spi_loopback test
This commit configures spi, dma & dmamux to run spi_loopback test
on nucleo_l552ze_q platform. The tx & rx pin of spi1 should be
shorted before running spi_loopback.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-10 12:43:19 -04:00
Henrik Brix Andersen 34904e567b boards: arm: lpcxpresso55s16: rename board definition
Rename the NXP LPCXpresso55S16 board definition from
lpcxpresso55s16_ns (non-secure) to lpcxpresso55s16 and remove TF-M
configuration options.

While the LPC55S16 does have Arm TrustZone support, there is no TF-M
support available upstream yet.

Fixes #35100

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-05-19 08:02:54 -05:00
Thomas Stranger 8b156dfc85 tests: spi: convert nucleo_g474re to define prescaler in dt
As the nucleo_g474re was converted to define clock properties
in devicetree, this commit makes the ncecessary changes such that
the ncecessary test properties are still applied.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2021-05-06 09:28:33 -05:00
Thomas Stranger 3c87b7acaa tests: spi: add nucleo_g431rb to spi_loopback test in async mode
Add nucleo_g431rb to spi_loopback test using spi async configuration.
Such that tests do not only run with syncronous spi configuration
(nucleo_g474re), but also with the asyncronous configuration.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2021-05-06 09:28:33 -05:00