diff --git a/boards/st/stm32h7s78_dk/Kconfig.sysbuild b/boards/st/stm32h7s78_dk/Kconfig.sysbuild new file mode 100644 index 0000000000000..5645bfca3c89a --- /dev/null +++ b/boards/st/stm32h7s78_dk/Kconfig.sysbuild @@ -0,0 +1,18 @@ +# Copyright (c) 2024-2025 STMicroelectronics +# SPDX-License-Identifier: Apache-2.0 + +if BOARD_STM32H7S78_DK_STM32H7S7XX_EXT_FLASH_APP + +choice BOOTLOADER + default BOOTLOADER_MCUBOOT +endchoice + +choice BOOT_SIGNATURE_TYPE + default BOOT_SIGNATURE_TYPE_NONE +endchoice + +choice MCUBOOT_MODE + default MCUBOOT_MODE_SINGLE_APP +endchoice + +endif # BOARD_STM32H7S78_DK_STM32H7S7XX_EXT_FLASH_APP diff --git a/boards/st/stm32h7s78_dk/board.cmake b/boards/st/stm32h7s78_dk/board.cmake index 7da292c79410b..50a32e49fd49a 100644 --- a/boards/st/stm32h7s78_dk/board.cmake +++ b/boards/st/stm32h7s78_dk/board.cmake @@ -2,7 +2,7 @@ # keep first board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw") -if(CONFIG_XIP AND (CONFIG_STM32_MEMMAP OR CONFIG_BOOTLOADER_MCUBOOT)) +if(CONFIG_STM32_MEMMAP OR CONFIG_BOOTLOADER_MCUBOOT) board_runner_args(stm32cubeprogrammer "--extload=MX66UW1G45G_STM32H7S78-DK.stldr") endif() @@ -12,7 +12,11 @@ board_runner_args(pyocd "--target=stm32h7s7l8hxh") board_runner_args(pyocd "--flash-opt=-O reset_type=hw") board_runner_args(pyocd "--flash-opt=-O connect_mode=under-reset") +board_runner_args(stlink_gdbserver "--apid=1") +board_runner_args(stlink_gdbserver "--extload=MX66UW1G45G_STM32H7S78-DK.stldr") + # keep first include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake) +include(${ZEPHYR_BASE}/boards/common/stlink_gdbserver.board.cmake) include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/openocd-stm32.board.cmake) diff --git a/boards/st/stm32h7s78_dk/board.yml b/boards/st/stm32h7s78_dk/board.yml index fdc7709132361..3c8b2f787e6af 100644 --- a/boards/st/stm32h7s78_dk/board.yml +++ b/boards/st/stm32h7s78_dk/board.yml @@ -4,3 +4,5 @@ board: vendor: st socs: - name: stm32h7s7xx + variants: + - name: ext_flash_app diff --git a/boards/st/stm32h7s78_dk/stm32h7s78_dk-common.dtsi b/boards/st/stm32h7s78_dk/stm32h7s78_dk-common.dtsi new file mode 100644 index 0000000000000..4967ad9dc62e9 --- /dev/null +++ b/boards/st/stm32h7s78_dk/stm32h7s78_dk-common.dtsi @@ -0,0 +1,335 @@ +/* + * Copyright (c) 2024-2025 STMicroelectronics + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/dts-v1/; +#include +#include +#include "arduino_r3_connector.dtsi" +#include "zephyr/dt-bindings/display/panel.h" +#include + +/ { + chosen { + zephyr,console = &uart4; + zephyr,shell-uart = &uart4; + zephyr,sram = &sram0; + zephyr,display = <dc; + zephyr,touch = &display_ctp; + }; + + psram: memory@90000000 { + compatible = "zephyr,memory-region"; + reg = <0x90000000 DT_SIZE_M(32)>; + zephyr,memory-region = "PSRAM"; + zephyr,memory-attr = ; + }; + + leds { + compatible = "gpio-leds"; + + green_led: led_1 { + gpios = <&gpioo 1 GPIO_ACTIVE_LOW>; + label = "User LD1"; + }; + + orange_led: led_2 { + gpios = <&gpioo 5 GPIO_ACTIVE_LOW>; + label = "User LD2"; + }; + + red_led: led_3 { + gpios = <&gpiom 2 GPIO_ACTIVE_LOW>; + label = "User LD3"; + }; + + blue_led: led_4 { + gpios = <&gpiom 3 GPIO_ACTIVE_LOW>; + label = "User LD4"; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + + user_button: button { + label = "User"; + gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; + zephyr,code = ; + }; + }; + + aliases { + led0 = &blue_led; + sw0 = &user_button; + watchdog0 = &iwdg; + die-temp0 = &die_temp; + volt-sensor0 = &vref; + volt-sensor1 = &vbat; + spi-flash0 = &mx66uw1g45; + }; + + ext_flash_mem: memory@70000000 { + compatible = "zephyr,memory-region"; + reg = <0x70000000 DT_SIZE_M(128)>; + zephyr,memory-region = "EXTMEM"; + /* The ATTR_MPU_EXTMEM attribut causing a MPU FAULT */ + zephyr,memory-attr = ; + }; +}; + +&clk_hsi48 { + status = "okay"; +}; + +&clk_lse { + status = "okay"; +}; + +&clk_hse { + clock-frequency = ; + hse-bypass; /* X3 is a 24MHz oscillator on PH0 */ + status = "okay"; +}; + +&pll { + div-m = <12>; + mul-n = <250>; + div-p = <2>; + div-q = <2>; + div-r = <2>; + div-s = <2>; + div-t = <2>; + clocks = <&clk_hse>; + status = "okay"; +}; + +&pll3 { + div-m = <12>; + mul-n = <25>; + div-r = <2>; + clocks = <&clk_hse>; + status = "okay"; +}; + +&rcc { + clocks = <&pll>; + clock-frequency = ; + dcpre = <1>; + hpre = <1>; + ppre1 = <2>; + ppre2 = <2>; + ppre4 = <2>; + ppre5 = <2>; +}; + +&uart4 { + pinctrl-0 = <&uart4_tx_pd1 &uart4_rx_pd0>; + pinctrl-names = "default"; + current-speed = <115200>; + status = "okay"; +}; + +&uart7 { + pinctrl-0 = <&uart7_tx_pe8 &uart7_rx_pe7>; + pinctrl-names = "default"; + current-speed = <115200>; + status = "okay"; +}; + +&timers2 { + st,prescaler = <10000>; + status = "okay"; + + pwm2: pwm { + status = "okay"; + pinctrl-0 = <&tim2_ch4_pa3>; + pinctrl-names = "default"; + }; +}; + +&timers3 { + st,prescaler = <10000>; + status = "okay"; + + pwm3: pwm { + status = "okay"; + pinctrl-0 = <&tim3_ch2_pb5>; + pinctrl-names = "default"; + }; +}; + +&rng { + status = "okay"; +}; + +&iwdg { + status = "okay"; +}; + +&wwdg { + status = "okay"; +}; + +&adc1 { + pinctrl-0 = <&adc1_inp6_pf12>; /* Arduino A3 */ + pinctrl-names = "default"; + st,adc-clock-source = "SYNC"; + st,adc-prescaler = <4>; + status = "okay"; +}; + +&adc2 { + pinctrl-0 = <&adc2_inp2_pf13>; /* Arduino A4 */ + pinctrl-names = "default"; + st,adc-clock-source = "SYNC"; + st,adc-prescaler = <4>; + status = "okay"; +}; + +&spi4 { + pinctrl-0 = <&spi4_nss_pe4 &spi4_sck_pe12 + &spi4_miso_pe13 &spi4_mosi_pe14>; + pinctrl-names = "default"; + status = "okay"; +}; + +&i2c1 { + pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb9>; + pinctrl-names = "default"; + status = "okay"; + + display_ctp: gt911@5d { + compatible = "goodix,gt911"; + reg = <0x5d>; + irq-gpios = <&gpioe 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; + status = "okay"; + }; +}; + +&xspi1 { + pinctrl-0 = <&xspim_p1_ncs1_po0 &xspim_p1_dqs0_po2 + &xspim_p1_dqs1_po3 &xspim_p1_clk_po4 + &xspim_p1_io0_pp0 &xspim_p1_io1_pp1 &xspim_p1_io2_pp2 + &xspim_p1_io3_pp3 &xspim_p1_io4_pp4 &xspim_p1_io5_pp5 + &xspim_p1_io6_pp6 &xspim_p1_io7_pp7 &xspim_p1_io8_pp8 + &xspim_p1_io9_pp9 &xspim_p1_io10_pp10 &xspim_p1_io11_pp11 + &xspim_p1_io12_pp12 &xspim_p1_io13_pp13 &xspim_p1_io14_pp14 + &xspim_p1_io15_pp15>; + + pinctrl-names = "default"; + status = "okay"; + + memc: aps256xxn-obr@0 { + compatible = "st,stm32-xspi-psram"; + reg = <0>; + size = ; /* 256 Mbits */ + max-frequency = ; + fixed-latency; + io-x16-mode; + read-latency = <4>; + write-latency = <1>; + burst-length = <0>; + st,csbound = <11>; + status = "okay"; + }; +}; + +&xspi2 { + pinctrl-0 = <&xspim_p2_clk_pn6 &xspim_p2_ncs1_pn1 + &xspim_p2_io0_pn2 &xspim_p2_io1_pn3 + &xspim_p2_io2_pn4 &xspim_p2_io3_pn5 + &xspim_p2_io4_pn8 &xspim_p2_io5_pn9 + &xspim_p2_io6_pn10 &xspim_p2_io7_pn11 + &xspim_p2_dqs0_pn0>; + pinctrl-names = "default"; + + status = "okay"; + + ext_flash_ctrl: xspi-nor-flash@0 { + compatible = "st,stm32-xspi-nor"; + reg = <0>; + size = ; /* 1 Gbits */ + ospi-max-frequency = ; + spi-bus-width = ; + data-rate = ; + four-byte-opcodes; + status = "okay"; + + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x70000000 DT_SIZE_M(128)>; + + ext_flash: mx66uw1g45: ext-flash@0 { + compatible = "soc-nv-flash"; + reg = <0x0 DT_SIZE_M(128)>; + write-block-size = <1>; + erase-block-size = ; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + }; + }; + }; +}; + +&die_temp { + status = "okay"; +}; + +&vref { + status = "okay"; +}; + +&vbat { + status = "okay"; +}; + +usb2: &usbotg_fs { + pinctrl-0 = <&usb_otg_fs_dm_pm12 &usb_otg_fs_dp_pm11>; + pinctrl-names = "default"; + status = "okay"; +}; + +zephyr_udc0: &usb2 {}; + +<dc { + pinctrl-0 = <<dc_r0_pf9 <dc_r1_pf10 <dc_r2_pf0 <dc_r3_pb4 + <dc_r4_pb3 <dc_r5_pa15 <dc_r6_pg1 <dc_r7_pg0 + <dc_g0_pf7 <dc_g1_pf15 <dc_g2_pa1 <dc_g3_pa0 + <dc_g4_pb13 <dc_g5_pb12 <dc_g6_pb11 <dc_g7_pb15 + <dc_b0_pf11 <dc_b1_pg14 <dc_b2_pa12 <dc_b3_pa11 + <dc_b4_pa10 <dc_b5_pa9 <dc_b6_pa8 <dc_b7_pa6 + <dc_de_pb14 <dc_clk_pg13 <dc_hsync_pg2 <dc_vsync_pe11>; + pinctrl-names = "default"; + disp-on-gpios = <&gpioe 15 GPIO_ACTIVE_HIGH>; + bl-ctrl-gpios = <&gpiog 15 GPIO_ACTIVE_HIGH>; + + status = "okay"; + + width = <800>; + height = <480>; + pixel-format = ; + + display-timings { + compatible = "zephyr,panel-timing"; + de-active = <0>; + pixelclk-active = <0>; + hsync-active = <0>; + vsync-active = <0>; + hsync-len = <4>; + vsync-len = <4>; + hback-porch = <8>; + vback-porch = <8>; + hfront-porch = <8>; + vfront-porch = <8>; + }; + + def-back-color-red = <0xFF>; + def-back-color-green = <0xFF>; + def-back-color-blue = <0xFF>; +}; diff --git a/boards/st/stm32h7s78_dk/stm32h7s78_dk.dts b/boards/st/stm32h7s78_dk/stm32h7s78_dk.dts index e6c76be07952a..f93f59af6c5cb 100644 --- a/boards/st/stm32h7s78_dk/stm32h7s78_dk.dts +++ b/boards/st/stm32h7s78_dk/stm32h7s78_dk.dts @@ -1,362 +1,33 @@ /* - * Copyright (c) 2024 STMicroelectronics + * Copyright (c) 2024-2025 STMicroelectronics * * SPDX-License-Identifier: Apache-2.0 */ /dts-v1/; -#include -#include -#include "arduino_r3_connector.dtsi" -#include "zephyr/dt-bindings/display/panel.h" -#include +#include "stm32h7s78_dk-common.dtsi" / { model = "STMicroelectronics STM32H7S78 DISCOVERY KIT board"; compatible = "st,stm32h7s78-dk"; chosen { - zephyr,console = &uart4; - zephyr,shell-uart = &uart4; zephyr,flash = &flash0; - zephyr,sram = &sram0; - zephyr,display = <dc; - zephyr,touch = &display_ctp; + zephyr,flash-controller = &flash; }; - - psram: memory@90000000 { - compatible = "zephyr,memory-region"; - reg = <0x90000000 DT_SIZE_M(32)>; - zephyr,memory-region = "PSRAM"; - zephyr,memory-attr = ; - }; - - leds { - compatible = "gpio-leds"; - - green_led: led_1 { - gpios = <&gpioo 1 GPIO_ACTIVE_LOW>; - label = "User LD1"; - }; - - orange_led: led_2 { - gpios = <&gpioo 5 GPIO_ACTIVE_LOW>; - label = "User LD2"; - }; - - red_led: led_3 { - gpios = <&gpiom 2 GPIO_ACTIVE_LOW>; - label = "User LD3"; - }; - - blue_led: led_4 { - gpios = <&gpiom 3 GPIO_ACTIVE_LOW>; - label = "User LD4"; - }; - }; - - gpio_keys { - compatible = "gpio-keys"; - - user_button: button { - label = "User"; - gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; - zephyr,code = ; - }; - }; - - aliases { - led0 = &blue_led; - sw0 = &user_button; - watchdog0 = &iwdg; - die-temp0 = &die_temp; - volt-sensor0 = &vref; - volt-sensor1 = &vbat; - spi-flash0 = &mx66uw1g45; - }; - - ext_memory: memory@70000000 { - compatible = "zephyr,memory-region"; - reg = <0x70000000 DT_SIZE_M(64)>; - zephyr,memory-region = "EXTMEM"; - /* The ATTR_MPU_EXTMEM attribut causing a MPU FAULT */ - zephyr,memory-attr = ; - }; -}; - -&clk_hsi48 { - status = "okay"; -}; - -&clk_lse { - status = "okay"; -}; - -&clk_hse { - clock-frequency = ; - hse-bypass; /* X3 is a 24MHz oscillator on PH0 */ - status = "okay"; }; -&pll { - div-m = <12>; - mul-n = <250>; - div-p = <2>; - div-q = <2>; - div-r = <2>; - div-s = <2>; - div-t = <2>; - clocks = <&clk_hse>; +&ext_flash { status = "okay"; -}; - -&pll3 { - div-m = <12>; - mul-n = <25>; - div-r = <2>; - clocks = <&clk_hse>; - status = "okay"; -}; - -&rcc { - clocks = <&pll>; - clock-frequency = ; - dcpre = <1>; - hpre = <1>; - ppre1 = <2>; - ppre2 = <2>; - ppre4 = <2>; - ppre5 = <2>; -}; - -&uart4 { - pinctrl-0 = <&uart4_tx_pd1 &uart4_rx_pd0>; - pinctrl-names = "default"; - current-speed = <115200>; - status = "okay"; -}; - -&uart7 { - pinctrl-0 = <&uart7_tx_pe8 &uart7_rx_pe7>; - pinctrl-names = "default"; - current-speed = <115200>; - status = "okay"; -}; - -&timers2 { - st,prescaler = <10000>; - status = "okay"; - - pwm2: pwm { - status = "okay"; - pinctrl-0 = <&tim2_ch4_pa3>; - pinctrl-names = "default"; - }; -}; - -&timers3 { - st,prescaler = <10000>; - status = "okay"; - - pwm3: pwm { - status = "okay"; - pinctrl-0 = <&tim3_ch2_pb5>; - pinctrl-names = "default"; - }; -}; - -&rng { - status = "okay"; -}; - -&iwdg { - status = "okay"; -}; -&wwdg { - status = "okay"; -}; - -&adc1 { - pinctrl-0 = <&adc1_inp6_pf12>; /* Arduino A3 */ - pinctrl-names = "default"; - st,adc-clock-source = "SYNC"; - st,adc-prescaler = <4>; - status = "okay"; -}; - -&adc2 { - pinctrl-0 = <&adc2_inp2_pf13>; /* Arduino A4 */ - pinctrl-names = "default"; - st,adc-clock-source = "SYNC"; - st,adc-prescaler = <4>; - status = "okay"; -}; - -&spi4 { - pinctrl-0 = <&spi4_nss_pe4 &spi4_sck_pe12 - &spi4_miso_pe13 &spi4_mosi_pe14>; - pinctrl-names = "default"; - status = "okay"; -}; - -&i2c1 { - pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb9>; - pinctrl-names = "default"; - status = "okay"; - - display_ctp: gt911@5d { - compatible = "goodix,gt911"; - reg = <0x5d>; - irq-gpios = <&gpioe 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; - status = "okay"; - }; -}; - -&xspi1 { - pinctrl-0 = <&xspim_p1_ncs1_po0 &xspim_p1_dqs0_po2 - &xspim_p1_dqs1_po3 &xspim_p1_clk_po4 - &xspim_p1_io0_pp0 &xspim_p1_io1_pp1 &xspim_p1_io2_pp2 - &xspim_p1_io3_pp3 &xspim_p1_io4_pp4 &xspim_p1_io5_pp5 - &xspim_p1_io6_pp6 &xspim_p1_io7_pp7 &xspim_p1_io8_pp8 - &xspim_p1_io9_pp9 &xspim_p1_io10_pp10 &xspim_p1_io11_pp11 - &xspim_p1_io12_pp12 &xspim_p1_io13_pp13 &xspim_p1_io14_pp14 - &xspim_p1_io15_pp15>; - - pinctrl-names = "default"; - status = "okay"; - - memc: aps256xxn-obr@0 { - compatible = "st,stm32-xspi-psram"; - reg = <0>; - size = ; /* 256 Mbits */ - max-frequency = ; - fixed-latency; - io-x16-mode; - read-latency = <4>; - write-latency = <1>; - burst-length = <0>; - st,csbound = <11>; - status = "okay"; - }; -}; - -&flash0 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; - /* Set the partitions with first MB to make use of the whole Bank1 */ - boot_partition: partition@0 { - label = "mcuboot"; - reg = <0x00000000 DT_SIZE_K(64)>; - }; - }; -}; - -&xspi2 { - pinctrl-0 = <&xspim_p2_clk_pn6 &xspim_p2_ncs1_pn1 - &xspim_p2_io0_pn2 &xspim_p2_io1_pn3 - &xspim_p2_io2_pn4 &xspim_p2_io3_pn5 - &xspim_p2_io4_pn8 &xspim_p2_io5_pn9 - &xspim_p2_io6_pn10 &xspim_p2_io7_pn11 - &xspim_p2_dqs0_pn0>; - pinctrl-names = "default"; - - status = "okay"; - - mx66uw1g45: xspi-nor-flash@0 { - compatible = "st,stm32-xspi-nor"; - reg = <0>; - size = ; /* 1 Gbits */ - ospi-max-frequency = ; - spi-bus-width = ; - data-rate = ; - four-byte-opcodes; - status = "okay"; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - slot0_partition: partition@0 { - label = "image-0"; - reg = <0x00000000 DT_SIZE_K(512)>; - }; - - slot1_partition: partition@80000 { - label = "image-1"; - reg = <0x0080000 DT_SIZE_K(512)>; - }; - - scratch_partition: partition@100000 { - label = "image-scratch"; - reg = <0x00100000 DT_SIZE_K(64)>; - }; - - storage_partition: partition@110000 { - label = "storage"; - reg = <0x00110000 DT_SIZE_K(64)>; - }; + storage_partition: partition@0 { + label = "storage"; + reg = <0x00000000 DT_SIZE_M(128)>; /* 128MB */ }; }; }; - -&die_temp { - status = "okay"; -}; - -&vref { - status = "okay"; -}; - -&vbat { - status = "okay"; -}; - -usb2: &usbotg_fs { - pinctrl-0 = <&usb_otg_fs_dm_pm12 &usb_otg_fs_dp_pm11>; - pinctrl-names = "default"; - status = "okay"; -}; - -zephyr_udc0: &usb2 {}; - -<dc { - pinctrl-0 = <<dc_r0_pf9 <dc_r1_pf10 <dc_r2_pf0 <dc_r3_pb4 - <dc_r4_pb3 <dc_r5_pa15 <dc_r6_pg1 <dc_r7_pg0 - <dc_g0_pf7 <dc_g1_pf15 <dc_g2_pa1 <dc_g3_pa0 - <dc_g4_pb13 <dc_g5_pb12 <dc_g6_pb11 <dc_g7_pb15 - <dc_b0_pf11 <dc_b1_pg14 <dc_b2_pa12 <dc_b3_pa11 - <dc_b4_pa10 <dc_b5_pa9 <dc_b6_pa8 <dc_b7_pa6 - <dc_de_pb14 <dc_clk_pg13 <dc_hsync_pg2 <dc_vsync_pe11>; - pinctrl-names = "default"; - disp-on-gpios = <&gpioe 15 GPIO_ACTIVE_HIGH>; - bl-ctrl-gpios = <&gpiog 15 GPIO_ACTIVE_HIGH>; - - status = "okay"; - - width = <800>; - height = <480>; - pixel-format = ; - - display-timings { - compatible = "zephyr,panel-timing"; - de-active = <0>; - pixelclk-active = <0>; - hsync-active = <0>; - vsync-active = <0>; - hsync-len = <4>; - vsync-len = <4>; - hback-porch = <8>; - vback-porch = <8>; - hfront-porch = <8>; - vfront-porch = <8>; - }; - - def-back-color-red = <0xFF>; - def-back-color-green = <0xFF>; - def-back-color-blue = <0xFF>; -}; diff --git a/boards/st/stm32h7s78_dk/stm32h7s78_dk.yaml b/boards/st/stm32h7s78_dk/stm32h7s78_dk.yaml index 6e9cc6c401afd..7e270006f9a6f 100644 --- a/boards/st/stm32h7s78_dk/stm32h7s78_dk.yaml +++ b/boards/st/stm32h7s78_dk/stm32h7s78_dk.yaml @@ -4,7 +4,7 @@ type: mcu arch: arm toolchain: - zephyr -ram: 640 +ram: 128 flash: 64 supported: - arduino_gpio diff --git a/boards/st/stm32h7s78_dk/stm32h7s78_dk_stm32h7s7xx_ext_flash_app.dts b/boards/st/stm32h7s78_dk/stm32h7s78_dk_stm32h7s7xx_ext_flash_app.dts new file mode 100644 index 0000000000000..c4f82fcccbbfc --- /dev/null +++ b/boards/st/stm32h7s78_dk/stm32h7s78_dk_stm32h7s7xx_ext_flash_app.dts @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2024-2025 STMicroelectronics + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/dts-v1/; +#include "stm32h7s78_dk-common.dtsi" + +/ { + model = "STMicroelectronics STM32H7S78 DISCOVERY KIT board"; + compatible = "st,stm32h7s78-dk"; + + chosen { + zephyr,flash = &ext_flash; + zephyr,flash-controller = &ext_flash_ctrl; + zephyr,code-partition = &slot0_partition; + }; +}; + +&flash0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + boot_partition: partition@0 { + label = "mcuboot"; + reg = <0x00000000 DT_SIZE_K(64)>; + }; + }; +}; + +&ext_flash { + status = "okay"; + + partitions { + slot0_partition: partition@0 { + label = "image-0"; + reg = <0x0 DT_SIZE_M(60)>; + }; + + slot1_partition: partition@3C00000 { + label = "image-1"; + reg = <0x3C00000 DT_SIZE_M(60)>; + }; + + storage_partition: partition@7800000 { + label = "storage"; + reg = <0x7800000 DT_SIZE_M(8)>; + }; + }; +}; diff --git a/boards/st/stm32h7s78_dk/stm32h7s78_dk_stm32h7s7xx_ext_flash_app.yaml b/boards/st/stm32h7s78_dk/stm32h7s78_dk_stm32h7s7xx_ext_flash_app.yaml new file mode 100644 index 0000000000000..35386151e0e6d --- /dev/null +++ b/boards/st/stm32h7s78_dk/stm32h7s78_dk_stm32h7s7xx_ext_flash_app.yaml @@ -0,0 +1,20 @@ +identifier: stm32h7s78_dk/stm32h7s7xx/ext_flash_app +name: ST STM32H7S78 Discovery Kit with App in Ext Flash +type: mcu +arch: arm +toolchain: + - zephyr +ram: 128 +flash: 61439 # size in kB of 1 app slot minus MCUboot header size (1KB) +sysbuild: true +supported: + - arduino_gpio + - gpio + - uart + - watchdog + - entropy + - adc + - octospi + - usbd + - memc +vendor: st diff --git a/boards/st/stm32h7s78_dk/stm32h7s78_dk_stm32h7s7xx_ext_flash_app_defconfig b/boards/st/stm32h7s78_dk/stm32h7s78_dk_stm32h7s7xx_ext_flash_app_defconfig new file mode 100644 index 0000000000000..33cb9085c05fd --- /dev/null +++ b/boards/st/stm32h7s78_dk/stm32h7s78_dk_stm32h7s7xx_ext_flash_app_defconfig @@ -0,0 +1,27 @@ +# Copyright (c) 2024 STMicroelectronics +# SPDX-License-Identifier: Apache-2.0 + +# Enable SMPS +CONFIG_POWER_SUPPLY_DIRECT_SMPS=y + +# Enable MPU +CONFIG_ARM_MPU=y + +# Enable HW stack protection +CONFIG_HW_STACK_PROTECTION=y + +# Enable uart driver +CONFIG_SERIAL=y +# Enable console +CONFIG_CONSOLE=y +CONFIG_UART_CONSOLE=y + +# Enable GPIO +CONFIG_GPIO=y + +# SRAM0 being small (128KB), SYS_HEAP_SMALL_ONLY +# is automatically selected, leading to not being +# able to tackle HEAP on the large PSRAM. Force it +# to AUTO in order to be able to handle HEAP on +# both SRAM and PSRAM +CONFIG_SYS_HEAP_AUTO=y diff --git a/samples/sysbuild/with_mcuboot/sample.yaml b/samples/sysbuild/with_mcuboot/sample.yaml index 16b9ce599285f..79e4d0e56c5f3 100644 --- a/samples/sysbuild/with_mcuboot/sample.yaml +++ b/samples/sysbuild/with_mcuboot/sample.yaml @@ -16,7 +16,7 @@ tests: - esp32c6_devkitc/esp32c6/hpcore - nucleo_h7s3l8 - nucleo_u385rg_q - - stm32h7s78_dk + - stm32h7s78_dk/stm32h7s7xx/ext_flash_app - stm32h573i_dk - stm32h573i_dk/stm32h573xx/ext_flash_app - stm32h750b_dk/stm32h750xx/ext_flash_app diff --git a/west.yml b/west.yml index 8a1fe70e2f186..1f5fd86a2064e 100644 --- a/west.yml +++ b/west.yml @@ -321,7 +321,7 @@ manifest: groups: - crypto - name: mcuboot - revision: b192716c969ad358bb3a1db60c898212f3275c55 + revision: 96576b341ee19f1c3af6622256b0d4f3d408e1e3 path: bootloader/mcuboot groups: - bootloader