Skip to content
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

Add st_b_lcd40_dsi1_mb1166 display shield support for stm32f769i_disco board #74646

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

ssekar15
Copy link
Collaborator

PR covers

  • Add mipi ltdc display shield support for stm32f769i_disco board
  • Replace direct hal api for ltdc block reset to zephyr reset api framework

dts/arm/st/f4/stm32f429.dtsi Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

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

If there are multiple ST boards that support the ST_B_LCD40_DSI1_MB1166 shield, then you might consider defining node labels for connectors (IE for the LTDC, MIPI DSI, and I2C connections). This has been done for some NXP supplied displays, see here:

. This avoids code duplication (for example, the display panel timings look the same as the ones here:

It seems this is already being done for the GPIO nexus node, so expanding this to the peripherals might be useful

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Touch and display controller are part of shield overlay. If I'm not wrong not all the STM chipset has LTDC, so the panel display timings in ltdc node shall be in board overlay.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure, not all the STM SOCs will have an LTDC- this is the case with NXP's SOCs as well. In the case of NXP's displays, we sell multiple display modules that connect via a 40 pin FPC present on several of our evaluation kits to the module itself. The benefit here is that if we designed a new SOC with a DSI interface and added the same 40 pin connector, we could enable support for these displays by simply adding node definitions at the board level.

Beyond this, if a customer wanted to use this shield with their custom board, they would not need to modify Zephyr itself to add a new overlay (or duplicate the overlay definition for their board out of tree).

This is a core idea of a shield- not every evaluation kit supported by Zephyr has a SPI interface broken out to arduino headers, but those that do can use a large subset of all Zephyr shields without board specific configuration. Of course the scope of this shield would be more narrow (perhaps 2-3 boards), but I think the benefits to this approach still apply.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry for the delayed response- yeah, this looks right to me. Essentially just refactor the shields to avoid duplicating things in board-specific shield overlays

@ssekar15 ssekar15 force-pushed the disp_f769_disco branch 2 times, most recently from 6ac49fc to 36d4ccf Compare June 26, 2024 08:44
@ajarmouni-st
Copy link
Collaborator

/

ok, what kind of problem? May I know how does correct one looks in other board?

screenshot_h747i

@ajarmouni-st
Copy link
Collaborator

/

ok, what kind of problem? May I know how does correct one looks in other board?

As a side note, you can run the sample on your PC (tested on Ubuntu laptop) using:

west build -p always -b native_posix/native/64 samples/drivers/display
west build -t run

Copy link
Collaborator

@ajarmouni-st ajarmouni-st left a comment

Choose a reason for hiding this comment

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

Adding the board to the different test cases of st_b_lcd40_dsi1_mb1166 would also be needed.

diff --git a/samples/drivers/display/sample.yaml b/samples/drivers/display/sample.yaml
index 33d72e11c74..8e708140e68 100644
--- a/samples/drivers/display/sample.yaml
+++ b/samples/drivers/display/sample.yaml
@@ -132,7 +132,9 @@ tests:
       fixture: fixture_display
   sample.display.st_b_lcd40_dsi1_mb1166:
     filter: dt_compat_enabled("orisetech,otm8009a")
-    platform_allow: stm32h747i_disco/stm32h747xx/m7
+    platform_allow:
+      - stm32h747i_disco/stm32h747xx/m7
+      - stm32f769i_disco
     extra_args: SHIELD=st_b_lcd40_dsi1_mb1166
     tags:
       - display
diff --git a/samples/modules/lvgl/demos/sample.yaml b/samples/modules/lvgl/demos/sample.yaml
index 5a9d668d02d..eea1ed0b127 100644
--- a/samples/modules/lvgl/demos/sample.yaml
+++ b/samples/modules/lvgl/demos/sample.yaml
@@ -26,7 +26,9 @@ tests:
       - CONFIG_LV_Z_DEMO_WIDGETS=y
   sample.modules.lvgl.demos.st_b_lcd40_dsi1_mb1166:
     filter: dt_compat_enabled("orisetech,otm8009a")
-    platform_allow: stm32h747i_disco/stm32h747xx/m7
+    platform_allow:
+      - stm32h747i_disco/stm32h747xx/m7
+      - stm32f769i_disco
     extra_args: SHIELD=st_b_lcd40_dsi1_mb1166
     harness: console
     harness_config:
diff --git a/samples/subsys/display/lvgl/sample.yaml b/samples/subsys/display/lvgl/sample.yaml
index 94b26bc1087..c2715fe6c55 100644
--- a/samples/subsys/display/lvgl/sample.yaml
+++ b/samples/subsys/display/lvgl/sample.yaml
@@ -42,7 +42,9 @@ tests:
       - mimxrt1170_evk/mimxrt1176/cm7
   sample.subsys.display.lvgl.st_b_lcd40_dsi1_mb1166:
     filter: dt_compat_enabled("orisetech,otm8009a")
-    platform_allow: stm32h747i_disco/stm32h747xx/m7
+    platform_allow:
+      - stm32h747i_disco/stm32h747xx/m7
+      - stm32f769i_disco
     extra_args: SHIELD=st_b_lcd40_dsi1_mb1166
     harness: console
     harness_config:

@zephyrbot zephyrbot added the area: Samples Samples label Jul 4, 2024
@zephyrbot zephyrbot requested a review from nashif July 4, 2024 06:51
dts/bindings/clock/st,stm32f7-pll-clock.yaml Show resolved Hide resolved
if LVGL

if BOARD_STM32H747I_DISCO_STM32H747XX_M7
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather add a orsource "boards/*.defconfig" then do this in a boards/shields/st_b_lcd40_dsi1_mb1166/boards/stm32h747i_disco_stm32h747xx_m7.defconfig

@erwango
Copy link
Member

erwango commented Jul 4, 2024

Few comments from my part. Don't hesitate to dismiss my review once done, as will be OoO for few weeks.

@ssekar15
Copy link
Collaborator Author

@ssekar15 stm32h747i_disco is looking good, will test stm32f769i_disco next.

@ssekar15 There seems to be a problem with samples/drivers/display on stm32f769i-disco, haven't looked into it yet. !

@ajarmouni-st
Related to display shift !

#32286

@ajarmouni-st ajarmouni-st removed their request for review July 25, 2024 08:05
@ajarmouni-st ajarmouni-st dismissed their stale review July 25, 2024 08:13

Dismissing as I'm no longer active on this work account.

Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

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

@ssekar15 One more comment that was left pending, but I'll need to review this entirely. Would you mind rebasing to solve merge conflicts ?

if LVGL

config STM32_LTDC_FB_NUM
default 0
orsource "boards/*.defconfig"
Copy link
Member

Choose a reason for hiding this comment

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

Nit: this line should be outside of if LVGL

Add support for STM32F7 MIPI DSI host driver.

Signed-off-by: Saravanan Sekar <[email protected]>
Add bindings for pll-r used for DSI HOST peripheral byte clock.

Signed-off-by: Saravanan Sekar <[email protected]>
Add pll-r clock used for DSI HOST peripheral byte clock.

Signed-off-by: Saravanan Sekar <[email protected]>
Use common pin reference for STMicroelectronics B-LCD40-DSI1 shield from
board header mapping.

Signed-off-by: Saravanan Sekar <[email protected]>
Enhanced lvgl config to improve performance for board stm32h747i_disco
impacts the compilation issue on low memory footprint stm32f769i_disco.

region `IDT_LIST' overflowed by 121081 bytes
bss ' will not fit in region `RAM'
ld.bfd: region `RAM' overflowed by 1220664 bytes
collect2: error: ld returned 1 exit status

Signed-off-by: Saravanan Sekar <[email protected]>
Capacitive touch ft6202 is not part board, remove in board dts
and move to panel st_b_lcd40_dsi1_mb1166 shield.

Signed-off-by: Saravanan Sekar <[email protected]>
Add support for STMicroelectronics B-LCD40-DSI1 shield to
stm32f769i_disco board.

Default config for lvgl is adjusted to lower value to fix compilation
issue on low memory footprint stm32f769i_disco.

region `IDT_LIST' overflowed by 121081 bytes
bss ' will not fit in region `RAM'
ld.bfd: region `RAM' overflowed by 1220664 bytes
collect2: error: ld returned 1 exit status

Signed-off-by: Saravanan Sekar <[email protected]>
Add disp_f769_disco board to platform-allow list for display sample tests
with st_b_lcd40_dsi1_mb1166 shield.

Signed-off-by: Saravanan Sekar <[email protected]>
Add disp_f769_disco board to platform-allow list for display sample tests
with st_b_lcd40_dsi1_mb1166 shield.

Signed-off-by: Saravanan Sekar <[email protected]>
Add disp_f769_disco board to platform-allow list for display sample tests
with st_b_lcd40_dsi1_mb1166 shield.

Signed-off-by: Saravanan Sekar <[email protected]>
@JarmouniA
Copy link
Contributor

@ssekar15 Hello again from my personal account :)
Has the shift issue on stm32f769i-disco been solved? I no longer have access to hardware to verify it.

@ssekar15
Copy link
Collaborator Author

ssekar15 commented Sep 2, 2024

@ssekar15 Hello again from my personal account :) Has the shift issue on stm32f769i-disco been solved? I no longer have access to hardware to verify it.

Unfortunately no.. I have tried with offset and different setting but didn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Clock Control area: Devicetree Binding PR modifies or adds a Device Tree binding area: Display area: Samples Samples area: Shields Shields (add-on boards) platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants