[STM32MP157A-DK1] Bare metal DSI host driver.
Hi ST experts,
I'd like to build a bare metal ARM cortex-A7 driver for my MIPI DSI display module. Because there is no HAL driver for LTDC and DSI host then I decided to build it from scratch. I followed the procedures from the STM32MP RM document to configure the parameters and initialize the HW. However, I couldn't read the display ID from DCS read command, checking bit 4 PRDFE (in register DSI_GPSR) is always 1. I tried to configure u-boot to support my display module, compiled the u-boot then I could execute DCS commands without any problem. It took a few weeks to compare my driver implementation line by line with the u-boot driver, even dumping out all the register values. Finally, I noticed there is a different register setting in the u-boot driver:
#define WRPCR_REGEN BIT(24) /* REGulator ENable */
#define WRPCR_BGREN BIT(28) /* BandGap Reference ENable */
/* Enable the regulator */
dsi_set(dsi, DSI_WRPCR, WRPCR_REGEN | WRPCR_BGREN);

There is no bit 28 in the RM document. Interestingly, if bit 28 is not set then the DCS commands do not run correctly. Is that missing in the RM documentation or are there any additional configuration steps needed to be added into the driver?
Another question related to the LTDC configuration, since we use MIPI DSI pins (clkp/n, datap/n) can I omit configuring the parallel LCD interface pins such as LTDC_R/G/B, LTDC_HSYNC/VSYNC...?
Your kind help is much appreciated.
