Skip to main content
LLe.1
Associate
July 16, 2022
Question

STM32 board support eDP bridge?

  • July 16, 2022
  • 12 replies
  • 13905 views

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?

This topic has been closed for replies.

12 replies

Erwan SZYMANSKI
Technical Moderator
July 18, 2022

Hello @LLe.1​,

Can you tell me on which OSTL version are you actually working on ?

Did you take a look at modifications that came with OSTL 4.0 ? A lot of modifications have been made on this particular TI bridge driver for DSI to eDP feature.

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
Technical Moderator
July 19, 2022

@LLe.1​ ,

Regarding at the TI-SN65DSI86 bridge, it seems that there is no obvious blocker to use it.

As an example of another bridge that links DSI and a connector, you can look at DSI-HDMI bridge AVD7533.

Concerning this TI bridge, it is capable of working with burst or non-burst mode. We advise you to work with burst mode which is easier to put in place.

You will have to use YAML documentation to configure all the device tree port etc...

Instead of attaching a panel to the DSI, you will have to attach the entry of your bridge, itself attached to your eDP connector.

Note that the STM32MP157C has 2 DSI physic lanes, so you will not be able to have a full HD resolution in output.

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.
LLe.1
LLe.1Author
Associate
July 21, 2022

Thanks @Erwan SZYMANSKI​ for the quick reply. I am surprise and appreciate it deeply.

Im using ostl version 3.1.8 linux kernel version 5.4.31. Should I do an upgrade or it is enough?

Below is my device tree, it seems DSI driver does not see all prerequisites and thus does not start communicating.

#include <dt-bindings/input/ti-drv260x.h>
 
/ {
 
 panel: panel {
 compatible = "lg,lp120up1";
 power-supply = <&v3v3>;
 status = "okay";
 backlight = <&backlight>;
 port {
 edp_panel_in: endpoint {
 remote-endpoint = <&edp_bridge_out>;
 };
 
 };
 };
 
 
};
 
&i2c2 {
 
 edp_bridge: edp_bridge@2c {
 status = "okay";
 compatible = "ti,sn65dsi86";
 #address-cells = <1>;
 #size-cells = <0>;
 reg = <0x2c>;
 
 enable-gpios = <&gpiob 9 GPIO_ACTIVE_HIGH>;
 
 vccio-supply = <&v1v8_reg>;
 vcca-supply = <&v1v2_reg>;
 vpll-supply = <&v1v8_reg>;
 vcc-supply = <&v1v2_reg>;
 
 clock-names = "refclk";
 clocks = <&input_refclk>;
 
 ports {
 #address-cells = <1>;
 #size-cells = <0>;
 
 port@0 {
 reg = <0>;
 
 edp_bridge_in: endpoint {
 remote-endpoint = <&dsi_out>;
 };
 };
 
 port@1 {
 reg = <1>;
 edp_bridge_out: endpoint {
 data-lanes = <0 1>;
 lane-polarities = <0 0>;
 remote-endpoint = <&edp_panel_in>;
 };
 };
 };
 
 };
};
 
 
&dsi {
 #address-cells = <1>;
 #size-cells = <0>;
 status = "okay";
 
 ports {
 #address-cells = <1>;
 #size-cells = <0>;
 
 port@0 {
 reg = <0>;
 dsi_in: endpoint {
 remote-endpoint = <&ltdc_ep0_out>;
 };
 };
 
 port@1 {
 reg = <1>;
 dsi_out: endpoint {
 remote-endpoint = <&edp_bridge_in>;
 data-lanes = <0 1 2 3>;
 attach-bridge;
 };
 };
 };
 
};
 
&ltdc {
 status = "okay";
 
 port {
 #address-cells = <1>;
 #size-cells = <0>;
 
 ltdc_ep0_out: endpoint@0 {
 reg = <0>;
 remote-endpoint = <&dsi_in>;
 };
 };
};

Erwan SZYMANSKI
Technical Moderator
July 21, 2022

Hi @LLe.1​,

As far as I am concerned, I would advise you to up to OSTL 4.0, to avoid any backport from 4.0 to 3.1 if needed. But this is just in prevention, maybe you will be able to do everything you want without any problem with 3.1. It is up to you !

Having a quick look at your device tree, as I said our DSI has only 2 lanes. I think you will have to replace:

"data-lanes = <0 1 2 3>" by "data-lanes = <0 1>"

