AM335x LCD Controller Driver's Guide
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
- Interrupt configuration and status registers are different.
- Increased resolution of 2048*2048.
- 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
- LCDC has 2 interface clocks, L3 peripheral and L4LS peripheral.
- 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.
- LCD_DATA[0-15] pins are in mode0 and LCD_DATA[16-23] are in mode1.
- LCD is enabled on General Purpose EVM operating in profile 0/1/2 and on IP-Phone.
- 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.
Make sure you have enabled LCD FB and FB console as below. Default am335x_defconfig keeps them enabled.
Device Drivers ---> Graphics support ---> <*> Support for frame buffer devices ---> <*> 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.
- <M> DA8xx/OMAP-L1xx Framebuffer support
Enable below config options to enable Framebuffer console support and bootup logo.
Console display driver support ---> <*> Framebuffer Console support [*] Bootup logo ---> [*] Standard black and white Linux logo [*] Standard 16-color Linux logo [*] Standard 224-color Linux logo
- Enabling TLC59108 back light driver
Device Drivers ---> Graphics support ---> [*] Backlight & LCD device support ---> <*> Lowlevel Backlight controls <*> TLC59108 LCD Backlight Driver
Please note it is not required to enable TLC59108 driver on beta boards.
Usage and Verification
- With above specified kernel configurations, Linux bootup penguin logo will appear on LCD panel.
- Use fbset utility to display timing parameters:
/ # fbset mode "800x480-40" # D: 21.429 MHz, H: 21.956 kHz, V: 40.139 Hz 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 / #
- In 24bpp configuration, testing can be done by dumping bmp image (header stripped 800*480.bmp) on LCD
$cat 800*480.bmp > /dev/fb0
- Framebuffer console blankes out after blanking interval. Framebuffer console blanking and unblanking can be set via below sysfs interfaces.
to unblank: $echo "0" > /sys/class/graphics/fb0/blank to blank: $echo "4" > /sys/class/graphics/fb0/blank
- 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.