Skip to content

Commit dd4efd7

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 da9aa8f commit dd4efd7

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
@@ -221,7 +221,7 @@
221221

222222
status = "okay";
223223

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

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

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)