Skip to content

Commit b748999

Browse files
committed
boards: st: nucleo_h7s3l8: Add ext_flash_app variant
Add ext_flash_app variant to nucleo_h7s3l8 to allow building applications running on ext flash. Based on Erwan Gouriou's work on stm32h7s78_dk in PR #97992 (which is based on A.Jarmouni's work on stm32h750_dk in PR 97037). Signed-off-by: Thomas Decker <[email protected]>
1 parent dd4efd7 commit b748999

8 files changed

+357
-246
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (c) 2024-2025 STMicroelectronics
2+
# Copyright (c) 2025 JB-Lighting Lichtanlagentechnik
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
if BOARD_NUCLEO_H7S3L8_STM32H7S3XX_EXT_FLASH_APP
6+
7+
choice BOOTLOADER
8+
default BOOTLOADER_MCUBOOT
9+
endchoice
10+
11+
choice BOOT_SIGNATURE_TYPE
12+
default BOOT_SIGNATURE_TYPE_NONE
13+
endchoice
14+
15+
choice MCUBOOT_MODE
16+
default MCUBOOT_MODE_SINGLE_APP
17+
endchoice
18+
19+
endif # BOARD_NUCLEO_H7S3L8_STM32H7S3XX_EXT_FLASH_APP

boards/st/nucleo_h7s3l8/board.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# keep first
44
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
5-
if(CONFIG_XIP AND (CONFIG_STM32_MEMMAP OR CONFIG_BOOTLOADER_MCUBOOT))
5+
if(CONFIG_STM32_MEMMAP OR CONFIG_BOOTLOADER_MCUBOOT)
66
board_runner_args(stm32cubeprogrammer "--extload=MX25UW25645G_NUCLEO-H7S3L8.stldr")
77
endif()
88
board_runner_args(openocd --target-handle=_CHIPNAME.cpu0)

