Bring up DSI Rasp Pi 7" ts panel on i.MX8MP platform

cancel
Showing results for 
Search instead for 
Did you mean: 

Bring up DSI Rasp Pi 7" ts panel on i.MX8MP platform

618 Views
Patel-Arpan
Contributor I

 

Below modifications will be required for the bringup:
1. Panel + dsi driver - https://github.com/raspberrypi/linux/blob/rpi-5.10.y/drivers/gpu/drm/panel/panel-raspberrypi-touchsc...
2. backlight driver - https://github.com/raspberrypi/linux/blob/rpi-5.10.y/drivers/video/backlight/rpi_backlight.c
3. touchscreen driver - https://github.com/raspberrypi/linux/blob/rpi-5.10.y/drivers/input/touchscreen/raspberrypi-ts.c
4. dts changes to be made as per this - https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/vc4-kms-dsi-7inch-ov...

Schematics Display (J4) - https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/rpi_SCH_4b_4p0_reduced.pdf
Display connector (J4), pinouts same as above in our platform.

We see following dependencies and issues:
1. backlight
- driver depends on firmware command calls and
- dts node depends on nodes for mbox and soc/firmware.

2. touchscreen
- driver depends on soc/firmware

3. firmware dependencies
- as per this link we will face dependencies on firmware and if any one of the components fails in DRM the whole thing won't work
https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=305690&p=1829609&hilit=panel+bring+up&sid=9c...

These are all the information I could gather.

We have done modifications in dts and added the drivers, but facing issues below:

dts info:

 

&i2c2 {
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c2>;
	status = "okay";

	rpipanel: panel@45 {
		compatible = "raspberrypi,7inch-touchscreen-panel";
		reg = <0x45>;
		status = "okay";

		port {
			panel_dsi_port: endpoint {
				remote-endpoint = <&mipi_dsi_out_port>;
			};
		};
	};
};

&mipi_dsi {
	status = "okay";

	port@1 {
		mipi_dsi_out_port: endpoint {
			remote-endpoint = <&panel_dsi_port>;
		};
	};
};

 

 

Using i.MX8 Kernel Version - 5.4

With this,
- panel gets detected at 0x45 on i2c2 bus and we are able to read and write REG_PWR to on/off panel and REG_PWN to control brightness using i2c-tools.
- rpi_touchscreen_probe() function,
host = of_find_mipi_dsi_host_by_node(dsi_host_node); returns null.
tried couple of configurations in dts but could not move further.
- imx_sec_dsim_bind() function - fails for this.

Questions:
1. Need help in resolving the issue?
2. Need help to get the dsi, backlight working?
3. Is it possible to remove the firmware dependencies? Otherwise, integrating the firmware.
4. I couldn't find the datasheet, is it available for the standard panel?

Thanks in advance for replying.

0 Kudos
14 Replies

500 Views
nxf65025
NXP Employee
NXP Employee

You must use our platform drm dsi driver, don't use rasp pi dsi driver.

Please see imx8mp-evk-rm67191.dts

1.This is our official panel dts, using 4 lanes ,you can change to 2 lanes.

panel@0 {
		compatible = "raydium,rm67191";
		reg = <0>;
		pinctrl-0 = <&pinctrl_mipi_dsi_en>;
		reset-gpio = <&gpio1 8 GPIO_ACTIVE_LOW>;
		dsi-lanes = <4>;
		video-mode = <2>;	/* 0: burst mode
					 * 1: non-burst mode with sync event
					 * 2: non-burst mode with sync pulse
					 */
		panel-width-mm = <68>;
		panel-height-mm = <121>;
		status = "okay";
	};

 

2. change panel-height-mm , panel-width-mm and compatible in dts

connector->display_info.bpc = 8;
connector->display_info.width_mm = 154;
connector->display_info.height_mm = 86;

3. Also need change panel-raydium-rm67191.c,you need change drm_display_mode in panel-raydium-rm67191.c(copy from panel-raspberrypi-touchscreen.c )

4 .Need change compatible name in driver,for example in dts and driver ,using compatible name "Raspi, touchscreen"

static const struct of_device_id rad_of_match[] = {
	{ .compatible = "raydium,rm67191", },
	{ /* sentinel */ }
};

 

0 Kudos

405 Views
kunal_003
Contributor III

Hi @nxf65025,

 

Continuing the debugging and responding on behalf of Arpan.

 

