BSP Customization

From WIKI SECO

LVDS Customization Guide

The i.MX 6 based modules use the fbdev interface for mode setting and output configuration. Two IPU units are on the imx6q SOC while only one IPU unit on the imx6dl SOC. Each IPU unit has two display interfaces. The Vivante X driver can only make use of the first framebuffer /dev/fb0 while the others can be used through the fbdev framebuffer interface. The assignment of the possible display outputs to the framebuffers (scan-out engines) and their timing configuration can be done either on the Kernel command line or from within the device tree. The command line settings take precedence over the device tree. The first and third video output have an additional overlay framebuffer configured.


Video Output IPU Core Frambuffer boot name Framebuffer device Overlay Framebuffer Device
First IPU1 mxcfb0 /dev/fb0 /dev/fb1
Second IPU1 mxcfb1 /dev/fb2
Third IPU2 mxcfb2 /dev/fb3 /dev/fb4
Fourth IPU2 mxcfb3 /dev/fb5


Adding LVDS support in device tree file

In order to support custom LVDS display into the seco i.MX 6 module.Please follow the steps below to add the custom display timing data into the dtsi file.

For e.g Here we are going to add custom lvds display into the qseven i.MX 6 module.

Refer the signal timing specifications of LCD in the datasheet & then calculate the parameters of hback-porch, hfront-porch , vback-porch, vfront-porch , hsync-len and vsync-len. Here is the sample timing data for SVGA TFT LCD(800x600) 10.4 inches (BA104S01-100):

                     name = LBD-SVGA-BA
                     Clock-frequency = 39600000
                     Hactive = 800
                     Vactive = 600
                     Hback = 45
                     Hfront = 45
                     Vback = 25 
                     Vfront = 25 
                     Hsync = 10
                     Vsync = 10

Now go to the Qseven i.MX 6 .dtsi file path (arch/arm/boot/dts/imx6qdl-seco_lvds_display.dtsi), Please find below ldb structure to be add in the imx6qdl-seco_lvds_display.dtsi file.

                     $cd <linux-kernel-secoboards-imx6>/arch/arm/boot/dts
                     $vi imx6qdl-seco_lvds_display.dtsi
  • LDB struture format:
                      timing7: $name { 
		          clock-frequency = <$Clock-frequency>; 
			  hactive = <$Hactive>; 
			  vactive = <$Vactive>; 
			  hback-porch = <$Hback>; 
			  hfront-porch = <$Hfront>; 
			  vback-porch = <$Vback>; 
			  vfront-porch = <$Vfront>; 
			  hsync-len = <$Hsync>; 
			  vsync-len = <$Vsync>; 
		       };

To obtain information about the structure ldb, you can refer to the documentation presents into the kernel:

                       devicetree/bindings/drm/imx/ldb.txt
                       devicetree/bindings/fb/fsl_ipuv3_fb.txt

To compile the device tree file in manual Go to the path of kernel directory,

$cd <linux-kernel-secoboards-imx6>/ 
$export ARCH=arm 
$export CROSS_COMPILE="/opt/compilers/arm-poky-linux-gnueabi_X.X.X/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-"            
$make dtbs

U-Boot Frame Buffer Configuration steps for LVDS

To change the framebuffer configuration in u-boot by modifying the environment varible videomode. This videomode argument can be configured upto 3 independent displays .The added LVDS custom display as shown in below example.

 
           editenv videomode 
           edit: video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb1:dev=ldb,LDB-WVGA,if=RGB666 
           "video=mxcfb<N>:dev=<X>,<Displayname-resolution>,if=<Output Format>''

Example:

 
          video=mxcfb0:dev=ldb,LDB-SVGA-BA ,if=RGB24 --> Custom 10.4 '' (BA104S01-100)
          video=mxcfb0:dev=ldb,LDB-WVGA ,if=RGB666  --> SECO 7'' LVDS
          video=mxcfb0:dev=ldb,LDB-WXGA ,if=RGB24 --> SECO 15'' LVDS
          video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 --> HDMI 1080P

Note:

 
          printenv : To print the envionment variable
          editenv : To modify specific environment variable
          saveenv : saving the environment variable

Note: * Not applicable on SBC-B08 Seco board

The kernel parameter

Display Settings
Custom 10.4 (BA104S01-100) mxcfb0:dev=ldb,LDB-SVGA-BA ,if=RGB24
SECO 7 LVDS mxcfb0:dev=ldb,LDB-WVGA ,if=RGB666
SECO 15 LVDS mxcfb0:dev=ldb,LDB-WXGA ,if=RGB24
HDMI at 1080p mxcfb0:dev=hdmi,1920x1080M@60,if=RGB2

Note that there are four components to the video= clause:

mxcfbN: This display specifier defines the ordering of display devices under Linux. Note that there is not a 1:1 correspondence with /dev/fbN because /dev/fb1 and /dev/fb3 will be automatically configured as overlay devices for /dev/fb0 and /dev/fb2.
dev=X This clause specifies the output interface used for the display. Options are lcd for the parallel RGB interface, ldb for the LVDS interface and hdmi for the HDMI transmitter.
Displayname or resolution This clause can either define a named panel such as LDB-XGA or CLAA-WVGA or a resolution in VESA Coordinated Video Timings format. Named panels are defined in a board-specific file. For more information refere <kernelversion>/Documentation/fb
if=Framebuffer depth This clause defines the output format at the transmitter. Options include RGB666 for 18-bit panels and RGB24 for 24-bit displays. Note that this does not define the in memory bit depth of the frame buffer. That’s done with the bpp= kernel command-line parameter.

output option can be in one of the following options

Output Device Output Output Format
Parallel RGB lcd RGB24,RGB666
HDMI hdmi RGB24
VGA vdac RGB565
LVDS ldb depends on attached display

Note :Once custom display added in video-mode argument save the environment with saveenv command and proceed with the boot command.

I.Before Connecting LVDS in to Qseven CQ7-3.5 have to customize the Jumper settings like below,
  1.Jumper 3 - The pin number 1 & 2 should be plugged
  2.Jumper 4 - The pin number 2 & 3 should be plugged
Make sure that,If you did the Jumper settings correctly then & only can able to access the LVDS