Skip to content

Commit 3ca8d47

Browse files
committed
boards: st: add pllsai for ltdc & mipi-dsi support on stm32f469 disco
Extension of support of pllsai for display configuration of stm32f469 discovery board. Enable Display panel through LTDC & DSI-HOST blocks. Enable Touch screen. Enable FMC/SDRAM for Framebuffer. Signed-off-by: Philippe Peurichard <[email protected]>
1 parent 0e74995 commit 3ca8d47

File tree

4 files changed

+125
-1
lines changed

4 files changed

+125
-1
lines changed

boards/st/stm32f469i_disco/Kconfig.defconfig

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,39 @@ config SPI_STM32_INTERRUPT
99
default y
1010
depends on SPI
1111

12+
if LVGL
1213

14+
# Double frame buffer maintained by lvgl.
15+
config STM32_LTDC_FB_NUM
16+
default 0
17+
18+
config LV_Z_DOUBLE_VDB
19+
default y
20+
21+
config LV_Z_VDB_ZEPHYR_REGION
22+
default y
23+
24+
config LV_Z_VDB_ZEPHYR_REGION_NAME
25+
default "SDRAM1"
26+
27+
config LV_Z_FULL_REFRESH
28+
default y
29+
30+
config INPUT
31+
default y
32+
33+
config LV_Z_BITS_PER_PIXEL
34+
default 32
35+
36+
config LV_DPI_DEF
37+
default 128
38+
39+
config LV_Z_FLUSH_THREAD
40+
default y
41+
42+
choice LV_COLOR_DEPTH
43+
default LV_COLOR_DEPTH_32
44+
endchoice
45+
46+
endif #LVGL
1347
endif # BOARD_STM32F469I_DISCO
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Philippe Peurichard <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Initialize after LTDC and MIPI-DSI
5+
CONFIG_DISPLAY_OTM8009A_INIT_PRIORITY=87

boards/st/stm32f469i_disco/stm32f469i_disco.dts

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
zephyr,sram = &sram0;
2121
zephyr,flash = &flash0;
2222
zephyr,ccm = &ccm0;
23+
zephyr,display = &ltdc;
24+
zephyr,touch = &ft5336;
2325
};
2426

2527
sdram1: sdram@c0000000 {
@@ -53,6 +55,12 @@
5355
};
5456
};
5557

58+
lvgl_pointer {
59+
compatible = "zephyr,lvgl-pointer-input";
60+
input = <&ft5336>;
61+
invert-y;
62+
};
63+
5664
gpio_keys {
5765
compatible = "gpio-keys";
5866

@@ -86,6 +94,17 @@
8694
mul-n = <336>;
8795
div-p = <2>;
8896
div-q = <7>;
97+
div-r = <6>;
98+
clocks = <&clk_hse>;
99+
status = "okay";
100+
};
101+
102+
&pllsai {
103+
div-m = <8>;
104+
mul-n = <266>;
105+
div-p = <2>;
106+
div-r = <5>;
107+
div-divr = <2>;
89108
clocks = <&clk_hse>;
90109
status = "okay";
91110
};
@@ -116,6 +135,13 @@
116135
pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>;
117136
pinctrl-names = "default";
118137
status = "okay";
138+
139+
ft5336: ft5336@2a {
140+
compatible = "focaltech,ft5336";
141+
reg = <0x2a>;
142+
int-gpios = <&gpioj 5 0>;
143+
status = "okay";
144+
};
119145
};
120146

121147
&spi2 {
@@ -174,7 +200,6 @@ zephyr_udc0: &usbotg_fs {
174200

175201
sdram {
176202
compatible = "st,stm32-fmc-sdram";
177-
status = "okay";
178203
power-up-delay = <100>;
179204
num-auto-refresh = <8>;
180205
mode-register = <0x230>;
@@ -197,5 +222,59 @@ zephyr_udc0: &usbotg_fs {
197222
STM32_FMC_SDRAM_RPIPE_0>;
198223
st,sdram-timing = <2 6 4 6 2 2 2>;
199224
};
225+
status = "okay";
226+
};
227+
};
228+
229+
&mipi_dsi {
230+
otm8009a: otm8009a@0 {
231+
compatible = "orisetech,otm8009a";
232+
reg = <0x0>;
233+
height = <800>;
234+
width = <480>;
235+
reset-gpios = <&gpioh 7 0>;
236+
bl-gpios = <&gpioa 3 0>;
237+
data-lanes = <2>;
238+
pixel-format = <MIPI_DSI_PIXFMT_RGB888>;
239+
rotation = <90>;
240+
status = "okay";
200241
};
242+
/* DSI HOST dedicated PLL
243+
* F_VCO = CLK_IN / pll-idf * 2 * pll-ndiv
244+
* PHI = F_VCO / 2 / (1 << pll-odf) = lane_byte_clk
245+
* = 8 MHz / 2 * 2 * 125 / 2 / (1<<0) / 8 = 62.5 MHz
246+
*/
247+
pll-ndiv = <125>;
248+
pll-idf = <2>;
249+
pll-odf = <0>;
250+
251+
vs-active-high;
252+
hs-active-high;
253+
de-active-high;
254+
status = "okay";
255+
};
256+
257+
&ltdc {
258+
width = <800>;
259+
height = <480>;
260+
pixel-format = <PANEL_PIXEL_FORMAT_RGB_888>;
261+
ext-sdram = <&sdram1>;
262+
/* orisetech, otm8009a */
263+
display-timings {
264+
compatible = "zephyr,panel-timing";
265+
hsync-active = <0>;
266+
vsync-active = <0>;
267+
de-active = <0>;
268+
pixelclk-active = <0>;
269+
hsync-len = <2>;
270+
vsync-len = <1>;
271+
hback-porch = <34>;
272+
vback-porch = <15>;
273+
hfront-porch = <34>;
274+
vfront-porch = <16>;
275+
};
276+
def-back-color-red = <0>;
277+
def-back-color-green = <0>;
278+
def-back-color-blue = <0>;
279+
status = "okay";
201280
};

boards/st/stm32f469i_disco/stm32f469i_disco_defconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ CONFIG_UART_CONSOLE=y
1414

1515
# enable GPIO
1616
CONFIG_GPIO=y
17+
18+
# Enable External Memory
19+
CONFIG_MEMC=y
20+
21+
# Configure Display
22+
CONFIG_STM32_LTDC_ARGB8888=y

0 commit comments

Comments
 (0)