cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with MIPI-DSI - Powertip display based on ili9881c

TStas.2
Associate II

Hello,

I've got problem with startup Display from Powertip. I added some commands to library ili9881c acording to datasheet by patch. 

After startup kernel 

[ 1.604819] [drm:dw_mipi_dsi_stm_probe] *ERROR* Unable to get peripheral clock: -517

[ 1.724139] ili9881c-dsi 5a000000.dsi.0: Couldn't get our power regulator

[ 2.920457] ili9881c-dsi 5a000000.dsi.0: Couldn't get our power regulator

Do anyone had idea where should i looking for a problem?

5 REPLIES 5
Kevin HUBER
ST Employee

Hello @Community member​ ,

The errors that you shared looks like DTS configuration issues. Please can you share your DTS and also your complete DTB?

I also would like to have your complete Boot log traces :).

Regarding the behavior, does your DSI Screen works in U-Boot?

Regards,

Kevin

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.

DSI screen i added only for linux, not u-boot.

General i working on tamplate prepared by seeed som.

Here is i hope all what will be needed to analized problem.

Full trace from startup. DTB and DTS files

Hello @Community member​ ,

After investigating your DTS, it looks right.

The error that you encounter "*ERROR* Unable to get peripheral clock: -517" is made by the file "drivers/gpu/drm/stm/dw_mipi_dsi-stm.c" when he tries to get the "pclk":

	pclk = devm_clk_get(dev, "pclk");
 
	if (IS_ERR(pclk)) {
 
		ret = PTR_ERR(pclk);
 
		DRM_ERROR("Unable to get peripheral clock: %d\n", ret);
 
		goto err_dsi_probe;
 
	}

I don't know why, but the code seems to be unable to get the kernel peripheral clock of the DSI on your board. This pclk is defined in "stm32mp157.dtsi":

dsi: dsi@5a000000 {
	compatible = "st,stm32-dsi";
	reg = <0x5a000000 0x800>;
	phy-dsi-supply = <&reg18>;
	clocks = <&rcc DSI_K>, <&scmi0_clk CK_SCMI0_HSE>, <&rcc DSI_PX>;
	clock-names = "pclk", "ref", "px_clk";

By looking at the refman RM0436.pdf v5.0 page 572:

0693W00000LyimIQAR.pngWe can see that the pclk is pclk4.

So I don't know why pclk4 is not available with your board.

Please can you display the clk_summary and send the traces. The command to use is:

cat /sys/kernel/debug/clk/clk_summary

In a working case you must have something like that on pclk4:

   pclk4                             1        1        0   133250000          0     0  50000
       ddrperfm                       0        0        0   133250000          0     0  50000
       stgenro                        0        0        0   133250000          0     0  50000
       usbphy                         0        0        0   133250000          0     0  50000
       iwdg2                          1        1        0   133250000          0     0  50000
       dsi                            0        0        0   133250000          0     0  50000
       ltdc                           0        0        0   133250000          0     0  50000

Please can you also get the tool devmem2 by following this page on the wiki: https://wiki.st.com/stm32mpu/wiki/How_to_read_or_write_peripheral_registers#Developer_Package 

and read the value of te register RCC_MP_APB4ENSETR:

/usr/local/devmem2 0x50000200

The bit4 must be set to 1:

0693W00000LyiqKQAR.png 

Regards,

Kevin

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.
TStas.2
Associate II
 pclk4                             1        1        0   133250000          0     0  50000
       ddrperfm                       0        0        0   133250000          0     0  50000
       stgenro                        0        0        0   133250000          0     0  50000
       usbphy                         0        0        0   133250000          0     0  50000
       iwdg2                          1        1        0   133250000          0     0  50000
       dsi                            0        0        0   133250000          0     0  50000
       ltdc                           0        0        0   133250000          0     0  50000

pcl4 is as above

Below i read register if i well understand it should works. But problem still the same.

root@stm32mp1:~# devmem2 0x50000200
/dev/mem opened.
Memory mapped at address 0xb6f9f000.
Read at address  0x50000200 (0xb6f9f200): 0x00018011

Kevin HUBER
ST Employee

Hello @Community member​  ,

After more investigation, the trace:

 [drm:dw_mipi_dsi_stm_probe] *ERROR* Unable to get peripheral clock: -517

is a Probe_DEFER error that happens because the kernel tries to probe too early the DSI. The clock is not yet available.

Then the clocks are enabled by RCC and they are available once the system completed the boot.

I am searching why this happens in your case and not with the DSI screen of the 157C-DK2. You are using the driver ili9881c for your panel, which is an upstreamed driver and your modifications are very lite, so for the moment I don't understand the problem.

Is it possible to test with the latest version of ecosystem (v3.1)?

In your log, you are using the Linux 5.10.10, the linux version of the ecosystem v3.0, but I can see on github that there were some patches related to the Probe_DEFER for the drm part.

Regards,

Kevin

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.