liteSOM and LCD display

Example available on GitHub. Check liteboard LCD + touchscreen.

<uml w=100%> title LCD display and i.MX6UL\nblock diagram

node “i.MX6UL” {

package "LCD controller" {
  [LCD data]
  [LCD sync]
}
[Backlight]
[Touchscreen]

}

[LCD data] –> RGB888 RGB888 –> [LCD panel]

interface “VSYNC, HSYNC\nCLK, EN” as sync

[LCD sync] –> sync sync –> [LCD panel]

[Backlight] –> PWM PWM –> [LCD panel]

[Touchscreen] ←- ADC ADC ←- [LCD panel] </uml>

i.MX6UL has several built-in peripherals which can be used to build complete graphical interface:

  • eLCDIF - Enhanced LCD Interface,
  • TSC - Touch Screen Controller,
  • PWM - Pulse Width Modulation.

Below you can see how to configure liteboard to support lcd module.

On lcd we are using RVT7.0A800480TNWR00 TFT display produced by Riverdi. Below you can find short details about this device:

  • type: TFT/Transmissive/Normally white,
  • size: 7 inch,
  • resolution: 800 x 600,
  • backlight: 21 LEDs,
  • interface: 24-bit RGB,
  • touchscreen: resistive.

The eLCDIF can be used to drive a wide range of display devices. It supports:

  • displays with resolution up to 1366 x 768,
  • 8/16/18/24 bit LCD TFT displays,
  • ITU-R BT.656 mode including progressive-to-interlace feature and RGB to YCbCr 4:2:2 color space conversion to support 525/60 and 625/50 operation.

Basic configuration for eLCDIF is defined in imx6ul.dtsi file.

lcdif: lcdif@021c8000 {
    compatible = "fsl,imx6ul-lcdif", "fsl,imx28-lcdif";
    reg = <0x021c8000 0x4000>;
    interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
    clocks = <&clks IMX6UL_CLK_LCDIF_PIX>,
             <&clks IMX6UL_CLK_LCDIF_APB>,
             <&clks IMX6UL_CLK_DUMMY>;
    clock-names = "pix", "axi", "disp_axi";
    status = "disabled";
};

which is used by mxsfb driver.

In the mxsfb.txt file you can find documentation with information how to configure eLCDIF via device tree file.

In addition please check display-timing.txt file with information how to configure display timings.

&iomuxc {
  pinctrl_lcdif_ctrl: lcdifctrlgrp {
    fsl,pins = <
      MX6UL_PAD_LCD_CLK__LCDIF_CLK       0x79
      MX6UL_PAD_LCD_ENABLE__LCDIF_ENABLE 0x79
      MX6UL_PAD_LCD_HSYNC__LCDIF_HSYNC   0x79
      MX6UL_PAD_LCD_VSYNC__LCDIF_VSYNC   0x79
    >;
  };

  pinctrl_lcdif_dat: lcdifdatgrp {
    fsl,pins = <
      MX6UL_PAD_LCD_DATA00__LCDIF_DATA00  0x79
      MX6UL_PAD_LCD_DATA01__LCDIF_DATA01  0x79
      [...]
      MX6UL_PAD_LCD_DATA23__LCDIF_DATA23  0x79
    >;
  };
};


&lcdif {
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_lcdif_dat
               &pinctrl_lcdif_ctrl>;
  display = <&display0>;
  status = "okay";

  display0: display {
    bits-per-pixel = <32>;
    bus-width = <24>;

    display-timings {
      native-mode = <&timing0>;
      timing0: timing0 {
        clock-frequency = <30000000>;
        hactive = <800>;
        vactive = <480>;
        hfront-porch = <210>;
        hsync-len = <2>;
        hback-porch = <46>;
        vfront-

          
        

        
  • litesom/devicetree/lcd.txt
  • Last modified: 2021/05/10 13:40
  • by kateryna.kozakova