Skip to content

Commit 7c4cde6

Browse files
committed
tree: Update sdk-zephyr, sdk-mcuboot and partition macro usage
Includes the new zephyr,mapped-binding and conversion of Nordic parts to use this new compatible. Also included is an update to the flash map PM file to support the new macros Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
1 parent 853975d commit 7c4cde6

File tree

139 files changed

+590
-219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+590
-219
lines changed

applications/nrf_desktop/src/modules/dfu.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,18 +130,18 @@ LOG_MODULE_REGISTER(MODULE, CONFIG_DESKTOP_CONFIG_CHANNEL_DFU_LOG_LEVEL);
130130
#define MCUBOOT_PRIMARY_NODE DT_NODELABEL(slot0_partition)
131131
#define MCUBOOT_SECONDARY_NODE DT_NODELABEL(slot1_partition)
132132

133-
BUILD_ASSERT(UTIL_OR(DT_FIXED_PARTITION_EXISTS(MCUBOOT_PRIMARY_NODE),
133+
BUILD_ASSERT(UTIL_OR(DT_PARTITION_EXISTS(MCUBOOT_PRIMARY_NODE),
134134
DT_FIXED_SUBPARTITION_EXISTS(MCUBOOT_PRIMARY_NODE)),
135135
"Missing primary partition definition in DTS.");
136-
BUILD_ASSERT(UTIL_OR(DT_FIXED_PARTITION_EXISTS(MCUBOOT_SECONDARY_NODE),
136+
BUILD_ASSERT(UTIL_OR(DT_PARTITION_EXISTS(MCUBOOT_SECONDARY_NODE),
137137
DT_FIXED_SUBPARTITION_EXISTS(MCUBOOT_SECONDARY_NODE)),
138138
"Missing secondary partition definition in DTS.");
139139

140140

141141
#define NVM_ADDRESS(node) \
142142
(COND_CODE_1(DT_FIXED_SUBPARTITION_EXISTS(node), \
143143
(DT_FIXED_SUBPARTITION_ADDR(node)), \
144-
(DT_FIXED_PARTITION_ADDR(node))))
144+
(DT_PARTITION_ADDR(node))))
145145
#define CODE_PARTITION_START_ADDR NVM_ADDRESS(CODE_PARTITION_NODE)
146146
#define MCUBOOT_PRIMARY_START_ADDR NVM_ADDRESS(MCUBOOT_PRIMARY_NODE)
147147
#define MCUBOOT_SECONDARY_START_ADDR NVM_ADDRESS(MCUBOOT_SECONDARY_NODE)
@@ -154,8 +154,8 @@ LOG_MODULE_REGISTER(MODULE, CONFIG_DESKTOP_CONFIG_CHANNEL_DFU_LOG_LEVEL);
154154
#error Primary and secondary partitions cannot have the same address.
155155
#endif
156156

157-
#define MCUBOOT_PRIMARY_SLOT_ID DT_FIXED_PARTITION_ID(MCUBOOT_PRIMARY_NODE)
158-
#define MCUBOOT_SECONDARY_SLOT_ID DT_FIXED_PARTITION_ID(MCUBOOT_SECONDARY_NODE)
157+
#define MCUBOOT_PRIMARY_SLOT_ID DT_PARTITION_ID(MCUBOOT_PRIMARY_NODE)
158+
#define MCUBOOT_SECONDARY_SLOT_ID DT_PARTITION_ID(MCUBOOT_SECONDARY_NODE)
159159

160160
#if BUILD_TIME_DFU_SLOT_ID_INFO_IS_AVAILABLE
161161
/* Use range check to allow for placing MCUboot header in a separate

applications/nrf_desktop/src/modules/failsafe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ static int failsafe_check(bool *failure_detected)
3838
static int failsafe_erase(void)
3939
{
4040
const struct flash_area *flash_area;
41-
int err = flash_area_open(FIXED_PARTITION_ID(storage_partition),
41+
int err = flash_area_open(PARTITION_ID(storage_partition),
4242
&flash_area);
4343
if (!err) {
4444
err = flash_area_erase(flash_area, 0,
45-
FIXED_PARTITION_SIZE(storage_partition));
45+
PARTITION_SIZE(storage_partition));
4646
flash_area_close(flash_area);
4747
}
4848

boards/nordic/nrf52820dongle/nrf52820dongle_nrf52820.dts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,26 +120,30 @@
120120
* http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
121121
*/
122122
partitions {
123-
compatible = "fixed-partitions";
124123
#address-cells = <1>;
125124
#size-cells = <1>;
125+
ranges;
126126

127127
boot_partition: partition@0 {
128+
compatible = "zephyr,mapped-partition";
128129
label = "mcuboot";
129130
reg = <0x000000000 0xd000>;
130131
};
131132

132133
slot0_partition: partition@d000 {
134+
compatible = "zephyr,mapped-partition";
133135
label = "image-0";
134136
reg = <0x0000d000 0x30000>;
135137
};
136138

137139
slot1_partition: partition@3d000 {
140+
compatible = "zephyr,mapped-partition";
138141
label = "image-1";
139142
reg = <0x0003d000 0x1000>;
140143
};
141144

142145
storage_partition: partition@3e000 {
146+
compatible = "zephyr,mapped-partition";
143147
label = "storage";
144148
reg = <0x0003e000 0x00002000>;
145149
};

boards/nordic/nrf52833dongle/nrf52833dongle_nrf52833.dts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,31 +125,36 @@
125125
* http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
126126
*/
127127
partitions {
128-
compatible = "fixed-partitions";
129128
#address-cells = <1>;
130129
#size-cells = <1>;
130+
ranges;
131131

132132
boot_partition: partition@0 {
133+
compatible = "zephyr,mapped-partition";
133134
label = "mcuboot";
134135
reg = <0x000000000 0xc000>;
135136
};
136137

137138
slot0_partition: partition@c000 {
139+
compatible = "zephyr,mapped-partition";
138140
label = "image-0";
139141
reg = <0x0000c000 0x32000>;
140142
};
141143

142144
slot1_partition: partition@3e000 {
145+
compatible = "zephyr,mapped-partition";
143146
label = "image-1";
144147
reg = <0x0003e000 0x32000>;
145148
};
146149

147150
scratch_partition: partition@70000 {
151+
compatible = "zephyr,mapped-partition";
148152
label = "image-scratch";
149153
reg = <0x00070000 0xa000>;
150154
};
151155

152156
storage_partition: partition@7a000 {
157+
compatible = "zephyr,mapped-partition";
153158
label = "storage";
154159
reg = <0x0007a000 0x00006000>;
155160
};

boards/nordic/nrf52840gmouse/nrf52840gmouse_nrf52840.dts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,31 +115,36 @@
115115
* http://docs.zephyrproject.org/devices/dts/flash_partitions.html
116116
*/
117117
partitions {
118-
compatible = "fixed-partitions";
119118
#address-cells = <1>;
120119
#size-cells = <1>;
120+
ranges;
121121

122122
boot_partition: partition@0 {
123+
compatible = "zephyr,mapped-partition";
123124
label = "mcuboot";
124125
reg = <0x000000000 0x0000c000>;
125126
};
126127

127128
slot0_partition: partition@c000 {
129+
compatible = "zephyr,mapped-partition";
128130
label = "image-0";
129131
reg = <0x0000c000 0x000069000>;
130132
};
131133

132134
slot1_partition: partition@75000 {
135+
compatible = "zephyr,mapped-partition";
133136
label = "image-1";
134137
reg = <0x00075000 0x000069000>;
135138
};
136139

137140
scratch_partition: partition@de000 {
141+
compatible = "zephyr,mapped-partition";
138142
label = "image-scratch";
139143
reg = <0x000de000 0x0001e000>;
140144
};
141145

142146
storage_partition: partition@fc000 {
147+
compatible = "zephyr,mapped-partition";
143148
label = "storage";
144149
reg = <0x000fc000 0x00004000>;
145150
};

boards/nordic/nrf52dmouse/nrf52dmouse_nrf52832.dts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,31 +87,36 @@
8787
* http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
8888
*/
8989
partitions {
90-
compatible = "fixed-partitions";
9190
#address-cells = <1>;
9291
#size-cells = <1>;
92+
ranges;
9393

9494
boot_partition: partition@0 {
95+
compatible = "zephyr,mapped-partition";
9596
label = "mcuboot";
9697
reg = <0x00000000 0x0000c000>;
9798
};
9899

99100
slot0_partition: partition@c000 {
101+
compatible = "zephyr,mapped-partition";
100102
label = "image-0";
101103
reg = <0x0000c000 0x00036000>;
102104
};
103105

104106
slot1_partition: partition@42000 {
107+
compatible = "zephyr,mapped-partition";
105108
label = "image-1";
106109
reg = <0x00042000 0x00036000>;
107110
};
108111

109112
scratch_partition: partition@78000 {
113+
compatible = "zephyr,mapped-partition";
110114
label = "image-scratch";
111115
reg = <0x00078000 0x00004000>;
112116
};
113117

114118
storage_partition: partition@7c000 {
119+
compatible = "zephyr,mapped-partition";
115120
label = "storage";
116121
reg = <0x0007c000 0x00004000>;
117122
};

boards/nordic/nrf52kbd/nrf52kbd_nrf52832.dts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,31 +67,36 @@
6767
* http://docs.zephyrproject.org/devices/dts/flash_partitions.html
6868
*/
6969
partitions {
70-
compatible = "fixed-partitions";
7170
#address-cells = <1>;
7271
#size-cells = <1>;
72+
ranges;
7373

7474
boot_partition: partition@0 {
75+
compatible = "zephyr,mapped-partition";
7576
label = "mcuboot";
7677
reg = <0x000000000 0x0000c000>;
7778
};
7879

7980
slot0_partition: partition@c000 {
81+
compatible = "zephyr,mapped-partition";
8082
label = "image-0";
8183
reg = <0x0000c000 0x000036000>;
8284
};
8385

8486
slot1_partition: partition@42000 {
87+
compatible = "zephyr,mapped-partition";
8588
label = "image-1";
8689
reg = <0x00042000 0x000036000>;
8790
};
8891

8992
scratch_partition: partition@78000 {
93+
compatible = "zephyr,mapped-partition";
9094
label = "image-scratch";
9195
reg = <0x00078000 0x00004000>;
9296
};
9397

9498
storage_partition: partition@7c000 {
99+
compatible = "zephyr,mapped-partition";
95100
label = "storage";
96101
reg = <0x0007c000 0x00004000>;
97102
};

boards/nordic/nrf54lm20dongle/nrf54lm20dongle_nrf54lm20b_cpuflpr.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@
2727

2828
&cpuflpr_rram {
2929
partitions {
30-
compatible = "fixed-partitions";
3130
#address-cells = <1>;
3231
#size-cells = <1>;
32+
ranges;
3333

3434
cpuflpr_code_partition: partition@0 {
35+
compatible = "zephyr,mapped-partition";
3536
label = "image-0";
3637
reg = <0x0 DT_SIZE_K(96)>;
3738
};

boards/nordic/nrf54ls05dk/nrf54ls05b_cpuapp_common.dtsi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,30 @@
4343

4444
&cpuapp_rram {
4545
partitions {
46-
compatible = "fixed-partitions";
4746
#address-cells = <1>;
4847
#size-cells = <1>;
4948
ranges;
5049

5150
boot_partition: partition@0 {
51+
compatible = "zephyr,mapped-partition";
5252
label = "mcuboot";
5353
reg = <0x0 DT_SIZE_K(64)>;
5454
};
5555

5656
slot0_partition: partition@10000 {
57+
compatible = "zephyr,mapped-partition";
5758
label = "image-0";
5859
reg = <0x10000 DT_SIZE_K(204)>;
5960
};
6061

6162
slot1_partition: partition@43000 {
63+
compatible = "zephyr,mapped-partition";
6264
label = "image-1";
6365
reg = <0x43000 DT_SIZE_K(204)>;
6466
};
6567

6668
storage_partition: partition@76000 {
69+
compatible = "zephyr,mapped-partition";
6770
label = "storage";
6871
reg = <0x76000 DT_SIZE_K(36)>;
6972
};

boards/nordic/nrf54lv10dk/nrf54lv10dk_nrf54lv10a_cpuapp.dts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,30 @@
2121

2222
&cpuapp_rram {
2323
partitions {
24-
compatible = "fixed-partitions";
2524
#address-cells = <1>;
2625
#size-cells = <1>;
2726
ranges;
2827

2928
boot_partition: partition@0 {
29+
compatible = "zephyr,mapped-partition";
3030
label = "mcuboot";
3131
reg = <0x0 DT_SIZE_K(64)>;
3232
};
3333

3434
slot0_partition: partition@10000 {
35+
compatible = "zephyr,mapped-partition";
3536
label = "image-0";
3637
reg = <0x10000 DT_SIZE_K(212)>;
3738
};
3839

3940
slot1_partition: partition@7a000 {
41+
compatible = "zephyr,mapped-partition";
4042
label = "image-1";
4143
reg = <0x7a000 DT_SIZE_K(212)>;
4244
};
4345

4446
storage_partition: partition@e4000 {
47+
compatible = "zephyr,mapped-partition";
4548
label = "storage";
4649
reg = <0xe4000 DT_SIZE_K(36)>;
4750
};

0 commit comments

Comments
 (0)