Skip to content

Commit f885e6a

Browse files
author
Alain Volmat
committed
boards: shields: add st_b_dsi_mb1314 shield (DSI display)
Addition of a new shield which embeds a round DSI display gvo,g1120tb101 of 390x390 pixels, with a touchpanel. This shield enables it via usage of the LTDC and DSI of the STM32. Touchpanel isn't yet supported in this commit and will be added later on in an additional commit. Signed-off-by: Alain Volmat <[email protected]>
1 parent 1aa1b8b commit f885e6a

File tree

7 files changed

+196
-0
lines changed

7 files changed

+196
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2025 STMicroelectronics
2+
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
config SHIELD_ST_B_DSI_MB1314
6+
def_bool $(shields_list_contains,st_b_dsi_mb1314)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CONFIG_DISPLAY=y
2+
CONFIG_MIPI_DSI=y
3+
CONFIG_STM32_LTDC_RGB565=y
4+
CONFIG_STM32_LTDC_FB_NUM=1
5+
CONFIG_GPIO_HOGS_INIT_PRIORITY=71
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&clk_hse {
8+
clock-frequency = <DT_FREQ_M(16)>; /* 16MHz */
9+
status = "okay";
10+
};
11+
12+
&ltdc {
13+
/* SRAM0 is too small to hold a framebuffer, use SRAM2 */
14+
ext-sdram = <&sram2>;
15+
};
16+
17+
&mfx {
18+
dsi_3v3_pwron {
19+
gpio-hog;
20+
gpios = <8 GPIO_ACTIVE_LOW>;
21+
output-high;
22+
line-name = "DSI_3V3_PWRON";
23+
};
24+
25+
dsi_1v8_pwron {
26+
gpio-hog;
27+
gpios = <18 GPIO_ACTIVE_HIGH>;
28+
output-high;
29+
line-name = "DSI_1v8_PWRON";
30+
};
31+
};
32+
33+
&pllsai2 {
34+
/* PLLSAI2 is here to generate the PCLK to feed the DSI
35+
* We need to feed roughly 500Mbps. PCLK depends on format
36+
* For 24bit (RGB888) format, we need roughly 20.8 MHz. (Actually target 15 MHz)
37+
* div-m = 1, mul-n = 60, div-r = 4, div-divr = 4
38+
*
39+
* PCLK = MSI (4MHz) * mul-n / (div-m * div-r * div-divr)
40+
*/
41+
status = "okay";
42+
div-m = <1>;
43+
mul-n = <60>;
44+
div-r = <4>;
45+
div-divr = <4>;
46+
clocks = <&clk_msi>;
47+
};
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.. _st_b_dsi_mb1314:
2+
3+
ST B-DSI-MB1314
4+
###############
5+
6+
Overview
7+
********
8+
9+
This shield provides a DSI display, based on a round AMOLED touch-sensitive panel
10+
of 1.2 inches and 390x390 pixels. The display module reference is IEG1120TB103GF-001
11+
from Govisionox Optoelectronics. It displays up to 16M colors.
12+
13+
.. figure:: mb1314.webp
14+
:alt: B-DSI-MB1314 Image
15+
:align: center
16+
17+
B-DSI-MB1314 Image
18+
19+
Requirements
20+
************
21+
22+
Your board needs to have ``zephyr_mipi_dsi`` and ``zephyr_lcd_controller``
23+
device-tree labels to work with this shield.
24+
25+
Usage
26+
*****
27+
28+
The shield can be used in any application by setting ``SHIELD`` to
29+
``st_b_dsi_mb1314`` and adding the necessary board specific device tree
30+
properties.
31+
32+
Set ``--shield "st_b_dsi_mb1314"`` when you invoke ``west build``. For example:
33+
34+
.. zephyr-app-commands::
35+
:zephyr-app: samples/drivers/display
36+
:board: stm32l4r9i_disco
37+
:shield: st_b_dsi_mb1314
38+
:goals: build
39+
40+
References
41+
**********
42+
43+
- `Product page <https://www.st.com/en/evaluation-tools/32l4r9idiscovery.html>`_
44+
45+
- `User manual <https://www.st.com/resource/en/user_manual/um2271-discovery-kit-with-stm32l4r9ai-mcu-stmicroelectronics.pdf>`_
5.41 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
shield:
2+
name: st_b_dsi_mb1314
3+
full_name: ST B-DSI-MB1314
4+
vendor: st
5+
supported_features:
6+
- display
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/mipi_dsi/mipi_dsi.h>
8+
9+
/ {
10+
chosen {
11+
zephyr,display = &zephyr_lcd_controller;
12+
};
13+
};
14+
15+
&zephyr_mipi_dsi {
16+
status = "okay";
17+
18+
/* DSI HOST dedicated PLL to generate 62.5 MHz from 16MHz
19+
* source clock, in order to generate 500Mbps on single lane
20+
*
21+
* F_VCO = CLK_IN / pll-idf * 2 * pll-ndiv
22+
* PHI = F_VCO / 2 / (1 << pll-odf) = lane_byte_clk
23+
* = 25 MHz / 5 * 2 * 100 / 2 / (1<<0) / 8 = 62.5 MHz
24+
*/
25+
pll-ndiv = <125>;
26+
pll-idf = <4>;
27+
pll-odf = <0>;
28+
29+
phy-timings = <33 /* ClockLaneHS2LPTime */
30+
30 /* ClockLaneLP2HSTime */
31+
11 /* DataLaneHS2LPTime */
32+
21 /* DataLaneLP2HSTime */
33+
0 /* DataLaneMaxReadTime */
34+
7 /* StopWaitTime */>;
35+
36+
host-timeouts = <1 /* TimeoutCkdiv */
37+
0 /* HighSpeedTransmissionTimeout */
38+
0 /* LowPowerReceptionTimeout */
39+
0 /* HighSpeedReadTimeout */
40+
0 /* LowPowerReadTimeout */
41+
0 /* HighSpeedWriteTimeout */
42+
0 /* HighSpeedWritePrespMode */
43+
0 /* LowPowerWriteTimeout */
44+
0 /* BTATimeout */>;
45+
46+
vs-active-high;
47+
hs-active-high;
48+
de-active-high;
49+
50+
lp-rx-filter=<10000>;
51+
52+
g1120tb101: panel@0 {
53+
compatible = "gvo,g1120tb101";
54+
reg = <0x0>;
55+
height = <390>;
56+
width = <390>;
57+
data-lanes = <1>;
58+
reset-gpios = <&dsi_lcd_qsh_030 57 GPIO_ACTIVE_LOW>;
59+
60+
pixel-format = <MIPI_DSI_PIXFMT_RGB888>;
61+
};
62+
};
63+
64+
&zephyr_lcd_controller {
65+
status = "okay";
66+
67+
width = <390>;
68+
height = <390>;
69+
pixel-format = <PANEL_PIXEL_FORMAT_RGB_888>;
70+
71+
display-timings {
72+
compatible = "zephyr,panel-timing";
73+
de-active = <0>;
74+
pixelclk-active = <0>;
75+
hsync-active = <0>;
76+
vsync-active = <0>;
77+
hsync-len = <1>;
78+
vsync-len = <1>;
79+
hback-porch = <1>;
80+
vback-porch = <1>;
81+
hfront-porch = <1>;
82+
vfront-porch = <1>;
83+
};
84+
def-back-color-red = <0x0>;
85+
def-back-color-green = <0x0>;
86+
def-back-color-blue = <0x0>;
87+
};

0 commit comments

Comments
 (0)