From 550793385a54ecf8f4a1732ff32b8159cad1f85f Mon Sep 17 00:00:00 2001 From: Dimitrije Lilic Date: Thu, 12 Sep 2024 15:55:17 +0200 Subject: [PATCH] tests: drivers: spi: spi_loopback: Add support for RTIO tests for APARD32690 board Add overlay for APARD32690 board and add a new test case to test RTIO functionalities of SPI MAX32 driver. Signed-off-by: Dimitrije Lilic --- .../boards/apard32690_max32690_m4.overlay | 39 +++++++++++++++++++ .../spi_loopback/overlay-max32-spi-rtio.conf | 7 ++++ tests/drivers/spi/spi_loopback/testcase.yaml | 7 ++++ 3 files changed, 53 insertions(+) create mode 100644 tests/drivers/spi/spi_loopback/boards/apard32690_max32690_m4.overlay create mode 100644 tests/drivers/spi/spi_loopback/overlay-max32-spi-rtio.conf diff --git a/tests/drivers/spi/spi_loopback/boards/apard32690_max32690_m4.overlay b/tests/drivers/spi/spi_loopback/boards/apard32690_max32690_m4.overlay new file mode 100644 index 000000000000000..a5f14e4a0648b15 --- /dev/null +++ b/tests/drivers/spi/spi_loopback/boards/apard32690_max32690_m4.overlay @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2024 Analog Devices, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&spi1a_miso_p1_28 { + power-source = ; +}; + +&spi1a_mosi_p1_29 { + power-source = ; +}; + +&spi1a_sck_p1_26 { + power-source = ; +}; + +&spi1a_ss0_p1_23 { + power-source = ; +}; + +arduino_spi: &spi1 { + pinctrl-0 = <&spi1a_miso_p1_28 &spi1a_mosi_p1_29 &spi1a_sck_p1_26 + &spi1a_ss0_p1_23>; + pinctrl-names = "default"; + compatible = "adi,max32-spi"; + status = "okay"; + slow@0 { + compatible = "test-spi-loopback-slow"; + reg = <0>; + spi-max-frequency = <128000>; + }; + fast@0 { + compatible = "test-spi-loopback-fast"; + reg = <0>; + spi-max-frequency = <500000>; + }; +}; \ No newline at end of file diff --git a/tests/drivers/spi/spi_loopback/overlay-max32-spi-rtio.conf b/tests/drivers/spi/spi_loopback/overlay-max32-spi-rtio.conf new file mode 100644 index 000000000000000..dcf44166a3b7ad5 --- /dev/null +++ b/tests/drivers/spi/spi_loopback/overlay-max32-spi-rtio.conf @@ -0,0 +1,7 @@ +# +# Copyright (c) 2024 Analog Devices, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +CONFIG_SPI_RTIO=y +CONFIG_SPI_ASYNC=n diff --git a/tests/drivers/spi/spi_loopback/testcase.yaml b/tests/drivers/spi/spi_loopback/testcase.yaml index 5760aa0d8793073..5128540d1c53985 100644 --- a/tests/drivers/spi/spi_loopback/testcase.yaml +++ b/tests/drivers/spi/spi_loopback/testcase.yaml @@ -204,3 +204,10 @@ tests: drivers.spi.max32_dma.loopback: extra_args: OVERLAY_CONFIG="overlay-max32-spi-dma.conf" filter: CONFIG_SOC_FAMILY_MAX32 + drivers.spi.max32_spi_rtio.loopback: + extra_args: + - OVERLAY_CONFIG="overlay-max32-spi-rtio.conf" + - DTC_OVERLAY_FILE="boards/apard32690_max32690_m4.overlay" + filter: CONFIG_SOC_FAMILY_MAX32 + platform_allow: + - apard32690/max32690/m4 \ No newline at end of file