-
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
base: main
Are you sure you want to change the base?
Conversation
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
a6cc95a
to
7bf2689
Compare
Added DSI connector in order to have shield overlay + board overlay and added doc folder. This is to be used on top of PR #85135 which add support for PLLSAI and has been tested using the display sample app: west build -p -b stm32l4r9i_disco --shield st_b_dsi_mb1314 samples/drivers/display/ |
Triggered again the test to allow proper building since now PLLSAI support has been merged. west build -p -b stm32l4r9i_disco --shield st_b_dsi_mb1314 samples/drivers/display/ |
7bf2689
to
f885e6a
Compare
Added a new test for this shield. Retested ok with latest push of PR #95299, both PRs merged on top of main branch |
Twister failure is due to the need to have this PR applied on top of the PR #95299. |
Add support for the GVO G1120TB101 DSI Panel. Signed-off-by: Alain Volmat <[email protected]>
Rely on the pixel format defined within the display node in order to configure the DSI interface pixel format. Signed-off-by: Alain Volmat <[email protected]>
Use the macro DISPLAY_BITS_PER_PIXEL in order to compute each format BPP and thus avoid requiring each format BPP written within the driver. Thanks to that, simply the function stm32_ltdc_set_pixel_format to avoid code duplication. Signed-off-by: Alain Volmat <[email protected]>
Addition of the STM32_SRC_HSE define in stm32l4_clock.h in order to be able to address the HSE clock source from the device-tree. Signed-off-by: Alain Volmat <[email protected]>
stm32l4r9 series embeds a MIPI DSI controller which uses the LTDC controller as input. Signed-off-by: Alain Volmat <[email protected]>
ltdc controller is also available in stm32l4r5 and stm32l4q5 so add it within stm32l4p5. It is not available in stm32l4r5 hence delete the node for this platform. Signed-off-by: Alain Volmat <[email protected]>
Add the description of the DSI connector available on the stm32l4r9i_disco board and zephyr_mipi_dsi/zephyr_lcd_controller alias to be used by display shields. Signed-off-by: Alain Volmat <[email protected]>
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]>
Addition of tests with the st_b_dsi_mb1314 shield. Signed-off-by: Alain Volmat <[email protected]>
0565eeb
to
62d6a56
Compare
Rebased on top of main branch now that PR #95299 is merged. Only corrected panel CMakefile & Kconfig conflicts due to the fact that another panel got merged in between. |
|
{ | ||
uint8_t InitParam1[4] = {0x00, 0x04, 0x01, 0x89}; | ||
uint8_t InitParam2[4] = {0x00, 0x00, 0x01, 0x85}; | ||
int ret, i; |
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.
int ret, i; | |
int ret; | |
int i; |
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.
Is your proposal related to MISRA rule about multiple declaration within the same line ?
(A declaration should not declare more than one variable or member variable)
I am not sure this is considered as a requirement in Zephyr CodyingStyle and doesn't seem to be listed in required rule right ? (doc/contribute/coding_guidelines/index.rst)
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.
Is your proposal related to MISRA rule about multiple declaration within the same line ? (A declaration should not declare more than one variable or member variable)
Yes, and it's more readable in my opinion. Non blocking though.
I am not sure this is considered as a requirement in Zephyr CodyingStyle and doesn't seem to be listed in required rule right ? (doc/contribute/coding_guidelines/index.rst)
Yes I think it's not.
reg = <0x40016800 0x200>; | ||
interrupts = <91 0>, <92 0>; | ||
interrupt-names = "ltdc", "ltdc_er"; | ||
clocks = <&rcc STM32_CLOCK(APB2, 26U)>; |
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.
clocks = <&rcc STM32_CLOCK(APB2, 26U)>; | |
clocks = <&rcc STM32_CLOCK(APB2, 26)>; |
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.
Removing as well from the reset properties since it isn't necessary as well.
#size-cells = <0>; | ||
reg = <0x40016c00 0x800>; | ||
clock-names = "dsiclk", "refclk", "pixelclk"; | ||
clocks = <&rcc STM32_CLOCK(APB2, 27U)>, |
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.
clocks = <&rcc STM32_CLOCK(APB2, 27U)>, | |
clocks = <&rcc STM32_CLOCK(APB2, 27)>, |
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.
Removing as well from the reset properties since it isn't necessary as well.
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config G1120TB101 | ||
bool "G1120TB101 display controller" |
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.
This pull request includes updates, new driver and a new shield in order to enable the DSI display that can be mounted on the STM32L4R9I-DISCO board.
It enables both LTDC and DSI interfaces of the STM32L4R9 and for that purpose require the usage of the PLLSAI.
PLLSAI support isn't yet merged. There is another ongoing pull request for that purpose which can be found here:
#85135
The PLLSAI pull-request is still evolving hence this new pull-request will be rebased afterward once the PLLSAI will be merged.
Since it rely on another pull-request, it won't build (missing pllsai nodes or macros) but I am already pushing this one in order to start the review process.