Skip to content

Commit 211681d

Browse files
committed
boards: st: stm32n6570_dk: Instantiate ext flash controller
Instantiate a `soc-nv-flash` compatible node to allow using XSPI flash driver as a real flash controller on NOR device. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent f1c2ce4 commit 211681d

File tree

1 file changed

+35
-27
lines changed

1 file changed

+35
-27
lines changed

boards/st/stm32n6570_dk/stm32n6570_dk_common.dtsi

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
zephyr,touch = &gt911;
2424
spi-flash0 = &mx66uw1g45g;
2525
zephyr,flash-controller = &mx66uw1g45g;
26-
zephyr,flash = &mx66uw1g45g;
26+
zephyr,flash = &ext_flash;
2727
zephyr,code-partition = &slot0_partition;
2828
};
2929

@@ -406,32 +406,40 @@ zephyr_udc0: &usbotg_hs1 {
406406
four-byte-opcodes;
407407
status = "okay";
408408

409-
partitions {
410-
compatible = "fixed-partitions";
411-
#address-cells = <1>;
412-
#size-cells = <1>;
413-
414-
/*
415-
* Following flash partition is dedicated to the use of bootloader
416-
*/
417-
boot_partition: partition@0 {
418-
label = "mcuboot";
419-
reg = <0x00000000 DT_SIZE_K(64)>;
420-
};
421-
422-
slot0_partition: partition@10000 {
423-
label = "image-0";
424-
reg = <0x10000 DT_SIZE_K(1536)>;
425-
};
426-
427-
slot1_partition: partition@210000 {
428-
label = "image-1";
429-
reg = <0x210000 DT_SIZE_K(1536)>;
430-
};
431-
432-
storage_partition: partition@410000 {
433-
label = "storage";
434-
reg = <0x410000 DT_SIZE_K(64)>;
409+
#address-cells = <1>;
410+
#size-cells = <1>;
411+
ranges = <0x0 0x70000000 DT_SIZE_M(128)>;
412+
413+
ext_flash: ext-flash@0 {
414+
compatible = "soc-nv-flash";
415+
reg = <0x0 DT_SIZE_M(128)>;
416+
write-block-size = <1>;
417+
erase-block-size = <DT_SIZE_K(4)>;
418+
419+
partitions {
420+
compatible = "fixed-partitions";
421+
#address-cells = <1>;
422+
#size-cells = <1>;
423+
424+
boot_partition: partition@0 {
425+
label = "mcuboot";
426+
reg = <0x00000000 DT_SIZE_K(64)>;
427+
};
428+
429+
slot0_partition: partition@10000 {
430+
label = "image-0";
431+
reg = <0x10000 DT_SIZE_K(1536)>;
432+
};
433+
434+
slot1_partition: partition@210000 {
435+
label = "image-1";
436+
reg = <0x210000 DT_SIZE_K(1536)>;
437+
};
438+
439+
storage_partition: partition@410000 {
440+
label = "storage";
441+
reg = <0x410000 DT_SIZE_K(64)>;
442+
};
435443
};
436444
};
437445
};

0 commit comments

Comments
 (0)