Skip to content

Commit b36db74

Browse files
committed
dts/arm: stm32h7: quadspi added
quadspi added to device tree of stm32h7 family. validated with samples/subsys/fs/littlefs Signed-off-by: Raphael Löffel <[email protected]>
1 parent 730acbd commit b36db74

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

drivers/flash/Kconfig.stm32_qspi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@ config FLASH_STM32_QSPI
1818
select FLASH_HAS_PAGE_LAYOUT
1919
select DMA if $(DT_STM32_QUADSPI_HAS_DMA)
2020
select USE_STM32_HAL_DMA if $(DT_STM32_QUADSPI_HAS_DMA)
21+
select USE_STM32_HAL_MDMA if !$(DT_STM32_QUADSPI_HAS_DMA)
2122
help
2223
Enable QSPI-NOR support on the STM32 family of processors.
24+
For STM32H7 devices DMA is not yet supported.

drivers/flash/flash_stm32_qspi.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
#include <logging/log.h>
3030
LOG_MODULE_REGISTER(flash_stm32_qspi, CONFIG_FLASH_LOG_LEVEL);
3131

32+
#ifdef CONFIG_SOC_SERIES_STM32H7X
33+
#if DT_NODE_HAS_PROP(DT_NODELABEL(quadspi),dmas)
34+
#error "STM32H7 QSPI flash driver do not support DMA"
35+
#endif
36+
#endif
37+
3238
#define STM32_QSPI_FIFO_THRESHOLD 8
3339
#define STM32_QSPI_CLOCK_PRESCALER_MAX 255
3440

dts/arm/st/h7/stm32h7.dtsi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,17 @@
378378
label = "I2C_4";
379379
};
380380

381+
quadspi: quadspi@52005000 {
382+
compatible = "st,stm32-qspi";
383+
#address-cells = <1>;
384+
#size-cells = <0>;
385+
reg = <0x52005000 0x400>;
386+
interrupts = <92 0>;
387+
clocks = <&rcc STM32_CLOCK_BUS_AHB3 0x00004000>;
388+
status = "disabled";
389+
label = "QUADSPI";
390+
};
391+
381392
spi1: spi@40013000 {
382393
compatible = "st,stm32-spi-fifo", "st,stm32-spi";
383394
#address-cells = <1>;

dts/bindings/qspi/st,stm32-qspi.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ properties:
3333
description: |
3434
Optional DMA channel specifier. If DMA should be used, specifier should
3535
hold a phandle reference to the dma controller, the channel number,
36-
the slot number, channel configuration and finally features.
36+
the slot number, channel configuration and finally features. For STM32H7
37+
devices DMA is not yet supported.
3738
3839
For example dmas for TX/RX on QSPI
3940
dmas = <&dma1 5 5 0x0000 0x03>;

0 commit comments

Comments
 (0)