IoTGateway/Features/Linux/Display

From ESS-WIKI
Revision as of 03:40, 4 September 2017 by Alex.cheng (Talk | contribs) (Modify description)

Jump to: navigation, search

Single Channel LVDS Panel

96LEDK-C070WV50NA1

The following operations are performed with RSB-4210 and BSP version 20120705 (i.MX5).
  • u-boot
get u-boot-2009.08_V1.1.patch and use it to patch by the following commands:
$ cd ${BSP_20120705_BASE}/source/u-boot-2009.08/
$ patch -p1 < ../u-boot-2009.08_V1.1.patch
include/asm-arm/clock.h
add one new enumerated PIXEL_CLK
enum {
        CPU_CLK = 0,
        PERIPH_CLK,
        AHB_CLK,
        IPG_CLK,
        IPG_PERCLK,
        UART_CLK,
        CSPI_CLK,
        DDR_CLK,
        NFC_CLK,
        ALL_CLK,
        PIXEL_CLK,
};
cpu/arm_cortexa8/mx53/generic.c
add one new case of the switch (clk_type) in the int clk_config(...)
case PIXEL_CLK:
        if (config_pixel_clk(ref, freq))
                return -1;
        break;
add the follow lines at the end of the file
int config_pixel_clk(u32 ref, u32 freq)
{
        int ret = 0;
        u32 pll = 0;
        struct pll_param pll_param;
 
        memset(&pll_param, 0, sizeof(struct pll_param));
 
        pll = freq;
        ret = calc_pll_params(ref, pll, &pll_param);
        if (ret != 0) {
                printf("Can't find pll parameters: %d\n",
                        ret);
                return ret;
        }
 
        return config_pll_clk(PLL4_CLK, &pll_param);
}
board/freescale/mx53_smd/mx53_smd.c
insert the follow lines between #ifdef CONFIG_ADV_SOM_CMX53 and #else
static struct fb_videomode lvds_g070y2 = {
         "G070Y2", 60, 800, 480, 33602, 100, 90, 10, 8, 2, 2,
         FB_SYNC_EXT,
         FB_VMODE_NONINTERLACED,
         0,
};
replace the part of the ... ipuv3_fb_init ... clk_config ... by the following:
ret = ipuv3_fb_init(&lvds_g070y2, di, IPU_PIX_FMT_RGB24,
                DI_PCLK_LDB, 30000000);
clk_config(CONFIG_REF_CLK_FREQ, 30*7, PIXEL_CLK);
  • u-boot environment variable
set bootargs_base as below:
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 ldb=single,di=1,ch0_map=JEIDA,ch1_map=JEIDA video=mxcdi0fb:RGB24,G070Y2 di1_primary,bpp=24'
  • linux kernel
arch/arm/mach-mx5/mx53_smd.c
insert the following lines into static struct struct fb_videomode ldb_modefb[] (or modify the existed "G070Y2") :
{
        "G070Y2", 60, 800, 480, 33602, 100, 90, 10, 8, 2, 2,
        0,
        FB_VMODE_NONINTERLACED, 0,
},

IDK-1115R-40XGC1E

  • u-boot environment variable
set bootargs_base as below:
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 enable_wait_mode=off video=mxcfb0:dev=ldb,1024x768M@60,if=RGB24 ldb=sin0'


AM-640480GETNQW-TA0H

      Android 4.4.2 (Kernel 3.0.35)

  • Timing 

          The clock frequency should be 25.175MHz. Need to modify the clock source form PLL2 (pll2_pfd_352M) to PLL5. (In arch/arm/mach-mx6/clock.c )

          Ref: https://cache.freescale.com/files/32bit/doc/app_note/AN4509.pdf
          Ref: https://community.nxp.com/thread/306801

       android/kernel_imx/arch/arm/mach-mx6/clock.c b/new/arch/arm/mach-mx6/clock.c

          (1) static struct clk ldb_di0_clk        .parent = &pll2_pfd_352M,  ==>  .parent = &pll5_video_main_clk,

          (2) static struct clk ldb_di1_clk        .parent = &pll2_pfd_352M,  ==>  .parent = &pll5_video_main_clk,

          (3) int __init mx6_clocks_init           clk_set_parent(&ldb_di0_clk, &pll2_pfd_352M);   --> clk_set_parent(&ldb_di0_clk, &pll5_video_main_clk);
                                                               clk_set_parent(&ldb_di1_clk, &pll2_pfd_352M);    --> clk_set_parent(&ldb_di1_clk, &pll5_video_main_clk);

       android/kernel_imx/drivers/video/mxc/ldb.c

          static struct fb_videomode ldb_modedb[] = {

                   {
                    "LDB-VGA", 25, 640, 480, 39682,
                     160, 80,
                     45, 22,
                       5, 1,
                     FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
                     FB_VMODE_NONINTERLACED,
                     FB_MODE_IS_VESA},

  • u-boot environment variable
set bootargs as below:

setenv bootargs console=ttymxc0,115200 androidboot.console=ttymxc0 vmalloc=400M init=/init video_mode=extension video=mxcfb0:dev=ldb,LDB-VGA,if=RGB666,bpp=32 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=28M,28M androidboot.hardware=freescale pcie_testmode=off

Dual Channel LVDS Panel

Calculating Timings parameter of LVDS Panel SOP OS: Yocto 1.8 Modify imx6qdl-advantech.dtsi Step1: In ldb parameter, add parameter --> split-mode; /* dual-channel setting *

  &ldb {
       ext_ref = "true";
       status = "okay";
       split-mode; /* dual-channel setting */

Step2: In lvds-channel@1, change [crtc = "ipu1-di1";] to [crtc = "ipu1-di0";]

       lvds-channel@1 {
               fsl,data-mapping = "spwg";
               fsl,data-width = <24>;
               /* crtc = "ipu1-di1"; */
               crtc = "ipu1-di0"; /* dual-channel setting */
               status = "okay";

Step3: In display-timings native-mode = <&timing0>, Delete the other panel parameter.Add" LTI370LN01 " Parameter

        //Dual channel panel
                       timing0: lti370ln01 {
                               clock-frequency = <148500000>;
                               hactive = <1920>;
                               vactive = <544>;
                               hback-porch = <70>;
                               hfront-porch = <70>;
                               vback-porch = <200>;
                               vfront-porch = <200>;
                               hsync-len = <140>;
                               vsync-len = <185>;
                       };

Calculating Timings parameter Check your panel Timing table Example : samsung 37 inch panel

Timing lvds.png
Timing lvds2.png

(1)clock-frequency --> Clock (MHz)

(2)hactive --> Horizontal Active Display Period

(3)vactive --> Vertical Active Display Period

(4)hback-porch + hfront-porch + hsync-len (Total) = Blanking = Horizontal Total - Horizontal Active Display Period

(5)vback-porch + vfront-porch + vsync-len (Total) = Blanking = Vertical Total - Vertical Active Display Period

U-boot command ( Must be add "video=mxcfb1:off")

     setenv mmcargs setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} video=mxcfb0:dev=ldb,1920x540M@60,if=RGB24 video=mxcfb1:off

Touchscreen Panel

E21D03U-C01-04 Irtouch-Dualtouch

IRTOUCH panel [Android 4.4]

 (1) Download IRTOUCH driver  (Irtouch-dualtouch-package-android-v14.2.0.0002.7z)
 (2) Download IRTOUCH SWAP mode tool (Swapmode.7z)
 (3) Swap mode
     You need to check and swap IRTOUCH 0X80.
     Please install SWAP mode tool in win7.
     Run SwapModeTool.exe and choose IRTOUCH 0X80.  
 (4) Installing the IRTOUCH Dual-touch Touchscreen Driver
     (a) irtouchusb-dt.c locate to kernel_imx/driver/input/touchscreen;
     (b) modify Makefile in kernel_imx/driver/input/touchscreen
         add:  "obj-$(CONFIG_TOUCHSCREEN_USBIRTOUCH_DT)	+= irtouchusb-dt.o"
     (c) modify Kconfig in kernel_imx/driver/input/touchscreen
         add:
         config TOUCHSCREEN_USBIRTOUCH_DT
                tristate "IRTOUCH USB Touchscreen Driver For single point"
                depends on USB_ARCH_HAS_HCD
                select USB
                help
                  Say Y here if you have a IRTOUCH based touchscreen
                  controller.
                  If unsure, say N.
                  To compile this driver as a module, choose M here: the
                  module will be called irtouch.
     (d)  You can make menuconfig select TOUCHSCREEN_USBIRTOUCH_DT and build kernel 
          Modify defconfig CONFIG_TOUCHSCREEN_USBIRTOUCH_DT=y
          example : imx6_rsb4410_android_kk44_defconfig
     (e)  Add one line to Android file system's ueventd.rc: 
          File path : device/fsl/imx6/etc/ueventd.freescale.rc  
          /dev/irtouch      0666   root    root
     (f)  Copy "Vendor_6615_Product_0081.idc" and "Vendor_6615_Product_0080.idc" file to the Android file system's /usr/idc directory. 
 (5)  Calibration the Touchscreen
         Install CalibrationTools.apk and run "CalibrationTools" to start calibrate touchscreen. 
         package name:com.irtouch.android.calibration    
         class name:  CalibrationToolsActivity

eGTouch touch panel [Android 4.2 ~ Android 4.4]

 (1) Add "eGalaxCalibrator" PRODUCK PACKAGES in device/fsl/imx6/iMX6.mk
 (2) Add eGtouch file path in device/fsl/imx6/iMX6.mk
     device/fsl/common/input/eGTouch_v2.5.2320.A/eGalaxTouch_VirtualDevice.idc:system/usr/idc/eGalaxTouch_VirtualDevice.idc \
     device/fsl/common/input/eGTouch_v2.5.2320.A/eGTouchA.ini:data/eGTouchA.ini \
     device/fsl/common/input/eGTouch_v2.5.2320.A/eGTouchD:system/bin/eGTouchD \
 (3) Add eGtouch idc and ini file in device/fsl/imx6/BoardConfigCommon.mK
     BOARD_USERDATAIMAGE_PARTITION_SIZE := 128M
     device/fsl/common/input/eGTouch_v2.5.2320.A/eGTouchA.ini
     device/fsl/common/input/eGTouch_v2.5.2320.A/eGTouchD
     device/fsl/common/input/eGTouch_v2.5.2320.A/eGalaxTouch_VirtualDevice.idc
 (4) Add service about eGTouch in device/fsl/rsb_4410/init.rc
      service eGTouchD /system/bin/eGTouchD
        class main
        user root
        group root
        oneshot      [Android 4.2 and 4.4 MP version is include eGTouch function]


IDK-1105R-50VGA1E

The following operations are performed using Linux BSP 4410LBV2080.
  • u-boot
apparently specify LDB-VGA in video item contained in the variable bootargs_base
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 enable_wait_mode=off video=mxcfb0:dev=ldb,LDB-VGA,if=RGB666'
  • linux kernel
in drivers/video/mxc/ldb.c, insert the following lines into static struct struct fb_videomode ldb_modefb[] (or modify the existed "LDB-VGA") :
 {
 "LDB-VGA", 60, 640, 480, 39722,
 50, 80,
 24, 18,
 30, 10,
 0,
 FB_VMODE_NONINTERLACED,
 FB_MODE_IS_DETAILED,},



The following operations are performed using Android BSP imx6ABV3040_2016-06-21 (Android 4.4)

  • Timing       

              The clock frequency should be 25.175MHz. Need to modify the clock source form PLL2 (pll2_pfd_352M) to PLL5. (In arch/arm/mach-mx6/clock.c )

              [1] [2]http://advdownload.advantech.com/productfile/Downloadfile1/1-Q18T9C/IDK-1105_USER_MANUAL_ED.1_FINAL.PDF

                

  • u-boot

           setenv bootargs console=ttymxc0,115200 androidboot.console=ttymxc0 vmalloc=400M init=/init video_mode=display3 video=mxcfb0:dev=ldb,LDB-VGA,if=RGB666                video=mxcfb1:off fbmem=28M,10M androidboot.hardware=freescale pcie_testmode=off  

  • Android kernel 

           

         android/kernel_imx/arch/arm/mach-mx6/clock.c b/new/arch/arm/mach-mx6/clock.c

          (1) static struct clk ldb_di0_clk        .parent = &pll2_pfd_352M,  ==>  .parent = &pll5_video_main_clk,

          (2) static struct clk gpu2d_core_clk        .parent = &pll2_pfd_352M,  ==>  .parent = &pll5_video_main_clk,

          (3)   if (cpu_is_mx6q())
                clk_set_parent(&gpu2d_core_clk[0], &pll3_usb_otg_main_clk);
                                                               clk_set_parent(&ldb_di0_clk, &pll2_pfd_352M);   --> clk_set_parent(&ldb_di0_clk, &pll5_video_main_clk);
                                                               clk_set_parent(&ldb_di1_clk, &pll2_pfd_352M);    --> clk_set_parent(&ldb_di1_clk, &pll5_video_main_clk);

       android/kernel_imx/drivers/video/mxc/ldb.c

          static struct fb_videomode ldb_modedb[] = {

                

       {
                         "LDB-VGA", 60, 640, 480, 39722,
                          50, 80,
                          24, 15,
                          15,  5,
                                0,
                      FB_VMODE_NONINTERLACED,
                      FB_MODE_IS_DETAILED,},

IDK-1107WR-40WVA1E

Linux

The following operations are performed with RSB-4410(4410LBV2080 and eGTouch_v2.5.3810.L-ma.zip)

  • u-boot
specify the variable bootargs_base as below:
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 enable_wait_mode=off video_mode=extension video=mxcfb0:dev=ldb,800x480M@60,if=RGB666,bpp=32 ldb=sin0'
  • linux kernel source
  1. drivers/input/evdev.c
    IDK-1107WR-40WVA1E linux evdev.png
  2. drivers/input/mousedev.c
    IDK-1107WR-40WVA1E linux mousedev.png
  3. drivers/input/joydev.c
    IDK-1107WR-40WVA1E linux joydev.png
  • linux kernel config
selection


Device Drivers --->
Input device support --->
<*> Event interface
Miscellaneous devices --->
<*> User level driver support
HID Devices --->
[*] /dev/hidraw raw HID device support
Special HID drivers --->
<*> HID Multitouch panels


deselection


Device Drivers --->
Input device support --->
[*] Touchscreens --->
< > USB Touchscreen Driver


  • root filesystem
IDK-1107WR-40WVA1E rootfs.png
add
/usr/local/eGTouchARMnonX
/etc/eGTouchL.ini
update
/etc/rc.d/rc.local

Android

The following operations are performed with RSB-4410(4410ABV1080 and eGTouch_v2.5.2320.A-all.zip)

  • u-boot
specify the variable bootargs_base as below:
setenv bootargs 'console=ttymxc0,115200 androidboot.console=ttymxc0 vmalloc=400M init=/init video=mxcfb0:dev=ldb,800x480M@60,if=RGB666,bpp=32 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=28M androidboot.hardware=freescale'
  • linux kernel config

Device Drivers --->

Input device support --->
<*> Event interface
Miscellaneous devices --->
<*> User level driver support
HID Devices --->
[*] /dev/hidraw raw HID device support
Special HID drivers --->
<*> HID Multitouch panels


copy and rename .config to arch/arm/configs/imx6_rsb4410_android_defconfig
  • root filesystem contained in BSP
android/device/fsl/rsb_4410/init.rc
RTENOTITLE
  • eGalaxCalibrator
IDK-1107WR-40WVA1E Apps.png
IDK-1107WR-40WVA1E eGTouchCalibrator 1.png IDK-1107WR-40WVA1E eGTouchCalibrator about.png
IDK-1107WR-40WVA1E eGTouchCalibrator 2.png IDK-1107WR-40WVA1E eGTouchCalibrator 3.png


IDK-1107WP-50WV-A1E

IMG 0279.JPG

For Yocto 1.8 and later

Display setting
u-boot

u-boot bootargs need to be set as below:

setenv mmcargs setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} video=mxcfb0:dev=ldb,800x480M@60,if=RGB24 video=mxcfb1:off video=mxcfb2:off;
kernel

Need to change clock source, so we modify dts file.

imx6q-rom3420-a1.dts is taken as an example:

Add the code as below to dts file

&clks {
       fsl,ldb-di0-parent = <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>;
       fsl,ldb-di1-parent = <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>;
};

If produst is i.MX6QP , we have to modify arch/arm/mach-imx/clk-imx6q.c as below

(It's just a workaround solution)

        //if (cpu_is_imx6q() && imx_get_soc_revision() == IMX_CHIP_REVISION_2_0) {
        //       clk[IMX6QDL_CLK_LDB_DI0_SEL]      = imx_clk_mux_flags("ldb_di0_sel", base + 0x2c, 9,  3, ldb_di_sels,      ARRAY_SIZE(ldb_di_sels), CLK_SET_RATE_PARENT);
        //       clk[IMX6QDL_CLK_LDB_DI1_SEL]      = imx_clk_mux_flags("ldb_di1_sel", base + 0x2c, 12, 3, ldb_di_sels,      ARRAY_SIZE(ldb_di_sels), CLK_SET_RATE_PARENT);
        //} else {
               /*
                * The LDB_DI0/1_SEL muxes are registered read-only due to a hardware
                * bug. Set the muxes to the requested values before registering the
                * ldb_di_sel clocks.
                */
               disable_anatop_clocks();
               init_ldb_clks(np);
               clk[IMX6QDL_CLK_LDB_DI0_SEL]      = imx_clk_mux_ldb("ldb_di0_sel", base + 0x2c, 9,  3, ldb_di_sels,      ARRAY_SIZE(ldb_di_sels));
               clk[IMX6QDL_CLK_LDB_DI1_SEL]      = imx_clk_mux_ldb("ldb_di1_sel", base + 0x2c, 12, 3, ldb_di_sels,      ARRAY_SIZE(ldb_di_sels));
        //}


Touch setting
kernel config setting

You could check this by make menuconfig

Necessary

Device Drivers --->
  Input device support --->
         <*> Event interface
         Miscellaneous devices --->
               <*> User level driver support
  HID support --->
         [*] /dev/hidraw raw HID device support
               Special HID drivers --->
                   <*> HID Multitouch panels

Remove

Device Drivers --->
      Input device support --->
            [*] Touchscreens --->
                < > USB Touchscreen Driver
Touch calibration on Yocto
Step 1
TocuhCalibrationonYocto1.png
Step 2
TocuhCalibrationonYocto2.png
Step 3
TocuhCalibrationonYocto3.png

HOWTOs

How to set display in u-boot command

Set HDMI in u-boot command mode is taken as an example:

# setenv mmcargs setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb1:off video=mxcfb2:off;boot

Set LVDS in u-boot command mode is taken as an example:

# setenv mmcargs setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} video=mxcfb0:dev=ldb,800x480M@60,if=RGB24 video=mxcfb1:off video=mxcfb2:off;boot

Set VGA in u-boot command mode is taken as an example:

# setenv mmcargs setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} video=mxcfb0:dev=lcd,1920x1080M@60,if=RGB24 video=mxcfb1:off video=mxcfb2:off;boot

How to fix display resolution

Set resolution in u-boot command mode Set HDMI 640x480 and VGA 1920x1080 is taken as an example:

# setenv mmcargs setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} video=mxcfb0:dev=hdmi,640x480M@60,if=RGB24 video=mxcfb1:dev=lcd,1920x1080M@60,if=RGB24 video=mxcfb2:off;boot

Set HDMI 1920x1080 and VGA 640x480 is taken as an example:

# setenv mmcargs setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb1:dev=lcd,640x480M@60,if=RGB24 video=mxcfb2:off;boot

How to get the current display mode

# cat /sys/class/graphics/fb0/mode
U:1920x1080p-60

How to get the supported display modes

# cat /sys/class/graphics/fb0/modes
U:1280x720p-120
U:1280x720p-100
U:1920x1080p-30
U:1920x1080p-25
U:1920x1080p-24
U:1920x1080p-50
U:1440x576p-50
U:1440x576p-50
U:1440x288p-50
U:1440x288p-50
U:1280x720p-50
U:720x576p-50
U:720x576p-50
U:1920x1080p-60
U:1440x480p-60
U:1440x480p-60
U:1440x240p-60
U:1440x240p-60
U:1280x720p-60
U:720x480p-60
U:720x480p-60
U:640x480p-60

How to get the monitor's EDID

# i2cdump -f -y -r 0x00-0x7F 2 0x50
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 ff ff ff ff ff ff 00 5a 63 28 0e 01 01 01 01    ........Zc(?????
10: 22 16 01 03 08 30 1b 78 2e e6 75 a4 56 4f 9e 27    "????0?x.?u?VO?'
20: 0f 50 54 bf ef 80 b3 00 a9 40 95 00 81 80 81 40    ?PT????.?@?.???@
30: 81 0f 81 00 71 4f 02 3a 80 18 71 38 2d 40 58 2c    ???.qO?:??q8-@X,
40: 45 00 dd 0c 11 00 00 1e 00 00 00 ff 00 53 44 44    E.???..?.....SDD
50: 31 32 33 34 41 31 33 37 36 0a 00 00 00 fd 00 32    1234A1376?...?.2
60: 4b 18 52 11 00 0a 20 20 20 20 20 20 00 00 00 fc    K?R?.?      ...?
70: 00 56 41 32 32 34 38 20 53 45 52 49 45 53 00 34    .VA2248 SERIES.4

How to control the screen blanking

to blank the primary display

# echo 1 > /sys/class/graphics/fb0/blank

to unblank the primary display

# echo 0 > /sys/class/graphics/fb0/blank

to set auto-blanking timeout seconds
The default linux framebuffer support will blank a console after 600 seconds of no activity.

kernel space
specify kernel parameter 'consoleblank=<n>' (where <n> means timeout seconds) in u-boot's parameter, bootargs_base
user space
use the command, setterm

About the following description, we use IDK-1107WR-40WVA1E panel to customize u-boot logo

Yocto 2.1

  • You can download patch file as below:


  • After you patch file, you need to build u-boot image(Example:ROM-3420 DDR 1G)
1. Source environment(Example: Toolchain path:/opt/poky/2.1/)
source /opt/poky/2.1/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
2. Build ROM-3420 1G u-boot image
make mx6qrom3420a1_1G_defconfig
make -j4
  • Generate u-boot logo image
1. For example: You can use picture editor tool(Photoshop) to generate a 800x480 u-boot logo image(16 bit BMP file)
U-boot logo image format:
File name: adv_uboot_logo.bmp
Resolution: 800x480
Depth: 16 Bit
BMP Advanced Modes: R5 G6 B5
2. Copy u-boot logo file(adv_uboot_logo.bmp) to linux OS(Example: Ubuntu), then produce a u-boot logo file that will actually be used
dd if=adv_uboot_logo.bmp of=adv_uboot_logo_new.bmp bs=1 skip=72
sync
  • Upload u-boot image and u-boot log image to eMMC by mgtool.
1. Modify ucl2.xml file
<LIST name="ADV u-boot" desc="update u-boot">
	<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot.imx">Loading U-boot</CMD>
	<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x12000000"
		loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE">Loading Kernel.</CMD>
	<CMD state="BootStrap" type="load" file="firmware/fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot" address="0x12C00000"
		loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE">Loading Initramfs.</CMD>
	<CMD state="BootStrap" type="load" file="firmware/zImage-%dtb%.dtb" address="0x18000000"
		loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE">Loading device tree.</CMD>
	<CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>
	<!-- burn uboot image -->
	<CMD state="Updater" type="push" body="send" file="files/u-boot_crc.bin.crc">Sending u-boot.bin.crc</CMD>
	<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc% bs=512 seek=2">write u-boot.bin.crc</CMD>
	<CMD state="Updater" type="push" body="send" file="files/u-boot_crc.bin">Sending u-boot.bin</CMD>
	<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc% bs=512 seek=3">write u-boot.bin</CMD>
	<!-- burn adv u-boot logo image -->
	<CMD state="Updater" type="push" body="send" file="files/adv_uboot_logo_new.bmp" ifdev="MX6Q">Sending u-boot logo</CMD>
	<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc% bs=512 seek=2048 conv=fsync">write u-boot logo</CMD>
	<CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
  </LIST>
2. Modify cfg.ini file
[LIST]
name = ADV u-boot
3. Copy "u-boot_crc.bin.crc", "u-boot_crc.bin" and "adv_uboot_logo_new.bmp" files to "3420A1LIVXXX_1G_mfgtools\Profiles\Linux\OS Firmware\files" folder
4. Finally, you can refer to Mfgtool to update u-boot image and u-boot logo image

LTIB

The following operations demonstrate how to customize one 800*480 boot logo for ROM-3420 with imx6LBV2210.

  • get one 800*480 8bpp BMP ready, or convert from PPM to BMP file
$ ppmtobmp -bpp=8 uboot_logo.ppm > uboot_logo.bmp
  • convert to C file
$ xxd -i uboot_logo.bmp > uboot_logo.c
  • create new u-boot-2009.08/board/freescale/common/adv_bmp_reversed_800x480.c
unsigned char adv_bmp_reversed_800x480[] = {
//hexvalue copyed from uboot_logo.c
//...
//...
}
unsigned int adv_bmp_reversed_800x480_size = sizeof(adv_bmp_reversed_800x480);
  • u-boot-2009.08/board/freescale/common/Makefile
#COBJS-${CONFIG_VIDEO_MX5} += fsl_bmp_600x400.o fsl_bmp_reversed_600x400.o   
COBJS-${CONFIG_ADVANTECH}  += adv_bmp_reversed_800x480.o
  • Check the ADV loader version. For example: The ADV loader version is V2.210 in the following message
Adv-Boot 2009.08-advantech_rom3420_1G_V2.210_svn414 (Mar 14 2014 - 09:51:19)
  • u-boot-2009.08/board/freescale/mx6q_rom-3420/mx6q_rom-3420.c
1. If ADV loader version of the device is less than the V.2350 version, modify the content as follows:
//extern unsigned char fsl_bmp_reversed_600x400[];
//extern int fsl_bmp_reversed_600x400_size;
extern unsigned char adv_bmp_reversed_800x480[];
extern int adv_bmp_reversed_800x480_size;
#if defined CONFIG_ADVANTECH
         // AUO 7.0 inch color TFT LCD module G070VW01 V0
         "WVGA", 60, 800, 480, 33898, 96, 24, 3, 10, 72, 7,
         FB_SYNC_EXT,
         FB_VMODE_NONINTERLACED,
         FB_MODE_IS_DETAILED,
#else
         "XGA", 60, 1024, 768, 15385, 220, 40, 21, 7, 60, 10,
         FB_SYNC_EXT,
         FB_VMODE_NONINTERLACED,
         0,
#endif
#ifdef CONFIG_ADVANTECH
    s = getenv("uboot_splashimage");
#else
    s = getenv("splashimage");
#endif
 
    if (NULL == s) {
        puts("env splashimage not found!\n");
#ifdef CONFIG_ADVANTECH
        puts("uboot_splashimage!\n");
#else
        puts("env splashimage not found!\n");
#endif
        return -1;
#ifdef CONFIG_ADVANTECH
        // The di_clk_val is set according to LVDS display panel? spec.
        // It also needs to comply with the pixelclock in fb_videomode structure.
        //     pixclock=(10^12)/clk_freq
        ret = ipuv3_fb_init(&lvds_xga, di, IPU_PIX_FMT_RGB666,
                        DI_PCLK_LDB, 29500000);
#else
        ret = ipuv3_fb_init(&lvds_xga, di, IPU_PIX_FMT_RGB666,
                        DI_PCLK_LDB, 65000000);
#endif
    char *s;
    ulong addr;
 
#ifdef CONFIG_ADVANTECH
    s = getenv("uboot_splashimage");
#else
    s = getenv("splashimage");
#endif
 
    if (s != NULL) {
        addr = simple_strtoul(s, NULL, 16);
2. If ADV loader version of the device is larger than the V.2350 version, modify the content as follows:
//extern unsigned char fsl_bmp_reversed_600x400[];
//extern int fsl_bmp_reversed_600x400_size;
extern unsigned char adv_bmp_reversed_800x480[];
extern int adv_bmp_reversed_800x480_size;
#if defined CONFIG_ADVANTECH
         // AUO 7.0 inch color TFT LCD module G070VW01 V0
         "WVGA", 60, 800, 480, 33898, 96, 24, 3, 10, 72, 7,
         FB_SYNC_EXT,
         FB_VMODE_NONINTERLACED,
         FB_MODE_IS_DETAILED,
#else
         "XGA", 60, 1024, 768, 15385, 220, 40, 21, 7, 60, 10,
         FB_SYNC_EXT,
         FB_VMODE_NONINTERLACED,
         0,
#endif
#ifdef CONFIG_ADVANTECH
        // The di_clk_val is set according to LVDS display panel? spec.
        // It also needs to comply with the pixelclock in fb_videomode structure.
        //     pixclock=(10^12)/clk_freq
        ret = ipuv3_fb_init(&lvds_xga, di, IPU_PIX_FMT_RGB666,
                        DI_PCLK_LDB, 29500000);
#else
        ret = ipuv3_fb_init(&lvds_xga, di, IPU_PIX_FMT_RGB666,
                        DI_PCLK_LDB, 65000000);
#endif
  • u-boot-2009.08/include/configs/mx6q_rom-3420_1G.h
#define CONFIG_SPLASH_SCREEN
  • u-boot parameter
1. If ADV loader version of the device is less than the V.2350 version, modify the content as follows:
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 enable_wait_mode=off video_mode=extension pcie_testmode=off video=mxcfb0:dev=ldb,800x480M@60,if=RGB24 video=mxcfb1:off video=mxcfb2:off'
setenv uboot_splashimage '0x30000000'
setenv splashpos '0,0'
setenv lvds_num 0
saveenv
2. If ADV loader version of the device is larger than the V.2350 version, modify the content as follows:
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 enable_wait_mode=off video_mode=extension pcie_testmode=off video=mxcfb0:dev=ldb,800x480M@60,if=RGB24 video=mxcfb1:off video=mxcfb2:off'
setenv splashimage '0x30000000'
setenv splashpos '0,0'
setenv lvds_num 0
saveenv

Android

The following operations demonstrate how to customize one 1024*768 boot logo for RSB-4410 with 4410ABV1080.

  • get one 1024*768 8bpp BMP ready, or convert from PPM to BMP file
$ ppmtobmp -bpp=8 uboot_logo.ppm > uboot_logo.bmp
  • convert to C file
$ xxd -i uboot_logo.bmp > uboot_logo.c
  • create new android/bootable/bootloader/uboot-imx/board/freescale/common/adv_bmp_reversed_1024x768.c
unsigned char adv_bmp_reversed_1024x768[] = {
//hexvalue copyed from uboot_logo.c
//...
//...
}
unsigned int adv_bmp_reversed_1024x768_size = sizeof(adv_bmp_reversed_1024x768);
  • android/bootable/bootloader/uboot-imx/board/freescale/common/Makefile
#COBJS-${CONFIG_ADVANTECH}  += adv_bmp_reversed_800x235.o   
COBJS-${CONFIG_ADVANTECH}  += adv_bmp_reversed_1024x768.o
  • android/bootable/bootloader/uboot-imx/board/freescale/mx6q_rsb-4410/mx6q_rsb-4410.c
//extern unsigned char adv_bmp_reversed_800x235[];
//extern int adv_bmp_reversed_800x235_size;
extern unsigned char adv_bmp_reversed_1024x768[];
extern int adv_bmp_reversed_1024x768_size;
#if defined CONFIG_ADVANTECH 
    // AUO 7.0 inch color TFT LCD module G070VW01 V0 
    //"WVGA", 60, 800, 480, 33898, 96, 24, 3, 10, 72, 7, 
    //FB_SYNC_EXT, 
    //FB_VMODE_NONINTERLACED, 
    //FB_MODE_IS_DETAILED, 
    //Customer 1024x768 panel   
    "TCG121XGLPAPNN", 60, 1024, 768, 14202, 150, 150 , 20, 15 , 15, 8, 
      FB_SYNC_EXT, 
      FB_VMODE_NONINTERLACED, 
      FB_MODE_IS_DETAILED, 
#else
#ifdef CONFIG_ADVANTECH 
  // The di_clk_val is set according to LVDS display panel spec. 
  // It also needs to comply with the pixelclock in fb_videomode structure. 
  //          pixclock=(10^12)/clk_freq 
  //ret = ipuv3_fb_init(&lvds_xga, di, IPU_PIX_FMT_RGB666, DI_PCLK_LDB, 29500000); 
    ret = ipuv3_fb_init(&lvds_xga, di, IPU_PIX_FMT_RGB666, DI_PCLK_LDB, 70412617); 
#else
if defined(CONFIG_ADVANTECH) 
    //addr = ioremap_nocache(iomem_to_phys(addr), adv_bmp_reversed_800x235_size); 
    addr = ioremap_nocache(iomem_to_phys(addr), adv_bmp_reversed_1024x768_size); 
#else
#if defined(CONFIG_ADVANTECH)
    //memcpy((char *)addr, (char *)adv_bmp_reversed_800x235, adv_bmp_reversed_800x235_size);
    memcpy((char *)addr, (char *)adv_bmp_reversed_1024x768, adv_bmp_reversed_1024x768_size);
#else
  • android/bootable/bootloader/uboot-imx/include/configs/mx6q_rsb-4410_1G.h
#define CONFIG_SPLASH_SCREEN
  • android/bootable/bootloader/uboot-imx/include/configs/mx6q_rsb-4410_1G_android.h
//"lvds_num=1\0"
"lvds_num=0\0"
  • u-boot parameter
setenv bootargs 'console=ttymxc0,115200 androidboot.console=ttymxc0 vmalloc=400M init=/init video_mode=extension video=mxcfb0:dev=ldb,1024x768@60,bpp=32,if=RGB666 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=10M androidboot.hardware=freescale pcie_testmode=off'

The following operations demonstrate how to customize one Android logo for RSB-4410 with 4410ABV1080.

  • replace android/frameworks/base/core/res/assets/images/android-logo-mask.png with the new 24bpp PNG file


How to modify dts file for setting different framebuffer

Example: Because there is one ipu in i.MX6 SOLO,we set LVDS and HDMI as our default display.

If we want to change HDMI and VGA as our default display ,we have to modify and re-compile dts file.

imx6dl-rom5420-b1.dts default as below:

&lcd {
       pinctrl-0 = <&pinctrl_ipu1_4>;
       status = "disabled"
};
&ldb {
       lvds-channel@0 {
       crtc = "ipu1-di0";
       };
       lvds-channel@1 {
       status ="disabled";
       };
};
&mxcfb3 {
       status = "okay";
};

mxcfb3 is mapped to lvds (you can check imx6qdl-advantech.dtsi)

We want to change to HDMI+VGA

&lcd {
       pinctrl-0 = <&pinctrl_ipu1_4>;
       status = "okay"; 
};
&ldb {
       status ="disabled";
};
&mxcfb2 {
       mode_str ="1366x768M@60";
       status = "okay";
};

Then re-compile dts file and replace

Limitation

i.MX6 Dual Display Capilities

Imx6 dual display cpabilities.png

i.MX6 Q/D

  • If you want to support two Full HD resloution , you have to allocate on two different ipu

i.MX6 Solo

  • Solo cpu have only one ipu ,so only support the highest resolution are 1920X1080 ,1366X768
  1. _
  2. http://advdownload.advantech.com/productfile/Downloadfile1/1-Q18T9C/IDK-1105_USER_MANUAL_ED.1_FINAL.PDF