zephyr: Display: stm32_ltdc: using "display-controller" causes Device Initialization Priority Validation to fail
Describe the bug
The phandle provided in the display-controller property causes Device Initialization Priority Validation to fail at compile time on stm32h747i_disco, as LTDC cannot be initialized before OTM8009A while it depends on it in DTS, & the latter needs to be initialized after both DSI & LTDC for the display to function correctly.
Please also mention any information which could help others to understand the problem you’re facing:
- What target platform are you using? stm32h747i_disco/stm32h747xx/m7
- What have you tried to workaround this issue? change LTDC init priority to be the same as the panel controller otm8009a.
- Is this a regression? property was introduced in commit 32fd2f57b161529485550199737978e2bb4d2cc4
To Reproduce Steps to reproduce the behavior:
cd ~/zephyrproject/zephyr- apply this patch
--- a/boards/shields/st_b_lcd40_dsi1_mb1166/boards/st_b_lcd40_dsi1_mb1166/stm32h747i_disco_stm32h747xx_m7.overlay
+++ b/boards/shields/st_b_lcd40_dsi1_mb1166/boards/st_b_lcd40_dsi1_mb1166/stm32h747i_disco_stm32h747xx_m7.overlay
@@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
<dc {
+ display-controller = <&otm8009a>;
/* orisetech, otm8009a */
display-timings {
compatible = "zephyr,panel-timing";
- run
west build -p always -b stm32h747i_disco/stm32h747xx/m7 samples/drivers/display -DSHIELD="st_b_lcd40_dsi1_mb1166"
Expected behavior Application built correctly
Impact
New display-controller property cannot be used on this platform.
Logs and console output
ERROR: Device initialization priority validation failed, the sequence of initialization calls does not match the devicetree dependencies.
ERROR: /soc/display-controller@50001000 <stm32_ltdc_init> is initialized before its dependency /soc/dsihost@50000000/otm8009a@0 <otm8009a_init> (POST_KERNEL+4 < POST_KERNEL+6)
Environment (please complete the following information):
- OS: Linux
- Toolchain: zephyr-sdk-0.16.5
- Commit SHA: 68a0741d4fcf8b0d51916969dda56ed10a277099
Additional context N/A
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 17 (13 by maintainers)
Ok let’s keep the priority nightmare stuff out for now – if you could troubleshoot that error that’d be cool.