Skip to content

Commit

Permalink
boards: shield: add support for stm32f769i_disco board
Browse files Browse the repository at this point in the history
Add support for STMicroelectronics B-LCD40-DSI1 shield to
stm32f769i_disco board.

Default config for lvgl is adjusted to lower value to fix compilation
issue on low memory footprint stm32f769i_disco.

region `IDT_LIST' overflowed by 121081 bytes
bss ' will not fit in region `RAM'
ld.bfd: region `RAM' overflowed by 1220664 bytes
collect2: error: ld returned 1 exit status

Signed-off-by: Saravanan Sekar <[email protected]>
  • Loading branch information
ssekar15 committed Jun 28, 2024
1 parent cdc1149 commit 6b80813
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 8 deletions.
10 changes: 2 additions & 8 deletions boards/shields/st_b_lcd40_dsi1_mb1166/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,13 @@ if SHIELD_ST_B_LCD40_DSI1_MB1166 || SHIELD_ST_B_LCD40_DSI1_MB1166_A09
if LVGL

config STM32_LTDC_FB_NUM
default 0
default 1

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
default 10

config LV_Z_FULL_REFRESH
default y
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2024 Linumiz
# SPDX-License-Identifier: Apache-2.0

# Initialize after LTDC and MIPI-DSI
CONFIG_DISPLAY_OTM8009A_INIT_PRIORITY=87
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2024 Linumiz
*
* SPDX-License-Identifier: Apache-2.0
*/

&ltdc {
/* orisetech, otm8009a */
display-timings {
compatible = "zephyr,panel-timing";
hsync-active = <0>;
vsync-active = <0>;
de-active = <0>;
pixelclk-active = <0>;
hsync-len = <2>;
vsync-len = <1>;
hback-porch = <34>;
vback-porch = <15>;
hfront-porch = <34>;
vfront-porch = <16>;
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2024 Linumiz
# SPDX-License-Identifier: Apache-2.0

CONFIG_MEMC=y
CONFIG_STM32_LTDC_RGB888=y
CONFIG_HEAP_MEM_POOL_SIZE=65536
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (c) 2024 Linumiz
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/dt-bindings/display/panel.h>

/ {
lvgl_pointer {
compatible = "zephyr,lvgl-pointer-input";
input = <&ft5336>;
};

chosen {
zephyr,display = &ltdc;
};
};

&ltdc {
status = "okay";
ext-sdram = <&sdram1>;
width = <800>;
height = <480>;
def-back-color-red = <0>;
def-back-color-green = <0>;
def-back-color-blue = <0>;
pixel-format = <PANEL_PIXEL_FORMAT_RGB_888>;
};

&mipi_dsi {
status = "okay";

pll-ndiv = <100>;
pll-idf = <5>;
pll-odf = <0>;

vs-active-high;
hs-active-high;
de-active-high;
};
26 changes: 26 additions & 0 deletions boards/st/stm32f769i_disco/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ The Zephyr stm32f769i_disco board configuration supports the following hardware
+-----------+------------+-------------------------------------+
| TOUCH | off-chip | ft5336(FT6202) |
+-----------+------------+-------------------------------------+
| DISPLAY | off-chip | MIPI DSI Host with shield (MP1166) |
| | | st_b_lcd40_dsi1_mb1166 |
+-----------+------------+-------------------------------------+

Other hardware features are not yet supported on Zephyr porting.

Expand Down Expand Up @@ -162,6 +165,29 @@ The STM32F769I Discovery kit has up to 8 UARTs. The Zephyr console output is ass
which connected to the onboard ST-LINK/V2 Virtual COM port interface. Default communication
settings are 115200 8N1.

Display
=======

The STM32F769I Discovery kit has a dedicated DSI LCD connector **CN1**, where
the MB1166 (B-LCD40-DSI1) display extension board can be mounted. Enable display
support in Zephyr by adding the shield ``st_b_lcd40_dsi1_mb1166`` or
``st_b_lcd40_dsi1_mb1166_a09`` to your build command, for example:

.. zephyr-app-commands::
:zephyr-app: samples/drivers/display
:board: stm32f769i_disco
:shield: st_b_lcd40_dsi1_mb1166
:goals: build flash

.. note::
The shield comes in different hardware revisions, the MB1166-A09
is utilizing a NT35510 panel controller and shall specifically
use ``st_b_lcd40_dsi1_mb1166_a09`` as SHIELD when building
Prior versions are utilizing an OTM8009a controller and shall
use shield name without postfix, that is: ``st_b_lcd40_dsi1_mb1166``
Shield version is printed on a sticker placed below the two bottom
mounting holes and has the format: MB1166-Axx

Programming and Debugging
*************************

Expand Down
17 changes: 17 additions & 0 deletions boards/st/stm32f769i_disco/stm32f769i_disco.dts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,23 @@
zephyr,memory-region = "QSPI_AVAIL";
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO) )>;
};

dsi_lcd_qsh_030: connector_dsi_lcd {
compatible = "st,dsi-lcd-qsh-030";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <4 0 &gpioi 13 0>, /* TOUCH_INT */
<35 0 &gpiod 12 0>, /* SCLK/MCLK */
<39 0 &gpiod 11 0>, /* I2S */
<40 0 &gpiob 9 0>, /* I2C4_SDA */
<44 0 &gpiob 8 0>, /* I2C4_SCL */
<45 0 &gpioa 8 0>, /* CEC_CLK */
<47 0 &gpioa 15 0>, /* CEC */
<49 0 &gpioj 2 0>, /* DSI_TE */
<53 0 &gpioi 14 0>, /* LCD_BL_CTRL */
<57 0 &gpioj 15 0>; /* DSI_RESET */
};
};

qsh_030_i2c: &i2c4 {
Expand Down

0 comments on commit 6b80813

Please sign in to comment.