boards: update stm32h747i_disco display

This update stm32h747i_disco board display config to use ltdc frame
buffer config feature.

For lvgl, by default ltdc frame buffer number set to 0.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
This commit is contained in:
HaiLong Yang 2023-12-14 10:39:47 +08:00 committed by Carles Cufí
parent 39d74f1fd4
commit be2700a8d9
4 changed files with 90 additions and 0 deletions

View File

@ -0,0 +1,9 @@
#
# Copyright 2023 BrainCo Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Add custom linker section to relocate framebuffers to PSRAM
zephyr_linker_sources_ifdef(CONFIG_LV_Z_VBD_CUSTOM_SECTION
SECTIONS dc_ram.ld)

View File

@ -0,0 +1,16 @@
/*
* Copyright (c) 2023 BrainCo Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#if DT_NODE_HAS_STATUS(DT_NODELABEL(sdram2), okay)
GROUP_START(SDRAM2)
SECTION_PROLOGUE(_STM32_SDRAM2_SECTION_NAME, (NOLOAD),)
{
*(.lvgl_buf)
} GROUP_LINK_IN(SDRAM2)
GROUP_END(SDRAM2)
#endif

View File

@ -0,0 +1,42 @@
# Copyright (c) 2023 BrainCo Inc.
# SPDX-License-Identifier: Apache-2.0
if SHIELD_ST_B_LCD40_DSI1_MB1166
# Double frame buffer maintained by lvgl.
if LVGL
config STM32_LTDC_FB_NUM
default 0
config INPUT
default y
config LV_Z_VDB_SIZE
default 100
config LV_Z_DOUBLE_VDB
default y
config LV_Z_VBD_CUSTOM_SECTION
default y
config LV_Z_FULL_REFRESH
default y
config LV_Z_BITS_PER_PIXEL
default 32
config LV_DPI_DEF
default 128
config LV_Z_FLUSH_THREAD
default y
choice LV_COLOR_DEPTH
default LV_COLOR_DEPTH_32
endchoice
endif # LVGL
endif # SHIELD_ST_B_LCD40_DSI1_MB1166

View File

@ -7,11 +7,22 @@
#include <zephyr/dt-bindings/display/panel.h>
/ {
lvgl_pointer {
compatible = "zephyr,lvgl-pointer-input";
input = <&ft5336>;
invert-y;
};
chosen {
zephyr,display = &ltdc;
};
};
&sdram2 {
/* Frame buffer memory cache will cause screen flickering. */
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
};
&ltdc {
status = "okay";
ext-sdram = <&sdram2>;
@ -72,3 +83,15 @@
pixel-format = <MIPI_DSI_PIXFMT_RGB888>;
rotation = <90>;
};
&i2c4 {
pinctrl-0 = <&i2c4_scl_pd12 &i2c4_sda_pd13>;
pinctrl-names = "default";
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";
ft5336: ft5336@38 {
compatible = "focaltech,ft5336";
reg = <0x38>;
};
};