Can you put me maybe some logs where you have errors that can help me to debug with you ?

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.
LLe.1
LLe.1Author
Associate
July 21, 2022

@Erwan SZYMANSKI​  that would be so kind of you willing to help debug this.

It does not print any error message out but I have my own debug logs and it seems like dsi-stm driver is still searching for panel instead of bridge for some reason. And as there is no panel, dsi does not start its operation.

(All ERRORs below are my own debug logs)

root@myPOD:~# dmesg | grep ERROR
 
[ 1.038038] [drm:dw_mipi_dsi_stm_probe] *ERROR* DW: stm dsi probe
 
[ 1.041566] [drm:panel_simple_probe] *ERROR* start to add panel
 
[ 1.122729] [drm:dw_mipi_dsi_stm_probe] *ERROR* DW: stm dsi probe
 
[ 1.124892] [drm:panel_simple_probe] *ERROR* start to add panel
 
[ 1.149027] [drm:dw_mipi_dsi_stm_probe] *ERROR* DW: stm dsi probe
 
[ 1.151215] [drm:panel_simple_probe] *ERROR* start to add panel
 
[ 1.217838] [drm:dw_mipi_dsi_stm_probe] *ERROR* DW: stm dsi probe
 
[ 1.219367] [drm:of_drm_find_panel] *ERROR* ADD: cannot find any
 
[ 1.219416] [drm:drm_of_find_panel_or_bridge] *ERROR* DRM no panel found
 
[ 1.220582] [drm:panel_simple_probe] *ERROR* start to add panel
 
[ 1.320740] [drm:dw_mipi_dsi_stm_probe] *ERROR* DW: stm dsi probe
 
[ 1.326817] [drm:of_drm_find_panel] *ERROR* ADD: cannot find any
 
[ 1.331672] [drm:drm_of_find_panel_or_bridge] *ERROR* DRM no panel found
 
[ 1.339546] [drm:panel_simple_probe] *ERROR* start to add panel
 
[ 1.947582] [drm:ti_sn_bridge_probe] *ERROR* probe bridge
 
[ 1.951675] [drm:ti_sn_bridge_probe] *ERROR* check i2c ok, proceed
 
[ 1.957926] [drm:ti_sn_bridge_probe] *ERROR* init i2c client ok
 
[ 1.963739] [drm:of_drm_find_panel] *ERROR* ADD: cannot find any
 
[ 1.969819] [drm:drm_of_find_panel_or_bridge] *ERROR* DRM no panel found
 
[ 1.976564] [drm:ti_sn_bridge_probe] *ERROR* panel node step 1 nOK, err code: -517
 
[ 2.115607] [drm:dw_mipi_dsi_stm_probe] *ERROR* DW: stm dsi probe
 
[ 2.120864] [drm:dw_mipi_dsi_stm_probe] *ERROR* DW: stm dsi start generic dsi probe
 
[ 2.128194] [drm:__dw_mipi_dsi_probe] *ERROR* DW: dsi probe
 
[ 2.133915] [drm:__dw_mipi_dsi_probe] *ERROR* DW: dsi probe ok
 
[ 2.139679] [drm:dw_mipi_dsi_stm_probe] *ERROR* DW: stm dsi ok
 
[ 2.146438] [drm:of_drm_find_panel] *ERROR* ADD: cannot find any
 
[ 2.153807] [drm:drm_of_find_panel_or_bridge] *ERROR* DRM no panel found
 
[ 2.160486] [drm:panel_simple_probe] *ERROR* start to add panel
 
[ 2.166493] [drm:panel_simple_probe] *ERROR* panel init done, start to drm add panel
 
[ 2.173145] [drm:drm_panel_add] *ERROR* ADD: add pannel to the list
 
[ 2.179381] [drm:panel_simple_probe] *ERROR* add to drm panel ok
 
-> NOTE: PANEL ON ROOT NODE ADD
 
 
 
[ 2.350320] [drm:ti_sn_bridge_probe] *ERROR* probe bridge
 
[ 2.354374] [drm:ti_sn_bridge_probe] *ERROR* check i2c ok, proceed
 
[ 2.360719] [drm:ti_sn_bridge_probe] *ERROR* init i2c client ok
 
[ 2.366482] [drm:of_drm_find_panel] *ERROR* ADD: loop through list of panel,panel:panel, dev name:panel
 
