Skip to content

Commit 3675c72

Browse files
committed
boards: arm: stm32h7s78 disco kit supporting xspi instance
Add the XSPI 2 which is an octoSPI connection to a octo NOR flash mx66uw1g45 on the stm32h7s78_dk disco kit Use the STM32Cube programmer to flash with the corresponding external loader for XiP mode. Removing usb_device will avoid test feature for that board. Signed-off-by: Francois Ramu <[email protected]>
1 parent 44c5756 commit 3675c72

File tree

3 files changed

+65
-1
lines changed

3 files changed

+65
-1
lines changed

boards/st/stm32h7s78_dk/board.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# SPDX-License-Identifier: Apache-2.0
22

33
# keep first
4+
if(CONFIG_STM32_MEMMAP)
45
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
6+
board_runner_args(stm32cubeprogrammer "--extload=MX66UW1G45G_STM32H7S78-DK.stldr")
7+
else()
8+
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw" )
9+
endif()
10+
511
board_runner_args(openocd --target-handle=_CHIPNAME.cpu0)
612

713
# keep first

boards/st/stm32h7s78_dk/stm32h7s78_dk.dts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,64 @@
173173
pinctrl-names = "default";
174174
};
175175

176+
&flash0 {
177+
partitions {
178+
compatible = "fixed-partitions";
179+
#address-cells = <1>;
180+
#size-cells = <1>;
181+
182+
/* Set the partitions with first MB to make use of the whole Bank1 */
183+
boot_partition: partition@0 {
184+
label = "mcuboot";
185+
reg = <0x00000000 DT_SIZE_K(64)>;
186+
};
187+
};
188+
};
189+
190+
&xspi2 {
191+
pinctrl-0 = <&xspim_p2_clk_pn6 &xspim_p2_ncs1_pn1
192+
&xspim_p2_io0_pn2 &xspim_p2_io1_pn3
193+
&xspim_p2_io2_pn4 &xspim_p2_io3_pn5
194+
&xspim_p2_io4_pn8 &xspim_p2_io5_pn9
195+
&xspim_p2_io6_pn10 &xspim_p2_io7_pn11
196+
&xspim_p2_dqs0_pn0>;
197+
pinctrl-names = "default";
198+
199+
status = "okay";
200+
201+
mx66uw1g45: xspi-nor-flash@70000000 {
202+
compatible = "st,stm32-xspi-nor";
203+
reg = <0x70000000 DT_SIZE_M(128)>; /* 1 Gbits */
204+
ospi-max-frequency = <DT_FREQ_M(50)>;
205+
spi-bus-width = <XSPI_OCTO_MODE>;
206+
data-rate = <XSPI_DTR_TRANSFER>;
207+
status = "okay";
208+
209+
partitions {
210+
compatible = "fixed-partitions";
211+
#address-cells = <1>;
212+
#size-cells = <1>;
213+
214+
slot0_partition: partition@0 {
215+
label = "image-0";
216+
reg = <0x00000000 DT_SIZE_K(512)>;
217+
};
218+
slot1_partition: partition@80000 {
219+
label = "image-1";
220+
reg = <0x0080000 DT_SIZE_K(512)>;
221+
};
222+
scratch_partition: partition@100000 {
223+
label = "image-scratch";
224+
reg = <0x00100000 DT_SIZE_K(64)>;
225+
};
226+
storage_partition: partition@110000 {
227+
label = "storage";
228+
reg = <0x00110000 DT_SIZE_K(64)>;
229+
};
230+
};
231+
};
232+
};
233+
176234
&die_temp {
177235
status = "okay";
178236
};

boards/st/stm32h7s78_dk/stm32h7s78_dk.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ supported:
1313
- watchdog
1414
- entropy
1515
- adc
16-
- usb_device
1716
- usbd
17+
- octospi
1818
vendor: st

0 commit comments

Comments
 (0)