Skip to content

Commit

Permalink
tests: drivers: spi loopback testing on the nucleo_h745zi_q boards
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bene42 authored and aescolar committed Aug 30, 2024
1 parent 205e971 commit 7775a08
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
Original file line number Diff line number Diff line change
@@ -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";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# Copyright (c) 2023 Graphcore Ltd, All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
CONFIG_NOCACHE_MEMORY=y
Original file line number Diff line number Diff line change
@@ -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";
};

0 comments on commit 7775a08

Please sign in to comment.