[ 2.375957] [drm:of_drm_find_panel] *ERROR* ADD: panel found
 
[ 2.381667] [drm:ti_sn_bridge_probe] *ERROR* find panel or bridge ok
 
[ 2.388208] [drm:ti_sn_bridge_probe] *ERROR* enable gpio ok
 
[ 2.394020] [drm:ti_sn_bridge_probe] *ERROR* regulator ok
 
[ 2.399275] [drm:ti_sn_bridge_probe] *ERROR* parse dsi host ok
 
[ 2.406063] [drm:ti_sn_bridge_probe] *ERROR* add bridge
 
-> NOTE: BRIDGE INIT DONE OK
 
[ 2.411543] [drm:of_drm_find_panel] *ERROR* ADD: loop through list of panel,panel:panel, dev name:dsi
 
[ 2.419787] [drm:of_drm_find_panel] *ERROR* ADD: cannot find any
 
[ 2.425784] [drm:drm_of_find_panel_or_bridge] *ERROR* DRM no panel found
 
[ 2.434369] [drm:of_drm_find_panel] *ERROR* ADD: loop through list of panel,panel:panel, dev name:dsi
 
[ 2.442311] [drm:of_drm_find_panel] *ERROR* ADD: cannot find any
 
[ 2.448339] [drm:drm_of_find_panel_or_bridge] *ERROR* DRM no panel found
 
[ 7.318691] [drm:of_drm_find_panel] *ERROR* ADD: loop through list of panel,panel:panel, dev name:dsi
 
[ 7.337999] [drm:of_drm_find_panel] *ERROR* ADD: cannot find any
 
[ 7.342682] [drm:drm_of_find_panel_or_bridge] *ERROR* DRM no panel found
 
[ 22.145918] [drm:of_drm_find_panel] *ERROR* ADD: loop through list of panel,panel:panel, dev name:dsi
 
[ 22.160483] [drm:of_drm_find_panel] *ERROR* ADD: cannot find any
 
[ 22.165823] [drm:drm_of_find_panel_or_bridge] *ERROR* DRM no panel found
 
[ 22.535922] [drm:of_drm_find_panel] *ERROR* ADD: loop through list of panel,panel:panel, dev name:dsi
 
[ 22.550233] [drm:of_drm_find_panel] *ERROR* ADD: cannot find any
 
[ 22.555338] [drm:drm_of_find_panel_or_bridge] *ERROR* DRM no panel found
 
root@myPOD:~#

LLe.1
LLe.1Author
Associate
July 21, 2022

@Erwan SZYMANSKI​ so more detail error here:

drm/drm_of.c

 if (bridge) {
 if (ret) {
 
 *bridge = of_drm_find_bridge(remote);
 if (*bridge){
 ret = 0;
 DRM_ERROR("DRM bridge found \n");
 }else
 DRM_ERROR("DRM get brige error \n"); ---> EXE GOES HERE
 } else {
 DRM_ERROR("DRM bridge not retrieved because of ret error \n");
 *bridge = NULL;
 }
 
 }else
 DRM_ERROR("DRM bridge pointer NULL \n");

LLe.1
LLe.1Author
Associate
July 21, 2022

My panel is not exactly like the one mentioned in device tree above, I am using a normal 24 inch LCD monitor with a display port as input. Does it matter? I suppose all simple_panel should work similarly...

LLe.1
LLe.1Author
Associate
July 21, 2022

For the ti-sn65dsi86.c driver, the ti_sn_bridge_probe func finishes successfully but after that no other function is called. I suppose at least ti_sn_bridge_attach or ti_sn_bridge_enable should be called but they are not.

LLe.1
LLe.1Author
Associate
July 21, 2022

I applied this patch to ti-sn65dsi86.c and it helps finding the panel root node but thats all

https://patchwork.kernel.org/project/dri-devel/patch/20191207203553.286017-4-robdclark@gmail.com/

Erwan SZYMANSKI
Technical Moderator
July 21, 2022

@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.
LLe.1
LLe.1Author
Associate
July 21, 2022

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

Erwan SZYMANSKI
Technical Moderator
July 21, 2022

@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.
Erwan SZYMANSKI
Technical Moderator
July 21, 2022

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.
LLe.1
LLe.1Author
Associate
July 22, 2022

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.

Erwan SZYMANSKI
Technical Moderator
July 22, 2022

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.