iMX8MM: Connect Display(with ili9881c driver ic) via MIPI-DSI with iMX8MM

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

iMX8MM: Connect Display(with ili9881c driver ic) via MIPI-DSI with iMX8MM

1,729 Views
pzauner
Contributor I

Hello,

I'm trying to connect the WF50DTYA3MNN0-WSR Display with an ili9881c driver ic to my iMX8MM board. I already saw there is an existing driver. So just adding the driver to the linux config and adding it to the devicetree should be enough. The Display is only connected with the four Mipi lanes, the clock and the reset gpio, but I guess that should be enough. VCI(3V3) voltage comes from the processor and IOVCC(1V8) and Backlight (21V) are fed externally.

https://github.com/embeddedartists/linux-imx/blob/ea_5.4.47/arch/arm64/boot/dts/freescale/imx8mm-ea-...

This is the Devicetree I'm using and below the change I made. I commented out the mipi-hdmi bridge, because I don't use it anymore and added a new pinctrl because we use this pin as reset gpio and have to change the function.

 

 

 

...
       /*
	adv_bridge: adv7535@3d {
		compatible = "adi,adv7533";
		reg = <0x3d>;
		adi,dsi-lanes# = <4>;
		status = "disabled";
	
		port {
			adv7535_from_dsim: endpoint {
				remote-endpoint = <&dsim_to_adv7535>;
			};
		};
	};
	*/
};

&lcdif {
	status = "okay";
};

&mipi_dsi {
	status = "okay";	

	/*
	port@1 {
		dsim_to_adv7535: endpoint {
			remote-endpoint = <&adv7535_from_dsim>;
			attach-bridge;
		};
	};
        */
	
	ports{
		#address-cells = <1>;
		#size-cells = <0>;

		port@1 {
			reg = <1>;
			mipi_out: endpoint {
				remote-endpoint = <&panel_in>;
			};
		};
	};

	panel@0 {
		compatible = "bananapi,lhr050h41", "ilitek,ili9881c"; 
		reg = <0>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_reset>;
		reset-gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
		status="okay";

                 port {
			panel_in: endpoint {
				remote-endpoint = <&mipi_out>;
			};
		};
	};
};
&iomuxc {
	pinctrl-names = "default";
	imx8mmea-ucom-kit {
                pinctrl_reset: resetgrp {
			fsl,pins = <
				MX8MM_IOMUXC_SPDIF_TX_GPIO5_IO3		0x16
			>;
		};
	};
};

 

 

 

 

If I keep the bindings with the ports I get this as output:

