Power & Source of Big Ideas

Set specific pixelclk / pixelclock in kernel for TFT panel

Moderators: chensy, FATechsupport

Dear friendlyarm,

I´m trying to drive a TFT panel (1280x120px) via RGB interface of the NanoPi S2.

I`ve modified kernel source code and added the timings for the TFT panel in:

Code: Select all


and compiled the kernel (uImage).

However one critical parameter is missing in lcds.c:

The pixelclock. The TFT panel needs a specific pixel clock of 11 MHz.

This is not to be confused with the

Code: Select all

parameter in

Code: Select all


So when booting up the NanoPiS2, I see via serial console (UART interface) the following line:

Code: Select all

[    0.876000] Display.0 fps=161 (6 ms), wait= 4 jiffies, Pixelclk=200000000hz

This "Pixelclk" value is obviously wrong and cant be set in lcds.c

What I did so far:
1) Modify lcds.c
2) Compile kernel (uImage)
3) Copy uImage to boot partition and clone it as well to uImage.hdmi
4) Interrupt boot process via serial interface to set bootargs
5) set bootargs to include lcd=BTFT1280 (my config)
6) saveenv
7) boot

Where to set the correct pixelclock for the TFT panel?

Thanks for all your answers!
Hi, try this please,
.width = 1280,
.height = 120,
.p_width = 280,
.p_height = 27,
.bpp = 24,
.freq = 60, // the refresh rate, not the pixel clock. the pixel clock will be calculated by driver.

If the lcd displays something but not correct, you need to modify .timing or .polarity.
Good luck.

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 1 guest