Skip to content

Commit d0aeb47

Browse files
committed
boards: arm: st: nucleo_h7s3l8: Add *-block-size properties to xspi2
Add write-block-size and erase-block-size attributes to xspi nor flash connected to xspi2. This is needed for mcuboot to handle flash access of the ext_flash. The changes in the node structure is taken from the stm32h7s78_dk board. Update zephyr,flash-controller in samples/sysbuild/with_mcuboot/boards /nucleo_h7s3l8.overlay to have CONFIG_STM32_APP_IN_EXT_FLASH set when direct parent of flash is not XSPI but only the parent of the flash- controller. Signed-off-by: Thomas Decker <[email protected]>
1 parent 39d3878 commit d0aeb47

File tree

2 files changed

+36
-25
lines changed

2 files changed

+36
-25
lines changed

boards/st/nucleo_h7s3l8/nucleo_h7s3l8.dts

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217

218218
status = "okay";
219219

220-
mx25uw25645: xspi-nor-flash@0 {
220+
ext_flash_ctrl: xspi-nor-flash@0 {
221221
compatible = "st,stm32-xspi-nor";
222222
reg = <0>;
223223
size = <DT_SIZE_M(256)>; /* 256Mbits */
@@ -227,29 +227,40 @@
227227
four-byte-opcodes;
228228
status = "okay";
229229

230-
partitions {
231-
compatible = "fixed-partitions";
232-
#address-cells = <1>;
233-
#size-cells = <1>;
234-
235-
slot0_partition: partition@0 {
236-
label = "image-0";
237-
reg = <0x00000000 DT_SIZE_K(512)>;
238-
};
239-
240-
slot1_partition: partition@80000 {
241-
label = "image-1";
242-
reg = <0x0080000 DT_SIZE_K(512)>;
243-
};
244-
245-
scratch_partition: partition@100000 {
246-
label = "image-scratch";
247-
reg = <0x00100000 DT_SIZE_K(64)>;
248-
};
249-
250-
storage_partition: partition@110000 {
251-
label = "storage";
252-
reg = <0x00110000 DT_SIZE_K(64)>;
230+
#address-cells = <1>;
231+
#size-cells = <1>;
232+
ranges = <0x0 0x70000000 DT_SIZE_M(32)>;
233+
234+
ext_flash: mx25uw25645: xspi-nor-flash@0 {
235+
compatible = "soc-nv-flash";
236+
reg = <0x0 DT_SIZE_M(32)>;
237+
write-block-size = <1>;
238+
erase-block-size = <DT_SIZE_K(4)>;
239+
240+
partitions {
241+
compatible = "fixed-partitions";
242+
#address-cells = <1>;
243+
#size-cells = <1>;
244+
245+
slot0_partition: partition@0 {
246+
label = "image-0";
247+
reg = <0x00000000 DT_SIZE_K(512)>;
248+
};
249+
250+
slot1_partition: partition@80000 {
251+
label = "image-1";
252+
reg = <0x0080000 DT_SIZE_K(512)>;
253+
};
254+
255+
scratch_partition: partition@100000 {
256+
label = "image-scratch";
257+
reg = <0x00100000 DT_SIZE_K(64)>;
258+
};
259+
260+
storage_partition: partition@110000 {
261+
label = "storage";
262+
reg = <0x00110000 DT_SIZE_K(64)>;
263+
};
253264
};
254265
};
255266
};

samples/sysbuild/with_mcuboot/boards/nucleo_h7s3l8.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/ {
1212
chosen {
1313
zephyr,flash = &mx25uw25645;
14-
zephyr,flash-controller = &mx25uw25645;
14+
zephyr,flash-controller = &ext_flash_ctrl;
1515
zephyr,code-partition = &slot0_partition;
1616
};
1717
};

0 commit comments

Comments
 (0)