[ 2.292567] imx-drm soc@0:bus@32c00000:display-subsystem: bound imx-lcdif-crtc.0 (ops lcdif_crtc_ops)
[ 2.301850] ------------[ cut here ]------------
[ 2.306476] WARNING: CPU: 0 PID: 124 at drivers/reset/core.c:556 __reset_control_get_internal+0x64/0x110
[ 2.315953] Modules linked in:
[ 2.319013] CPU: 0 PID: 124 Comm: kworker/0:3 Not tainted 5.4.47-ea-5.4.47+gca870f01605d #1
[ 2.327362] Hardware name: Embedded Artists i.MX8MM uCOM Kit (DT)
[ 2.333460] Workqueue: events deferred_probe_work_func
[ 2.338600] pstate: 20000005 (nzCv daif -PAN -UAO)
[ 2.343392] pc : __reset_control_get_internal+0x64/0x110
[ 2.348703] lr : __of_reset_control_get+0x158/0x1b0
[ 2.353580] sp : ffff80001224b830
[ 2.356892] x29: ffff80001224b830 x28: 0000000000000000
[ 2.362206] x27: ffff0000136663b8 x26: 0000000000000001
[ 2.367517] x25: 0000000000000000 x24: 0000000000000001
[ 2.372829] x23: 0000000000000000 x22: ffff000012836d80
[ 2.378141] x21: 0000000000000005 x20: ffff000012836da0
[ 2.383454] x19: ffff0000128a6f00 x18: 0000000000000010
[ 2.388766] x17: 0000000000000000 x16: 0000000000000000
[ 2.394078] x15: ffff00001262ca70 x14: 72632d666964636c
[ 2.399390] x13: 2d786d6920646e75 x12: 0000000000000000
[ 2.404702] x11: 0000000000000020 x10: 0101010101010101
[ 2.410015] x9 : 0000000000000004 x8 : 7f7f7f7f7f7f7f7f
[ 2.415327] x7 : 766f21ff726b6b64 x6 : 0000000080237077
[ 2.420637] x5 : fffffdfffe71d580 x4 : 0000000000000000
[ 2.425950] x3 : 0000000000000001 x2 : 0000000000000005
[ 2.431262] x1 : 0000000000000005 x0 : 0000000000000000
[ 2.436576] Call trace:
[ 2.439025] __reset_control_get_internal+0x64/0x110
[ 2.443990] __of_reset_control_get+0x158/0x1b0
[ 2.448521] of_reset_control_array_get+0xac/0x1a0
[ 2.453314] imx_sec_dsim_bind+0x208/0x348
[ 2.457412] component_bind_all+0xfc/0x258
[ 2.461509] imx_drm_bind+0xb8/0x150
[ 2.465085] try_to_bring_up_master+0x164/0x1c8
[ 2.469617] __component_add+0xa0/0x168
[ 2.473453] component_add+0x10/0x18
[ 2.477029] imx_sec_dsim_probe+0x4c/0x70
[ 2.481041] platform_drv_probe+0x50/0xa0
[ 2.485051] really_probe+0xd4/0x318
[ 2.488627] driver_probe_device+0x54/0xe8
[ 2.492722] __device_attach_driver+0x80/0xb8
[ 2.497081] bus_for_each_drv+0x74/0xc0
[ 2.500917] __device_attach+0xdc/0x138
[ 2.504754] device_initial_probe+0x10/0x18
[ 2.508935] bus_probe_device+0x90/0x98
[ 2.512771] deferred_probe_work_func+0x64/0x98
[ 2.517306] process_one_work+0x198/0x320
[ 2.521316] worker_thread+0x1f0/0x420
[ 2.525066] kthread+0xf0/0x120
[ 2.528209] ret_from_fork+0x10/0x18
[ 2.531784] ---[ end trace 118d17503cfae06b ]---
[ 2.536459] ------------[ cut here ]------------
[ 2.541081] WARNING: CPU: 0 PID: 124 at drivers/reset/core.c:556 __reset_control_get_internal+0x64/0x110
[ 2.550558] Modules linked in:
[ 2.553615] CPU: 0 PID: 124 Comm: kworker/0:3 Tainted: G W 5.4.47-ea-5.4.47+gca870f01605d #1
[ 2.563351] Hardware name: Embedded Artists i.MX8MM uCOM Kit (DT)
[ 2.569446] Workqueue: events deferred_probe_work_func
[ 2.574583] pstate: 20000005 (nzCv daif -PAN -UAO)
[ 2.579373] pc : __reset_control_get_internal+0x64/0x110
[ 2.584686] lr : __of_reset_control_get+0x158/0x1b0
[ 2.589561] sp : ffff80001224b830
[ 2.592872] x29: ffff80001224b830 x28: 0000000000000000
[ 2.598185] x27: ffff0000136663b8 x26: 0000000000000001
[ 2.603497] x25: 0000000000000000 x24: 0000000000000001
[ 2.608810] x23: 0000000000000000 x22: ffff000012839380
[ 2.614122] x21: 0000000000000009 x20: ffff0000128393a0
[ 2.619434] x19: ffff0000128a7000 x18: 0000000000000010
[ 2.624747] x17: 0000000000000000 x16: 0000000000000000
[ 2.630059] x15: ffff00001262ca70 x14: 72632d666964636c
[ 2.635371] x13: 2d786d6920646e75 x12: 0000000000000000
[ 2.640684] x11: 0000000000000020 x10: 0101010101010101
[ 2.645996] x9 : 0000000000000004 x8 : 7f7f7f7f7f7f7f7f
[ 2.651308] x7 : 766f21ff726b6b64 x6 : 0000000080237077
[ 2.656621] x5 : fffffdfffe71d5c8 x4 : 0000000000000000
[ 2.661933] x3 : 0000000000000001 x2 : 0000000000000009
[ 2.667244] x1 : 0000000000000009 x0 : 0000000000000000
[ 2.672557] Call trace:
[ 2.675003] __reset_control_get_internal+0x64/0x110
[ 2.679966] __of_reset_control_get+0x158/0x1b0
[ 2.684497] of_reset_control_array_get+0xac/0x1a0
[ 2.689290] imx_sec_dsim_bind+0x208/0x348
[ 2.693388] component_bind_all+0xfc/0x258
[ 2.697485] imx_drm_bind+0xb8/0x150
[ 2.701060] try_to_bring_up_master+0x164/0x1c8
[ 2.705589] __component_add+0xa0/0x168
[ 2.709425] component_add+0x10/0x18
[ 2.713001] imx_sec_dsim_probe+0x4c/0x70
[ 2.717012] platform_drv_probe+0x50/0xa0
[ 2.721021] really_probe+0xd4/0x318
[ 2.724596] driver_probe_device+0x54/0xe8
[ 2.728692] __device_attach_driver+0x80/0xb8
[ 2.733047] bus_for_each_drv+0x74/0xc0
[ 2.736884] __device_attach+0xdc/0x138
[ 2.740718] device_initial_probe+0x10/0x18
[ 2.744901] bus_probe_device+0x90/0x98
[ 2.748736] deferred_probe_work_func+0x64/0x98
[ 2.753269] process_one_work+0x198/0x320
[ 2.757277] worker_thread+0x1f0/0x420
[ 2.761026] kthread+0xf0/0x120
[ 2.764168] ret_from_fork+0x10/0x18
[ 2.767741] ---[ end trace 118d17503cfae06c ]---
[ 2.772408] ------------[ cut here ]------------
[ 2.777028] WARNING: CPU: 0 PID: 124 at drivers/reset/core.c:556 __reset_control_get_internal+0x64/0x110
[ 2.786503] Modules linked in:
[ 2.789560] CPU: 0 PID: 124 Comm: kworker/0:3 Tainted: G W 5.4.47-ea-5.4.47+gca870f01605d #1
[ 2.799297] Hardware name: Embedded Artists i.MX8MM uCOM Kit (DT)
[ 2.805391] Workqueue: events deferred_probe_work_func
[ 2.810528] pstate: 20000005 (nzCv daif -PAN -UAO)
[ 2.815321] pc : __reset_control_get_internal+0x64/0x110
[ 2.820633] lr : __of_reset_control_get+0x158/0x1b0
[ 2.825507] sp : ffff80001224b830
[ 2.828821] x29: ffff80001224b830 x28: 0000000000000000
[ 2.834133] x27: ffff0000136663b8 x26: 0000000000000001
[ 2.839445] x25: 0000000000000000 x24: 0000000000000001
[ 2.844757] x23: 0000000000000000 x22: ffff000012839980
[ 2.850068] x21: 0000000000000001 x20: ffff0000128399a0
[ 2.855380] x19: ffff0000128a7180 x18: 0000000000000010
[ 2.860692] x17: 0000000000000000 x16: 0000000000000000
[ 2.866005] x15: ffff00001262ca70 x14: 72632d666964636c
[ 2.871317] x13: 2d786d6920646e75 x12: 0000000000000000
[ 2.876629] x11: 0000000000000020 x10: 0101010101010101
[ 2.881942] x9 : 0000000000000004 x8 : 7f7f7f7f7f7f7f7f
[ 2.887254] x7 : 766f21ff726b6b64 x6 : 0000000080237077
[ 2.892567] x5 : fffffdfffe71d618 x4 : 0000000000000000
[ 2.897879] x3 : 0000000000000001 x2 : 0000000000000001
[ 2.903190] x1 : 0000000000000001 x0 : 0000000000000000
[ 2.908502] Call trace:
[ 2.910949] __reset_control_get_internal+0x64/0x110
[ 2.915914] __of_reset_control_get+0x158/0x1b0
[ 2.920446] of_reset_control_array_get+0xac/0x1a0
[ 2.925237] imx_sec_dsim_bind+0x208/0x348
[ 2.929336] component_bind_all+0xfc/0x258
[ 2.933432] imx_drm_bind+0xb8/0x150
[ 2.937006] try_to_bring_up_master+0x164/0x1c8
[ 2.941537] __component_add+0xa0/0x168
[ 2.945371] component_add+0x10/0x18
[ 2.948947] imx_sec_dsim_probe+0x4c/0x70
[ 2.952956] platform_drv_probe+0x50/0xa0
[ 2.956964] really_probe+0xd4/0x318
[ 2.960539] driver_probe_device+0x54/0xe8
[ 2.964635] __device_attach_driver+0x80/0xb8
[ 2.968992] bus_for_each_drv+0x74/0xc0
[ 2.972827] __device_attach+0xdc/0x138
[ 2.976663] device_initial_probe+0x10/0x18
[ 2.980846] bus_probe_device+0x90/0x98
[ 2.984683] deferred_probe_work_func+0x64/0x98
[ 2.989212] process_one_work+0x198/0x320
[ 2.993220] worker_thread+0x1f0/0x420
[ 2.996968] kthread+0xf0/0x120
[ 3.000110] ret_from_fork+0x10/0x18
[ 3.003683] ---[ end trace 118d17503cfae06d ]---
[ 3.008331] imx_sec_dsim_drv 32e10000.mipi_dsi: no invalid reset control exists
[ 3.015656] imx-drm soc@0:bus@32c00000:display-subsystem: failed to bind 32e10000.mipi_dsi (ops imx_sec_dsim_ops): -22
[ 3.026450] imx-drm soc@0:bus@32c00000:display-subsystem: master bind failed: -22
[ 3.033967] imx_sec_dsim_drv: probe of 32e10000.mipi_dsi failed with error -22

