cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 board support eDP bridge?

LLe.1
Associate II

Hi,

We are using stm32mp157c MCU/board and it has DSI output built-in. Now we want to add display port support via DSI to eDP bridge SN65DSI86. It seems that stm32 does not support Displayport output or it has never been done. At least the driver dw_mipi_dsi-stm.c should be updated not to require a panel.

Any idea how this can be achieved please?

34 REPLIES 34
Erwan SZYMANSKI
ST Employee

@LLe.1​,

Thank you for all your logs and information. Can you also put me your complete dmesg in attachment please ?

I will take a look ASAP in the afternoon.

Regards.

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Here it is Erwan, kindly note that the ERROR is my custom log, not the actual error.

@LLe.1​,

If I remember well, we can face an issue with I2C bridge, because panels and bridges are isolated from DSI node in device tree and we can have difficulties to find them. I think this is what you are facing right now.

Please take a look at the following patch that can probably help you:

patch-dw-mipi-dsi

Please let me know if this patch help you.

Kind regards.

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thanks @Erwan SZYMANSKI​  for the patch, I will try it out immediately.

One question though, currently we have this flow: dsi -> bridge -> panel. After probe function is called on every driver, how each device is detected and enabled? is it like panel is detected (by some signal idk) -> panel_simple_enable() -> bridge_enable() -> dsi_enable() or vice-versa?

Could it be that in my case the simple-panel is not detected and not enabled, causing the rest not started?

@LLe.1​,

Concerning the different actions that are made during all the DSI/bridge/panel chain (add, attach, enable...), you have an interesting documentation paragraph at the beginning of the following file: drivers/gpu/drm/drm_bridge.c

I would not be able to say you why the documentation is here, but this paragraph is particularly well written to understand what you ask.

Concerning your last remark, your panel looks to well probe and well be added to panel_list. I think that nothing is going wrong at this step with it. However, maybe you will have a work after to have the rendering that you want etc.. It can be sometimes long to configure or not depending on your panel. In your device tree, you have the following compatible "lg,lp120up1". Is it just a panel-simple that is hidden behind ?

I think we have to first correct your actual step and see how the system react after.

Kind regards.

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Erwan SZYMANSKI
ST Employee

As an information, you can find here the different patches of sn65dsi86 driver. Some are very recent (46 hours before my message).

https://cgit.freedesktop.org/drm-misc/log/drivers/gpu/drm/bridge/ti-sn65dsi86.c?_sm_au_=i5Vn21qDFf1tnTFHcLpsvK618Vf61

Regards.

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi @Erwan SZYMANSKI​ , one question, how easy it is to upgrade from 3.1 to OSTL 4.0?

Look like my DSI code and also ti-sn65dsi86.c are outdated so I doubt if I can just replace ti-sn65dsi86.c with its latest version.

Hi @LLe.1​,

It will depends about the number of custom components that you have on your board. Some fields such as security have major differences with the 4.0. Note that an article will soon be written to help customer to make the migration from 3.1 to 4.0, but this article is not available for now.

If you want to avoid it, or you think that it will be too much time consuming regarding your project, maybe you can try to backport only the driver version that you find useful (maybe kernel 5.18 version is not needed, 5.15 should be enough).

Did you success to apply the patch that I gave you for DSI device finding in DT (on dw-mipi-dsi driver)?

Regards.

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

@Erwan SZYMANSKI​ the dsi code is not the same so I had to merge the patch manually, but it should be ok I think.

With your provided path I got a bit further, func dw_mipi_dsi_bridge_attach() is called and within this func, it tries to find the edp_bridge but failed, possibly because bridge probe() has not been called. After that bridge_probe() func is called and finishes successfully but dsi has already failed and does not retry.

