mipi-dsi signal problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mipi-dsi signal problem

2,580 Views
hansung_jung
Contributor III

Hi,

I want to use sn65dsi84 to display single dsi as dual lvds on my custom board.

My development environment is imx8qxp in linux kernel 5.15.71.

The problem is that no mipi-dsi signal on board.

I referred to the settings from the imx8qxp-mek.dts file.

This is configuration of my dts.

-------------------------------

&mipi1_dphy {
        status = "okay";
};

&mipi1_dsi_host {
status = "okay";
fsl,clock-drop-level = <2>;
 
panel@0 {
        compatible = "panel-lvds";
 
        /* Physical dimensions of active area */
        width-mm = <338>;
        height-mm = <270>;
 
        data-mapping = "vesa-24";
 
        panel-timing {
            /* the hactive and porches in the datasheet are for a single LVDS channel */
            /* since we use dual LVDS channel, Horizontal paramter and clock must double*/
            clock-frequency = <41238000>;
            hactive = <640>;
            hsync-len = <10>;
            hfront-porch = <70>;
            hback-porch = <70>;
 
            vactive = <1024>;
            vsync-len = <10>;
            vfront-porch = <5>;
            vback-porch = <5>;
        };
 
        ports {
            #address-cells = <1>;
            #size-cells = <0>;
            port@0 {
                reg = <0>;
                dual-lvds-odd-pixels;
                panel_in_a: endpoint {
                    remote-endpoint = <&bridge_out_a>;
                };
            };
            port@1 {
                reg = <1>;
                dual-lvds-even-pixels;
                panel_in_b: endpoint {
                    remote-endpoint = <&bridge_out_b>;
                };
            };
        };
    };
 
    port {
        dsi_out_port: endpoint {
            remote-endpoint = <&bridge_in>;
            data-lanes = <0 1 2 3>;
        };
    };
};
-------------------------------
However, I cannot get a signal from mipi-dsi.
Is there any missing point?
Thank you in advance.
0 Kudos
Reply
14 Replies

1,689 Views
sean33996
Contributor I

I get the similar error

[drm:drm_bridge_attach] *ERROR* failed to attach bridge /bus@56220000/dsi_host@56228000 to encoder DSI-89: -517

 

dts:

&mipi0_dphy {
status = "okay";
};
 
&mipi0_dsi_host {
status = "okay";
 
ports {
/delete-node/ port@1;
 
port@1 {
reg = <1>;
mipi0_dsi_out: endpoint {
remote-endpoint = <&edp_bridge_in>;
};
};
};
 
};

 

0 Kudos
Reply

1,688 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @sean33996 

Modify your edp driver like this patch about lt9211, -517 is caused by incorrect driver sequence.

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Patch-for-LT9211-bridge-on-i-MX/ta-p/168...

0 Kudos
Reply

2,541 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @hansung_jung 

Please refer below rules.

1.Define sn65dsi84 in i2c node

bridge@2c {
		compatible = "ti,sn65dsi84";
		reg = <0x2c>;
		enable-gpios = <&gpiof 15 GPIO_ACTIVE_HIGH>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				bridge_in: endpoint {
					remote-endpoint = <&dsi_out>;
					data-lanes = <1 2>;
				};
			};

			port@2 {
				reg = <2>;
				bridge_out: endpoint {
					remote-endpoint = <&panel_in_lvds>;
				};
			};
		};
	};

 2. Define panel-lvds in root node , not mipi dsi node

/ {
 
}
panel@0 {
        compatible = "panel-lvds";
 
        /* Physical dimensions of active area */
        width-mm = <338>;
        height-mm = <270>;
 
        data-mapping = "vesa-24";
 
        panel-timing {
            /* the hactive and porches in the datasheet are for a single LVDS channel */
            /* since we use dual LVDS channel, Horizontal paramter and clock must double*/
            clock-frequency = <41238000>;
            hactive = <640>;
            hsync-len = <10>;
            hfront-porch = <70>;
            hback-porch = <70>;
 
            vactive = <1024>;
            vsync-len = <10>;
            vfront-porch = <5>;
            vback-porch = <5>;
        };
 
        ports {
            #address-cells = <1>;
            #size-cells = <0>;
            port@0 {
                reg = <0>;
                dual-lvds-odd-pixels;
                panel_in_a: endpoint {
                    remote-endpoint = <&bridge_out_a>;
                };
            };
            port@1 {
                reg = <1>;
                dual-lvds-even-pixels;
                panel_in_b: endpoint {
                    remote-endpoint = <&bridge_out_b>;
                };
            };
        };
    };
 
    port {
        dsi_out_port: endpoint {
            remote-endpoint = <&bridge_in>;
            data-lanes = <0 1 2 3>;
        };
    };
};

 3.Define mipi dsi out node in mipi1_dsi_host

&mipi1_dsi_host {
	status = "okay";

	ports {
		port@1 {
			reg = <1>;
			mipi1_adv_out: endpoint {
				remote-endpoint = <&adv7535_1_in>;
			};
		};
	};
};

 

0 Kudos
Reply

2,529 Views
hansung_jung
Contributor III

Thanks for your reply.

I tried running it after making some modifications, but it's not working properly.

Error running "drm_of_find_panel_or_bridge" function on "ti-sn65dsi83.c".

