Difference between revisions of "CM-T3x: U-Boot: Custom Features"

From Compulab Mediawiki
Jump to: navigation, search
(Splash screen image)
 
(Setting the "{{parameter|displaytype}}" variable)
Line 22: Line 22:
 
** {{parameter|dvi1280x960}} - DVI interface with 1280x960 resolution and 16/8 bit color depth.
 
** {{parameter|dvi1280x960}} - DVI interface with 1280x960 resolution and 16/8 bit color depth.
 
** {{parameter|dvi1280x1024}} - DVI interface with 1280x1024 resolution and 16/8 bit color depth.
 
** {{parameter|dvi1280x1024}} - DVI interface with 1280x1024 resolution and 16/8 bit color depth.
 +
** {{parameter|dataimage480x800}} - DataImage LCD with 480x800 resolution and 16/8 bit color depth.
 
* {{parameter|none}} - U-Boot will disable the display sub-system. This is also the default behavior when the {{parameter|displaytype}} variable value is not set.
 
* {{parameter|none}} - U-Boot will disable the display sub-system. This is also the default behavior when the {{parameter|displaytype}} variable value is not set.
 
* <{{parameter|varname}}> - U-Boot will search for the "{{parameter|varname}}" environment variable and setup the display parameters as described in [[#Custom display parameter setup|Custom display parameter setup]] section.
 
* <{{parameter|varname}}> - U-Boot will search for the "{{parameter|varname}}" environment variable and setup the display parameters as described in [[#Custom display parameter setup|Custom display parameter setup]] section.

Revision as of 12:31, 3 December 2013

Splash screen

CM-T3x U-Boot features splash screen support starting from version 2013.04-cm-t3x-4.
The support covers displays that are connected via DVI interface.
The following setup is required to enable splash screen display:

Display parameters setup

Configuring the U-Boot display sub-system involves passing display parameters to the OMAP3 display driver.
U-Boot for CM-T3x provides predefined parameter sets, as well as the option to configure custom parameters according to the display data-sheet.
U-Boot for CM-T3x display sub-system configuration is controlled by two U-Boot environment variables: the displaytype variable and the optional user defined variable for custom display settings.

Setting the "displaytype" variable

The displaytype variable can be assigned one of the following values:

  • <preset> - One of the following predefined settings:
    • dvi640x480 - DVI interface with 640x480 resolution and 16/8 bit color depth.
    • dvi800x600 - DVI interface with 800x600 resolution and 16/8 bit color depth.
    • dvi1024x768 - DVI interface with 1024x768 resolution and 16/8 bit color depth.
    • dvi1152x864 - DVI interface with 1152x864 resolution and 16/8 bit color depth.
    • dvi1280x960 - DVI interface with 1280x960 resolution and 16/8 bit color depth.
    • dvi1280x1024 - DVI interface with 1280x1024 resolution and 16/8 bit color depth.
    • dataimage480x800 - DataImage LCD with 480x800 resolution and 16/8 bit color depth.
  • none - U-Boot will disable the display sub-system. This is also the default behavior when the displaytype variable value is not set.
  • <varname> - U-Boot will search for the "varname" environment variable and setup the display parameters as described in Custom display parameter setup section.

Custom display parameter setup

Throughout this section the optional user defined variable will be called custom.
The custom variable is a string of parameters, describing the display characteristics.
The syntax of custom variable is a comma separated list of <key>:<value> pairs and <value> singles. For example:

<key1>:<value1>,<key2>:<value2>,<value3>,<key4>:<value4>

The order of the parameters in the string is not important.

Parameters description
mode:XRESxYRES The display resolution in pixels: XRES - width, YRES - height.
pixclock:PIXCLOCK Pixel clock in MHz.
left:LEFT Left display margin (Horizontal Back Porch)
right:RIGHT Right display margin (Horizontal Front Porch)
upper:UPPER Upper display margin (Vertical Back Porch)
lower:LOWER Lower display margin (Vertical Front Porch)
hsynclen:HSYNC Horizontal sync time (Horizontal Sync Pulse Width)
vsynclen:VSYNC Vertical sync time (Vertical Sync Pulse Width)
active Active (TFT) display
passive Passive (STN) display
hsync:HSYNC Horizontal sync polarity. 0 => active low, 1 => active high
vsync:VSYNC Vertical sync polarity. 0 => active low, 1 => active high
outputen:POLARITY Output enable polarity. 0 => active low, 1 => active high
pixclockpol:POLARITY Pixel clock polarity. 0 => falling edge, 1 => rising edge
display:DISPLAY Target display. Currently, the only supported option is dvi.

All the above values should be taken or derived from the display datasheet.
For example, to setup the parameters for a 1024x768 DVI display in custom variable, use the following commands:

> setenv custom mode:1024x768,pixclock:65,left:160,right:24,upper:29,lower:3,hsynclen:136,vsynclen:6,hsync:0,vsync:0,outputen:1,pixclockpol:0,active,display:dvi
> setenv displaytype custom
> saveenv

Splash screen image

U-Boot for CM-T3x supports uncompressed 8-bit and 16-bit BMP splash screen images. An example of such an image can be found in the U-Boot for CM-T3x package (here) under utilities-->splash_images folder. The splash screen image should be stored in the CM-T3x NAND flash at offset 0x100000 and its maximal size should not exceed 1408KB (0x160000). U-Boot will automatically relocate the splash screen image from NAND flash into the OMAP3 display frame buffer.

Flashing the Splash screen image into the NAND flash

To write the splash screen image into the NAND flash use the following command sequence:

  • Download the image to the CM-T3x RAM:
> tftp 80a00000 <bmp file name>
  • Or read the image from MMC/SD card:
> mmc rescan
> fatload mmc 0 80a00000 <bmp file name>
  • Erase the NAND flash at offset 0x100000:
> nand erase 100000 <bmp size>
  • Write the splash screen image into the NAND flash:
> nand write 80a00000 100000 <bmp size>

Now the splash screen is in the NAND flash.

Setting up the environment

To display the splash screen image, the splashimage environment variable must be set. The splashimage variable should contain the base address for splash screen shadow in RAM. Due to alignment restrictions, this address should be 16-bit aligned, but not 32-bit aligned. Good example is 0x80a00002. U-Boot will not accept addresses that do not satisfy this requirement, and will also refuse to load an image if it overlaps the U-Boot shadow in RAM. To set the splashimage variable use the following command:

> setenv splashimage 80a00002
> saveenv

Multiple environment storage devices

Starting from version 2012.07-cm-t3x-3, CM-T3x U-Boot supports storing its environment in multiple storage devices simultaneously, as well as importing and switching between the devices on the fly. This feature adds the following variant to U-Boot env command:

env device [dev [import]]

The value of dev can be nand or mmc.

Using multiple environment feature

To see the currently active environment storage device run:

> env device

To switch to another environment storage device run (this will not change the content of the current U-Boot environment):

> env device <storage device>

To switch to another environment storage device and also import the environment content from that device and replace the current U-Boot environment:

> env device <storage device> import

See also