2022-04-18 09:35 PM
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?
2022-04-19 02:24 AM
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
2022-04-20 04:07 AM
2022-04-22 02:22 AM
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 = <®18>;
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:
We 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:
Regards,
Kevin
2022-04-22 03:10 AM
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
2022-04-26 01:51 AM
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