-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
4 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
tests/drivers/spi/spi_loopback/boards/nucleo_h745zi_q_stm32h745xx_m4.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
}; |
6 changes: 6 additions & 0 deletions
6
tests/drivers/spi/spi_loopback/boards/nucleo_h745zi_q_stm32h745xx_m7.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
43 changes: 43 additions & 0 deletions
43
tests/drivers/spi/spi_loopback/boards/nucleo_h745zi_q_stm32h745xx_m7.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
}; |