Skip to content

Commit 70d8196

Browse files
committed
samples: drivers: mspi: configure the sample to run on stm32h573_dk
Declare the xspi node of the stm32h573i_dk node to be MSPI "st,stm32-mspi-controller"compatible when running the samples/drivers/mspi/ Signed-off-by: Francois Ramu <[email protected]>
1 parent 001d428 commit 70d8196

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CONFIG_LOG=y
2+
CONFIG_MSPI_LOG_LEVEL_INF=y
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/* Replace the xspi1 by a "st,stm32-mspi-controller" compatible */
8+
/delete-node/ &xspi1;
9+
10+
/ {
11+
aliases {
12+
/* The sample gets the DT_ALIAS(flash0) as the mspi device */
13+
flash0 = &mx25lm51245;
14+
};
15+
16+
soc {
17+
xspi1: mspi@47001400 {
18+
compatible = "st,stm32-mspi-controller";
19+
reg = <0x47001400 0x400>, <0x90000000 DT_SIZE_M(256)>;
20+
interrupts = <78 0>;
21+
clock-names = "xspix", "xspi-ker";
22+
clocks = <&rcc STM32_CLOCK(AHB4, 20U)>,
23+
<&rcc STM32_SRC_PLL1_Q OCTOSPI1_SEL(1)>;
24+
#address-cells = <1>;
25+
#size-cells = <0>;
26+
27+
clock-frequency = < 0x17d7840 >;
28+
op-mode = "MSPI_CONTROLLER";
29+
duplex = "MSPI_HALF_DUPLEX";
30+
dqs-support;
31+
32+
status = "okay";
33+
34+
pinctrl-0 = <&octospi1_io0_pb1 &octospi1_io1_pd12
35+
&octospi1_io2_pc2 &octospi1_io3_pd13
36+
&octospi1_io4_ph2 &octospi1_io5_ph3
37+
&octospi1_io6_pg9 &octospi1_io7_pc0
38+
&octospi1_clk_pf10 &octospi1_ncs_pg6
39+
&octospi1_dqs_pb2>;
40+
pinctrl-names = "default";
41+
42+
mx25lm51245: ospi-nor-flash@0 {
43+
compatible = "jedec,mspi-nor";
44+
reg = <0>;
45+
size = <DT_SIZE_M(512)>; /* 512 Mbits */
46+
47+
status = "okay";
48+
49+
mspi-max-frequency = <DT_FREQ_M(50)>;
50+
mspi-io-mode = "MSPI_IO_MODE_OCTAL";
51+
mspi-data-rate = "MSPI_DATA_RATE_SINGLE"; /* as first step */
52+
mspi-hardware-ce-num = <0>;
53+
read-command = <0x13>; /* ReaD 4Bytes */
54+
write-command = <0x12>; /* WRite 4Bytes */
55+
command-length = "INSTR_1_BYTE";
56+
address-length = "ADDR_4_BYTE";
57+
rx-dummy = <8>;
58+
tx-dummy = <0>;
59+
jedec-id = [c2 85 3a];
60+
61+
partitions {
62+
compatible = "fixed-partitions";
63+
#address-cells = <1>;
64+
#size-cells = <1>;
65+
66+
partition@0 {
67+
label = "nor";
68+
reg = <0x00000000 DT_SIZE_M(64)>;
69+
};
70+
};
71+
};
72+
};
73+
};
74+
};

0 commit comments

Comments
 (0)