More specifically, it happened in the "of_drm_find_panel".

I think it's because of the incorrect kernel configuration.

So could you please check the attached config file(config.txt) and let me know what needs to be revised?

 

 

0 Kudos
Reply

2,524 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @hansung_jung 

Please enable panel-lvds driver.

CONFIG_DRM_PANEL_LVDS 

 

0 Kudos
Reply

2,519 Views
hansung_jung
Contributor III

Thanks for the reply.

Following your guide, there are no more errors.

However, it still doesn't work.

When I checked the dsi line with the oscilloscope, I couldn't see the signal.

Is there anything else I can look at about why the dsi signal is not transmitting?

And below is current drm list.

Also refer to the attached dts file(sn65dsi84.dts), panel-simple.c and kernel config(config.txt).

----------------------------

root@:~# ls -l /sys/class/drm/
total 0
lrwxrwxrwx 1 root root 0 Apr 28 17:42 card0 -> ../../devices/platform/display-subsystem/drm/card0
lrwxrwxrwx 1 root root 0 Apr 28 17:42 renderD128 -> ../../devices/platform/display-subsystem/drm/renderD128
-r--r--r-- 1 root root 4096 Apr 28 17:42 version
root@:~# ls -l /sys/class/drm/card0/
dev device/ power/ subsystem/ uevent
root@:~# ls -l /sys/class/drm/card0/
total 0
-r--r--r-- 1 root root 4096 May 5 09:56 dev
lrwxrwxrwx 1 root root 0 May 5 09:56 device -> ../../../display-subsystem
drwxr-xr-x 2 root root 0 May 5 09:56 power
lrwxrwxrwx 1 root root 0 Apr 28 17:42 subsystem -> ../../../../../class/drm
-rw-r--r-- 1 root root 4096 Apr 28 17:42 uevent

0 Kudos
Reply

2,461 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @hansung_jung 

Please use one typical timing for test and provide kernel log.

0 Kudos
Reply

2,408 Views
hansung_jung
Contributor III

Thanks for your reply.

Follwing your guide, but stiil it doesn't display.

Please check attached log(sn65dsi84_lvds.log).

And the previous panel-simple method was not possible, so I changed the driver to panel-lvds.

0 Kudos
Reply

2,402 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @hansung_jung 

Can you add more log print in sn65dsi83 driver and enable debug flag in drivers/gpu/drm/bridge/nwl-dsi.c ? Please check MIPI HOST driver status.

0 Kudos
Reply

2,370 Views
hansung_jung
Contributor III

Thanks for your reply.

I tried to enable debug flag in nwl-dsi.c like below, but it doesn't show debug message.

hansung_jung_0-1714039680071.png

So could you please let me know how to enable debug flag in driver?

 

0 Kudos
Reply

2,259 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @hansung_jung 

The log should contain 'imx-drm display-subsystem', need check dts nodes.

[    3.155378] imx-drm display-subsystem: bound imx-drm-dpu-bliteng.2 (ops dpu_bliteng_ops)
[    3.163871] imx-drm display-subsystem: bound imx-dpu-crtc.0 (ops dpu_crtc_ops)
[    3.171546] imx-drm display-subsystem: bound imx-dpu-crtc.1 (ops dpu_crtc_ops)
[    3.179325] imx-drm display-subsystem: bound bus@56220000:ldb@562210e0 (ops imx8qxp_ldb_ops)
[    3.187908] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /bus@56220000/dsi_host@56228000 to encoder DSI-89: -19
[    3.199019] imx-drm display-subsystem: bound 56228000.dsi_host (ops nwl_dsi_component_ops)
[    3.207751] imx-drm display-subsystem: bound bus@56220000:ldb@562410e0 (ops imx8qxp_ldb_ops)
[    3.216240] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /bus@56220000/dsi_host@56248000 to encoder DSI-89: -19
[    3.227335] imx-drm display-subsystem: bound 56248000.dsi_host (ops nwl_dsi_component_ops)
[    3.236054] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 1

 

Please include evk dts in your dts or add dc/dpu node like mek.dts

0 Kudos
Reply

2,223 Views
hansung_jung
Contributor III

Thanks for your reply.

Referring to imx8qxp-ss-lvds.dtsi and imx8qxp-ss-dc.dtsi, I tried to activate 'imx-drm display-subsystem' in 2 ways, but it is failed.

The first way is to add 'display-subsystem' in existing dts.

Please refer to the attached subsystem.dts.

In this case, 'imx-drm display-subsystem' log is not displayed.

 

The second way is to use dpu, refer to the attached 'dpu_subsystem.dts'.

This causes kernel panic.

 

I am not familiar with it.

So would you please let me know how to enable 'display-subsystem'.

 

0 Kudos
Reply

2,079 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @hansung_jung 

Are you using linux-imx? You can modify imx8qxp-mek.dts and add this video bridge based on ADV7535. Then you don't need modify any driver config and device tree node.

 

0 Kudos
Reply

1,983 Views
hansung_jung
Contributor III

Thanks to your reply.

As you said, I use linux-imx.

However, base image is different from imx8qxp-mek.dts.

Even I tried to reference the imx8qxp-mek image as much as possible, but display-subsystem log is not displayed.

I think due to a slight difference, my board doesn't work.

Anyway, thanks to your help, it is very helpful to me.

0 Kudos
Reply