root@imx8mmea-ucom:~# dmesg | grep display
[ 1.280880] imx-drm soc@0:bus@32c00000:display-subsystem: bound imx-lcdif-crtc.0 (ops lcdif_crtc_ops)
[ 2.295769] imx-drm soc@0:bus@32c00000:display-subsystem: bound imx-lcdif-crtc.0 (ops lcdif_crtc_ops)
[ 3.018821] imx-drm soc@0:bus@32c00000:display-subsystem: failed to bind 32e10000.mipi_dsi (ops imx_sec_dsim_ops): -22
[ 3.029618] imx-drm soc@0:bus@32c00000:display-subsystem: master bind failed: -22
root@imx8mmea-ucom:~# dmesg | grep mipi
[ 3.011497] imx_sec_dsim_drv 32e10000.mipi_dsi: no invalid reset control exists
[ 3.018821] imx-drm soc@0:bus@32c00000:display-subsystem: failed to bind 32e10000.mipi_dsi (ops imx_sec_dsim_ops): -22
[ 3.037139] imx_sec_dsim_drv: probe of 32e10000.mipi_dsi failed with error -22

When I change the device tree to

 

 

 

...
       /*
	adv_bridge: adv7535@3d {
		compatible = "adi,adv7533";
		reg = <0x3d>;
		adi,dsi-lanes# = <4>;
		status = "disabled";
	
		port {
			adv7535_from_dsim: endpoint {
				remote-endpoint = <&dsim_to_adv7535>;
			};
		};
	};
	*/
};

