Skip to content

Commit b211e1b

Browse files
jacobwnashif
authored andcommitted
boards: nrf52840 common partition dtsi
Add common default flash partition layout for nrf52840 as many boards have used identical flash layouts. The default flash layout was updated to remove scrach in 2022 (9a84258) but almost all boards were still using the previous layout, so this updates them to the new layout with allows for larger applications. This commit also incorporates feeedback from @nordicjm in PR #77791 to change slot0 to 0x00077000 and slot1 to 0x00075000: "If you use swap using move, you need a sector for the data to be moved up by, and you need space for the swap status fields, which is about a sector, so by making the changes here you get the full 0x65000 for an image, without these changes you get 0x64000. Signed-off-by: Jacob Winther <[email protected]>
1 parent db22e1a commit b211e1b

File tree

25 files changed

+28
-850
lines changed

25 files changed

+28
-850
lines changed

boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
/dts-v1/;
99
#include "adafruit_feather_nrf52840_common.dtsi"
10-
#include "adafruit_feather_nrf52840_flash.dtsi"
10+
#include <nordic/nrf52840_partition.dtsi>
1111

1212
/ {
1313
model = "Adafruit Feather nRF52840 Express";

boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_common.dtsi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
/ {
1515

1616
chosen {
17-
zephyr,sram = &sram0;
1817
zephyr,ieee802154 = &ieee802154;
1918
};
2019

boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_flash_uf2.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
/ {
1010
chosen {
11+
zephyr,sram = &sram0;
1112
zephyr,flash = &flash0;
1213
zephyr,code-partition = &code_partition;
1314
};

boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_nrf52840_sense.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/dts-v1/;
88
#include "adafruit_feather_nrf52840_common.dtsi"
9-
#include "adafruit_feather_nrf52840_flash.dtsi"
9+
#include <nordic/nrf52840_partition.dtsi>
1010

1111
/ {
1212
model = "Adafruit Feather nRF52840 Sense";

boards/contextualelectronics/abc/contextualelectronics_abc.dts

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
/dts-v1/;
88
#include <nordic/nrf52840_qiaa.dtsi>
9+
#include <nordic/nrf52840_partition.dtsi>
910
#include "contextualelectronics_abc-pinctrl.dtsi"
1011

1112
/ {
@@ -15,9 +16,6 @@
1516
chosen {
1617
zephyr,console = &uart0;
1718
zephyr,shell-uart = &uart0;
18-
zephyr,sram = &sram0;
19-
zephyr,flash = &flash0;
20-
zephyr,code-partition = &slot0_partition;
2119
};
2220

2321
aliases {
@@ -95,43 +93,3 @@ arduino_i2c: &i2c0 {
9593
pinctrl-1 = <&spi2_sleep>;
9694
pinctrl-names = "default", "sleep";
9795
};
98-
99-
&flash0 {
100-
101-
partitions {
102-
compatible = "fixed-partitions";
103-
#address-cells = <1>;
104-
#size-cells = <1>;
105-
106-
boot_partition: partition@0 {
107-
label = "mcuboot";
108-
reg = <0x00000000 0x0000C000>;
109-
};
110-
slot0_partition: partition@c000 {
111-
label = "image-0";
112-
reg = <0x0000C000 0x00067000>;
113-
};
114-
slot1_partition: partition@73000 {
115-
label = "image-1";
116-
reg = <0x00073000 0x00067000>;
117-
};
118-
scratch_partition: partition@da000 {
119-
label = "image-scratch";
120-
reg = <0x000da000 0x0001e000>;
121-
};
122-
123-
/*
124-
* The flash starting at 0x000f8000 and ending at
125-
* 0x000fffff is reserved for use by the application.
126-
*/
127-
128-
/*
129-
* Storage partition will be used by FCB/LittleFS/NVS
130-
* if enabled.
131-
*/
132-
storage_partition: partition@f8000 {
133-
label = "storage";
134-
reg = <0x000f8000 0x00008000>;
135-
};
136-
};
137-
};

boards/electronut/nrf52840_blip/nrf52840_blip.dts

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/dts-v1/;
1111
#include <nordic/nrf52840_qiaa.dtsi>
12+
#include <nordic/nrf52840_partition.dtsi>
1213
#include "nrf52840_blip-pinctrl.dtsi"
1314
#include <zephyr/dt-bindings/input/input-event-codes.h>
1415

@@ -17,14 +18,11 @@
1718
compatible = "nordic,pca10056-dk";
1819

1920
chosen {
20-
zephyr,code-partition = &slot0_partition;
2121
zephyr,console = &uart0;
2222
zephyr,shell-uart = &uart0;
2323
zephyr,uart-mcumgr = &uart0;
2424
zephyr,bt-mon-uart = &uart0;
2525
zephyr,bt-c2h-uart = &uart0;
26-
zephyr,sram = &sram0;
27-
zephyr,flash = &flash0;
2826
zephyr,ieee802154 = &ieee802154;
2927
};
3028

@@ -149,46 +147,6 @@
149147
status = "okay";
150148
};
151149

152-
&flash0 {
153-
154-
partitions {
155-
compatible = "fixed-partitions";
156-
#address-cells = <1>;
157-
#size-cells = <1>;
158-
159-
boot_partition: partition@0 {
160-
label = "mcuboot";
161-
reg = <0x00000000 0x0000C000>;
162-
};
163-
slot0_partition: partition@c000 {
164-
label = "image-0";
165-
reg = <0x0000C000 0x00067000>;
166-
};
167-
slot1_partition: partition@73000 {
168-
label = "image-1";
169-
reg = <0x00073000 0x00067000>;
170-
};
171-
scratch_partition: partition@da000 {
172-
label = "image-scratch";
173-
reg = <0x000da000 0x0001e000>;
174-
};
175-
176-
/*
177-
* The flash starting at 0x000f8000 and ending at
178-
* 0x000fffff is reserved for use by the application.
179-
*/
180-
181-
/*
182-
* Storage partition will be used by FCB/LittleFS/NVS
183-
* if enabled.
184-
*/
185-
storage_partition: partition@f8000 {
186-
label = "storage";
187-
reg = <0x000f8000 0x00008000>;
188-
};
189-
};
190-
};
191-
192150
zephyr_udc0: &usbd {
193151
compatible = "nordic,nrf-usbd";
194152
status = "okay";

boards/electronut/nrf52840_papyr/nrf52840_papyr.dts

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
/dts-v1/;
88
#include <nordic/nrf52840_qiaa.dtsi>
9+
#include <nordic/nrf52840_partition.dtsi>
910
#include "nrf52840_papyr-pinctrl.dtsi"
1011
#include <zephyr/dt-bindings/input/input-event-codes.h>
1112

@@ -14,14 +15,11 @@
1415
compatible = "nordic,pca10056-dk";
1516

1617
chosen {
17-
zephyr,code-partition = &slot0_partition;
1818
zephyr,console = &uart0;
1919
zephyr,uart-mcumgr = &uart0;
2020
zephyr,shell-uart = &uart0;
2121
zephyr,bt-mon-uart = &uart0;
2222
zephyr,bt-c2h-uart = &uart0;
23-
zephyr,sram = &sram0;
24-
zephyr,flash = &flash0;
2523
zephyr,ieee802154 = &ieee802154;
2624
};
2725

@@ -142,45 +140,6 @@
142140
status = "okay";
143141
};
144142

145-
&flash0 {
146-
partitions {
147-
compatible = "fixed-partitions";
148-
#address-cells = <1>;
149-
#size-cells = <1>;
150-
151-
boot_partition: partition@0 {
152-
label = "mcuboot";
153-
reg = <0x00000000 0x0000C000>;
154-
};
155-
slot0_partition: partition@c000 {
156-
label = "image-0";
157-
reg = <0x0000C000 0x00067000>;
158-
};
159-
slot1_partition: partition@73000 {
160-
label = "image-1";
161-
reg = <0x00073000 0x00067000>;
162-
};
163-
scratch_partition: partition@da000 {
164-
label = "image-scratch";
165-
reg = <0x000da000 0x0001e000>;
166-
};
167-
168-
/*
169-
* The flash starting at 0x000f8000 and ending at
170-
* 0x000fffff is reserved for use by the application.
171-
*/
172-
173-
/*
174-
* Storage partition will be used by FCB/LittleFS/NVS
175-
* if enabled.
176-
*/
177-
storage_partition: partition@f8000 {
178-
label = "storage";
179-
reg = <0x000f8000 0x00008000>;
180-
};
181-
};
182-
};
183-
184143
zephyr_udc0: &usbd {
185144
compatible = "nordic,nrf-usbd";
186145
status = "okay";

boards/ezurio/bl654_dvk/bl654_dvk.dts

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
/dts-v1/;
1010
#include <nordic/nrf52840_qiaa.dtsi>
11+
#include <nordic/nrf52840_partition.dtsi>
1112
#include "bl654_dvk-pinctrl.dtsi"
1213
#include <zephyr/dt-bindings/input/input-event-codes.h>
1314

@@ -21,9 +22,6 @@
2122
zephyr,uart-mcumgr = &uart0;
2223
zephyr,bt-mon-uart = &uart0;
2324
zephyr,bt-c2h-uart = &uart0;
24-
zephyr,sram = &sram0;
25-
zephyr,flash = &flash0;
26-
zephyr,code-partition = &slot0_partition;
2725
zephyr,ieee802154 = &ieee802154;
2826
};
2927

@@ -182,46 +180,6 @@
182180
status = "okay";
183181
};
184182

185-
&flash0 {
186-
187-
partitions {
188-
compatible = "fixed-partitions";
189-
#address-cells = <1>;
190-
#size-cells = <1>;
191-
192-
boot_partition: partition@0 {
193-
label = "mcuboot";
194-
reg = <0x00000000 0x0000C000>;
195-
};
196-
slot0_partition: partition@c000 {
197-
label = "image-0";
198-
reg = <0x0000C000 0x00067000>;
199-
};
200-
slot1_partition: partition@73000 {
201-
label = "image-1";
202-
reg = <0x00073000 0x00067000>;
203-
};
204-
scratch_partition: partition@da000 {
205-
label = "image-scratch";
206-
reg = <0x000da000 0x0001e000>;
207-
};
208-
209-
/*
210-
* The flash starting at 0x000f8000 and ending at
211-
* 0x000fffff is reserved for use by the application.
212-
*/
213-
214-
/*
215-
* Storage partition will be used by FCB/LittleFS/NVS
216-
* if enabled.
217-
*/
218-
storage_partition: partition@f8000 {
219-
label = "storage";
220-
reg = <0x000f8000 0x00008000>;
221-
};
222-
};
223-
};
224-
225183
zephyr_udc0: &usbd {
226184
compatible = "nordic,nrf-usbd";
227185
status = "okay";

boards/holyiot/yj16019/holyiot_yj16019.dts

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,14 @@
66

77
/dts-v1/;
88
#include <nordic/nrf52832_qfaa.dtsi>
9+
#include <nordic/nrf52840_partition.dtsi>
910
#include "holyiot_yj16019-pinctrl.dtsi"
1011
#include <zephyr/dt-bindings/input/input-event-codes.h>
1112

1213
/ {
1314
model = "Holyiot YJ-16019";
1415
compatible = "holyiot,yj-16019";
1516

16-
chosen {
17-
zephyr,sram = &sram0;
18-
zephyr,flash = &flash0;
19-
zephyr,code-partition = &slot0_partition;
20-
};
21-
2217
leds {
2318
compatible = "gpio-leds";
2419
led0: led_0 {
@@ -58,43 +53,3 @@
5853
pinctrl-1 = <&pwm0_sleep>;
5954
pinctrl-names = "default", "sleep";
6055
};
61-
62-
&flash0 {
63-
64-
partitions {
65-
compatible = "fixed-partitions";
66-
#address-cells = <1>;
67-
#size-cells = <1>;
68-
69-
boot_partition: partition@0 {
70-
label = "mcuboot";
71-
reg = <0x00000000 0x0000C000>;
72-
};
73-
slot0_partition: partition@c000 {
74-
label = "image-0";
75-
reg = <0x0000C000 0x00067000>;
76-
};
77-
slot1_partition: partition@73000 {
78-
label = "image-1";
79-
reg = <0x00073000 0x00067000>;
80-
};
81-
scratch_partition: partition@da000 {
82-
label = "image-scratch";
83-
reg = <0x000da000 0x0001e000>;
84-
};
85-
86-
/*
87-
* The flash starting at 0x000f8000 and ending at
88-
* 0x000fffff is reserved for use by the application.
89-
*/
90-
91-
/*
92-
* Storage partition will be used by FCB/LittleFS/NVS
93-
* if enabled.
94-
*/
95-
storage_partition: partition@f8000 {
96-
label = "storage";
97-
reg = <0x000f8000 0x00008000>;
98-
};
99-
};
100-
};

0 commit comments

Comments
 (0)