Skip to content

Commit 7969deb

Browse files
rdob-antcarlescufi
authored andcommitted
dts/arm/silabs: update partition definitions
- To link image loadable by MCUboot, zephyr,code-partition must be set in the DTS. - Move partition definitions from SoC DTS to the board DTS. - Remove scratch partition since MCUboot does not recommend to use it. - Increase bootloader partitions to 48K to fit recent MCUboot. Signed-off-by: Roman Dobrodii <rdobrodii@antmicro.com>
1 parent 563cc01 commit 7969deb

File tree

4 files changed

+48
-84
lines changed

4 files changed

+48
-84
lines changed

boards/arm/efr32_thunderboard/efr32bg22_brd4184a.dts

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,39 +22,37 @@
2222
spi0 = &usart0;
2323
watchdog0 = &wdog0;
2424
};
25+
26+
chosen {
27+
zephyr,code-partition = &slot0_partition;
28+
};
2529
};
2630

2731
&flash0 {
2832
partitions {
29-
/* Reserve 32 kB for the bootloader */
33+
/* Reserve 48 KiB for the bootloader */
3034
boot_partition: partition@0 {
3135
label = "mcuboot";
32-
reg = <0x0 0x00008000>;
36+
reg = <0x00000000 0x0000c000>;
3337
read-only;
3438
};
3539

36-
/* Reserve 220 kB for the application in slot 0 */
37-
slot0_partition: partition@8000 {
40+
/* Reserve 224 KiB for the application in slot 0 */
41+
slot0_partition: partition@c000 {
3842
label = "image-0";
39-
reg = <0x0008000 0x00037000>;
43+
reg = <0x0000c000 0x00038000>;
4044
};
4145

42-
/* Reserve 220 kB for the application in slot 1 */
43-
slot1_partition: partition@3f000 {
46+
/* Reserve 224 KiB for the application in slot 1 */
47+
slot1_partition: partition@44000 {
4448
label = "image-1";
45-
reg = <0x0003f000 0x00037000>;
46-
};
47-
48-
/* Reserve 32 kB for the scratch partition */
49-
scratch_partition: partition@76000 {
50-
label = "image-scratch";
51-
reg = <0x00076000 0x00008000>;
49+
reg = <0x00044000 0x00038000>;
5250
};
5351

54-
/* Set 8Kb of storage at the end of the 512KB of flash */
55-
storage_partition: partition@7e000 {
52+
/* Set 16 KiB of storage at the end of the 512 KiB of flash */
53+
storage_partition: partition@7c000 {
5654
label = "storage";
57-
reg = <0x0007e000 0x00002000>;
55+
reg = <0x0007c000 0x00004000>;
5856
};
5957
};
6058
};

boards/arm/efr32_thunderboard/efr32bg27_brd2602a.dts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,39 @@
2222
spi0 = &usart0;
2323
watchdog0 = &wdog0;
2424
};
25+
26+
chosen {
27+
zephyr,code-partition = &slot0_partition;
28+
};
29+
};
30+
31+
&flash0 {
32+
partitions {
33+
/* Reserve 48 KiB for the bootloader */
34+
boot_partition: partition@0 {
35+
label = "mcuboot";
36+
reg = <0x00000000 0x0000c000>;
37+
read-only;
38+
};
39+
40+
/* Reserve 328 KiB for the application in slot 0 */
41+
slot0_partition: partition@c000 {
42+
label = "image-0";
43+
reg = <0x0000c000 0x00052000>;
44+
};
45+
46+
/* Reserve 328 KiB for the application in slot 1 */
47+
slot1_partition: partition@5e000 {
48+
label = "image-1";
49+
reg = <0x0005e000 0x00052000>;
50+
};
51+
52+
/* Set 64 KiB of storage at the end of the 768 KiB of flash */
53+
storage_partition: partition@b0000 {
54+
label = "storage";
55+
reg = <0x000b0000 0x00010000>;
56+
};
57+
};
2558
};
2659

2760
&led0 {

dts/arm/silabs/efr32bg22.dtsi

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,6 @@
1313
write-block-size = <4>;
1414
erase-block-size = <8192>;
1515
reg = <0x0 DT_SIZE_K(512)>;
16-
17-
partitions {
18-
/* Reserve 32 kB for the bootloader */
19-
boot_partition: partition@0 {
20-
label = "mcuboot";
21-
reg = <0x0 0x00008000>;
22-
read-only;
23-
};
24-
25-
/* Reserve 220 kB for the application in slot 0 */
26-
slot0_partition: partition@8000 {
27-
label = "image-0";
28-
reg = <0x0008000 0x00037000>;
29-
};
30-
31-
/* Reserve 220 kB for the application in slot 1 */
32-
slot1_partition: partition@3f000 {
33-
label = "image-1";
34-
reg = <0x0003f000 0x00037000>;
35-
};
36-
37-
/* Reserve 32 kB for the scratch partition */
38-
scratch_partition: partition@76000 {
39-
label = "image-scratch";
40-
reg = <0x00076000 0x00008000>;
41-
};
42-
43-
/* Set 8Kb of storage at the end of the 512KB of flash */
44-
storage_partition: partition@7e000 {
45-
label = "storage";
46-
reg = <0x0007e000 0x00002000>;
47-
};
48-
};
4916
};
5017
};
5118

dts/arm/silabs/efr32bg27.dtsi

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,6 @@
1313
write-block-size = <4>;
1414
erase-block-size = <8192>;
1515
reg = <0x08000000 DT_SIZE_K(768)>;
16-
17-
partitions {
18-
/* Reserve 32 kB for the bootloader */
19-
boot_partition: partition@0 {
20-
label = "mcuboot";
21-
reg = <0x0 0x00008000>;
22-
read-only;
23-
};
24-
25-
/* Reserve 320 kB for the application in slot 0 */
26-
slot0_partition: partition@8000 {
27-
label = "image-0";
28-
reg = <0x00008000 0x00050000>;
29-
};
30-
31-
/* Reserve 320 kB for the application in slot 1 */
32-
slot1_partition: partition@58000 {
33-
label = "image-1";
34-
reg = <0x00058000 0x00050000>;
35-
};
36-
37-
/* Reserve 32 kB for the scratch partition */
38-
scratch_partition: partition@a8000 {
39-
label = "image-scratch";
40-
reg = <0x000a8000 0x00008000>;
41-
};
42-
43-
/* Set 64Kb of storage at the end of the 768KB of flash */
44-
storage_partition: partition@b0000 {
45-
label = "storage";
46-
reg = <0x000b0000 0x00010000>;
47-
};
48-
49-
};
5016
};
5117
};
5218

0 commit comments

Comments
 (0)