Skip to content

Commit a6cc95a

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 dc053b9 commit a6cc95a

File tree

3 files changed

+137
-0
lines changed

3 files changed

+137
-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: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
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 = &ltdc;
12+
/* SRAM0 is too small to hold a framebuffer */
13+
zephyr,sram = &sram2;
14+
};
15+
};
16+
17+
&clk_hse {
18+
clock-frequency = <DT_FREQ_M(16)>; /* 16MHz */
19+
status = "okay";
20+
};
21+
22+
&ltdc {
23+
status = "okay";
24+
25+
width = <390>;
26+
height = <390>;
27+
pixel-format = <PANEL_PIXEL_FORMAT_RGB_888>;
28+
29+
display-timings {
30+
compatible = "zephyr,panel-timing";
31+
de-active = <0>;
32+
pixelclk-active = <0>;
33+
hsync-active = <0>;
34+
vsync-active = <0>;
35+
hsync-len = <1>;
36+
vsync-len = <1>;
37+
hback-porch = <1>;
38+
vback-porch = <1>;
39+
hfront-porch = <1>;
40+
vfront-porch = <1>;
41+
};
42+
def-back-color-red = <0x0>;
43+
def-back-color-green = <0x0>;
44+
def-back-color-blue = <0x0>;
45+
};
46+
47+
&mfx {
48+
dsi_3v3_pwron {
49+
gpio-hog;
50+
gpios = <8 GPIO_ACTIVE_LOW>;
51+
output-high;
52+
line-name = "DSI_3V3_PWRON";
53+
};
54+
55+
dsi_1v8_pwron {
56+
gpio-hog;
57+
gpios = <18 GPIO_ACTIVE_HIGH>;
58+
output-high;
59+
line-name = "DSI_1v8_PWRON";
60+
};
61+
};
62+
63+
&pllsai2 {
64+
/* PLLSAI2 is here to generate the PCLK to feed the DSI
65+
* We need to feed roughly 500Mbps. PCLK depends on format
66+
* For 24bit (RGB888) format, we need roughly 20.8 MHz. (Actually target 15 MHz)
67+
* div-m = 1, mul-n = 60, div-r = 4, div-divr = 4
68+
*
69+
* PCLK = MSI (4MHz) * mul-n / (div-m * div-r * div-divr)
70+
*/
71+
status = "okay";
72+
div-m = <1>;
73+
mul-n = <60>;
74+
div-r = <4>;
75+
div-divr = <4>;
76+
clocks = <&clk_msi>;
77+
};
78+
79+
&zephyr_mipi_dsi {
80+
status = "okay";
81+
82+
/* DSI HOST dedicated PLL to generate 62.5 MHz from 16MHz
83+
* source clock, in order to generate 500Mbps on single lane
84+
*
85+
* F_VCO = CLK_IN / pll-idf * 2 * pll-ndiv
86+
* PHI = F_VCO / 2 / (1 << pll-odf) = lane_byte_clk
87+
* = 25 MHz / 5 * 2 * 100 / 2 / (1<<0) / 8 = 62.5 MHz
88+
*/
89+
pll-ndiv = <125>;
90+
pll-idf = <4>;
91+
pll-odf = <0>;
92+
93+
phy-timings = <33 /* ClockLaneHS2LPTime */
94+
30 /* ClockLaneLP2HSTime */
95+
11 /* DataLaneHS2LPTime */
96+
21 /* DataLaneLP2HSTime */
97+
0 /* DataLaneMaxReadTime */
98+
7 /* StopWaitTime */>;
99+
100+
host-timeouts = <1 /* TimeoutCkdiv */
101+
0 /* HighSpeedTransmissionTimeout */
102+
0 /* LowPowerReceptionTimeout */
103+
0 /* HighSpeedReadTimeout */
104+
0 /* LowPowerReadTimeout */
105+
0 /* HighSpeedWriteTimeout */
106+
0 /* HighSpeedWritePrespMode */
107+
0 /* LowPowerWriteTimeout */
108+
0 /* BTATimeout */>;
109+
110+
vs-active-high;
111+
hs-active-high;
112+
de-active-high;
113+
114+
lp-rx-filter=<10000>;
115+
116+
g1120tb101: panel@0 {
117+
compatible = "gvo,g1120tb101";
118+
reg = <0x0>;
119+
height = <390>;
120+
width = <390>;
121+
data-lanes = <1>;
122+
reset-gpios = <&mfx 10 GPIO_ACTIVE_LOW>;
123+
124+
pixel-format = <MIPI_DSI_PIXFMT_RGB888>;
125+
};
126+
};

0 commit comments

Comments
 (0)