U-boot Display

  • Yes, showing an image on the display is basically possible since release fsimx6ul-B2019.11. However we want to add quite some more features for the display in the future, for example more image formats. So this version is only a first step and usage may change in the future. This is why we didn't put any emphasis on this feature in the past and the documentation is still rare.


    DIsplay Usage in U-Boot


    There are some new environment variables


    disppanel: Port and Name of a display

    dispmode: Timing parameters for the display

    dispflags: Additional flags



    disppanel

    The variable disppanel has the form <port>:<name>. <port> is one of the following values


    lcd Display is located on the parallel RGB port

    hdmi Display is located on the DVI/HDMI-Port (not supported yet)

    lvds0 Display is located on the first LVDS channel (not available on fsimx6ul)

    lvds1 Display is located on the second LVDS channel (not available on fsimx6ul)


    <name> is either a name from a list of predefined displays and then the parameters are taken from the internal entry. Or it is an own name and then the display parameters have to be given in dispmode and dispflags. At the moment only the following three Displays are predefined. These are the displays that we provide with our Starterkits.


    EDT-ET070080DH6

    ChiMei-G070Y2-L01

    Jinghua-J070WVTC0211


    The easiest way is to use one of the predefined display. Then only one variable has to be set:

    Code
    1. setenv lcdpanel lcd:EDT-ET070080DH6


    For an own display, you simply take a freely defined name and add at least the dispmode variable.


    dispmode

    Variable dispmode contains pairs of the form <name>=<value>. They are seperated by commas and describe the display timings and clock polarities.


    clk: Pixelclock (in Hz, optional)

    rate: Refresh rate (in fps, default: 60 fps)

    hres: Horizontal Resolution (in pixels or clk-ticks)

    vres: Vertical Resolution (in rows)

    hfp: Horizontal Front Porch (in clk-ticks)

    hbp: Horizontal Back Porch (in clk-ticks)

    hsw: HSYNC Width (in clk-ticks)

    vfp: Vertical Front Porch (in rows)

    vbp: Vertical Back Porch (in rows)

    vsw: VSYNC Width (in rows)

    hsp: HSYNC Polarity: 0: Active Low, 1: Active High

    vsp: VSYNC Polarity: 0: Active Low, 1: Active High

    dep: DE Polarity: 0: Active Low, 1: Active High

    clkp: Pixelclock Polarity: 0: Latch on falling edge, 1: Latch on rising edge

    il: Interlaced: 0: No, 1: Yes (Not supported yet)


    Example:

    Code
    1. setenv dispmode rate=60,hres=800,vres=480,...

    The parameters can be taken from the display data sheet. If you already have values for the Linux device tree, then you can use these:


    hactive -> hres

    vactive -> vres

    hfront-porch -> hfp

    hback-porch -> hbp

    vfront-porch -> vfp

    vback-porch -> vbp

    hsync-len -> hsw

    vsync-len -> vsw

    hsync-active -> hsp

    vsync-active -> vsp

    de-active -> dep

    pixelclk-active -> clkp


    dispflags

    Variable dispflags contains a list of flags, separated by commas. Flags are often meant for a specific display port. If a flag is given, the value is set. If it is not given, the value is unset. For now only flags for LVDS are defined.


    lvds2ch: LVDS display is in Dual-Channel-Mode (1st channel even pixels, 2nd channel odd pixels (not supported yet)

    lvdsdup: Both LVDS channels show the same image, i.e. it is a duplicated image on similar displays (not supported yet)

    lvds24: LVDS is using 24 bits per Pixel, four LVDS lanes (default: 18 bits per pixel, three LVDS lanes)

    lvdsjeida: LVDS data is using JEIDA mode (Default: SPWG) (only relevant in 24-bit mode)


    Example:

    Code
    1. setenv dispflags lvds24,lvdsjeida



    Supply a boot image


    When you have defined your display as shown above (don't forget to use saveenv), then you'll see an F&S logo and the U-Boot version on the display on the next start. However this logo is *not* intended to be replaced with your logo. You can define your own (and even larger) logo (or other start image) in a completely independent way. This image can even fill the whole screen. There are gain two environment variables for this.


    splashimage: Address where the image to show is located in RAM

    splashprepare: Commands to be executed to get the image to RAM


    For now, the image must use the BMP format. First you have to think about where to store the image, so that it is available at the next start. For example use an own MTD partition in NAND. By setting the splashprepare variable, you load the image from this source to RAM and by setting the splashimage variable, you tell U-Boot that it should show a boot screen and where the image is located in RAM.


    Example:


    We have a small MTD partition UserDef that is exactly meant for things like that. So if you use a BMP image with 8 Bit/Pixel and you have a display resolution of 800x480, then the image will fit in this UserDef partition. The following commands will store the image there and prepares the board to show this image at every start.

    Code
    1. tftp startscreen.bmp
    2. nand erase.part UserDef
    3. nand write $loadaddr UserDef $filesize
    4. setenv splashprepare nand read $loadaddr UserDef $filesize
    5. setenv splashimage $loadaddr
    6. saveenv

    The first command loads the image via TFTP. Then the second and third commands store the image in the UserDef partition. The fourth command stores a nand read sequence in the splashprepare variable that will load the image from the UserDef partition to $loadaddr in RAM. The fifth command sets the splashimage variable that tells U-Boot that there is an image at $loadaddr in RAM that should be displayed.


    As I said, this is only the beginning with display support in U-Boot. We have plans for quite some more stuff, for example that several displays can be activated at t eh same time and that also texts and graphic primitives can be shown. In addition the transition from U-Boot to Linux should be made seamless. At the moment, the boot screen vanishes when Linux starts.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Yes. U-Boot is the same in the Buildroot and the Yocto releases.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.