OMAP-L137/DA830 Linux LCD driver

From Texas Instruments Wiki
Jump to: navigation, search

Agenda : OMAPL137/DA830 GLCD and CLCD overview

  • Overview -Part 1
    • LCD controller
    • Raster controller
    • LIDD
  • GLCD - Part 2
    • Features
    • Enabling GLCD support - Kernel configuration(menuconfig)
    • IOCTLs
    • Typical application flow
    • Typical usage/basic tests
  • CLCD - Part 3
    • Features
    • Enabling CLCD support - Kernel configuration(menuconfig)
    • IOCTLs
    • Typical application flow
    • Typical usage/basic tests

Overview(LCD controller)

LCD controller supports -

  • Low-end (8-bit character-based) to mid-range (VGA Color rasterized graphics) to high-end (“smart”) LCD displays.
  • 21 dedicated LCD I/O pins (16 bits of data and 5 bits of programmable timing and control).
  • Low-end displays : Use LCD interface display driver (LIDD) block which allows the ARM CPU to write/read character data.
  • Mid-range displays : Use LCD raster-type display controller which provides timing and data for constant graphics refresh to a passive display.
  • High-end “smart” LCD panels : Use Frame Buffer space and the DMA engine to drive streaming data to the panel via the LIDD block.

Overview(LCD controller - Block diagram)

LCD Controller Block diagram

Lcd controller.JPG

Overview(LCD controller - Features)

  • A Raster Controller and a LIDD Timing and Control Block operating at a dedicated LCD Clock frequency.
  • A DMA Engine operating at the global VBUS Clock frequency to provide a constant flow of data through the Raster Controller (or LIDD) to the display.
  • A VBUS Slave interface for MIPS program register accesses and LIDD data management.
  • A VBUSP Master interface for DMA access to off-chip Frame Buffer data via a Switched Central Resource.
  • Synchronizing logic and mode-select muxes driving dedicated LCD I/O pins.


Overview(Raster controller)

  • VBUS Slave port for register accesses.
  • Pixel data is stored in external memory in a frame buffer in 1- , 2-, 4-, 8- 12- or 16-bpp formats.
  • Programmable pixel display modes.
  • Programmable display size.
  • Four types of displays are supported—passive and active color, and passive and active monochrome.
  • Any screen size up to 1024x1024 (assuming big enough bandwidth) is supported.


Overview(LIDD)

  • VBUS Slave port for register accesses and data transfers to/from LCD Display.
  • Complete control (via processor-programmable registers) of the timing relationships of all LIDD-mode output signals, to match the requirements of a wide variety of MPU-like LCD display interfaces.
  • Support for the most prevalent parallel LCD display interface standards – MPU80, MPU68, MPUxx, Hitachi HD44780U.


Software architecture

Driver software architecture

Sw arch.JPG

End of Part 1

Part 1 ends here


GLCD driver overview

Supports-

  • QVGA display on the OMAPL137/DA830 EVM GLCD.
  • Fbdev driver framework.
  • Display of RGB format images with various bpp configurations.
  • Getting and setting variable screen information through Fbdev.


GLCD driver Kernel configuration (menuconfig)

How to enable Graphical LCD driver in LSP 02.20 is documented here

GLCD driver - Supported ioctls

IOCTL name Description
FBIOGET_VSCREENINFO This ioctl is used to query the variable screen info. This allows an application to query the display mode, including the color depth, resolution, timing etc.
FBIOPUT_VSCREENINFO This ioctl is used to set the variable screen info. This allows an application to set the display mode, including the color depth, resolution, timing etc.
FBIOGET_FSCREENINFO This ioctl can be used by applications to get the fixed properties(non changeable) of the display, e.g. the start address of the framebuffer memory.
FBIOGETCMAP,FBIOOUTCMAP These ioctls can be used to query or set the color map information



Typical GLCD(Fbdev) application flow

Typical Fbdev application flow

fbdev_app_flow.JPG
  • Open device node.
  • Set image size and format.
  • mmap() buffers and start filling them.
  • Close device node.


Typical GLCD usage/basic tests

  • Bringup xwindows - Boot up the EVM with NFS configuration and issue startx at command line. We should be able to see a x session on GLCD.
  • fbtest - open source application to display a color pattern on GLCD. Please refer to link fbtestInfo for information regarding the tool, instructions regarding compilation and execution.
  • Test application - Write and use a test application as described in previous slide.

End of Part 2

Part 2 ends here


CLCD driver overview

Supports-

  • CLCD UI card on OMAPL137/DA830 EVM - 2 rows with a total of 48 characters display.
  • Writing character strings to CLCD display by echoing onto the dev entry in command line.
  • Enabling and disabling display.
  • Enabling and disabling cursor.
  • Moving the display to left and right.
  • Enabling and disabling of cursor blinking.
  • Movement of cursor to home.
  • Setting the position (coordinates- row,column) to write a character.
  • Clearing the screen.


CLCD driver kernel configuration(menuconfig)

Note: Character LCD part is not present on OMAP-L137 DSP Starter Kit board. OMAP-L137 SoC however supports interfacing with Character LCD through LCD controller.

System Type  --->
    [*] DA830/OMAP-L137 UI (User Interface) board support
        (X) LCD

Device Drivers --->
    Graphics support  --->
        < > Support for frame buffer devices
        < > DA830/OMAP-L137 Framebuffer support
    Character devices  ---> 
        <*> DA830/OMAP-L137 Character LCD Support


CLCD driver - supported ioctls

IOCTL name Description
LIDD_CLEAR_SCREEN This ioctl helps in clearing the screen. All the characters typed so far can be erased(screen can be cleared).
LIDD_GOTO_XY This ioctl is used for setting the position ie going to a particular row, column to write a character.
LIDD_CURSOR_STATE This ioctl is used for enabling and disabling the cursor. The argument value decides whether to enable/disable
LIDD_DISPLAY_MOVE This ioctl is used for moving the display to left or right. The argument value when calling the ioctl command decides whether the desired movement is towards left or right.
LIDD_CURSOR_MOVE This ioctl is used for moving the cursor to left or right. The argument value when calling the ioctl command decides whether the desired movement is towards left or right.
LIDD_CURSOR_HOME This ioctl is used for moving the cursor to home(the very first position ie first row and column on CLCD screen).
LIDD_DISPLAY This ioctl is used for enabling and disabling the CLCD display.The argument value when calling the ioctl command decides whether to enable or disable.
LIDD_BLINK This ioctl is used for enabling and disabling the blinking of cursor. The argument value when calling the ioctl command decides whether to enable or disable.



Typical CLCD application flow

  • Open device node (using open() API)
  • Enable display.
  • Write a character string to the display(using write() API on the handle returned as part of open() call in step 1.
  • Disable display.
  • Close the device node (uisng close() API).


Typical CLCD usage/basic tests

  • Write some character from command line using echo - echo "abcd" > /dev/lcd_da8xx. We should observe the string abcd on clcd console.
  • Test application - Write and use a test application as described in previous slide.


End of Part 3

Part 3 ends here


Demos - startx

Startx -xwindows session on GLCD

Startx 450x600.jpg Startx2 450 x 600.jpg

Demos - fbtest

fbtest output on GLCD

Fbtest1.jpg Fbtest2.jpg

Demos - custom test application

Custom test application output on GLCD(Squares,chess board pattern,natural image(a hen),Text ouput(in order))

Custom1.jpg Custom2.jpg Custom3.jpg Custom4.jpg

Thanks

Thank You

Recording of the Presentations

Streaming WebEx recording of OMAPL1 Linux LCD Driver