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>
This commit is contained in:
parent
d5b0bd55e0
commit
ac50f8a99e
103 changed files with 908 additions and 293 deletions
|
@ -4,34 +4,5 @@ mainmenu "SPI Loopback Test"
|
||||||
|
|
||||||
source "Kconfig.zephyr"
|
source "Kconfig.zephyr"
|
||||||
|
|
||||||
config SPI_LOOPBACK_DRV_NAME
|
|
||||||
string "SPI device name to use for test"
|
|
||||||
|
|
||||||
config SPI_LOOPBACK_CS_GPIO
|
|
||||||
bool "SPI port CS pin is controlled via a GPIO port during test"
|
|
||||||
depends on GPIO
|
|
||||||
|
|
||||||
config SPI_LOOPBACK_CS_CTRL_GPIO_DRV_NAME
|
|
||||||
string "The GPIO port which is used to control CS"
|
|
||||||
depends on SPI_LOOPBACK_CS_GPIO
|
|
||||||
default "GPIO_0"
|
|
||||||
|
|
||||||
config SPI_LOOPBACK_CS_CTRL_GPIO_PIN
|
|
||||||
int "The GPIO PIN which is used to act as a CS pin"
|
|
||||||
depends on SPI_LOOPBACK_CS_GPIO
|
|
||||||
default 0
|
|
||||||
|
|
||||||
config SPI_LOOPBACK_SLAVE_NUMBER
|
|
||||||
int "Slave number from 0 to host controller slave limit"
|
|
||||||
default 0
|
|
||||||
|
|
||||||
config SPI_LOOPBACK_SLOW_FREQ
|
|
||||||
int "The frequency in Hz to use when testing in slow mode"
|
|
||||||
default 500000
|
|
||||||
|
|
||||||
config SPI_LOOPBACK_FAST_FREQ
|
|
||||||
int "The frequency in Hz to use when testing in fast mode"
|
|
||||||
default 16000000
|
|
||||||
|
|
||||||
config SPI_LOOPBACK_MODE_LOOP
|
config SPI_LOOPBACK_MODE_LOOP
|
||||||
bool "Configure the SPI in LOOP mode, so that no extra wiring is needed"
|
bool "Configure the SPI in LOOP mode, so that no extra wiring is needed"
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_2"
|
|
||||||
CONFIG_SPI_STM32_INTERRUPT=y
|
CONFIG_SPI_STM32_INTERRUPT=y
|
||||||
|
|
18
tests/drivers/spi/spi_loopback/boards/96b_carbon.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/96b_carbon.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&spi2 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,4 +0,0 @@
|
||||||
CONFIG_SPI_LOOPBACK_CS_GPIO=y
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_CTRL_GPIO_DRV_NAME="GPIOE"
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_CTRL_GPIO_PIN=11
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_4"
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&spi4 {
|
||||||
|
cs-gpios = <&gpioe 11 GPIO_ACTIVE_LOW>;
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,5 +1,2 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SERCOM1"
|
CONFIG_GPIO=y
|
||||||
CONFIG_SPI_LOOPBACK_MODE_LOOP=y
|
CONFIG_SPI_LOOPBACK_MODE_LOOP=y
|
||||||
CONFIG_SPI_LOOPBACK_CS_GPIO=y
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_CTRL_GPIO_DRV_NAME="PORTA"
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_CTRL_GPIO_PIN=7
|
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&sercom1 {
|
||||||
|
cs-gpios = <&porta 7 GPIO_ACTIVE_LOW>;
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,4 +1,2 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SERCOM4"
|
CONFIG_GPIO=y
|
||||||
CONFIG_SPI_LOOPBACK_CS_GPIO=y
|
CONFIG_SPI_ASYNC=n
|
||||||
CONFIG_SPI_LOOPBACK_CS_CTRL_GPIO_DRV_NAME="PINMUX_A"
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_CTRL_GPIO_PIN=3
|
|
||||||
|
|
19
tests/drivers/spi/spi_loopback/boards/arduino_zero.overlay
Normal file
19
tests/drivers/spi/spi_loopback/boards/arduino_zero.overlay
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&sercom4 {
|
||||||
|
cs-gpios = <&porta 3 GPIO_ACTIVE_LOW>;
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -4,5 +4,4 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="DAPLINK_SINGLE_SPI_0"
|
|
||||||
CONFIG_SPI_LOOPBACK_MODE_LOOP=y
|
CONFIG_SPI_LOOPBACK_MODE_LOOP=y
|
||||||
|
|
|
@ -6,4 +6,14 @@
|
||||||
|
|
||||||
&daplink_single_spi0 {
|
&daplink_single_spi0 {
|
||||||
status = "okay";
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SERCOM5"
|
CONFIG_SPI_ASYNC=n
|
||||||
CONFIG_SPI_LOOPBACK_CS_GPIO=n
|
|
||||||
|
|
|
@ -8,4 +8,14 @@
|
||||||
/* Internally connect MOSI to MISO for loop-back operation */
|
/* Internally connect MOSI to MISO for loop-back operation */
|
||||||
dipo = <0>;
|
dipo = <0>;
|
||||||
dopo = <0>;
|
dopo = <0>;
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_0"
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_GPIO=n
|
|
|
@ -8,4 +8,14 @@
|
||||||
/* Internally connect MOSI to MISO for loop-back operation */
|
/* Internally connect MOSI to MISO for loop-back operation */
|
||||||
dipo = <3>;
|
dipo = <3>;
|
||||||
dopo = <2>;
|
dopo = <2>;
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_0"
|
CONFIG_SPI_ASYNC=n
|
||||||
CONFIG_SPI_LOOPBACK_CS_GPIO=n
|
|
||||||
|
|
|
@ -8,4 +8,14 @@
|
||||||
/* Internally connect MOSI to MISO for loop-back operation */
|
/* Internally connect MOSI to MISO for loop-back operation */
|
||||||
dipo = <0>;
|
dipo = <0>;
|
||||||
dopo = <0>;
|
dopo = <0>;
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,3 +7,16 @@
|
||||||
&rcc {
|
&rcc {
|
||||||
apb2-prescaler = <2>;
|
apb2-prescaler = <2>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_0"
|
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_SLOW_FREQ=2000000
|
|
||||||
CONFIG_SPI_LOOPBACK_FAST_FREQ=3000000
|
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_MODE_LOOP=y
|
CONFIG_SPI_LOOPBACK_MODE_LOOP=y
|
||||||
|
|
||||||
#The driver does not yet have async support
|
#The driver does not yet have async support
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&spi0 {
|
||||||
|
slow@0 {
|
||||||
|
compatible = "test-spi-loopback-slow";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <2000000>;
|
||||||
|
};
|
||||||
|
fast@0 {
|
||||||
|
compatible = "test-spi-loopback-fast";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <3000000>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1 +0,0 @@
|
||||||
CONFIG_GPIO=y
|
|
|
@ -1,2 +0,0 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_0"
|
|
||||||
CONFIG_SPI_LOOPBACK_SLOW_FREQ=128000
|
|
18
tests/drivers/spi/spi_loopback/boards/em_starterkit.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/em_starterkit.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&spi0 {
|
||||||
|
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 = <16000000>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_3"
|
|
||||||
CONFIG_SPI_ESP32_INTERRUPT=y
|
CONFIG_SPI_ESP32_INTERRUPT=y
|
||||||
|
|
18
tests/drivers/spi/spi_loopback/boards/esp32.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/esp32.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&spi3 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_2"
|
|
||||||
CONFIG_SPI_ESP32_INTERRUPT=y
|
CONFIG_SPI_ESP32_INTERRUPT=y
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&spi2 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_3"
|
|
||||||
CONFIG_SPI_ESP32_INTERRUPT=y
|
CONFIG_SPI_ESP32_INTERRUPT=y
|
||||||
|
|
18
tests/drivers/spi/spi_loopback/boards/esp32s2_saola.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/esp32s2_saola.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&spi3 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,7 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (c) 2018, NXP
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_0"
|
|
18
tests/drivers/spi/spi_loopback/boards/frdm_k64f.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/frdm_k64f.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&spi0 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,9 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (c) 2018, NXP
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_0"
|
|
||||||
CONFIG_SPI_LOOPBACK_SLOW_FREQ=5000
|
|
||||||
CONFIG_SPI_LOOPBACK_FAST_FREQ=160000
|
|
18
tests/drivers/spi/spi_loopback/boards/frdm_kw41z.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/frdm_kw41z.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&spi0 {
|
||||||
|
slow@0 {
|
||||||
|
compatible = "test-spi-loopback-slow";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <5000>;
|
||||||
|
};
|
||||||
|
fast@0 {
|
||||||
|
compatible = "test-spi-loopback-fast";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <160000>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,8 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (c) 2019, NXP
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="FLEXCOMM_5"
|
|
||||||
CONFIG_SPI_LOOPBACK_SLAVE_NUMBER=2
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&flexcomm5 {
|
||||||
|
slow@2 {
|
||||||
|
compatible = "test-spi-loopback-slow";
|
||||||
|
reg = <2>;
|
||||||
|
spi-max-frequency = <500000>;
|
||||||
|
};
|
||||||
|
fast@2 {
|
||||||
|
compatible = "test-spi-loopback-fast";
|
||||||
|
reg = <2>;
|
||||||
|
spi-max-frequency = <16000000>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,10 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (c) 2020 Henrik Brix Andersen <henrik@brixandersen.dk>
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="HS_LSPI"
|
|
||||||
CONFIG_SPI_LOOPBACK_SLAVE_NUMBER=1
|
|
||||||
CONFIG_SPI_LOOPBACK_SLOW_FREQ=5000
|
|
||||||
CONFIG_SPI_LOOPBACK_FAST_FREQ=160000
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&hs_lspi {
|
||||||
|
slow@1 {
|
||||||
|
compatible = "test-spi-loopback-slow";
|
||||||
|
reg = <1>;
|
||||||
|
spi-max-frequency = <5000>;
|
||||||
|
};
|
||||||
|
fast@1 {
|
||||||
|
compatible = "test-spi-loopback-fast";
|
||||||
|
reg = <1>;
|
||||||
|
spi-max-frequency = <160000>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -3,8 +3,5 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="HS_LSPI"
|
|
||||||
CONFIG_SPI_LOOPBACK_SLAVE_NUMBER=1
|
|
||||||
CONFIG_SPI_MCUX_FLEXCOMM_DMA=y
|
CONFIG_SPI_MCUX_FLEXCOMM_DMA=y
|
||||||
CONFIG_SPI_ASYNC=n
|
CONFIG_SPI_ASYNC=n
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
&hs_lspi {
|
||||||
|
/delete-property/ cs-gpios;
|
||||||
|
slow@1 {
|
||||||
|
compatible = "test-spi-loopback-slow";
|
||||||
|
reg = <1>;
|
||||||
|
spi-max-frequency = <5000>;
|
||||||
|
};
|
||||||
|
fast@1 {
|
||||||
|
compatible = "test-spi-loopback-fast";
|
||||||
|
reg = <1>;
|
||||||
|
spi-max-frequency = <160000>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -3,7 +3,5 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_1"
|
|
||||||
CONFIG_SPI_MCUX_LPSPI_DMA=y
|
CONFIG_SPI_MCUX_LPSPI_DMA=y
|
||||||
CONFIG_SPI_ASYNC=n
|
CONFIG_SPI_ASYNC=n
|
||||||
|
|
18
tests/drivers/spi/spi_loopback/boards/mimxrt1010_evk.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/mimxrt1010_evk.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&lpspi1 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -3,7 +3,5 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_1"
|
|
||||||
CONFIG_SPI_MCUX_LPSPI_DMA=y
|
CONFIG_SPI_MCUX_LPSPI_DMA=y
|
||||||
CONFIG_SPI_ASYNC=n
|
CONFIG_SPI_ASYNC=n
|
||||||
|
|
18
tests/drivers/spi/spi_loopback/boards/mimxrt1015_evk.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/mimxrt1015_evk.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&lpspi1 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -3,7 +3,5 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_1"
|
|
||||||
CONFIG_SPI_MCUX_LPSPI_DMA=y
|
CONFIG_SPI_MCUX_LPSPI_DMA=y
|
||||||
CONFIG_SPI_ASYNC=n
|
CONFIG_SPI_ASYNC=n
|
||||||
|
|
18
tests/drivers/spi/spi_loopback/boards/mimxrt1020_evk.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/mimxrt1020_evk.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&lpspi1 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -3,7 +3,5 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_1"
|
|
||||||
CONFIG_SPI_MCUX_LPSPI_DMA=y
|
CONFIG_SPI_MCUX_LPSPI_DMA=y
|
||||||
CONFIG_SPI_ASYNC=n
|
CONFIG_SPI_ASYNC=n
|
||||||
|
|
18
tests/drivers/spi/spi_loopback/boards/mimxrt1024_evk.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/mimxrt1024_evk.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&lpspi1 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -3,7 +3,5 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_1"
|
|
||||||
CONFIG_SPI_MCUX_LPSPI_DMA=y
|
CONFIG_SPI_MCUX_LPSPI_DMA=y
|
||||||
CONFIG_SPI_ASYNC=n
|
CONFIG_SPI_ASYNC=n
|
||||||
|
|
18
tests/drivers/spi/spi_loopback/boards/mimxrt1050_evk.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/mimxrt1050_evk.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&lpspi1 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -3,7 +3,5 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_1"
|
|
||||||
CONFIG_SPI_MCUX_LPSPI_DMA=y
|
CONFIG_SPI_MCUX_LPSPI_DMA=y
|
||||||
CONFIG_SPI_ASYNC=n
|
CONFIG_SPI_ASYNC=n
|
||||||
|
|
18
tests/drivers/spi/spi_loopback/boards/mimxrt1060_evk.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/mimxrt1060_evk.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&lpspi1 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -3,7 +3,5 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_1"
|
|
||||||
CONFIG_SPI_MCUX_LPSPI_DMA=y
|
CONFIG_SPI_MCUX_LPSPI_DMA=y
|
||||||
CONFIG_SPI_ASYNC=n
|
CONFIG_SPI_ASYNC=n
|
||||||
|
|
18
tests/drivers/spi/spi_loopback/boards/mimxrt1064_evk.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/mimxrt1064_evk.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&lpspi1 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -3,7 +3,5 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="HS_LSPI_1"
|
|
||||||
CONFIG_SPI_MCUX_FLEXCOMM_DMA=y
|
CONFIG_SPI_MCUX_FLEXCOMM_DMA=y
|
||||||
CONFIG_SPI_ASYNC=n
|
CONFIG_SPI_ASYNC=n
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&hs_lspi1 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -3,7 +3,5 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="FLEXCOMM_5"
|
|
||||||
CONFIG_SPI_MCUX_FLEXCOMM_DMA=y
|
CONFIG_SPI_MCUX_FLEXCOMM_DMA=y
|
||||||
CONFIG_SPI_ASYNC=n
|
CONFIG_SPI_ASYNC=n
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&flexcomm5 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,4 +0,0 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_1"
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_GPIO=y
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_CTRL_GPIO_DRV_NAME="GPIO_0"
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_CTRL_GPIO_PIN=28
|
|
|
@ -6,4 +6,15 @@
|
||||||
|
|
||||||
&spi1 {
|
&spi1 {
|
||||||
overrun-character = <0x00>;
|
overrun-character = <0x00>;
|
||||||
|
cs-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_3"
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_GPIO=y
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_CTRL_GPIO_DRV_NAME="GPIO_0"
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_CTRL_GPIO_PIN=28
|
|
|
@ -7,4 +7,15 @@
|
||||||
&spi3 {
|
&spi3 {
|
||||||
overrun-character = <0x00>;
|
overrun-character = <0x00>;
|
||||||
rx-delay = <1>;
|
rx-delay = <1>;
|
||||||
|
cs-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_1"
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_GPIO=y
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_CTRL_GPIO_DRV_NAME="GPIO_0"
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_CTRL_GPIO_PIN=28
|
|
|
@ -6,4 +6,15 @@
|
||||||
|
|
||||||
&spi1 {
|
&spi1 {
|
||||||
overrun-character = <0x00>;
|
overrun-character = <0x00>;
|
||||||
|
cs-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_3"
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_GPIO=y
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_CTRL_GPIO_DRV_NAME="GPIO_0"
|
|
||||||
CONFIG_SPI_LOOPBACK_CS_CTRL_GPIO_PIN=16
|
|
|
@ -6,4 +6,15 @@
|
||||||
|
|
||||||
&spi3 {
|
&spi3 {
|
||||||
overrun-character = <0x00>;
|
overrun-character = <0x00>;
|
||||||
|
cs-gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,6 +12,16 @@
|
||||||
|
|
||||||
&spi1 {
|
&spi1 {
|
||||||
status = "okay";
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma2 {
|
&dma2 {
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_2"
|
|
||||||
CONFIG_SPI_STM32_INTERRUPT=y
|
CONFIG_SPI_STM32_INTERRUPT=y
|
||||||
|
|
18
tests/drivers/spi/spi_loopback/boards/nucleo_f302r8.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/nucleo_f302r8.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&spi2 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -12,6 +12,16 @@
|
||||||
|
|
||||||
&spi1 {
|
&spi1 {
|
||||||
status = "okay";
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma2 {
|
&dma2 {
|
||||||
|
|
|
@ -12,6 +12,16 @@
|
||||||
|
|
||||||
&spi1 {
|
&spi1 {
|
||||||
status = "okay";
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma2 {
|
&dma2 {
|
||||||
|
|
|
@ -11,6 +11,16 @@
|
||||||
&dma1 3 0 0x28480 0x03>;
|
&dma1 3 0 0x28480 0x03>;
|
||||||
dma-names = "tx", "rx";
|
dma-names = "tx", "rx";
|
||||||
status = "okay";
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma1 {
|
&dma1 {
|
||||||
|
|
|
@ -8,6 +8,16 @@
|
||||||
dmas = <&dma2 5 3 0x28440 0x03
|
dmas = <&dma2 5 3 0x28440 0x03
|
||||||
&dma2 2 3 0x28480 0x03>;
|
&dma2 2 3 0x28480 0x03>;
|
||||||
dma-names = "tx", "rx";
|
dma-names = "tx", "rx";
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma2 {
|
&dma2 {
|
||||||
|
|
|
@ -8,6 +8,16 @@
|
||||||
dmas = <&dmamux1 2 17 0x20440
|
dmas = <&dmamux1 2 17 0x20440
|
||||||
&dmamux1 1 16 0x20480>;
|
&dmamux1 1 16 0x20480>;
|
||||||
dma-names = "tx", "rx";
|
dma-names = "tx", "rx";
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma1 {
|
&dma1 {
|
||||||
|
|
|
@ -8,6 +8,16 @@
|
||||||
dmas = <&dmamux1 0 11 0x20440
|
dmas = <&dmamux1 0 11 0x20440
|
||||||
&dmamux1 1 10 0x20480>;
|
&dmamux1 1 10 0x20480>;
|
||||||
dma-names = "tx", "rx";
|
dma-names = "tx", "rx";
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma1 {
|
&dma1 {
|
||||||
|
|
|
@ -17,6 +17,16 @@
|
||||||
dmas = <&dmamux1 0 11 0x20440
|
dmas = <&dmamux1 0 11 0x20440
|
||||||
&dmamux1 8 10 0x20480>;
|
&dmamux1 8 10 0x20480>;
|
||||||
dma-names = "tx", "rx";
|
dma-names = "tx", "rx";
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma1 {
|
&dma1 {
|
||||||
|
|
|
@ -15,4 +15,14 @@
|
||||||
/delete-property/ clocks;
|
/delete-property/ clocks;
|
||||||
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00001000>,
|
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00001000>,
|
||||||
<&rcc STM32_SRC_PLL1_Q SPI123_SEL(0)>;
|
<&rcc STM32_SRC_PLL1_Q SPI123_SEL(0)>;
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,6 +8,16 @@
|
||||||
dmas = <&dmamux1 0 38 0x20440
|
dmas = <&dmamux1 0 38 0x20440
|
||||||
&dmamux1 1 37 0x20480>;
|
&dmamux1 1 37 0x20480>;
|
||||||
dma-names = "tx", "rx";
|
dma-names = "tx", "rx";
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma1 {
|
&dma1 {
|
||||||
|
|
|
@ -11,6 +11,16 @@
|
||||||
&dma1 2 0x20480>;
|
&dma1 2 0x20480>;
|
||||||
dma-names = "tx", "rx";
|
dma-names = "tx", "rx";
|
||||||
status = "okay";
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma1 {
|
&dma1 {
|
||||||
|
|
|
@ -8,6 +8,16 @@
|
||||||
dmas = <&dma1 3 1 0x20440
|
dmas = <&dma1 3 1 0x20440
|
||||||
&dma1 2 1 0x20480>;
|
&dma1 2 1 0x20480>;
|
||||||
dma-names = "tx", "rx";
|
dma-names = "tx", "rx";
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma1 {
|
&dma1 {
|
||||||
|
|
|
@ -8,6 +8,16 @@
|
||||||
dmas = <&dmamux1 0 11 0x20440
|
dmas = <&dmamux1 0 11 0x20440
|
||||||
&dmamux1 7 10 0x20480>;
|
&dmamux1 7 10 0x20480>;
|
||||||
dma-names = "tx", "rx";
|
dma-names = "tx", "rx";
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma1 {
|
&dma1 {
|
||||||
|
|
|
@ -8,6 +8,16 @@
|
||||||
dmas = <&dmamux1 0 12 0x440
|
dmas = <&dmamux1 0 12 0x440
|
||||||
&dmamux1 7 11 0x480>;
|
&dmamux1 7 11 0x480>;
|
||||||
dma-names = "tx", "rx";
|
dma-names = "tx", "rx";
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma1 {
|
&dma1 {
|
||||||
|
|
|
@ -7,3 +7,16 @@
|
||||||
&rcc {
|
&rcc {
|
||||||
apb2-prescaler = <2>;
|
apb2-prescaler = <2>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
@ -8,6 +8,16 @@
|
||||||
dmas = <&dmamux1 11 7 0x20440
|
dmas = <&dmamux1 11 7 0x20440
|
||||||
&dmamux1 1 6 0x20480>;
|
&dmamux1 1 6 0x20480>;
|
||||||
dma-names = "tx", "rx";
|
dma-names = "tx", "rx";
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma1 {
|
&dma1 {
|
||||||
|
|
|
@ -8,6 +8,16 @@
|
||||||
dmas = <&dmamux1 11 8 0x20440
|
dmas = <&dmamux1 11 8 0x20440
|
||||||
&dmamux1 1 7 0x20480>;
|
&dmamux1 1 7 0x20480>;
|
||||||
dma-names = "tx", "rx";
|
dma-names = "tx", "rx";
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma1 {
|
&dma1 {
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
# Loopback on UEXT connector
|
# Loopback on UEXT connector
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_2"
|
|
||||||
CONFIG_SPI_ESP32_INTERRUPT=y
|
CONFIG_SPI_ESP32_INTERRUPT=y
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&spi2 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,8 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (c) 2018, NXP
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_0"
|
|
||||||
CONFIG_SPI_LOOPBACK_SLAVE_NUMBER=2
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&lpspi0 {
|
||||||
|
slow@2 {
|
||||||
|
compatible = "test-spi-loopback-slow";
|
||||||
|
reg = <2>;
|
||||||
|
spi-max-frequency = <500000>;
|
||||||
|
};
|
||||||
|
fast@2 {
|
||||||
|
compatible = "test-spi-loopback-fast";
|
||||||
|
reg = <2>;
|
||||||
|
spi-max-frequency = <16000000>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -8,6 +8,16 @@
|
||||||
dmas = <&dmamux1 0 12 0x440
|
dmas = <&dmamux1 0 12 0x440
|
||||||
&dmamux1 7 11 0x480>;
|
&dmamux1 7 11 0x480>;
|
||||||
dma-names = "tx", "rx";
|
dma-names = "tx", "rx";
|
||||||
|
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>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&dma1 {
|
&dma1 {
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (c) 2019, STMicroelectronics
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_4"
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&spi4 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,7 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (c) 2021 Telink Semiconductor
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="PSPI"
|
|
18
tests/drivers/spi/spi_loopback/boards/tlsr9518adk80d.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/tlsr9518adk80d.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&pspi {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,7 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (c) 2019 Vestas Wind Systems A/S
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_0"
|
|
18
tests/drivers/spi/spi_loopback/boards/twr_ke18f.overlay
Normal file
18
tests/drivers/spi/spi_loopback/boards/twr_ke18f.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&lpspi0 {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1,13 @@
|
||||||
|
#
|
||||||
|
# Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
description: |
|
||||||
|
This binding provides resources required to build and run the
|
||||||
|
tests/drivers/spi/spi_loopback test in Zephyr.
|
||||||
|
|
||||||
|
compatible: "test-spi-loopback-fast"
|
||||||
|
|
||||||
|
include: [spi-device.yaml]
|
|
@ -0,0 +1,13 @@
|
||||||
|
#
|
||||||
|
# Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
description: |
|
||||||
|
This binding provides resources required to build and run the
|
||||||
|
tests/drivers/spi/spi_loopback test in Zephyr.
|
||||||
|
|
||||||
|
compatible: "test-spi-loopback-slow"
|
||||||
|
|
||||||
|
include: [spi-device.yaml]
|
|
@ -2,4 +2,3 @@
|
||||||
CONFIG_DMA=y
|
CONFIG_DMA=y
|
||||||
CONFIG_DSPI_MCUX_EDMA=y
|
CONFIG_DSPI_MCUX_EDMA=y
|
||||||
CONFIG_MCUX_DSPI_BUFFER_SIZE=144
|
CONFIG_MCUX_DSPI_BUFFER_SIZE=144
|
||||||
CONFIG_SPI_LOOPBACK_FAST_FREQ=1000000
|
|
||||||
|
|
18
tests/drivers/spi/spi_loopback/overlay-mcux-dspi-dma.overlay
Normal file
18
tests/drivers/spi/spi_loopback/overlay-mcux-dspi-dma.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Kumar Gala <galak@kernel.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&spi0 {
|
||||||
|
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 = <1000000>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,5 +1,4 @@
|
||||||
# enable DMA mode for SPI loopback test
|
# enable DMA mode for SPI loopback test
|
||||||
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_1"
|
|
||||||
CONFIG_SPI_STM32_DMA=y
|
CONFIG_SPI_STM32_DMA=y
|
||||||
CONFIG_SPI_STM32_INTERRUPT=n
|
CONFIG_SPI_STM32_INTERRUPT=n
|
||||||
CONFIG_SPI_ASYNC=n
|
CONFIG_SPI_ASYNC=n
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue