I'm working with a MIMXRT1170-EVK board trying to create a driver for a MIPI LCD that is not 1 of the 3 that already have drivers in the SDK. I'm using the MIPI DSI Compliant Test as my project, I've modified the frame buffer in that to display a red, green, blue pattern on the LCD instead of a black, grey, white.
The LCD I'm trying to create a driver for is a Riverdi RVT70HSMNWC00-B, it's LCD driver is an EK79007AD3+EK73217BCGA. The pinouts are not the same between the EVK and the LCD so I have a breakout board so that the clock and data lanes are aligned, along with the 3.3V and GND, the anode and cathode for the LCD backlight is powered by an external DC power supply as the electrical characteristics for the Riverdi backlight are different than the Rocktech backlight.
The LCD is partially receiving commands properly, I'm able to set the LCD to display a Built-In Self Text (BIST) pattern perfectly fine. The BIST pattern doesn't use any of the data lanes or clocks, when I send the commands for the LCD to function in normal operation a bunch of static comes through (it looks like an old CRT tv on the wrong channel). Below I will add the files I've modified, along with the lines specific where I added stuff for my driver. If anyone has any light to shed on this it would be much appreciated, I'm at a loss right now.
The Riverdi LCD datasheet can be found here: https://riverdi.com/download/RVT70HSMNWC00-B/DS_RVT70HSMNWC00-B%20_Rev.1.0.pdf
In display_support.h:
In display_support.c:
In fsl_ek79007ad3.h:
In fsl_ek79007ad3.c:
Everything else is exactly the same as it is in the evkmimxrt1170_mipi_dsi_compliant_test_cm7 project from the SDK (SDK_2.x_MIMXRT1170-EVK (Version 2.11.1)).
can you share how you set the panel in the device tree?
Hi @CMoran ,
I am also having the same issue, but also wanted to read back some registers to confirm they have been written properly. I am curious if you ever used the MIPI_DSI_GenericRead function successfully too?
Although my LCD is different, I am also curious what the 0x87 (Riverdi god code) register might be for, as that register is not in the EK79007ad3 datasheet. My LCD has no mention of other initialization registers like this.
Thanks!!
For additional visuals I've taken a video of the panel in BIST mode and under normal operation. I can verify that the panel is receiving some commands correctly as BIST mode is not a default option. Something is just out of sync under normal operation but I don't understand what.
Hi CMoran, did you ever get a solution to this? I'm having the same issues...
Yes I did eventually figure out that the issue was the MIPI DSI Tx Esc clock frequency. Here's a snippet of code from the function BOARD_InitMipiDsiClock (in display_support.c) that had to be modified in order for the LCD to display correctly.
const clock_root_config_t mipiEscClockConfig = {
.clockOff = false,
.mux = kCLOCK_MIPI_ESC_ClockRoot_MuxOscRc400M, /*!< 400Mhz. */
.div = 14,
};
CLOCK_SetRootClock(kCLOCK_Root_Mipi_Esc, &mipiEscClockConfig);
mipiDsiEscClkFreq_Hz = CLOCK_GetRootClockFreq(kCLOCK_Root_Mipi_Esc);
const clock_group_config_t mipiEscClockGroupConfig = {
.clockOff = false, .resetDiv = 1, .div0 = 1,
};
CLOCK_SetGroupConfig(kCLOCK_Group_MipiDsi, &mipiEscClockGroupConfig);
mipiDsiTxEscClkFreq_Hz = mipiDsiEscClkFreq_Hz / 2;
I'm unsure of your current setup, if you're also using the same LCD panel, etc... but I hope this is able to help!
Yes, thank you, I suspect my issue is related to this setting as well, I just cannot determine how to figure out the correct values for my display. Which is a 1080x1920 @ 30fps...
It was a while since I did it, but what ended up happening is somewhere in the EK79007AD3 datasheet it says that the escape clock has to be within a range of the low power clock (66.67% to 150%) and that the low power clock has a requirement of 20ns. So you may have to dive into your LCD's tft driver datasheet. For the pixel clock the formula provided is:
(height + VSW + VFP + VBP) * (width + HSW + HFP + HBP) * frame rate.
OK, thanks... yeah the pixel clock is easy and well documented, the LCD datasheet I have is not, but Ill pour over it again, thanks!