Skip to content

Commit 3f1c537

Browse files
committed
boards: arm: stm32h735 disco kit for XiP on external octoflash
Define the Device tree of the stm32h735g_disco board to access the external NOR octo-flash in MemoryMapped mode for XiP Signed-off-by: Francois Ramu <[email protected]>
1 parent 2341814 commit 3f1c537

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

boards/arm/stm32h735g_disco/stm32h735g_disco.dts

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
zephyr,shell-uart = &usart3;
2020
zephyr,sram = &sram0;
2121
zephyr,flash = &flash0;
22+
zephyr,flash-controller = &mx25lm51245;
23+
zephyr,code-partition = &slot1_partition;
24+
2225
};
2326

2427
leds {
@@ -143,6 +146,28 @@
143146
cd-gpios = <&gpiof 5 GPIO_ACTIVE_LOW>;
144147
};
145148

149+
&flash0 {
150+
partitions {
151+
compatible = "fixed-partitions";
152+
#address-cells = <1>;
153+
#size-cells = <1>;
154+
155+
boot_partition: partition@0 {
156+
label = "mcuboot";
157+
reg = <0x00000000 DT_SIZE_K(64)>;
158+
};
159+
/* Set 2KB of storage at the end of first 1MB flash */
160+
slot0_partition: partition@10000 {
161+
label = "image-0";
162+
reg = <0x00010000 DT_SIZE_K(416)>;
163+
};
164+
storage_partition: partition@ff800 {
165+
label = "storage";
166+
reg = <0x000ff800 DT_SIZE_K(2)>;
167+
};
168+
};
169+
};
170+
146171
&octospi1 {
147172
pinctrl-0 = <&octospim_p1_clk_pf10 &octospim_p1_ncs_pg6
148173
&octospim_p1_io0_pd11 &octospim_p1_io1_pd12
@@ -156,9 +181,8 @@
156181

157182
mx25lm51245: ospi-nor-flash@0 {
158183
compatible = "st,stm32-ospi-nor";
159-
reg = <0>;
184+
reg = <0x90000000 DT_SIZE_M(64)>; /* 512 Mbits */
160185
ospi-max-frequency = <DT_FREQ_M(50)>;
161-
size = <DT_SIZE_M(512)>; /* 64 MBytes */
162186
spi-bus-width = <OSPI_OPI_MODE>;
163187
data-rate = <OSPI_DTR_TRANSFER>;
164188
status = "okay";
@@ -168,9 +192,10 @@
168192
#address-cells = <1>;
169193
#size-cells = <1>;
170194

171-
partition@0 {
195+
/* put image at offset 0 in slot1 */
196+
slot1_partition:partition@0 {
172197
label = "nor";
173-
reg = <0x00000000 DT_SIZE_M(4)>;
198+
reg = <0x00000000 DT_SIZE_M(32)>;
174199
};
175200
};
176201
};

0 commit comments

Comments
 (0)