-
Notifications
You must be signed in to change notification settings - Fork 8k
Enable STM32L4R9i-disco DSI display via shield ST_B_DSI_MB1314 #86812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
avolmat-st
wants to merge
9
commits into
zephyrproject-rtos:main
Choose a base branch
from
avolmat-st:st_b_dsi_mb1314
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+589
−34
Draft
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
14bf0c2
display: addition of GVO G1120TB101 DSI panel
64e970e
mipi_dsi: stm32: use mdev pixfmt to configure DSI interface
9b31696
display: stm32_ltdc: use DISPLAY_BITS_PER_PIXEL to compute format BPP
f9e817b
dt-bindings: clock: stm32l4: addition of HSE clock source
e40131e
dts: st: l4: stm32l4r9: addition of mipi_dsi node
b21f537
dts: arm: stm32l4: add ltdc in stm32l4p5 and stm32l4q5
9c92373
boards: st: add DSI connector and display alias in stm32l4r9i_disco
a5cc4b3
boards: shields: add st_b_dsi_mb1314 shield (DSI display)
62d6a56
tests: display: display_check: add st_b_dsi_mb1314 shield
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Copyright (c) 2025 STMicroelectronics | ||
|
||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config SHIELD_ST_B_DSI_MB1314 | ||
def_bool $(shields_list_contains,st_b_dsi_mb1314) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CONFIG_DISPLAY=y | ||
CONFIG_MIPI_DSI=y | ||
CONFIG_STM32_LTDC_RGB565=y | ||
CONFIG_STM32_LTDC_FB_NUM=1 | ||
CONFIG_GPIO_HOGS_INIT_PRIORITY=71 |
47 changes: 47 additions & 0 deletions
47
boards/shields/st_b_dsi_mb1314/boards/stm32l4r9i_disco.overlay
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright (c) 2025 STMicroelectronics | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&clk_hse { | ||
clock-frequency = <DT_FREQ_M(16)>; /* 16MHz */ | ||
status = "okay"; | ||
}; | ||
|
||
<dc { | ||
/* SRAM0 is too small to hold a framebuffer, use SRAM2 */ | ||
ext-sdram = <&sram2>; | ||
}; | ||
|
||
&mfx { | ||
dsi_3v3_pwron { | ||
gpio-hog; | ||
gpios = <8 GPIO_ACTIVE_LOW>; | ||
output-high; | ||
line-name = "DSI_3V3_PWRON"; | ||
}; | ||
|
||
dsi_1v8_pwron { | ||
gpio-hog; | ||
gpios = <18 GPIO_ACTIVE_HIGH>; | ||
output-high; | ||
line-name = "DSI_1v8_PWRON"; | ||
}; | ||
}; | ||
|
||
&pllsai2 { | ||
/* PLLSAI2 is here to generate the PCLK to feed the DSI | ||
* We need to feed roughly 500Mbps. PCLK depends on format | ||
* For 24bit (RGB888) format, we need roughly 20.8 MHz. (Actually target 15 MHz) | ||
* div-m = 1, mul-n = 60, div-r = 4, div-divr = 4 | ||
* | ||
* PCLK = MSI (4MHz) * mul-n / (div-m * div-r * div-divr) | ||
*/ | ||
status = "okay"; | ||
div-m = <1>; | ||
mul-n = <60>; | ||
div-r = <4>; | ||
div-divr = <4>; | ||
clocks = <&clk_msi>; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
.. _st_b_dsi_mb1314: | ||
|
||
ST B-DSI-MB1314 | ||
############### | ||
|
||
Overview | ||
******** | ||
|
||
This shield provides a DSI display, based on a round AMOLED touch-sensitive panel | ||
of 1.2 inches and 390x390 pixels. The display module reference is IEG1120TB103GF-001 | ||
from Govisionox Optoelectronics. It displays up to 16M colors. | ||
|
||
.. figure:: mb1314.webp | ||
:alt: B-DSI-MB1314 Image | ||
:align: center | ||
|
||
B-DSI-MB1314 Image | ||
|
||
Requirements | ||
************ | ||
|
||
Your board needs to have ``zephyr_mipi_dsi`` and ``zephyr_lcd_controller`` | ||
device-tree labels to work with this shield. | ||
|
||
Usage | ||
***** | ||
|
||
The shield can be used in any application by setting ``SHIELD`` to | ||
``st_b_dsi_mb1314`` and adding the necessary board specific device tree | ||
properties. | ||
|
||
Set ``--shield "st_b_dsi_mb1314"`` when you invoke ``west build``. For example: | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/drivers/display | ||
:board: stm32l4r9i_disco | ||
:shield: st_b_dsi_mb1314 | ||
:goals: build | ||
|
||
References | ||
********** | ||
|
||
- `Product page <https://www.st.com/en/evaluation-tools/32l4r9idiscovery.html>`_ | ||
|
||
- `User manual <https://www.st.com/resource/en/user_manual/um2271-discovery-kit-with-stm32l4r9ai-mcu-stmicroelectronics.pdf>`_ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
shield: | ||
name: st_b_dsi_mb1314 | ||
full_name: ST B-DSI-MB1314 | ||
vendor: st | ||
supported_features: | ||
- display |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/* | ||
* Copyright (c) 2025 STMicroelectronics | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/mipi_dsi/mipi_dsi.h> | ||
|
||
/ { | ||
chosen { | ||
zephyr,display = &zephyr_lcd_controller; | ||
}; | ||
}; | ||
|
||
&zephyr_mipi_dsi { | ||
status = "okay"; | ||
|
||
/* DSI HOST dedicated PLL to generate 62.5 MHz from 16MHz | ||
* source clock, in order to generate 500Mbps on single lane | ||
* | ||
* F_VCO = CLK_IN / pll-idf * 2 * pll-ndiv | ||
* PHI = F_VCO / 2 / (1 << pll-odf) = lane_byte_clk | ||
* = 25 MHz / 5 * 2 * 100 / 2 / (1<<0) / 8 = 62.5 MHz | ||
*/ | ||
pll-ndiv = <125>; | ||
pll-idf = <4>; | ||
pll-odf = <0>; | ||
|
||
phy-timings = <33 /* ClockLaneHS2LPTime */ | ||
30 /* ClockLaneLP2HSTime */ | ||
11 /* DataLaneHS2LPTime */ | ||
21 /* DataLaneLP2HSTime */ | ||
0 /* DataLaneMaxReadTime */ | ||
7 /* StopWaitTime */>; | ||
|
||
host-timeouts = <1 /* TimeoutCkdiv */ | ||
0 /* HighSpeedTransmissionTimeout */ | ||
0 /* LowPowerReceptionTimeout */ | ||
0 /* HighSpeedReadTimeout */ | ||
0 /* LowPowerReadTimeout */ | ||
0 /* HighSpeedWriteTimeout */ | ||
0 /* HighSpeedWritePrespMode */ | ||
0 /* LowPowerWriteTimeout */ | ||
0 /* BTATimeout */>; | ||
|
||
vs-active-high; | ||
hs-active-high; | ||
de-active-high; | ||
|
||
lp-rx-filter=<10000>; | ||
|
||
g1120tb101: panel@0 { | ||
compatible = "gvo,g1120tb101"; | ||
reg = <0x0>; | ||
height = <390>; | ||
width = <390>; | ||
data-lanes = <1>; | ||
reset-gpios = <&dsi_lcd_qsh_030 57 GPIO_ACTIVE_LOW>; | ||
|
||
pixel-format = <MIPI_DSI_PIXFMT_RGB888>; | ||
}; | ||
}; | ||
|
||
&zephyr_lcd_controller { | ||
status = "okay"; | ||
|
||
width = <390>; | ||
height = <390>; | ||
pixel-format = <PANEL_PIXEL_FORMAT_RGB_888>; | ||
|
||
display-timings { | ||
compatible = "zephyr,panel-timing"; | ||
de-active = <0>; | ||
pixelclk-active = <0>; | ||
hsync-active = <0>; | ||
vsync-active = <0>; | ||
hsync-len = <1>; | ||
vsync-len = <1>; | ||
hback-porch = <1>; | ||
vback-porch = <1>; | ||
hfront-porch = <1>; | ||
vfront-porch = <1>; | ||
}; | ||
def-back-color-red = <0x0>; | ||
def-back-color-green = <0x0>; | ||
def-back-color-blue = <0x0>; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright (c) 2025 STMicroelectronics | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config G1120TB101 | ||
bool "G1120TB101 display controller" | ||
default y | ||
depends on DT_HAS_GVO_G1120TB101_ENABLED | ||
select MIPI_DSI | ||
help | ||
Enable the driver for GVO G1120TB101 display controller. | ||
|
||
if G1120TB101 | ||
|
||
config DISPLAY_G1120TB101_INIT_PRIORITY | ||
int "Initialization priority" | ||
default DISPLAY_INIT_PRIORITY | ||
help | ||
G1120TB101 display driver initialization priority. | ||
|
||
endif |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The panel controller is actually RM67162
https://community.st.com/ysqtg83639/attachments/ysqtg83639/mcu-boards-hardware-tools-forum/8521/3/Visionox-8-10-2017-G1120TB103GF-001A.pdf
And the panel is G1120TB103GF-001
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch ... THANKS for spotting this.
I also checked again, I originally based this on the Cube Example but mixed up the panel / controller.
This changes things since the RM67162 is actually already supported with a driver in Zephyr so I will rework this part of the PR.