NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
OMAP-L137/DA830 Linux LCD driver
Contents
- 1 Agenda : OMAPL137/DA830 GLCD and CLCD overview
- 2 Overview(LCD controller)
- 3 Overview(LCD controller - Block diagram)
- 4 Overview(LCD controller - Features)
- 5 Overview(Raster controller)
- 6 Overview(LIDD)
- 7 Software architecture
- 8 End of Part 1
- 9 GLCD driver overview
- 10 GLCD driver Kernel configuration (menuconfig)
- 11 GLCD driver - Supported ioctls
- 12 Typical GLCD(Fbdev) application flow
- 13 Typical GLCD usage/basic tests
- 14 End of Part 2
- 15 CLCD driver overview
- 16 CLCD driver kernel configuration(menuconfig)
- 17 CLCD driver - supported ioctls
- 18 Typical CLCD application flow
- 19 Typical CLCD usage/basic tests
- 20 End of Part 3
- 21 Demos - startx
- 22 Demos - fbtest
- 23 Demos - custom test application
- 24 Thanks
- 25 Recording of the Presentations
Agenda : OMAPL137/DA830 GLCD and CLCD overview[edit]
- 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)[edit]
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)[edit]
LCD Controller Block diagram
Overview(LCD controller - Features)[edit]
- 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)[edit]
- 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)[edit]
- 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[edit]
Driver software architecture
End of Part 1[edit]
Part 1 ends here
GLCD driver overview[edit]
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.
[edit]
How to enable Graphical LCD driver in LSP 02.20 is documented here
GLCD driver - Supported ioctls[edit]
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[edit]
Typical Fbdev application flow
- Open device node.
- Set image size and format.
- mmap() buffers and start filling them.
- Close device node.
Typical GLCD usage/basic tests[edit]
- 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[edit]
Part 2 ends here
CLCD driver overview[edit]
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.
[edit]
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[edit]
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[edit]
- 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[edit]
- 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[edit]
Part 3 ends here
Demos - startx[edit]
Startx -xwindows session on GLCD
Demos - fbtest[edit]
fbtest output on GLCD
Demos - custom test application[edit]
Custom test application output on GLCD(Squares,chess board pattern,natural image(a hen),Text ouput(in order))
Thanks[edit]
Thank You
Recording of the Presentations[edit]
Streaming WebEx recording of OMAPL1 Linux LCD Driver