From 2222fafead9ee5bb7e81918b2a8a0ab6df667ee5 Mon Sep 17 00:00:00 2001 From: Tu Nguyen Van Date: Thu, 29 Aug 2024 19:02:07 +0700 Subject: [PATCH] tests: drivers: spi: enable test spi_loopback enable test spi_loopback for dspi feature on s32z27x devices Signed-off-by: Tu Nguyen Van --- .../boards/s32z2xxdc2_s32z270_dspi.overlay | 40 +++++++++++++++++++ tests/drivers/spi/spi_loopback/testcase.yaml | 6 +++ 2 files changed, 46 insertions(+) create mode 100644 tests/drivers/spi/spi_loopback/boards/s32z2xxdc2_s32z270_dspi.overlay diff --git a/tests/drivers/spi/spi_loopback/boards/s32z2xxdc2_s32z270_dspi.overlay b/tests/drivers/spi/spi_loopback/boards/s32z2xxdc2_s32z270_dspi.overlay new file mode 100644 index 000000000000000..c6111cbd703fd50 --- /dev/null +++ b/tests/drivers/spi/spi_loopback/boards/s32z2xxdc2_s32z270_dspi.overlay @@ -0,0 +1,40 @@ +/* + * Copyright 2024 NXP + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&pinctrl { + dspi0_default: dspi0_default { + group1 { + pinmux = , ; + output-enable; + nxp,current-reference-control; + nxp,termination-resistor; + }; + group2 { + pinmux = ; + input-enable; + nxp,current-reference-control; + nxp,termination-resistor; + }; + }; +}; + +&dspi0 { + pinctrl-0 = <&dspi0_default>; + pinctrl-names = "default"; + status = "okay"; + + slow@0 { + compatible = "test-spi-loopback-slow"; + reg = <0>; + spi-max-frequency = <500000>; + }; + + fast@0 { + compatible = "test-spi-loopback-fast"; + reg = <0>; + spi-max-frequency = <16000000>; + }; +}; diff --git a/tests/drivers/spi/spi_loopback/testcase.yaml b/tests/drivers/spi/spi_loopback/testcase.yaml index 47d2ec28178ea25..3087e65c640d291 100644 --- a/tests/drivers/spi/spi_loopback/testcase.yaml +++ b/tests/drivers/spi/spi_loopback/testcase.yaml @@ -204,3 +204,9 @@ tests: drivers.spi.max32_dma.loopback: extra_args: EXTRA_CONF_FILE="overlay-max32-spi-dma.conf" filter: CONFIG_SOC_FAMILY_MAX32 + drivers.spi.s32z_dspi.loopback: + extra_args: + - DTC_OVERLAY_FILE=boards/s32z2xxdc2_s32z270_dspi.overlay + platform_allow: + - s32z2xxdc2/s32z270/rtu0 + - s32z2xxdc2/s32z270/rtu1