AM335x LCD Controller Driver's Guide

= Introduction =

LCD controller(LCDC) on AM335x is an updated version of LCDC that is found on OMAP-L138 SoC. It has following updates in comparison with OMAP-L138


 * 1) Interrupt configuration and status registers are different.
 * 2) Increased resolution of 2048*2048.
 * 3) 24 bits per pixel active TFT raster configuration.

So da8xx-fb LCD driver can be used by having enhancements under LCD_VERSION2 code. This update in LCDC version can be detected by reading PID register.

= LCDC on AM335x SoC =


 * 1) LCDC has 2 interface clocks, L3 peripheral and L4LS peripheral.
 * 2) LCDC functional clock can be mux selected among DISPLAY PLL CLKOUTM2, CORE PLLCLKOUTM5 or PER PLLCLKOUTM2. Supports MAX pixel clock of ~126MHz, configure DISPLAY PLL for 600MHz.
 * 3) LCD_DATA[0-15] pins are in mode0 and LCD_DATA[16-23] are in mode1.
 * 4) LCD is enabled on General Purpose EVM operating in profile 0/1/2 and on IP-Phone.
 * 5) Backlight is through eCAP0_in_PWM0_out pin, controls brightness via eCAP0 module. LCD EVM also has alternative backlight control via TLC59108 power control chip. This is via do not implement(DNI) R36 resistor on non-alpha boards, only populated in-case of non-availability of eCAP0_in_PWM0_out pin.

= Driver Configuration =

Make sure you have enabled LCD FB and FB console as below. Default am335x_defconfig keeps them enabled. Device Drivers ---&gt; Graphics support ---&gt; &lt;*&gt; Support for frame buffer devices ---&gt; &lt;*&gt;  DA8xx/OMAP-L1xx Framebuffer support (4)    Consistent DMA memory size (MB)

Building as Loadable Kernel Module
To build the above components as modules, press 'M' key on below config option.
 * &lt;M&gt;  DA8xx/OMAP-L1xx Framebuffer support

Enable below config options to enable Framebuffer console support and bootup logo. Console display driver support ---&gt; &lt;*&gt; Framebuffer Console support [*] Bootup logo ---&gt; [*]  Standard black and white Linux logo [*]  Standard 16-color Linux logo [*]  Standard 224-color Linux logo

Device Drivers ---&gt; Graphics support ---&gt; [*] Backlight &amp; LCD device support ---&gt; &lt;*&gt;  Lowlevel Backlight controls &lt;*&gt;  TLC59108 LCD Backlight Driver  NOTE Please note it is not required to enable TLC59108 driver on beta boards. = Usage and Verification =
 * Enabling TLC59108 back light driver

/ # fbset mode "800x480-40" geometry 800 480 800 960 32 timings 46666 64 64 32 32 48 3 accel false rgba 8/16,8/8,8/0,0/0 endmode / #
 * With above specified kernel configurations, Linux bootup penguin logo will appear on LCD panel.
 * Use fbset utility to display timing parameters:
 * D: 21.429 MHz, H: 21.956 kHz, V: 40.139 Hz
 * In 24bpp configuration, testing can be done by dumping bmp image (header stripped 800*480.bmp) on LCD

$cat 800*480.bmp &gt; /dev/fb0

to unblank: $echo "0" > /sys/class/graphics/fb0/blank to blank: $echo "4" > /sys/class/graphics/fb0/blank
 * Framebuffer console blankes out after blanking interval. Framebuffer console blanking and unblanking can be set via below sysfs interfaces.


 * Default blankinterval is 10 minutes, blank event is triggered on every 10 minutes period(this will happen even if you set screen unblank as above). Blanking can be disabled altogether by appending consoleblank=0 to kernel bootargs.