tests: drivers: spi loopback testing on the nucleo_h745zi_q boards

Connect D12(PA6) & D22(PB5) pins on the board to pass the test.

Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
Reviewed-by: Vasilij Strassheim <vasilij.strassheim@linutronix.de>
This commit is contained in:
Benedikt Spranger 2024-06-28 17:12:01 +02:00 committed by Alberto Escolar
commit 7775a08739
4 changed files with 92 additions and 1 deletions

View file

@ -40,6 +40,5 @@
pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pb5>;
pinctrl-names = "default";
cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
status = "okay";
};

View file

@ -0,0 +1,43 @@
/*
* Copyright (c) 2024 Linutronix GmbH
*
* SPDX-License-Identifier: Apache-2.0
*/
/* Set div-q to get test clk freq into acceptable SPI freq range */
&pll {
/delete-property/ div-q;
div-q = <8>;
};
&sram2 {
zephyr,memory-attr = < DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) >;
};
&spi1 {
dmas = <&dmamux1 0 38 (STM32_DMA_PERIPH_TX | STM32_DMA_PRIORITY_HIGH)
&dmamux1 1 37 (STM32_DMA_PERIPH_RX | STM32_DMA_PRIORITY_HIGH)>;
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 {
status = "okay";
};
&dma2 {
status = "okay";
};
&dmamux1 {
status = "okay";
};

View file

@ -0,0 +1,6 @@
#
# Copyright (c) 2023 Graphcore Ltd, All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
CONFIG_NOCACHE_MEMORY=y

View file

@ -0,0 +1,43 @@
/*
* Copyright (c) 2024 Linutronix GmbH
*
* SPDX-License-Identifier: Apache-2.0
*/
/* Set div-q to get test clk freq into acceptable SPI freq range */
&pll {
/delete-property/ div-q;
div-q = <8>;
};
&sram2 {
zephyr,memory-attr = < DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) >;
};
&spi1 {
dmas = <&dmamux1 0 38 (STM32_DMA_PERIPH_TX | STM32_DMA_PRIORITY_HIGH)
&dmamux1 1 37 (STM32_DMA_PERIPH_RX | STM32_DMA_PRIORITY_HIGH)>;
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 {
status = "okay";
};
&dma2 {
status = "okay";
};
&dmamux1 {
status = "okay";
};