Skip to content

Commit eb71640

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 af04b31 commit eb71640

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
@@ -220,7 +220,7 @@
220220

221221
status = "okay";
222222

223-
mx25uw25645: xspi-nor-flash@0 {
223+
ext_flash_ctrl: xspi-nor-flash@0 {
224224
compatible = "st,stm32-xspi-nor";
225225
reg = <0>;
226226
size = <DT_SIZE_M(256)>; /* 256Mbits */
@@ -230,29 +230,40 @@
230230
four-byte-opcodes;
231231
status = "okay";
232232

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

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)