boards: nucleo_wba: Add flash partitions
Add flash partitions which can be used with mcuboot.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
diff --git a/boards/st/nucleo_wba52cg/nucleo_wba52cg.dts b/boards/st/nucleo_wba52cg/nucleo_wba52cg.dts
index 67bc009..0c08acc 100644
--- a/boards/st/nucleo_wba52cg/nucleo_wba52cg.dts
+++ b/boards/st/nucleo_wba52cg/nucleo_wba52cg.dts
@@ -22,6 +22,7 @@
zephyr,shell-uart = &usart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
+ zephyr,code-partition = &slot0_partition;
};
leds: leds {
@@ -138,3 +139,32 @@
&rng {
status = "okay";
};
+
+&flash0 {
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ boot_partition: partition@0 {
+ label = "mcuboot";
+ reg = <0x00000000 DT_SIZE_K(64)>;
+ };
+ slot0_partition: partition@10000 {
+ label = "image-0";
+ reg = <0x00010000 DT_SIZE_K(448)>;
+ };
+ slot1_partition: partition@80000 {
+ label = "image-1";
+ reg = <0x00080000 DT_SIZE_K(448)>;
+ };
+ scratch_partition: partition@f0000 {
+ label = "image-scratch";
+ reg = <0x000f0000 DT_SIZE_K(16)>;
+ };
+ storage_partition: partition@f4000 {
+ label = "storage";
+ reg = <0x000f4000 DT_SIZE_K(48)>;
+ };
+ };
+};
diff --git a/boards/st/nucleo_wba55cg/nucleo_wba55cg.dts b/boards/st/nucleo_wba55cg/nucleo_wba55cg.dts
index 3a2ad07..88dd408 100644
--- a/boards/st/nucleo_wba55cg/nucleo_wba55cg.dts
+++ b/boards/st/nucleo_wba55cg/nucleo_wba55cg.dts
@@ -23,6 +23,7 @@
zephyr,shell-uart = &usart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
+ zephyr,code-partition = &slot0_partition;
};
leds: leds {
@@ -141,11 +142,25 @@
#address-cells = <1>;
#size-cells = <1>;
- /* Last 16K of flash: Min 2 sectors */
- storage_partition: partition@f8000 {
- label = "storage";
- reg = <0x000f8000 DT_SIZE_K(16)>;
+ boot_partition: partition@0 {
+ label = "mcuboot";
+ reg = <0x00000000 DT_SIZE_K(64)>;
};
-
+ slot0_partition: partition@10000 {
+ label = "image-0";
+ reg = <0x00010000 DT_SIZE_K(448)>;
+ };
+ slot1_partition: partition@80000 {
+ label = "image-1";
+ reg = <0x00080000 DT_SIZE_K(448)>;
+ };
+ scratch_partition: partition@f0000 {
+ label = "image-scratch";
+ reg = <0x000f0000 DT_SIZE_K(16)>;
+ };
+ storage_partition: partition@f4000 {
+ label = "storage";
+ reg = <0x000f4000 DT_SIZE_K(48)>;
+ };
};
};