Skip to content

Commit 8a2aba4

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 10308e5 commit 8a2aba4

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>;
@@ -184,6 +209,7 @@ zephyr_udc0: &usbotg_fs {
184209
* Note: SDRAM_CLK_MHZ = HCLK_MHZ / 2
185210
*/
186211
refresh-rate = <1292>;
212+
status = "okay";
187213

188214
bank@0 {
189215
reg = <0>;
@@ -199,3 +225,56 @@ zephyr_udc0: &usbotg_fs {
199225
};
200226
};
201227
};
228+
229+
&mipi_dsi {
230+
/* DSI HOST dedicated PLL
231+
* F_VCO = CLK_IN / pll-idf * 2 * pll-ndiv
232+
* PHI = F_VCO / 2 / (1 << pll-odf) = lane_byte_clk
233+
* = 8 MHz / 2 * 2 * 125 / 2 / (1<<0) / 8 = 62.5 MHz
234+
*/
235+
pll-ndiv = <125>;
236+
pll-idf = <2>;
237+
pll-odf = <0>;
238+
vs-active-high;
239+
hs-active-high;
240+
de-active-high;
241+
status = "okay";
242+
243+
otm8009a: otm8009a@0 {
244+
compatible = "orisetech,otm8009a";
245+
reg = <0x0>;
246+
height = <800>;
247+
width = <480>;
248+
reset-gpios = <&gpioh 7 0>;
249+
bl-gpios = <&gpioa 3 0>;
250+
data-lanes = <2>;
251+
pixel-format = <MIPI_DSI_PIXFMT_RGB888>;
252+
rotation = <90>;
253+
status = "okay";
254+
};
255+
};
256+
257+
&ltdc {
258+
width = <800>;
259+
height = <480>;
260+
pixel-format = <PANEL_PIXEL_FORMAT_RGB_888>;
261+
ext-sdram = <&sdram1>;
262+
def-back-color-red = <0>;
263+
def-back-color-green = <0>;
264+
def-back-color-blue = <0>;
265+
status = "okay";
266+
/* orisetech, otm8009a */
267+
display-timings {
268+
compatible = "zephyr,panel-timing";
269+
hsync-active = <0>;
270+
vsync-active = <0>;
271+
de-active = <0>;
272+
pixelclk-active = <0>;
273+
hsync-len = <2>;
274+
vsync-len = <1>;
275+
hback-porch = <34>;
276+
vback-porch = <15>;
277+
hfront-porch = <34>;
278+
vfront-porch = <16>;
279+
};
280+
};

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)