Skip to content

Commit 84db0d2

Browse files
committed
boards: st: add initial support for the stm32h757i eval board
Add initial support for the STM32H757I-EVAL board. Largely based on the STM32H747I-DISCO board Signed-off-by: Tomas Groth Christensen <tgc@foss.dk>
1 parent 5736aed commit 84db0d2

22 files changed

+1052
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2023 bytes at work AG
2+
# Copyright (c) 2024 Erik Andersson <erian747@gmail.com>
3+
# Copyright (c) 2025 Foss Analytical A/S
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
# Initialize after LTDC and MIPI-DSI
7+
CONFIG_DISPLAY_OTM8009A_INIT_PRIORITY=87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2023 bytes at work AG
2+
# Copyright (c) 2025 Foss Analytical A/S
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
CONFIG_MEMC=y
6+
CONFIG_STM32_LTDC_ARGB8888=y
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (c) 2024 Linumiz
2+
# Copyright (c) 2025 Foss Analytical A/S
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
if BOARD_STM32H757I_EVAL_STM32H757XX_M7
6+
7+
if LVGL
8+
9+
# Double frame buffer maintained by lvgl.
10+
config STM32_LTDC_FB_NUM
11+
default 0
12+
13+
config LV_Z_DOUBLE_VDB
14+
default y
15+
16+
config LV_Z_VDB_CUSTOM_SECTION
17+
default y
18+
19+
config LV_Z_FULL_REFRESH
20+
default y
21+
22+
endif # LVGL
23+
24+
endif # BOARD_STM32H757I_EVAL_STM32H757XX_M7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Copyright (c) 2023 bytes at work AG
3+
* Copyright (c) 2025 Foss Analytical A/S
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
&sdram2 {
9+
/* Frame buffer memory when cached causes screen flickering. */
10+
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
11+
};
12+
13+
&zephyr_lcd_controller {
14+
status = "okay";
15+
ext-sdram = <&sdram2>;
16+
def-back-color-red = <0>;
17+
def-back-color-green = <0>;
18+
def-back-color-blue = <0>;
19+
};
20+
21+
/* ltdc uses pll3_r as pixel clock */
22+
&pll3 {
23+
status = "okay";
24+
clocks = <&clk_hse>;
25+
div-m = <5>;
26+
mul-n = <132>;
27+
div-p = <2>;
28+
div-q = <2>;
29+
div-r = <24>; /* 27.5 MHz */
30+
};
31+
32+
&zephyr_mipi_dsi {
33+
status = "okay";
34+
35+
/* DSI HOST dedicated PLL
36+
* F_VCO = CLK_IN / pll-idf * 2 * pll-ndiv
37+
* PHI = F_VCO / 2 / (1 << pll-odf) = lane_byte_clk
38+
* = 25 MHz / 5 * 2 * 100 / 2 / (1<<0) / 8 = 62.5 MHz
39+
*/
40+
pll-ndiv = <100>;
41+
pll-idf = <5>;
42+
pll-odf = <0>;
43+
44+
vs-active-high;
45+
hs-active-high;
46+
de-active-high;
47+
};

boards/st/stm32h747i_disco/stm32h747i_disco_stm32h747xx_m7.dts

+3-10
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,7 @@
126126
};
127127
};
128128

129-
&mac {
130-
/*
131-
* From UM2411 Rev 4:
132-
* With the default setting, the Ethernet feature is not working due
133-
* of a pin conflict between ETH_MDC and SAI4_D1 of the MEMs digital
134-
* microphone.
135-
* Cf Ethernet section in board documentation for more information on
136-
* the hw modification to be done to enable it.
137-
*/
129+
&enet_mac {
138130
status = "okay";
139131
pinctrl-0 = <&eth_ref_clk_pa1
140132
&eth_crs_dv_pa7
@@ -144,9 +136,10 @@
144136
&eth_txd0_pg13
145137
&eth_txd1_pg12>;
146138
pinctrl-names = "default";
139+
phy-connection-type = "rmii"
147140
};
148141

149-
&mdio {
142+
&enet_mdio {
150143
status = "okay";
151144
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
152145
pinctrl-names = "default";
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# Copyright 2023 BrainCo Inc.
3+
# Copyright (c) 2025 Foss Analytical A/S
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
#
7+
8+
# Add custom linker section to relocate framebuffers to PSRAM
9+
zephyr_linker_sources_ifdef(CONFIG_LV_Z_VDB_CUSTOM_SECTION
10+
SECTIONS dc_ram.ld)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# STM32H757I EVAL board configuration
2+
3+
# Copyright (c) 2019 Linaro Limited
4+
# Copyright (c) 2025 Foss Analytical A/S
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
if BOARD_STM32H757I_EVAL
8+
9+
if NETWORKING
10+
11+
config NET_L2_ETHERNET
12+
default y
13+
14+
endif # NETWORKING
15+
16+
config DISK_DRIVER_SDMMC
17+
default y if DISK_DRIVERS
18+
19+
endif # BOARD_STM32H757I_EVAL
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# STM32H757I EVAL board configuration
2+
3+
# Copyright (c) 2019 Linaro Limited
4+
# Copyright (c) 2025 Foss Analytical A/S
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
config BOARD_STM32H757I_EVAL
8+
select SOC_STM32H757XX_M7 if BOARD_STM32H757I_EVAL_STM32H757XX_M7
9+
select SOC_STM32H757XX_M4 if BOARD_STM32H757I_EVAL_STM32H757XX_M4

boards/st/stm32h757i_eval/board.cmake

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# Copyright (c) 2019 STMicroelectronics
3+
# Copyright (c) 2025 Foss Analytical A/S
4+
5+
# keep first
6+
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
7+
8+
if(CONFIG_BOARD_STM32H757I_EVAL_STM32H757XX_M7)
9+
board_runner_args(jlink "--device=STM32H757XI")
10+
board_runner_args(openocd "--config=${BOARD_DIR}/support/openocd_stm32h757i_eval_m7.cfg")
11+
board_runner_args(openocd --target-handle=_CHIPNAME.cpu0)
12+
elseif(CONFIG_BOARD_STM32H757I_EVAL_STM32H757XX_M4)
13+
board_runner_args(jlink "--device=STM32H757XI_M4")
14+
board_runner_args(openocd "--config=${BOARD_DIR}/support/openocd_stm32h757i_eval_m4.cfg")
15+
board_runner_args(openocd --target-handle=_CHIPNAME.cpu1)
16+
endif()
17+
18+
# keep first
19+
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
20+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
21+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/st/stm32h757i_eval/board.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
board:
2+
name: stm32h757i_eval
3+
full_name: STM32H757I Eval
4+
vendor: st
5+
socs:
6+
- name: stm32h757xx

boards/st/stm32h757i_eval/dc_ram.ld

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright (c) 2023 BrainCo Inc.
3+
* Copyright (c) 2025 Foss Analytical A/S
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
#if DT_NODE_HAS_STATUS(DT_NODELABEL(sdram2), okay)
9+
GROUP_START(SDRAM2)
10+
11+
SECTION_PROLOGUE(_STM32_SDRAM2_SECTION_NAME, (NOLOAD),)
12+
{
13+
*(.lvgl_buf)
14+
} GROUP_LINK_IN(SDRAM2)
15+
16+
GROUP_END(SDRAM2)
17+
#endif
Binary file not shown.

0 commit comments

Comments
 (0)