Skip to content

Commit 78c1def

Browse files
marekmatejkartben
authored andcommitted
boards: esp32xx: Use common partition tables
* Replace copies of fixed-partitions nodes in related boards by referencing the apropriate partition table from the available list. * For better reference the `partitions_*.dtsi` file has boot offset, purpose and the flash size encoded in the file name. Default flash size is considered to be 4MB. * Added the flash size node for the boards which are not based on the module. * Removed flash size registry from the esp32.*common.dtsi Signed-off-by: Marek Matej <[email protected]>
1 parent 4072594 commit 78c1def

File tree

44 files changed

+77
-830
lines changed

Some content is hidden

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

44 files changed

+77
-830
lines changed

boards/01space/esp32c3_042_oled/esp32c3_042_oled.dts

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

1010
#include <espressif/esp32c3/esp32c3_fx4.dtsi>
1111
#include "esp32c3_042_oled-pinctrl.dtsi"
12+
#include <espressif/partitions_0x0_default.dtsi>
1213

1314
/ {
1415
model = "01space ESP32C3 0.42 OLED";
@@ -104,37 +105,3 @@
104105
&esp32_bt_hci {
105106
status = "okay";
106107
};
107-
108-
&flash0 {
109-
partitions {
110-
compatible = "fixed-partitions";
111-
#address-cells = <1>;
112-
#size-cells = <1>;
113-
114-
boot_partition: partition@0 {
115-
label = "mcuboot";
116-
reg = <0x00000000 0x0000F000>;
117-
read-only;
118-
};
119-
120-
slot0_partition: partition@10000 {
121-
label = "image-0";
122-
reg = <0x00010000 0x00100000>;
123-
};
124-
125-
slot1_partition: partition@110000 {
126-
label = "image-1";
127-
reg = <0x00110000 0x00100000>;
128-
};
129-
130-
scratch_partition: partition@210000 {
131-
label = "image-scratch";
132-
reg = <0x00210000 0x00040000>;
133-
};
134-
135-
storage_partition: partition@250000 {
136-
label = "storage";
137-
reg = <0x00250000 0x00006000>;
138-
};
139-
};
140-
};

boards/dptechnics/walter/walter_esp32s3_appcpu.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
/dts-v1/;
77

8-
#include <espressif/esp32s3/esp32s3_appcpu.dtsi>
8+
#include "espressif/esp32s3/esp32s3_wroom_n16r2.dtsi"
99
#include <espressif/partitions_0x0_amp.dtsi>
1010

1111
/ {

boards/espressif/esp32s3_devkitc/esp32s3_devkitc_appcpu.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
/dts-v1/;
77

8-
#include <espressif/esp32s3/esp32s3_appcpu.dtsi>
8+
#include <espressif/esp32s3/esp32s3_wroom_n8.dtsi>
99
#include <espressif/partitions_0x0_amp.dtsi>
1010
#include "esp32s3_devkitc-pinctrl.dtsi"
1111

boards/espressif/esp32s3_devkitm/esp32s3_devkitm_appcpu.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
/dts-v1/;
77

8-
#include <espressif/esp32s3/esp32s3_appcpu.dtsi>
8+
#include <espressif/esp32s3/esp32s3_mini_n8.dtsi>
99
#include <espressif/partitions_0x0_amp.dtsi>
1010
#include "esp32s3_devkitm-pinctrl.dtsi"
1111

boards/espressif/esp32s3_eye/esp32s3_eye_appcpu.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
};
2222
};
2323

24+
&flash0 {
25+
reg = <0x0 DT_SIZE_M(4)>;
26+
};
27+
2428
&trng0 {
2529
status = "okay";
2630
};

boards/espressif/esp32s3_eye/esp32s3_eye_procpu.dts

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <zephyr/dt-bindings/input/input-event-codes.h>
1111
#include <zephyr/dt-bindings/input/esp32-touch-sensor-input.h>
1212
#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>
13+
#include <espressif/partitions_0x0_amp.dtsi>
1314

1415
/ {
1516
model = "Espressif ESP32S3-EYE PROCPU";
@@ -200,45 +201,6 @@
200201
status = "okay";
201202
};
202203

203-
&flash0 {
204-
status = "okay";
205-
partitions {
206-
compatible = "fixed-partitions";
207-
#address-cells = <1>;
208-
#size-cells = <1>;
209-
210-
/* Reserve 64kB for the bootloader */
211-
boot_partition: partition@0 {
212-
label = "mcuboot";
213-
reg = <0x00000000 0x00010000>;
214-
read-only;
215-
};
216-
217-
/* Reserve 1024kB for the application in slot 0 */
218-
slot0_partition: partition@10000 {
219-
label = "image-0";
220-
reg = <0x00010000 0x00100000>;
221-
};
222-
223-
/* Reserve 1024kB for the application in slot 1 */
224-
slot1_partition: partition@110000 {
225-
label = "image-1";
226-
reg = <0x00110000 0x00100000>;
227-
};
228-
229-
/* Reserve 256kB for the scratch partition */
230-
scratch_partition: partition@210000 {
231-
label = "image-scratch";
232-
reg = <0x00210000 0x00040000>;
233-
};
234-
235-
storage_partition: partition@250000 {
236-
label = "storage";
237-
reg = <0x00250000 0x00006000>;
238-
};
239-
};
240-
};
241-
242204
&esp32_bt_hci {
243205
status = "okay";
244206
};

boards/franzininho/esp32s2_franzininho/esp32s2_franzininho.dts

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

99
#include <espressif/esp32s2/esp32s2_wroom.dtsi>
1010
#include "esp32s2_franzininho-pinctrl.dtsi"
11+
#include <espressif/partitions_0x1000_default.dtsi>
1112

