Skip to content

Commit a27d5a0

Browse files
committed
boards: st: stm32l562e_dk: ns: Align partitions
The partitions for the stm32l562e_dk/stm32l562xx/ns board are not aligned with TF-M. This fixes the partition alignment. Signed-off-by: BUDKE Gerson Fernando <[email protected]>
1 parent fd61f3d commit a27d5a0

File tree

1 file changed

+49
-9
lines changed

1 file changed

+49
-9
lines changed

boards/st/stm32l562e_dk/stm32l562e_dk_stm32l562xx_ns.dts

Lines changed: 49 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
zephyr,shell-uart = &usart1;
2020
zephyr,sram = &sram0;
2121
zephyr,flash = &flash0;
22-
zephyr,code-partition = &slot1_ns_partition;
22+
zephyr,code-partition = &slot0_ns_partition;
2323
};
2424

2525
aliases {
@@ -46,24 +46,64 @@
4646
#address-cells = <1>;
4747
#size-cells = <1>;
4848

49+
/*
50+
* Flash layout:
51+
* - BL2 - Multi image boot
52+
* - internal
53+
* - external
54+
* - Scratch
55+
*/
4956
boot_partition: partition@0 {
50-
reg = <0x00000000 DT_SIZE_K(100)>;
57+
reg = <0x00000000 DT_SIZE_K(68)>;
5158
read-only;
5259
};
5360

54-
/* Secure image primary slot */
61+
scratch_partition: partition@11000 {
62+
reg = <0x00011000 DT_SIZE_K(8)>;
63+
};
64+
65+
otp_partition: partition@13000 {
66+
reg = <0x00013000 DT_SIZE_K(8)>;
67+
};
68+
69+
general_secure_storage_partition: partition@15000 {
70+
reg = <0x00015000 DT_SIZE_K(8)>;
71+
};
72+
73+
internal_secure_storage_partition: partition@17000 {
74+
reg = <0x00017000 DT_SIZE_K(8)>;
75+
};
76+
5577
slot0_partition: partition@19000 {
5678
reg = <0x00019000 DT_SIZE_K(240)>;
5779
};
5880

59-
/* Non-secure image primary slot */
60-
slot1_ns_partition: partition@55000 {
61-
reg = <0x00055000 DT_SIZE_K(168)>;
81+
slot0_ns_partition: partition@55000 {
82+
reg = <0x00055000 DT_SIZE_K(172)>;
83+
};
84+
};
85+
};
86+
87+
&mx25lm51245 {
88+
partitions {
89+
compatible = "fixed-partitions";
90+
#address-cells = <1>;
91+
#size-cells = <1>;
92+
93+
slot1_partition: partition@0 {
94+
reg = <0x00000000 DT_SIZE_K(240)>;
95+
};
96+
97+
unused: partition@3c000 {
98+
reg = <0x0003c000 DT_SIZE_K(32)>;
99+
};
100+
101+
slot1_ns_partition: partition@44000 {
102+
reg = <0x00044000 DT_SIZE_K(172)>;
62103
};
63104

64-
/* 4KB at the end of 512KB flash is set for storage */
65-
storage_partition: partition@7f000 {
66-
reg = <0x0007f000 DT_SIZE_K(4)>;
105+
storage_partition: partition@6f000 {
106+
reg = <0x0006f000 (DT_SIZE_M(64) - DT_SIZE_K(444))>;
67107
};
68108
};
69109
};

0 commit comments

Comments
 (0)