boards/st/nucleo_h7s3l8/board.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ board:
44
vendor: st
55
socs:
66
- name: stm32h7s3xx
7+
variants:
8+
- name: ext_flash_app
Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
/*
2+
* Copyright (c) 2024 STMicroelectronics
3+
* Copyright (c) 2025 JB-Lighting Lichtanlagentechnik
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
/dts-v1/;
9+
#include <st/h7rs/stm32h7s3X8.dtsi>
10+
#include <st/h7/stm32h7s3l8hx-pinctrl.dtsi>
11+
#include "arduino_r3_connector.dtsi"
12+
#include <zephyr/dt-bindings/input/input-event-codes.h>
13+
14+
/ {
15+
chosen {
16+
zephyr,console = &usart3;
17+
zephyr,shell-uart = &usart3;
18+
zephyr,dtcm = &dtcm;
19+
zephyr,sram = &sram0;
20+
zephyr,canbus = &fdcan1;
21+
};
22+
23+
leds: leds {
24+
compatible = "gpio-leds";
25+
26+
green_led: led_1 {
27+
gpios = <&gpiod 10 GPIO_ACTIVE_HIGH>;
28+
label = "User LD1";
29+
};
30+
31+
yellow_led: led_2 {
32+
gpios = <&gpiod 13 GPIO_ACTIVE_HIGH>;
33+
label = "User LD2";
34+
};
35+
36+
red_led: led_3 {
37+
gpios = <&gpiob 7 GPIO_ACTIVE_HIGH>;
38+
label = "User LD3";
39+
};
40+
};
41+
42+
gpio_keys {
43+
compatible = "gpio-keys";
44+
45+
user_button: button_0 {
46+
label = "User";
47+
gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>;
48+
zephyr,code = <INPUT_KEY_0>;
49+
};
50+
};
51+
52+
aliases {
53+
led0 = &green_led;
54+
led1 = &yellow_led;
55+
led2 = &red_led;
56+
sw0 = &user_button;
57+
watchdog0 = &iwdg;
58+
spi-flash0 = &mx25uw25645;
59+
};
60+
61+
ext_memory: memory@70000000 {
62+
compatible = "zephyr,memory-region";
63+
reg = <0x70000000 DT_SIZE_M(32)>;
64+
zephyr,memory-region = "EXTMEM";
65+
/* The ATTR_MPU_EXTMEM attribute causing a MPU FAULT */
66+
zephyr,memory-attr = <DT_MEM_ARM(ATTR_MPU_IO)>;
67+
};
68+
};
69+
70+
&clk_hse {
71+
clock-frequency = <DT_FREQ_M(24)>;
72+
status = "okay";
73+
};
74+
75+
&clk_lse {
76+
status = "okay";
77+
};
78+
79+
&pll {
80+
div-m = <12>;
81+
mul-n = <200>;
82+
div-p = <2>;
83+
div-q = <2>;
84+
div-r = <2>;
85+
div-s = <2>;
86+
div-t = <2>;
87+
clocks = <&clk_hse>;
88+
status = "okay";
89+
};
90+
91+
/* PLL2 for clocking the xspi peripheral */
92+
&pll2 {
93+
div-m = <12>;
94+
mul-n = <200>;
95+
div-p = <2>;
96+
div-q = <2>;
97+
div-r = <2>;
98+
div-s = <2>;
99+
div-t = <2>;
100+
clocks = <&clk_hse>;
101+
status = "okay";
102+
};
103+
104+
&rcc {
105+
clocks = <&pll>;
106+
clock-frequency = <DT_FREQ_M(200)>;
107+
dcpre = <1>;
108+
hpre = <1>;
109+
ppre1 = <2>;
110+
ppre2 = <2>;
111+
ppre4 = <2>;
112+
ppre5 = <2>;
113+
};
114+
115+
&pwr {
116+
power-supply = "ldo";
117+
};
118+
119+
&usart1 {
120+
pinctrl-0 = <&usart1_tx_pb14 &usart1_rx_pa10>;
121+
pinctrl-names = "default";
122+
current-speed = <115200>;
123+
status = "okay";
124+
};
125+
126+
&usart3 {
127+
pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>;
128+
pinctrl-names = "default";
129+
current-speed = <115200>;
130+
status = "okay";
131+
};
132+
133+
&iwdg {
134+
status = "okay";
135+
};
136+
137+
&wwdg {
138+
status = "okay";
139+
};
140+
141+
&adc1 {
142+
pinctrl-0 = <&adc1_inp15_pa3>; /* Arduino A0 */
143+
pinctrl-names = "default";
144+
st,adc-clock-source = "SYNC";
145+
st,adc-prescaler = <4>;
146+
status = "okay";
147+
};
148+
149+
&spi1 {
150+
status = "okay";
151+
pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pb5>;
152+
pinctrl-names = "default";
153+
cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
154+
};
155+
156+
&i2c1 {
157+
pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>;
158+
pinctrl-names = "default";
159+
status = "okay";
160+
clock-frequency = <I2C_BITRATE_FAST>;
161+
};
162+
163+
&fdcan1 {
164+
pinctrl-0 = <&fdcan1_rx_pd0 &fdcan1_tx_pd1>;
165+
pinctrl-names = "default";
166+
clocks = <&rcc STM32_CLOCK(APB1_2, 8)>,
167+
<&rcc STM32_SRC_HSE FDCAN_SEL(0)>;
168+
status = "okay";
169+
};
170+
171+
&mac {
172+
pinctrl-0 = <&eth_rmii_rxd0_pg4
173+
&eth_rmii_rxd1_pg5
174+
&eth_rmii_ref_clk_pb6
175+
&eth_rmii_crs_dv_pa7
176+
&eth_rmii_tx_en_pg11
177+
&eth_rmii_txd0_pg13
178+
&eth_rmii_txd1_pg12>;
179+
pinctrl-names = "default";
180+
phy-connection-type = "rmii";
181+
phy-handle = <&eth_phy>;
182+
status = "okay";
183+
};
184+
185+
&mdio {
186+
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pg6>;
187+
pinctrl-names = "default";
188+
status = "okay";
189+
190+
eth_phy: ethernet-phy@0 {
191+
compatible = "ethernet-phy";
192+
reg = <0x00>;
193+
};
194+
};
195+
196+
&xspi2 {
197+
pinctrl-0 = <&xspim_p2_clk_pn6 &xspim_p2_ncs1_pn1
198+
&xspim_p2_io0_pn2 &xspim_p2_io1_pn3
199+
&xspim_p2_io2_pn4 &xspim_p2_io3_pn5
200+
&xspim_p2_io4_pn8 &xspim_p2_io5_pn9
201+
&xspim_p2_io6_pn10 &xspim_p2_io7_pn11
202+
&xspim_p2_dqs0_pn0>;
203+
pinctrl-names = "default";
204+
205+
status = "okay";
206+
207+
ext_flash_ctrl: xspi-nor-flash@0 {
208+
compatible = "st,stm32-xspi-nor";
209+
reg = <0>;
210+
size = <DT_SIZE_M(256)>; /* 256Mbits */
211+
ospi-max-frequency = <DT_FREQ_M(50)>;
212+
spi-bus-width = <XSPI_OCTO_MODE>;
213+
data-rate = <XSPI_DTR_TRANSFER>;
214+
four-byte-opcodes;
215+
status = "okay";
216+
217+
#address-cells = <1>;
218+
#size-cells = <1>;
219+
ranges = <0x0 0x70000000 DT_SIZE_M(32)>;
220+
221+
ext_flash: mx25uw25645: xspi-nor-flash@0 {
222+
compatible = "soc-nv-flash";
223+
reg = <0x0 DT_SIZE_M(32)>;
224+
write-block-size = <1>;
225+
erase-block-size = <DT_SIZE_K(4)>;
226+
227+
partitions {
228+
compatible = "fixed-partitions";
229+
#address-cells = <1>;
230+
#size-cells = <1>;
231+
};
232+
};
233+
};
234+
};

0 commit comments

Comments
 (0)