Skip to content

Conversation

avolmat-st
Copy link

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.

@decsny decsny removed their request for review March 11, 2025 17:35
@kartben kartben assigned erwango and unassigned kartben Mar 12, 2025
Copy link

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.

@github-actions github-actions bot added the Stale label May 17, 2025
@avolmat-st
Copy link
Author

Reopening this PR now. First fixing the comments I previously got before rebasing it to the latest Zephyr code.
Moreover, the PLLSAI support (done in PR #85135) not being merged and requiring a very large amount of rework, I might avoid to rely on it for now and do as done for other SOC series, aka embedding HAL_PLLSAI code into the drivers depending on the SOC type. Such code would be removed later on once PLLSAI support is finalized.

@github-actions github-actions bot removed the Stale label Aug 17, 2025
@avolmat-st avolmat-st marked this pull request as draft August 17, 2025 06:57
@avolmat-st
Copy link
Author

Simply rebased the branch on main branch to allow it to run properly tests. Further changes will be done on top of this new branch now.

Alain Volmat added 7 commits August 18, 2025 21:51
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]>
@avolmat-st
Copy link
Author

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/

@avolmat-st avolmat-st marked this pull request as ready for review August 18, 2025 20:17
@avolmat-st
Copy link
Author

Triggered again the test to allow proper building since now PLLSAI support has been merged.
Tested ok merged on latest main branch using

west build -p -b stm32l4r9i_disco --shield st_b_dsi_mb1314 samples/drivers/display/

/ {
chosen {
/* SRAM0 is too small to hold a framebuffer */
zephyr,sram = &sram2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we just relocate the framebuffer to SRAM2, and leave the system RAM as SRAM0?

Copy link
Author

@avolmat-st avolmat-st Aug 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Let me work on that, hopefully might be able to use the zephyr,memory-region in order to generate the linker entry for all regions and then later on be able to point to any of it.
That would allow to remove the current code allowing to point simple to several dedicated sdram1/sdram2/psram.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually possible but would like to do that correctly for all STM32 board which rely on the ext-sdram and linker scripts in memc so will first do that in a separate PR in order to be clean and then update here again this PR once the modification is done.

Ex of what I did:

+#define FRAME_BUFFER_SECTION   \
+       Z_GENERIC_SECTION(LINKER_DT_NODE_REGION_NAME(DT_INST_PHANDLE(0, ext_sdram)))

Assuming the phandle given in ext_sdram has the right compatible and property, this will allow to get the section attribute automatically, and thus remove the need to have dedicated cases for all memory:

+               compatible = "zephyr,memory-region", "mmio-sram";
                reg = <0x10000000 DT_SIZE_K(64)>;
+               zephyr,memory-region = "SRAM1";

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Base implemented within PR #95299

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

included by mistake I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

convert to webp.

@avolmat-st avolmat-st marked this pull request as draft August 31, 2025 20:43
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]>
@avolmat-st avolmat-st marked this pull request as ready for review September 1, 2025 19:46
Copy link

sonarqubecloud bot commented Sep 1, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants