Skip to content

Commit 6e56de3

Browse files
Philippe Cornunashif
authored andcommitted
boards: arm: stm32h750b_dk: add support for display
ltdc devicetree definition & external SDRAM selection for the display buffer Signed-off-by: Philippe Cornu <[email protected]> Signed-off-by: Toon Stegen <[email protected]> Signed-off-by: Abderrahmane Jarmouni <[email protected]>
1 parent 9712271 commit 6e56de3

File tree

2 files changed

+73
-6
lines changed

2 files changed

+73
-6
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# STM32H750B DISCOVERY board configuration
2+
3+
# Copyright (c) 2024 STMicroelectronics
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_STM32H750B_DK
7+
8+
if DISPLAY
9+
10+
# MEMC needs to be enabled in order to store
11+
# display buffer to external SDRAM connected to FMC
12+
config MEMC
13+
default y
14+
15+
endif # DISPLAY
16+
17+
endif # BOARD_STM32H750B_DK

boards/st/stm32h750b_dk/stm32h750b_dk.dts

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
zephyr,sram = &sram0;
2020
zephyr,flash = &flash0;
2121
zephyr,flash-controller = &mt25ql512ab1;
22+
zephyr,display = &ltdc;
2223
};
2324

2425
sdram2: sdram@d0000000 {
@@ -75,6 +76,45 @@
7576
status = "okay";
7677
};
7778

79+
&ltdc {
80+
pinctrl-0 = <&ltdc_r0_pi15 &ltdc_r1_pj0 &ltdc_r2_pj1 &ltdc_r3_ph9
81+
&ltdc_r4_pj3 &ltdc_r5_pj4 &ltdc_r6_pj5 &ltdc_r7_pj6
82+
&ltdc_g0_pj7 &ltdc_g1_pj8 &ltdc_g2_pj9 &ltdc_g3_pj10
83+
&ltdc_g4_pj11 &ltdc_g5_pi0 &ltdc_g6_pi1 &ltdc_g7_pk2
84+
&ltdc_b0_pj12 &ltdc_b1_pj13 &ltdc_b2_pj14 &ltdc_b3_pj15
85+
&ltdc_b4_pk3 &ltdc_b5_pk4 &ltdc_b6_pk5 &ltdc_b7_pk6
86+
&ltdc_de_pk7 &ltdc_clk_pi14 &ltdc_hsync_pi12 &ltdc_vsync_pi9>;
87+
pinctrl-names = "default";
88+
89+
disp-on-gpios = <&gpiod 7 GPIO_ACTIVE_HIGH>;
90+
91+
ext-sdram = <&sdram2>;
92+
status = "okay";
93+
94+
clocks = <&rcc STM32_CLOCK_BUS_APB3 0x00000008>,
95+
<&rcc STM32_SRC_PLL3_R NO_SEL>;
96+
97+
width = <480>;
98+
height = <272>;
99+
pixel-format = <PANEL_PIXEL_FORMAT_RGB_565>;
100+
display-timings {
101+
compatible = "zephyr,panel-timing";
102+
de-active = <1>;
103+
pixelclk-active = <0>;
104+
hsync-active = <0>;
105+
vsync-active = <0>;
106+
hsync-len = <1>;
107+
vsync-len = <10>;
108+
hback-porch = <43>;
109+
vback-porch = <12>;
110+
hfront-porch = <8>;
111+
vfront-porch = <4>;
112+
};
113+
def-back-color-red = <0xFF>;
114+
def-back-color-green = <0xFF>;
115+
def-back-color-blue = <0xFF>;
116+
};
117+
78118
&pll {
79119
div-m = <5>;
80120
mul-n = <192>;
@@ -85,6 +125,16 @@
85125
status = "okay";
86126
};
87127

128+
&pll3 {
129+
div-m = <5>;
130+
mul-n = <192>;
131+
div-p = <2>;
132+
div-q = <20>;
133+
div-r = <99>;
134+
clocks = <&clk_hse>;
135+
status = "okay";
136+
};
137+
88138
&rcc {
89139
clocks = <&pll>;
90140
clock-frequency = <DT_FREQ_M(480)>;
@@ -121,13 +171,13 @@
121171
status = "okay";
122172

123173
partitions {
124-
compatible = "fixed-partitions";
125-
#address-cells = <1>;
126-
#size-cells = <1>;
174+
compatible = "fixed-partitions";
175+
#address-cells = <1>;
176+
#size-cells = <1>;
127177

128-
partition@0 {
129-
reg = <0x0 DT_SIZE_M(64)>;
130-
};
178+
partition@0 {
179+
reg = <0x0 DT_SIZE_M(64)>;
180+
};
131181
};
132182
};
133183

0 commit comments

Comments
 (0)