-
Notifications
You must be signed in to change notification settings - Fork 8.2k
boards: stm32h7s78_dk: Introduce App in Ext Flash variant #97992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a0b1c86
e6a22f7
92e2386
f2b3205
1e20348
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,5 @@ board: | |
| vendor: st | ||
| socs: | ||
| - name: stm32h7s7xx | ||
| variants: | ||
| - name: ext_flash_app | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,335 @@ | ||
| /* | ||
| * Copyright (c) 2024-2025 STMicroelectronics | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| /dts-v1/; | ||
| #include <st/h7rs/stm32h7s7X8.dtsi> | ||
| #include <st/h7/stm32h7s7l8hxh-pinctrl.dtsi> | ||
| #include "arduino_r3_connector.dtsi" | ||
| #include "zephyr/dt-bindings/display/panel.h" | ||
| #include <zephyr/dt-bindings/input/input-event-codes.h> | ||
|
|
||
| / { | ||
| 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 = <DT_MEM_ARM_MPU_RAM>; | ||
| }; | ||
|
|
||
| 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 = <INPUT_KEY_0>; | ||
| }; | ||
| }; | ||
|
|
||
| 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 = <DT_MEM_ARM(ATTR_MPU_IO)>; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you test There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Display related features are not working yet when executed from external flash. Probably due to Is everyone fine to put this as a notable issue that can still be investigated and fixed in RC ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Weird, even Non-blocking, but could you try with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Makes sense. |
||
| }; | ||
| }; | ||
|
|
||
| &clk_hsi48 { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &clk_lse { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &clk_hse { | ||
| clock-frequency = <DT_FREQ_M(24)>; | ||
| 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 = <DT_FREQ_M(250)>; | ||
| 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 = <DT_SIZE_M(256)>; /* 256 Mbits */ | ||
| max-frequency = <DT_FREQ_M(200)>; | ||
| 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 = <DT_SIZE_M(1024)>; /* 1 Gbits */ | ||
| ospi-max-frequency = <DT_FREQ_M(50)>; | ||
| spi-bus-width = <XSPI_OCTO_MODE>; | ||
| data-rate = <XSPI_DTR_TRANSFER>; | ||
| 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 = <DT_SIZE_K(4)>; | ||
|
|
||
| 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 = <PANEL_PIXEL_FORMAT_RGB_565>; | ||
|
|
||
| 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>; | ||
| }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can use direct-xip if wanted, there is no limitation on mode that can be used