[    2.166300] [drm:dw_mipi_dsi_stm_probe] *ERROR* DW: stm dsi probe
[    2.171531] [drm:dw_mipi_dsi_stm_probe] *ERROR* DW: stm dsi start generic dsi probe
[    2.178885] [drm:__dw_mipi_dsi_probe] *ERROR* DW: dsi probe
[    2.184605] [drm:drm_bridge_add] *ERROR* drm bridge add
[    2.189765] [drm:__dw_mipi_dsi_probe] *ERROR* DW: dsi probe ok
[    2.195617] [drm:dw_mipi_dsi_stm_probe] *ERROR* DW: stm dsi ok
[    2.204533] [drm:drm_of_find_panel_or_bridge] *ERROR* drm_of_find_panel_or_bridge display-controller, remote:dsi
[    2.213506] [drm:of_drm_find_panel] *ERROR* ADD: cannot find any
[    2.219495] [drm:drm_of_find_panel_or_bridge] *ERROR* DRM no panel found
[    2.227278] [drm:drm_of_find_panel_or_bridge] *ERROR* DRM bridge found
[    2.232884] [drm:dw_mipi_dsi_bridge_attach] *ERROR* DW: attach bridge
[    2.239286] [drm:dw_mipi_dsi_bridge_attach] *ERROR* DRM attach find
[    2.245576] [drm:dw_mipi_dsi_panel_or_bridge] *ERROR* DRM new func panel or bridge
[    2.253309] [drm:drm_of_find_panel_or_bridge] *ERROR* drm_of_find_panel_or_bridge dsi, remote:edp_bridge
[    2.262838] [drm:of_drm_find_panel] *ERROR* ADD: cannot find any
[    2.268907] [drm:drm_of_find_panel_or_bridge] *ERROR* DRM no panel found
[    2.276989] [drm:drm_of_find_panel_or_bridge] *ERROR* DRM get brige error
[    2.282524] [drm:dw_mipi_dsi_bridge_attach] *ERROR* find bridge failed
[    2.289183] [drm:ltdc_load] *ERROR* init encoder endpoint 0
--> try to dw_mipi_dsi_bridge_attach() BUT FAILED BECAUSE CANNOT FIND BRIDGE edp_bridge, possibly not init yet.
 
 
 
[    2.295961] [drm:panel_simple_probe] *ERROR* start to add panel
[    2.301026] [drm:panel_simple_probe] *ERROR* panel init done, start to drm add panel
[    2.308597] [drm:drm_panel_add] *ERROR* ADD: add pannel to the list
[    2.314818] [drm:panel_simple_probe] *ERROR* add to drm panel ok
[    2.480409] [drm:ti_sn_bridge_probe] *ERROR* probe bridge
[    2.484460] [drm:ti_sn_bridge_probe] *ERROR* check i2c ok, proceed
[    2.490800] [drm:ti_sn_bridge_probe] *ERROR* init i2c client ok
[    2.496567] [drm:drm_of_find_panel_or_bridge] *ERROR* drm_of_find_panel_or_bridge edp_bridge, remote:panel
[    2.506299] [drm:of_drm_find_panel] *ERROR* ADD: loop through list of panel,panel:panel, dev name:panel
[    2.515747] [drm:of_drm_find_panel] *ERROR* ADD: panel found
[    2.521464] [drm:drm_of_find_panel_or_bridge] *ERROR* DRM bridge pointer NULL
 
[    2.528681] [drm:ti_sn_bridge_probe] *ERROR* find panel or bridge ok
[    2.535181] [drm:ti_sn_bridge_probe] *ERROR* enable gpio ok
[    2.541044] [drm:ti_sn_bridge_probe] *ERROR* regulator ok
[    2.546239] [drm:ti_sn_bridge_probe] *ERROR* parse dsi host ok
[    2.553045] [drm:ti_sn_bridge_probe] *ERROR* add bridge
[    2.557411] [drm:drm_bridge_add] *ERROR* drm bridge add
 
--> bridge probe() FUNC FINISHES SUCCESSFULLY HERE BUT DSI HAS ALREADY FAILED AND NOT RETRY

Hello @LLe.1​,

Great, we are a little bit further right now, the fact that LTDC began its work is a good news.

Can you attach me your bridge driver file just to be sure to analyze the same version as you have ? I do not know if you applied patch on it finally.

Regards.

Erwan

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.