Skip to content

Commit 9fb4a78

Browse files
butokkartben
authored andcommitted
boards: nxp: make equal partition slots
- creates equal partition slots for NXP boards. - allows support for all firmware update modes, primarily for the new preferred "Swap using offset". Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
1 parent 82b802f commit 9fb4a78

31 files changed

+278
-229
lines changed

boards/nxp/frdm_k22f/frdm_k22f.dts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,25 +204,26 @@ zephyr_udc0: &usbotg {
204204
#address-cells = <1>;
205205
#size-cells = <1>;
206206

207+
/*
208+
* Partition sizes must be aligned
209+
* to the flash memory sector size of 2KB.
210+
*/
207211
boot_partition: partition@0 {
208212
label = "mcuboot";
209213
reg = <0x00000000 DT_SIZE_K(64)>;
210214
read-only;
211215
};
212-
/* The MCUBoot swap-move algorithm uses the last 3 sectors
213-
* of the primary slot0 for swap status and move.
214-
*/
215216
slot0_partition: partition@10000 {
216217
label = "image-0";
217-
reg = <0x00010000 (DT_SIZE_K(180) + DT_SIZE_K(6))>;
218+
reg = <0x00010000 DT_SIZE_K(182)>;
218219
};
219-
slot1_partition: partition@3E800 {
220+
slot1_partition: partition@3D800 {
220221
label = "image-1";
221-
reg = <0x0003E800 DT_SIZE_K(180)>;
222+
reg = <0x0003D800 DT_SIZE_K(182)>;
222223
};
223-
storage_partition: partition@6B800 {
224+
storage_partition: partition@6B000 {
224225
label = "storage";
225-
reg = <0x0006B800 DT_SIZE_K(82)>;
226+
reg = <0x0006B000 DT_SIZE_K(84)>;
226227
};
227228

228229
};

boards/nxp/frdm_k64f/frdm_k64f.dts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,21 +233,22 @@ zephyr_udc0: &usbotg {
233233
#address-cells = <1>;
234234
#size-cells = <1>;
235235

236+
/*
237+
* Partition sizes must be aligned
238+
* to the flash memory sector size of 4KB.
239+
*/
236240
boot_partition: partition@0 {
237241
label = "mcuboot";
238242
reg = <0x00000000 DT_SIZE_K(64)>;
239243
read-only;
240244
};
241-
/* The MCUBoot swap-move algorithm uses the last 2 sectors
242-
* of the primary slot0 for swap status and move.
243-
*/
244245
slot0_partition: partition@10000 {
245246
label = "image-0";
246-
reg = <0x00010000 (DT_SIZE_K(416) + DT_SIZE_K(8))>;
247+
reg = <0x00010000 DT_SIZE_K(420)>;
247248
};
248-
slot1_partition: partition@7a000 {
249+
slot1_partition: partition@79000 {
249250
label = "image-1";
250-
reg = <0x0007a000 DT_SIZE_K(416)>;
251+
reg = <0x00079000 DT_SIZE_K(420)>;
251252
};
252253
storage_partition: partition@e2000 {
253254
label = "storage";

boards/nxp/frdm_k82f/frdm_k82f.dts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,20 +158,21 @@
158158
#address-cells = <1>;
159159
#size-cells = <1>;
160160

161+
/*
162+
* Partition sizes must be aligned
163+
* to the flash memory sector size of 4KB.
164+
*/
161165
boot_partition: partition@0 {
162166
label = "mcuboot";
163167
reg = <0x0 DT_SIZE_K(44)>;
164168
};
165-
/* The MCUBoot swap-move algorithm uses the last 2 sectors
166-
* of the primary slot0 for swap status and move.
167-
*/
168169
slot0_partition: partition@b000 {
169170
label = "image-0";
170-
reg = <0xb000 (DT_SIZE_K(96) + DT_SIZE_K(8))>;
171+
reg = <0xb000 DT_SIZE_K(100)>;
171172
};
172-
slot1_partition: partition@25000 {
173+
slot1_partition: partition@24000 {
173174
label = "image-1";
174-
reg = <0x25000 DT_SIZE_K(96)>;
175+
reg = <0x24000 DT_SIZE_K(100)>;
175176
};
176177
storage_partition: partition@3d000 {
177178
label = "storage";

boards/nxp/frdm_ke17z/frdm_ke17z.dts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,20 +141,21 @@
141141
#address-cells = <1>;
142142
#size-cells = <1>;
143143

144+
/*
145+
* Partition sizes must be aligned
146+
* to the flash memory sector size of 2KB.
147+
*/
144148
boot_partition: partition@0 {
145149
label = "mcuboot";
146150
reg = <0x0 DT_SIZE_K(44)>;
147151
};
148-
/* The MCUBoot swap-move algorithm uses the last 2 sectors
149-
* of the primary slot0 for swap status and move.
150-
*/
151152
slot0_partition: partition@b000 {
152153
label = "image-0";
153-
reg = <0xb000 (DT_SIZE_K(98) + DT_SIZE_K(4))>;
154+
reg = <0xb000 DT_SIZE_K(100)>;
154155
};
155-
slot1_partition: partition@24800 {
156+
slot1_partition: partition@24000 {
156157
label = "image-1";
157-
reg = <0x24800 DT_SIZE_K(98)>;
158+
reg = <0x24000 DT_SIZE_K(100)>;
158159
};
159160
storage_partition: partition@3d000 {
160161
label = "storage";

boards/nxp/frdm_ke17z512/frdm_ke17z512.dts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,25 +158,27 @@
158158
compatible = "fixed-partitions";
159159
#address-cells = <1>;
160160
#size-cells = <1>;
161+
162+
/*
163+
* Partition sizes must be aligned
164+
* to the flash memory sector size of 2KB.
165+
*/
161166
boot_partition: partition@0 {
162167
label = "mcuboot";
163168
reg = <0x00000000 DT_SIZE_K(64)>;
164169
read-only;
165170
};
166-
/* The MCUBoot swap-move algorithm uses the last 3 sectors
167-
* of the primary slot0 for swap status and move.
168-
*/
169171
slot0_partition: partition@10000 {
170172
label = "image-0";
171-
reg = <0x00010000 (DT_SIZE_K(202) + DT_SIZE_K(6))>;
173+
reg = <0x00010000 DT_SIZE_K(204)>;
172174
};
173-
slot1_partition: partition@44000 {
175+
slot1_partition: partition@43000 {
174176
label = "image-1";
175-
reg = <0x00044000 DT_SIZE_K(202)>;
177+
reg = <0x00043000 DT_SIZE_K(204)>;
176178
};
177-
storage_partition: partition@76800 {
179+
storage_partition: partition@76000 {
178180
label = "storage";
179-
reg = <0x00076800 DT_SIZE_K(38)>;
181+
reg = <0x00076000 DT_SIZE_K(40)>;
180182
};
181183
};
182184
};

boards/nxp/frdm_mcxw71/frdm_mcxw71.dts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,19 @@
135135
compatible = "fixed-partitions";
136136
#address-cells = <1>;
137137
#size-cells = <1>;
138-
/* The MCUBoot swap-move algorithm uses the last 2 sectors
139-
* of the primary slot0 for swap status and move.
138+
139+
/*
140+
* Partition sizes must be aligned
141+
* to the flash memory sector size of 8KB.
140142
*/
141143
boot_partition: partition@0 {
142144
reg = <0x0 DT_SIZE_K(64)>;
143145
};
144146
slot0_partition: partition@10000 {
145-
reg = <0x10000 (DT_SIZE_K(416) + DT_SIZE_K(16))>;
147+
reg = <0x10000 DT_SIZE_K(424)>;
146148
};
147-
slot1_partition: partition@7C000 {
148-
reg = <0x7C000 DT_SIZE_K(416)>;
149+
slot1_partition: partition@7A000 {
150+
reg = <0x7A000 DT_SIZE_K(424)>;
149151
};
150152
storage_partition: partition@E4000 {
151153
reg = <0xE4000 DT_SIZE_K(112)>;

boards/nxp/frdm_rw612/frdm_rw612_common.dtsi

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,24 +101,25 @@
101101
#address-cells = <1>;
102102
#size-cells = <1>;
103103

104+
/*
105+
* Partition sizes must be aligned
106+
* to the flash memory sector size of 4KB.
107+
*/
104108
boot_partition: partition@0 {
105109
label = "mcuboot";
106110
reg = <0x00000000 DT_SIZE_K(128)>;
107111
};
108-
/* The MCUBoot swap-move algorithm uses the last 2 sectors
109-
* of the primary slot0 for swap status and move.
110-
*/
111112
slot0_partition: partition@20000 {
112113
label = "image-0";
113-
reg = <0x00020000 (DT_SIZE_M(3) + DT_SIZE_K(2 * 4))>;
114+
reg = <0x00020000 DT_SIZE_M(3)>;
114115
};
115-
slot1_partition: partition@323000 {
116+
slot1_partition: partition@320000 {
116117
label = "image-1";
117-
reg = <0x00323000 DT_SIZE_M(3)>;
118+
reg = <0x00320000 DT_SIZE_M(3)>;
118119
};
119-
storage_partition: partition@623000 {
120+
storage_partition: partition@620000 {
120121
label = "storage";
121-
reg = <0x00623000 (DT_SIZE_M(58) - DT_SIZE_K(136))>;
122+
reg = <0x00620000 (DT_SIZE_M(58) - DT_SIZE_K(128))>;
122123
};
123124
};
124125
};

boards/nxp/hexiwear/hexiwear_mk64f12.dts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,21 +187,23 @@
187187
compatible = "fixed-partitions";
188188
#address-cells = <1>;
189189
#size-cells = <1>;
190+
191+
/*
192+
* Partition sizes must be aligned
193+
* to the flash memory sector size of 4KB.
194+
*/
190195
boot_partition: partition@0 {
191196
label = "mcuboot";
192197
reg = <0x00000000 DT_SIZE_K(64)>;
193198
read-only;
194199
};
195-
/* The MCUBoot swap-move algorithm uses the last 2 sectors
196-
* of the primary slot0 for swap status and move.
197-
*/
198200
slot0_partition: partition@10000 {
199201
label = "image-0";
200-
reg = <0x00010000 (DT_SIZE_K(416) + DT_SIZE_K(8))>;
202+
reg = <0x00010000 DT_SIZE_K(420)>;
201203
};
202-
slot1_partition: partition@7a000 {
204+
slot1_partition: partition@79000 {
203205
label = "image-1";
204-
reg = <0x0007a000 DT_SIZE_K(416)>;
206+
reg = <0x00079000 DT_SIZE_K(420)>;
205207
};
206208
storage_partition: partition@e2000 {
207209
label = "storage";

boards/nxp/mimxrt1010_evk/mimxrt1010_evk.dts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,24 +105,26 @@ arduino_serial: &lpuart1 {};
105105
compatible = "fixed-partitions";
106106
#address-cells = <1>;
107107
#size-cells = <1>;
108+
109+
/*
110+
* Partition sizes must be aligned
111+
* to the flash memory sector size of 4KB.
112+
*/
108113
boot_partition: partition@0 {
109114
label = "mcuboot";
110115
reg = <0x00000000 DT_SIZE_K(128)>;
111116
};
112-
/* The MCUBoot swap-move algorithm uses the last 3 sectors
113-
* of the primary slot0 for swap status and move.
114-
*/
115117
slot0_partition: partition@20000 {
116118
label = "image-0";
117-
reg = <0x00020000 (DT_SIZE_M(7) + DT_SIZE_K(12))>;
119+
reg = <0x00020000 DT_SIZE_M(7)>;
118120
};
119-
slot1_partition: partition@723000 {
121+
slot1_partition: partition@720000 {
120122
label = "image-1";
121-
reg = <0x00723000 DT_SIZE_M(7)>;
123+
reg = <0x00720000 DT_SIZE_M(7)>;
122124
};
123-
storage_partition: partition@E23000 {
125+
storage_partition: partition@E20000 {
124126
label = "storage";
125-
reg = <0x00E23000 (DT_SIZE_M(2) - DT_SIZE_K(140))>;
127+
reg = <0x00E20000 (DT_SIZE_M(2) - DT_SIZE_K(128))>;
126128
};
127129
};
128130
};

boards/nxp/mimxrt1015_evk/mimxrt1015_evk.dts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,24 +102,26 @@ arduino_serial: &lpuart4 {
102102
compatible = "fixed-partitions";
103103
#address-cells = <1>;
104104
#size-cells = <1>;
105+
106+
/*
107+
* Partition sizes must be aligned
108+
* to the flash memory sector size of 4KB.
109+
*/
105110
boot_partition: partition@0 {
106111
label = "mcuboot";
107112
reg = <0x00000000 DT_SIZE_K(128)>;
108113
};
109-
/* The MCUBoot swap-move algorithm uses the last 3 sectors
110-
* of the primary slot0 for swap status and move.
111-
*/
112114
slot0_partition: partition@20000 {
113115
label = "image-0";
114-
reg = <0x00020000 (DT_SIZE_M(7) + DT_SIZE_K(12))>;
116+
reg = <0x00020000 DT_SIZE_M(7)>;
115117
};
116-
slot1_partition: partition@723000 {
118+
slot1_partition: partition@720000 {
117119
label = "image-1";
118-
reg = <0x00723000 DT_SIZE_M(7)>;
120+
reg = <0x00720000 DT_SIZE_M(7)>;
119121
};
120-
storage_partition: partition@E23000 {
122+
storage_partition: partition@E20000 {
121123
label = "storage";
122-
reg = <0x00E23000 (DT_SIZE_M(2) - DT_SIZE_K(140))>;
124+
reg = <0x00E20000 (DT_SIZE_M(2) - DT_SIZE_K(128))>;
123125
};
124126
};
125127
};

0 commit comments

Comments
 (0)