&lcdif {
	status = "okay";
};

&mipi_dsi {
	status = "okay";	

	/*
	port@1 {
		dsim_to_adv7535: endpoint {
			remote-endpoint = <&adv7535_from_dsim>;
			attach-bridge;
		};
	};
        */
	
	panel@0 {
		compatible = "bananapi,lhr050h41", "ilitek,ili9881c"; 
		reg = <0>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_reset>;
		reset-gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
		status="okay";
	};
};
&iomuxc {
	pinctrl-names = "default";
	imx8mmea-ucom-kit {
                pinctrl_reset: resetgrp {
			fsl,pins = <
				MX8MM_IOMUXC_SPDIF_TX_GPIO5_IO3		0x16
			>;
		};
	};
};

 

 

 

 

Without the ports I get further. I also had to add dsi->mode_flags = MIPI_DSI_MODE_VIDEO_SYNC_PULSE | MIPI_DSI_MODE_VIDEO; in the panel-ili9881.c file because I got the error "unsupported dsi mode" from sec-dsim.c.

My output ended up with this:

root@imx8mmea-ucom:~# dmesg | grep mipi
[ 1.281535] imx_sec_dsim_drv 32e10000.mipi_dsi: version number is 0x1060200
[ 1.289766] imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[ 1.298098] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -517
[ 2.322808] imx_sec_dsim_drv 32e10000.mipi_dsi: version number is 0x1060200
[ 2.331028] ili9881c-dsi 32e10000.mipi_dsi.0: 32e10000.mipi_dsi.0 supply power not found, using dummy regulator
[ 2.341255] imx-drm soc@0:bus@32c00000:display-subsystem: bound 32e10000.mipi_dsi (ops imx_sec_dsim_ops)
[ 2.364511] imx_sec_dsim_drv 32e10000.mipi_dsi: no bus formats assigned by connector
[ 2.696120] imx_sec_dsim_drv 32e10000.mipi_dsi: wait pkthdr tx done time out
[ 2.696125] imx_sec_dsim_drv 32e10000.mipi_dsi: panel prepare failed: -16
[ 2.713779] imx_sec_dsim_drv 32e10000.mipi_dsi: no bus formats assigned by connector
[ 2.741480] imx_sec_dsim_drv 32e10000.mipi_dsi: no bus formats assigned by connector
[ 5.987590] imx_sec_dsim_drv 32e10000.mipi_dsi: no bus formats assigned by connector

