From a3e2e3ea7e10b4c1329c8a27bf08f96ce1c03e13 Mon Sep 17 00:00:00 2001 From: Krishna Mohan Dani Date: Wed, 28 Apr 2021 18:07:17 +0530 Subject: [PATCH] boards/arm: stm32h747i_disco_m7: Enabling flash support in device tree. This commit enables flash support for stm32h747i_disco_m7 in device tree. This has been tested with flash sample application on stm32h747i_disco platform with m7 core. Flash is shared between two cores (M4 & M7) so the last 1M is assigned to M4 core. Hence allocating 1M of storage at the end of first 1M. Signed-off-by: Krishna Mohan Dani --- boards/arm/stm32h747i_disco/doc/index.rst | 2 ++ boards/arm/stm32h747i_disco/stm32h747i_disco_m7.dts | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/boards/arm/stm32h747i_disco/doc/index.rst b/boards/arm/stm32h747i_disco/doc/index.rst index b4f1366bd2d..622bef88ae3 100644 --- a/boards/arm/stm32h747i_disco/doc/index.rst +++ b/boards/arm/stm32h747i_disco/doc/index.rst @@ -63,6 +63,8 @@ The current Zephyr stm32h747i_disco board configuration supports the following h +-----------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ +| FLASH | on-chip | flash memory | ++-----------+------------+-------------------------------------+ | ETHERNET | on-chip | ethernet (*) | +-----------+------------+-------------------------------------+ | RNG | on-chip | True Random number generator | diff --git a/boards/arm/stm32h747i_disco/stm32h747i_disco_m7.dts b/boards/arm/stm32h747i_disco/stm32h747i_disco_m7.dts index bc47acd708b..5fa7c1f08f8 100644 --- a/boards/arm/stm32h747i_disco/stm32h747i_disco_m7.dts +++ b/boards/arm/stm32h747i_disco/stm32h747i_disco_m7.dts @@ -60,6 +60,19 @@ status = "okay"; }; +&flash0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + /* Set 2KB of storage at the end of first 1MB flash */ + storage_partition: partition@ff800 { + label = "storage"; + reg = <0x000ff800 0x00000800>; + }; + }; +}; &mac { /*