We made the changes as suggested by you. Also, other RPI panel related changes are taken. We are able to see the display. However, there is some issue while display. Bottom half is not displayed properly. We are getting continuous error " No hblank data for mode 800x480 with 1 lanes". Can you please help us on this in this? I have attached the image and driver file for reference.

 

Please help on this. It is urgent. Thank you in advance.

 

Regards,

Kunal

0 Kudos

375 Views
nxf65025
NXP Employee
NXP Employee

Hi @kunal_003 

 I will update this driver of my personal version for you later

Best Regards

Zhiming 

264 Views
sswaringen
NXP Employee
NXP Employee

@nxf65025@Patel-Arpan@kunal_003 

I believe I am responding to the latest post in this thread.  Has any more progress been made on this issue?  I am supporting the end customer who has asked for this.

Regards,

Scott

0 Kudos

260 Views
nxf65025
NXP Employee
NXP Employee

Hi @sswaringen @kunal_003 

 

I am still debug this issue.

 

Best Regards

Zhiming

0 Kudos

246 Views
kunal_003
Contributor III

Hi @nxf65025 ,

 

Thank you for debugging and taking this further. It would be helpful if we can have below insight:

  1. Can you share the approaches and current state? So, we can also debug parallelly to expedite the solution.
  2. Do you have the datasheet of the panel with timing and all details? If yes, can you please share the same to us?
  3. Are you using 2 lanes? Is NXP supporting 1 lane?
  4. With the last scrambled image(bottom half improper) that we shared do you think issue is specific to panel timings or it could be something else?

Thank you in advance!

 

Regards,

Kunal

0 Kudos

190 Views
nxf65025
NXP Employee
NXP Employee

Hi @kunal_003 

1.Now my screen is all white

2.No datasheet

3.2 lanes, we don't support 1lane

4.I think we need config timming to support 800x480 in sec_dsim.c

0 Kudos

173 Views
kunal_003
Contributor III

Hi @nxf65025,

 

Please find the attached device tree node and driver file. Please disable other display related nodes for testing. For datasheet we are referring following links:

https://www.raspberrypi.org/app/uploads/2019/04/RPI-PCN-Display_v.1-002.pdf

https://www.scancraftdisplay.se/wp-content/uploads/2018/11/ph800480t013-iac09.pdf

Though, the part number is not exactly the same. However, the timings seems similar.

 

Regarding, 2 lane support, I believe RPI panel driver is using 1 lanes. Is this correct understanding? 

 

Regards,

Kunal

0 Kudos

163 Views
nxf65025
NXP Employee
NXP Employee

Hi @kunal_003 

mipi driver in i.MX8MP can't support 1 lane which you can see https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/gpu/drm/bridge/sec-dsim.c?h=imx_5....

My advice is using 2 lanes, and you can try to add "800x480" hblank_2lanes in sec-dsim.c

Add these paramters:

.vrefresh = (vf),				\
	.hfp_wc   = (hfp),				\
	.hbp_wc   = (hbp),				\
	.hsa_wc   = (hsa),				\
	.lanes	  = (num)

 

Tags (1)
0 Kudos

598 Views
nxf65025
NXP Employee
NXP Employee

Hi

 

You can add drm_debug=0x07 in bootargs and and upload your log.

 

Best Regards

Zhiming

0 Kudos

593 Views
Patel-Arpan
Contributor I

Hi,

Please find the attached logs.
Let me know if you can help with these.

In drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c file,

of_find_mipi_dsi_host_by_node()
returns null

https://github.com/raspberrypi/linux/blob/a2d265da70816783255d7f450d065c6e1100185c/drivers/gpu/drm/p...

Regards,

Arpan

0 Kudos

560 Views
nxf65025
NXP Employee
NXP Employee

The MIPI on i.MX8 has 4 lanes and the panel has 2 lanes

0 Kudos

550 Views
Patel-Arpan
Contributor I

We are using the 2 lane configuration in panel driver.
We have created an interface board as per below for interfacing the panel.

Schematics Display (J4) - https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/rpi_SCH_4b_4p0_reduced.pdf

Regards,
Arpan

0 Kudos

504 Views
nxf65025
NXP Employee
NXP Employee

Hi @Patel-Arpan 

 

I need some time to handle this issue.I will reply you as soon as possible if i get any progress.

 

BR

Zhiming

0 Kudos