I also checked the mipi clock there, but nothing happens. Only on the reset gpio is activity detected.

I also tried to change the driver to the rm67191 and adapt it according to the ili9881c.

 

 

 

...
       /*
	adv_bridge: adv7535@3d {
		compatible = "adi,adv7533";
		reg = <0x3d>;
		adi,dsi-lanes# = <4>;
		status = "disabled";
	
		port {
			adv7535_from_dsim: endpoint {
				remote-endpoint = <&dsim_to_adv7535>;
			};
		};
	};
	*/
};

&lcdif {
	status = "okay";
};

&mipi_dsi {
	status = "okay";	

	/*
	port@1 {
		dsim_to_adv7535: endpoint {
			remote-endpoint = <&adv7535_from_dsim>;
			attach-bridge;
		};
	};
        */
	
	panel@0{
		compatible = "raydium, rm67919";
		reg = <0>;
		pinctrl-0 = <&pinctrl_reset>;
		reset-gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
		dsi-lanes = <4>;
		width-mm = <62>;
		height-mm = <110>;
		video-mode = <2>;
		port {
			panel_in: endpoint {
				remote-endpoint = <&mipi_out>;
			};
		};
	};
        ports{
		#address-cells = <1>;
		#size-cells = <0>;

		port@1 {
			reg = <1>;
			mipi_out: endpoint {
				remote-endpoint = <&panel_in>;
			};
		};
	};
};
&iomuxc {
	pinctrl-names = "default";
	imx8mmea-ucom-kit {
                pinctrl_reset: resetgrp {
			fsl,pins = <
				MX8MM_IOMUXC_SPDIF_TX_GPIO5_IO3		0x16
			>;
		};
	};
};

 

 

 

 

With ports I get the same output as the first one and without the ports I get:

root@imx8mmea-ucom:~# dmesg | grep mipi
[ 1.285133] imx_sec_dsim_drv 32e10000.mipi_dsi: version number is 0x1060200
[ 1.293353] imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[ 1.301687] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -517
[ 2.331660] imx_sec_dsim_drv 32e10000.mipi_dsi: version number is 0x1060200
[ 2.339813] imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[ 2.348142] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -517
[ 2.740218] imx_sec_dsim_drv 32e10000.mipi_dsi: version number is 0x1060200
[ 2.747599] imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[ 2.756072] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -517
[ 2.794439] imx_sec_dsim_drv 32e10000.mipi_dsi: version number is 0x1060200
[ 2.801535] imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[ 2.809850] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -517
[ 2.864675] imx_sec_dsim_drv 32e10000.mipi_dsi: version number is 0x1060200
[ 2.874626] imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[ 2.885859] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -517
[ 2.977580] imx_sec_dsim_drv 32e10000.mipi_dsi: version number is 0x1060200
[ 2.984795] imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[ 2.993162] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -517
[ 3.809556] imx_sec_dsim_drv 32e10000.mipi_dsi: version number is 0x1060200
[ 3.817477] imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[ 3.828459] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -517

I don't know what to do next to get that display up and running. Did I miss something?

 

regards,

Patrick

2 Replies

1,623 Views
pzauner
Contributor I

With the raydium67191 driver I get some feedback from the display (had a typo in the driver name). I see some white and black stripes and then it turns it self off and the imx8 processor crashes. I read that you have to use the raydium driver instead of the ilitek because of the mipi write function. just copy the init sequence from the ilitek to the raydium driver.

0 Kudos

1,689 Views
matt_frandsen
Contributor II

We are having a similar issue.  The init function for our panel is getting called, but the probe for the panel isn't.  So like you we get the -517 Probe deferred when trying to bind. Is the probe of your panel getting called? It seems like something was changed that we missed or something is broke.  If I find anything I will post.  If you find a resolution please post your solution.

0 Kudos