Close

Week 9. Software stabilized.

A project log for Raspberry Pi CM4 –°arrier with Hi-Res MIPI Display

An interface breakout board for Raspberry Pi Compute Module 4, permanently attached to a 7" IPS touchscreen display

Igor ShturmaIgor Shturma 01/31/2021 at 04:340 Comments

It looks like we got it working reliably now. As I promised in the last update, sharing the details of our software bring-up struggle, click "Read more" below the image if interested. 

---------- more ----------

Whatever you do, someone has already done that before. LT070ME05000 bring-up is not an exception. There are two great discussions to follow on the Raspberry Pi forum: [SOLVED] DSI Panel JDI LT070ME05000 bringup issues and VC4 Video Driver dont start DSI Interface. Many thanks to Raspberry Pi Foundation engineers that are willing to offer their help with the issues along the way. For someone, the Nexus 7 driver just worked out of the box: GitHub: harlab / CM4_LCD_LT070ME05000. We are not that lucky.

What we have learned:

  1. Working with a custom DSI panel requires the Full KMS mode GPU driver, which is being in active development and only works with changes from kernel version 5.10+. Currently, the official stable version for RPi is 5.4. We had to update the kernel ahead of its official stable release.
  2. As we use the I2C GPIO expander to save user GPIOs, we needed a kernel driver for it. The driver exists but apparently cannot be built with DKMS as it is using some unexported kernel functions and needs to be built with the kernel. That is unfortunate because it means maintaining our own kernel builds just for this driver. We are considering another expander (‎MCP23008) for the next PCB revision. That one seems to be supported by default.
  3. The display panel driver also needs to be enabled in the kernel build configuration, but this one can be built with DKMS and automatically re-built on every kernel upgrade.
  4. The biggest surprise: there are counterfeit display panels out there! This is really interesting. The panels that we received as samples from a Chinese supplier require some changes to the initialization sequence found with trial-and-error. They don't strictly follow what is written in the datasheet and require the "exit sleep mode" command after the "set display on" command, while in the datasheet (and the mainline driver), it is the other way around. Even after fully enabling the panel, a sleep mode flag in the power mode register tells us it is still "sleeping," which doesn't make sense. I ordered a repair kit for Nexus 7 from Amazon to get a different panel sample under the same part number for comparison. That one worked as specified. Another interesting detail to notice - there is no serial number (which is supposed to encode revision, manufacturing time, and location) etched on our samples. This makes me think there is a non-authentic version of this panel that is used in some tablets for the internal Chinese market. That is just my assumption. The display still works fine, but the driver requires some changes to the initialization procedure.
  5. Another surprise: the driver is not properly turning the panel off before the signal disappears when the software blanks the screen. When this happens, something gets seriously screwed up between the panel driver IC and the LCD matrix. It then results in persistent visual artifacts and screen flickering that takes hours to dissipate. Powering the poor thing down does not fix that. It looks like it is under control now with our latest driver changes.

That is it for now. It seems to work reliably, but our fingers are crossed in the hope not to run into another issue soon. The next step will be to enable touch input. It is supposed to be trivial, but who knows.

Discussions