1213
/ {
1314
model = "ESP32S2 Franzininho";
@@ -107,45 +108,6 @@
107108
pinctrl-names = "default";
108109
};
109110

110-
&flash0 {
111-
status = "okay";
112-
partitions {
113-
compatible = "fixed-partitions";
114-
#address-cells = <1>;
115-
#size-cells = <1>;
116-
117-
/* Reserve 60kB for the bootloader */
118-
boot_partition: partition@1000 {
119-
label = "mcuboot";
120-
reg = <0x00001000 0x0000F000>;
121-
read-only;
122-
};
123-
124-
/* Reserve 1024kB for the application in slot 0 */
125-
slot0_partition: partition@10000 {
126-
label = "image-0";
127-
reg = <0x00010000 0x00100000>;
128-
};
129-
130-
/* Reserve 1024kB for the application in slot 1 */
131-
slot1_partition: partition@110000 {
132-
label = "image-1";
133-
reg = <0x00110000 0x00100000>;
134-
};
135-
136-
/* Reserve 256kB for the scratch partition */
137-
scratch_partition: partition@210000 {
138-
label = "image-scratch";
139-
reg = <0x00210000 0x00040000>;
140-
};
141-
142-
storage_partition: partition@250000 {
143-
label = "storage";
144-
reg = <0x00250000 0x00006000>;
145-
};
146-
};
147-
};
148-
149111
&wdt0 {
150112
status = "okay";
151113
};

boards/heltec/heltec_wifi_lora32_v2/heltec_wifi_lora32_v2_appcpu.dts

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/dts-v1/;
77

88
#include <espressif/esp32/esp32_appcpu.dtsi>
9+
#include <espressif/partitions_0x1000_amp.dtsi>
910

1011
/ {
1112
model = "Heltec Wi-Fi Lora32 V2 APPCPU";
@@ -25,42 +26,3 @@
2526
&trng0 {
2627
status = "okay";
2728
};
28-
29-
&flash0 {
30-
status = "okay";
31-
partitions {
32-
compatible = "fixed-partitions";
33-
#address-cells = <1>;
34-
#size-cells = <1>;
35-
36-
/* Reserve 60kB for the bootloader */
37-
boot_partition: partition@1000 {
38-
label = "mcuboot";
39-
reg = <0x00001000 0x0000F000>;
40-
read-only;
41-
};
42-
43-
/* Reserve 1024kB for the application in slot 0 */
44-
slot0_partition: partition@10000 {
45-
label = "image-0";
46-
reg = <0x00010000 0x00100000>;
47-
};
48-
49-
/* Reserve 1024kB for the application in slot 1 */
50-
slot1_partition: partition@110000 {
51-
label = "image-1";
52-
reg = <0x00110000 0x00100000>;
53-
};
54-
55-
/* Reserve 256kB for the scratch partition */
56-
scratch_partition: partition@210000 {
57-
label = "image-scratch";
58-
reg = <0x00210000 0x00040000>;
59-
};
60-
61-
storage_partition: partition@250000 {
62-
label = "storage";
63-
reg = <0x00250000 0x00006000>;
64-
};
65-
};
66-
};

boards/heltec/heltec_wifi_lora32_v2/heltec_wifi_lora32_v2_procpu.dts

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <espressif/esp32/esp32_d0wd_v3.dtsi>
99
#include "heltec_wifi_lora32_v2-pinctrl.dtsi"
1010
#include <zephyr/dt-bindings/input/input-event-codes.h>
11+
#include <espressif/partitions_0x1000_amp.dtsi>
1112

1213
/ {
1314
model = "Heltec Wi-Fi Lora32 V2 PROCPU";
@@ -59,6 +60,10 @@
5960
};
6061
};
6162

63+
&flash0 {
64+
reg = <0x0 DT_SIZE_M(4)>;
65+
};
66+
6267
&uart0 {
6368
status = "okay";
6469
current-speed = <115200>;
@@ -106,50 +111,6 @@
106111
};
107112
};
108113

109-
&flash0 {
110-
/* the board is using plain d0wd SoC part without the flash
111-
* so any additional flash size should be defined at the board level
112-
*/
113-
reg = <0x0 DT_SIZE_M(8)>;
114-
115-
status = "okay";
116-
partitions {
117-
compatible = "fixed-partitions";
118-
#address-cells = <1>;
119-
#size-cells = <1>;
120-
121-
/* Reserve 60kB for the bootloader */
122-
boot_partition: partition@1000 {
123-
label = "mcuboot";
124-
reg = <0x00001000 0x0000F000>;
125-
read-only;
126-
};
127-
128-
/* Reserve 1024kB for the application in slot 0 */
129-
slot0_partition: partition@10000 {
130-
label = "image-0";
131-
reg = <0x00010000 0x00100000>;
132-
};
133-
134-
/* Reserve 1024kB for the application in slot 1 */
135-
slot1_partition: partition@110000 {
136-
label = "image-1";
137-
reg = <0x00110000 0x00100000>;
138-
};
139-
140-
/* Reserve 256kB for the scratch partition */
141-
scratch_partition: partition@210000 {
142-
label = "image-scratch";
143-
reg = <0x00210000 0x00040000>;
144-
};
145-
146-
storage_partition: partition@250000 {
147-
label = "storage";
148-
reg = <0x00250000 0x00006000>;
149-
};
150-
};
151-
};
152-
153114
&esp32_bt_hci {
154115
status = "okay";
155116
};

boards/heltec/heltec_wireless_stick_lite_v3/heltec_wireless_stick_lite_v3_appcpu.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
};
2222
};
2323

24+
&flash0 {
25+
reg = <0x0 DT_SIZE_M(4)>;
26+
};
27+
2428
&trng0 {
2529
status = "okay";
2630
};

0 commit comments

Comments
 (0)