Difference between revisions of "IoTGateway/Features/Linux/Display"

From ESS-WIKI
Jump to: navigation, search
(How to modify dts file for setting different framebuffer)
Line 1: Line 1:
<noinclude>{{DISPLAYTITLE:Linux Display Features}}</noinclude><includeonly>{{DISPLAYTITLE:Android Display Features}}</includeonly>
+
{{DISPLAYTITLE:Linux Display Features}}fckLR{{DISPLAYTITLE:Android Display Features}}fckLR
==Single Channel LVDS Panel==
+
 
===96LEDK-C070WV50NA1===
+
== Single Channel LVDS Panel ==
 +
 
 +
=== 96LEDK-C070WV50NA1 ===
 +
 
 
:The following operations are performed with RSB-4210 and BSP version 20120705 (i.MX5).
 
:The following operations are performed with RSB-4210 and BSP version 20120705 (i.MX5).
* u-boot
+
 
 +
*u-boot
 +
 
 
:get [[Media:u-boot-2009.08_V1.1.patch|u-boot-2009.08_V1.1.patch]] and use it to patch by the following commands:
 
:get [[Media:u-boot-2009.08_V1.1.patch|u-boot-2009.08_V1.1.patch]] and use it to patch by the following commands:
<div style="margin-left: 3em;"><source lang="bash">
+
<div style="margin-left: 3em;"><syntaxhighlight lang="bash">
 
$ cd ${BSP_20120705_BASE}/source/u-boot-2009.08/
 
$ cd ${BSP_20120705_BASE}/source/u-boot-2009.08/
 
$ patch -p1 < ../u-boot-2009.08_V1.1.patch
 
$ patch -p1 < ../u-boot-2009.08_V1.1.patch
</source></div>
+
</syntaxhighlight></div>
 
+
 
:<tt>include/asm-arm/clock.h</tt>
 
:<tt>include/asm-arm/clock.h</tt>
 
::add one new enumerated <code>PIXEL_CLK</code>
 
::add one new enumerated <code>PIXEL_CLK</code>
<div style="margin-left: 3em;"><source lang="C">
+
<div style="margin-left: 3em;"><syntaxhighlight lang="C">
 
enum {
 
enum {
 
         CPU_CLK = 0,
 
         CPU_CLK = 0,
Line 26: Line 30:
 
         PIXEL_CLK,
 
         PIXEL_CLK,
 
};
 
};
</source></div>
+
</syntaxhighlight></div>
 
+
 
:<tt>cpu/arm_cortexa8/mx53/generic.c</tt>
 
:<tt>cpu/arm_cortexa8/mx53/generic.c</tt>
 
::add one new case of the <code>switch (clk_type)</code> in the <code>int clk_config(...)</code>
 
::add one new case of the <code>switch (clk_type)</code> in the <code>int clk_config(...)</code>
<div style="margin-left: 3em;"><source lang="C">
+
<div style="margin-left: 3em;"><syntaxhighlight lang="C">
 
case PIXEL_CLK:
 
case PIXEL_CLK:
 
         if (config_pixel_clk(ref, freq))
 
         if (config_pixel_clk(ref, freq))
 
                 return -1;
 
                 return -1;
 
         break;
 
         break;
</source></div>
+
</syntaxhighlight></div>
 
::add the follow lines at the end of the file
 
::add the follow lines at the end of the file
<div style="margin-left: 3em;"><source lang="C">
+
<div style="margin-left: 3em;"><syntaxhighlight lang="C">
 
int config_pixel_clk(u32 ref, u32 freq)
 
int config_pixel_clk(u32 ref, u32 freq)
 
{
 
{
Line 56: Line 59:
 
         return config_pll_clk(PLL4_CLK, &pll_param);
 
         return config_pll_clk(PLL4_CLK, &pll_param);
 
}
 
}
</source></div>
+
</syntaxhighlight></div>
 
+
 
:<tt>board/freescale/mx53_smd/mx53_smd.c</tt>
 
:<tt>board/freescale/mx53_smd/mx53_smd.c</tt>
 
::insert the follow lines between <code>#ifdef CONFIG_ADV_SOM_CMX53</code> and <code>#else</code>
 
::insert the follow lines between <code>#ifdef CONFIG_ADV_SOM_CMX53</code> and <code>#else</code>
<div style="margin-left: 3em;"><source lang="C">
+
<div style="margin-left: 3em;"><syntaxhighlight lang="C">
 
static struct fb_videomode lvds_g070y2 = {
 
static struct fb_videomode lvds_g070y2 = {
 
         "G070Y2", 60, 800, 480, 33602, 100, 90, 10, 8, 2, 2,
 
         "G070Y2", 60, 800, 480, 33602, 100, 90, 10, 8, 2, 2,
Line 67: Line 69:
 
         0,
 
         0,
 
};
 
};
</source></div>
+
</syntaxhighlight></div>
 
::replace the part of the <code>... ipuv3_fb_init ... clk_config ...</code> by the following:
 
::replace the part of the <code>... ipuv3_fb_init ... clk_config ...</code> by the following:
<div style="margin-left: 3em;"><source lang="C">
+
<div style="margin-left: 3em;"><syntaxhighlight lang="C">
 
ret = ipuv3_fb_init(&lvds_g070y2, di, IPU_PIX_FMT_RGB24,
 
ret = ipuv3_fb_init(&lvds_g070y2, di, IPU_PIX_FMT_RGB24,
 
                 DI_PCLK_LDB, 30000000);
 
                 DI_PCLK_LDB, 30000000);
 
clk_config(CONFIG_REF_CLK_FREQ, 30*7, PIXEL_CLK);
 
clk_config(CONFIG_REF_CLK_FREQ, 30*7, PIXEL_CLK);
</source></div>
+
</syntaxhighlight></div>
 +
*u-boot environment variable
  
* u-boot environment variable
 
 
:set <code>bootargs_base</code> as below:
 
:set <code>bootargs_base</code> as below:
 +
 
{| class="wikitable" style="margin-left: 3em;"
 
{| class="wikitable" style="margin-left: 3em;"
 
|-
 
|-
|<tt>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'</tt>
+
| <tt>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'</tt>
 
|}
 
|}
  
* linux kernel
+
*linux kernel
 +
 
 
:<tt>arch/arm/mach-mx5/mx53_smd.c</tt>
 
:<tt>arch/arm/mach-mx5/mx53_smd.c</tt>
::insert the following lines into <code>static struct struct fb_videomode ldb_modefb[]</code> (or modify the existed <span style="color:red">"G070Y2"</span>) :
+
::insert the following lines into <code>static struct struct fb_videomode ldb_modefb[]</code> (or modify the existed <span style="color:red">"G070Y2"</span>)&nbsp;:
<div style="margin-left: 3em;"><source lang="C">
+
<div style="margin-left: 3em;"><syntaxhighlight lang="C">
 
{
 
{
 
         "G070Y2", 60, 800, 480, 33602, 100, 90, 10, 8, 2, 2,
 
         "G070Y2", 60, 800, 480, 33602, 100, 90, 10, 8, 2, 2,
Line 91: Line 95:
 
         FB_VMODE_NONINTERLACED, 0,
 
         FB_VMODE_NONINTERLACED, 0,
 
},
 
},
</source></div>
+
</syntaxhighlight></div>
 +
=== IDK-1115R-40XGC1E ===
 +
 
 +
*u-boot environment variable
  
===IDK-1115R-40XGC1E===
 
* u-boot environment variable
 
 
:set <code>bootargs_base</code> as below:
 
:set <code>bootargs_base</code> as below:
 +
 
{| class="wikitable" style="margin-left: 3em;"
 
{| class="wikitable" style="margin-left: 3em;"
 
|-
 
|-
|<tt>setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 enable_wait_mode=off video=mxcfb0:dev=ldb,1024x768M@60,if=RGB24 ldb=sin0'</tt>
+
| <tt>setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 enable_wait_mode=off video=mxcfb0:dev=ldb,1024x768M@60,if=RGB24 ldb=sin0'</tt>
 
|}
 
|}
  
==Dual Channel LVDS Panel==
+
 
Calculating Timings parameter of LVDS Panel SOP
+
 
OS: Yocto 1.8
+
=== AM-640480GETNQW-TA0H ===
Modify imx6qdl-advantech.dtsi
+
 
Step1: In ldb parameter, add parameter --> split-mode; /* dual-channel setting *
+
&nbsp; &nbsp; &nbsp; Android 4.4.2
<small>
+
 
  &ldb {
+
*u-boot environment variable
 +
 
 +
:set <code>bootargs_base</code> as below:
 +
 
 +
{| class="wikitable" style="margin-left: 3em;"
 +
|-
 +
|
 +
<tt>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</tt>
 +
 
 +
|}
 +
 
 +
==  ==
 +
 
 +
== 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 *  
 +
 
 +
<small> &ldb {
 
         ext_ref = "true";
 
         ext_ref = "true";
 
         status = "okay";
 
         status = "okay";
 
         split-mode; /* dual-channel setting */</small>
 
         split-mode; /* dual-channel setting */</small>
  
Step2: In lvds-channel@1, change [crtc = "ipu1-di1";] to [crtc = "ipu1-di0";]
+
Step2: In lvds-channel@1, change [crtc = "ipu1-di1";] to [crtc = "ipu1-di0";]  
<small>
+
 
        lvds-channel@1 {
+
<small>       lvds-channel@1 {
 
                 fsl,data-mapping = "spwg";
 
                 fsl,data-mapping = "spwg";
 
                 fsl,data-width = <24>;
 
                 fsl,data-width = <24>;
Line 121: Line 144:
 
                 status = "okay";</small>
 
                 status = "okay";</small>
  
Step3: In display-timings native-mode = <&timing0>, Delete the other panel parameter.Add" LTI370LN01 " Parameter
+
Step3: In display-timings native-mode = &lt;&timing0&gt;, Delete the other panel parameter.Add" LTI370LN01 " Parameter
 +
 
 
         <small>//Dual channel panel
 
         <small>//Dual channel panel
 
                         timing0: lti370ln01 {
 
                         timing0: lti370ln01 {
Line 135: Line 159:
 
                         };</small>
 
                         };</small>
  
Calculating Timings parameter
+
Calculating Timings parameter Check your panel Timing table Example&nbsp;: samsung 37 inch panel
Check your panel Timing table
+
Example : samsung 37 inch panel
+
:[[Image:Timing lvds.png|500px]]
+
:[[Image:Timing lvds2.png|300px]]
+
  
(1)clock-frequency  -->  Clock (MHz)
+
:[[File:Timing lvds.png|500px|Timing lvds.png]]
 +
:[[File:Timing lvds2.png|300px|Timing lvds2.png]]
  
(2)hactive                --> Horizontal Active Display Period
+
(1)clock-frequency --> Clock (MHz)
  
(3)vactive                --> Vertical Active Display Period
+
(2)hactive --> Horizontal Active Display Period
  
(4)hback-porch + hfront-porch + hsync-len (Total) = Blanking =  Horizontal Total - Horizontal Active Display Period
+
(3)vactive --> Vertical Active Display Period
  
(5)vback-porch + vfront-porch + vsync-len (Total) = Blanking = Vertical Total - 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")
+
U-boot command ( Must be add "video=mxcfb1:off")  
<small>
+
      setenv mmcargs setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} video=mxcfb0:dev=ldb,1920x540M@60,if=RGB24 video=mxcfb1:off</small>
+
  
==Touchscreen Panel==
+
<small>    setenv mmcargs setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} video=mxcfb0:dev=ldb,1920x540M@60,if=RGB24 video=mxcfb1:off</small>
===E21D03U-C01-04 Irtouch-Dualtouch===
+
 
IRTOUCH panel [Android 4.4]
+
== Touchscreen Panel ==
<small>  
+
 
  (1) Download IRTOUCH driver  ([[Media:Irtouch-dualtouch-package-android-v14.2.0.0002.7z|Irtouch-dualtouch-package-android-v14.2.0.0002.7z]])
+
=== E21D03U-C01-04 Irtouch-Dualtouch ===
 +
 
 +
IRTOUCH panel [Android 4.4]  
 +
 
 +
<small> (1) Download IRTOUCH driver  ([[Media:Irtouch-dualtouch-package-android-v14.2.0.0002.7z|Irtouch-dualtouch-package-android-v14.2.0.0002.7z]])
 
   (2) Download IRTOUCH SWAP mode tool ([[Media:Swapmode.7z|Swapmode.7z]])
 
   (2) Download IRTOUCH SWAP mode tool ([[Media:Swapmode.7z|Swapmode.7z]])
 
   (3) Swap mode
 
   (3) Swap mode
Line 184: Line 208:
 
       (d)  You can make menuconfig select TOUCHSCREEN_USBIRTOUCH_DT and build kernel  
 
       (d)  You can make menuconfig select TOUCHSCREEN_USBIRTOUCH_DT and build kernel  
 
           Modify defconfig CONFIG_TOUCHSCREEN_USBIRTOUCH_DT=y
 
           Modify defconfig CONFIG_TOUCHSCREEN_USBIRTOUCH_DT=y
           example : imx6_rsb4410_android_kk44_defconfig
+
           example&nbsp;: imx6_rsb4410_android_kk44_defconfig
 
       (e)  Add one line to Android file system's ueventd.rc:  
 
       (e)  Add one line to Android file system's ueventd.rc:  
           File path : device/fsl/imx6/etc/ueventd.freescale.rc   
+
           File path&nbsp;: device/fsl/imx6/etc/ueventd.freescale.rc   
 
           /dev/irtouch      0666  root    root
 
           /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.  
 
       (f)  Copy "Vendor_6615_Product_0081.idc" and "Vendor_6615_Product_0080.idc" file to the Android file system's /usr/idc directory.  
Line 194: Line 218:
 
           class name:  CalibrationToolsActivity</small>
 
           class name:  CalibrationToolsActivity</small>
  
eGTouch touch panel [Android 4.2 ~ Android 4.4]
+
eGTouch touch panel [Android 4.2 ~ Android 4.4]  
<small>  
+
 
  (1) Add "eGalaxCalibrator" PRODUCK PACKAGES in device/fsl/imx6/iMX6.mk
+
<small> (1) Add "eGalaxCalibrator" PRODUCK PACKAGES in device/fsl/imx6/iMX6.mk
 
   (2) Add eGtouch file path 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/eGalaxTouch_VirtualDevice.idc:system/usr/idc/eGalaxTouch_VirtualDevice.idc \
Line 202: Line 226:
 
       device/fsl/common/input/eGTouch_v2.5.2320.A/eGTouchD:system/bin/eGTouchD \
 
       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
 
   (3) Add eGtouch idc and ini file in device/fsl/imx6/BoardConfigCommon.mK
       BOARD_USERDATAIMAGE_PARTITION_SIZE := 128M
+
       BOARD_USERDATAIMAGE_PARTITION_SIZE&nbsp;:= 128M
 
       device/fsl/common/input/eGTouch_v2.5.2320.A/eGTouchA.ini
 
       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/eGTouchD
Line 212: Line 236:
 
         group root
 
         group root
 
         oneshot      [Android 4.2 and 4.4 MP version is include eGTouch function]
 
         oneshot      [Android 4.2 and 4.4 MP version is include eGTouch function]
</small>
+
</small>
 +
 
 +
 
 +
 
 +
=== IDK-1105R-50VGA1E ===
  
===IDK-1105R-50VGA1E===
 
 
:The following operations are performed using Linux BSP 4410LBV2080.
 
:The following operations are performed using Linux BSP 4410LBV2080.
  
* u-boot
+
*u-boot
 +
 
 
:apparently specify <span style="color:red">LDB-VGA</span> in video item contained in the variable <code>bootargs_base</code>
 
:apparently specify <span style="color:red">LDB-VGA</span> in video item contained in the variable <code>bootargs_base</code>
 
:<code>setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 enable_wait_mode=off video=mxcfb0:dev=ldb,<span style="color:red">LDB-VGA</span>,if=RGB666'</code>
 
:<code>setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 enable_wait_mode=off video=mxcfb0:dev=ldb,<span style="color:red">LDB-VGA</span>,if=RGB666'</code>
  
* linux kernel
+
*linux kernel
:in drivers/video/mxc/ldb.c, insert the following lines into <code>static struct struct fb_videomode ldb_modefb[]</code> (or modify the existed <span style="color:red">"LDB-VGA"</span>) :
+
 
<div style="margin-left: 2em;"><source lang="C">
+
:in drivers/video/mxc/ldb.c, insert the following lines into <code>static struct struct fb_videomode ldb_modefb[]</code> (or modify the existed <span style="color:red">"LDB-VGA"</span>)&nbsp;:
 +
<div style="margin-left: 2em;"><syntaxhighlight lang="C">
 
  {
 
  {
 
  "LDB-VGA", 60, 640, 480, 39722,
 
  "LDB-VGA", 60, 640, 480, 39722,
Line 232: Line 261:
 
  FB_VMODE_NONINTERLACED,
 
  FB_VMODE_NONINTERLACED,
 
  FB_MODE_IS_DETAILED,},
 
  FB_MODE_IS_DETAILED,},
</source></div>
+
</syntaxhighlight></div>
 +
=== IDK-1107WR-40WVA1E ===
 +
 
 +
==== Linux ====
  
===IDK-1107WR-40WVA1E===
 
====Linux====
 
 
The following operations are performed with RSB-4410(4410LBV2080 and [[Media:eGTouch_v2.5.3810.L-ma.zip|eGTouch_v2.5.3810.L-ma.zip]])
 
The following operations are performed with RSB-4410(4410LBV2080 and [[Media:eGTouch_v2.5.3810.L-ma.zip|eGTouch_v2.5.3810.L-ma.zip]])
  
* u-boot
+
*u-boot
 +
 
 
:specify the variable bootargs_base as below:
 
:specify the variable bootargs_base as below:
 
:<code>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'</code>
 
:<code>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'</code>
  
 
*linux kernel source
 
*linux kernel source
 +
 
#drivers/input/evdev.c
 
#drivers/input/evdev.c
#:[[File:IDK-1107WR-40WVA1E_linux_evdev.png|600px]]
+
#:[[File:IDK-1107WR-40WVA1E linux evdev.png|600px|IDK-1107WR-40WVA1E linux evdev.png]]
 
#drivers/input/mousedev.c
 
#drivers/input/mousedev.c
#:[[File:IDK-1107WR-40WVA1E_linux_mousedev.png|600px]]
+
#:[[File:IDK-1107WR-40WVA1E linux mousedev.png|600px|IDK-1107WR-40WVA1E linux mousedev.png]]
 
#drivers/input/joydev.c
 
#drivers/input/joydev.c
#:[[File:IDK-1107WR-40WVA1E_linux_joydev.png|600px]]
+
#:[[File:IDK-1107WR-40WVA1E linux joydev.png|600px|IDK-1107WR-40WVA1E linux joydev.png]]
 +
 
 +
*linux kernel config
  
* linux kernel config
 
 
:'''selection'''
 
:'''selection'''
<tt><small>
+
 
::Device Drivers --->  
+
 
:::Input device support --->
+
 
::::<*>   Event interface
+
::<tt><small>Device Drivers ---></small></tt>
::::Miscellaneous devices --->
+
:::<tt><small>Input device support ---></small></tt>
:::::<*>   User level driver support
+
::::<tt><small>&lt;*&gt; Event interface</small></tt>
:::HID Devices --->
+
::::<tt><small>Miscellaneous devices ---></small></tt>
::::[*]     /dev/hidraw raw HID device support
+
:::::<tt><small>&lt;*&gt; User level driver support</small></tt>
::::Special HID drivers --->
+
:::<tt><small>HID Devices ---></small></tt>
:::::<*> HID Multitouch panels
+
::::<tt><small>[*] /dev/hidraw raw HID device support</small></tt>
</small></tt>
+
::::<tt><small>Special HID drivers ---></small></tt>
 +
:::::<tt><small>&lt;*&gt; HID Multitouch panels</small></tt>
 +
 
 +
 
 +
 
 
:'''deselection'''
 
:'''deselection'''
<tt><small>
+
 
::Device Drivers --->
+
 
:::Input device support --->
+
 
::::[*]   Touchscreens --->
+
::<tt><small>Device Drivers ---></small></tt>
:::::< >   USB Touchscreen Driver
+
:::<tt><small>Input device support ---></small></tt>
</small></tt>
+
::::<tt><small>[*] Touchscreens ---></small></tt>
 +
:::::<tt><small>&lt; &gt; USB Touchscreen Driver</small></tt>
 +
 
 +
 
  
 
*root filesystem
 
*root filesystem
:[[File:IDK-1107WR-40WVA1E_rootfs.png|600px]]
+
 
 +
:[[File:IDK-1107WR-40WVA1E rootfs.png|600px|IDK-1107WR-40WVA1E rootfs.png]]
 
:add
 
:add
:: <tt>/usr/local/eGTouchARMnonX</tt>
+
::<tt>/usr/local/eGTouchARMnonX</tt>
:: <tt>/etc/eGTouchL.ini</tt>
+
::<tt>/etc/eGTouchL.ini</tt>
  
 
:update
 
:update
:: <tt>/etc/rc.d/rc.local</tt>
+
::<tt>/etc/rc.d/rc.local</tt>
 +
 
 +
==== Android ====
  
====Android====
 
 
The following operations are performed with RSB-4410(4410ABV1080 and [[Media:eGTouch_v2.5.2320.A-all.zip|eGTouch_v2.5.2320.A-all.zip]])
 
The following operations are performed with RSB-4410(4410ABV1080 and [[Media:eGTouch_v2.5.2320.A-all.zip|eGTouch_v2.5.2320.A-all.zip]])
  
* u-boot
+
*u-boot
 +
 
 
:specify the variable bootargs_base as below:
 
:specify the variable bootargs_base as below:
 +
 
{| class="wikitable" style="margin-left: 2em;"
 
{| class="wikitable" style="margin-left: 2em;"
 
|-
 
|-
|<tt>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'</tt>
+
| <tt>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'</tt>
 
|}
 
|}
  
* linux kernel config
+
*linux kernel config
 +
 
 
{| class="wikitable" style="margin-left: 2em; line-height: 0"
 
{| class="wikitable" style="margin-left: 2em; line-height: 0"
 
|-
 
|-
|<tt>
+
|  
Device Drivers --->  
+
<tt>Device Drivers ---></tt>
:Input device support --->
+
 
::<span style="color:red">'''<*>'''</span>   Event interface
+
:<tt>Input device support ---> </tt>
::Miscellaneous devices --->
+
::<tt><span style="color:red">'''&lt;*&gt;'''</span> Event interface</tt>
:::<span style="color:red">'''<*>'''</span>   User level driver support
+
::<tt>Miscellaneous devices ---> </tt>
:HID Devices --->
+
:::<tt><span style="color:red">'''&lt;*&gt;'''</span> User level driver support</tt>
::<span style="color:red">'''[*]'''</span>     /dev/hidraw raw HID device support
+
:<tt>HID Devices ---> </tt>
::Special HID drivers --->
+
::<tt><span style="color:red">'''[*]'''</span> /dev/hidraw raw HID device support</tt>
:::<span style="color:red">'''<*>'''</span> HID Multitouch panels
+
::<tt>Special HID drivers ---> </tt>
</tt>
+
:::<tt><span style="color:red">'''&lt;*&gt;'''</span> HID Multitouch panels</tt>
 +
 
 +
 
 +
 
 
|}
 
|}
 +
 
:copy and rename <code>.config</code> to <code>arch/arm/configs/imx6_rsb4410_android_defconfig</code>
 
:copy and rename <code>.config</code> to <code>arch/arm/configs/imx6_rsb4410_android_defconfig</code>
  
* root filesystem contained in BSP
+
*root filesystem contained in BSP
 +
 
 
:android/device/fsl/rsb_4410/init.rc
 
:android/device/fsl/rsb_4410/init.rc
:[[File:IDK-1107WR-40WVA1E_android_init_rc.png]]
+
:[[File:IDK-1107WR-40WVA1E android init rc.png|RTENOTITLE]]
* eGalaxCalibrator
+
:[[File:IDK-1107WR-40WVA1E_Apps.png|640px]]
+
:[[File:IDK-1107WR-40WVA1E_eGTouchCalibrator_1.png|400px]] [[File:IDK-1107WR-40WVA1E_eGTouchCalibrator_about.png|400px]]
+
:[[File:IDK-1107WR-40WVA1E_eGTouchCalibrator_2.png|400px]] [[File:IDK-1107WR-40WVA1E_eGTouchCalibrator_3.png|400px]]
+
  
<section begin=howtos/>
+
*eGalaxCalibrator
==HOWTOs==
+
  
===How to fix display resolution===
+
:[[File:IDK-1107WR-40WVA1E Apps.png|640px|IDK-1107WR-40WVA1E Apps.png]]
Set resolution in '''u-boot command mode'''
+
:[[File:IDK-1107WR-40WVA1E eGTouchCalibrator 1.png|400px|IDK-1107WR-40WVA1E eGTouchCalibrator 1.png]] [[File:IDK-1107WR-40WVA1E eGTouchCalibrator about.png|400px|IDK-1107WR-40WVA1E eGTouchCalibrator about.png]]
Set HDMI 640x480 and VGA 1920x1080 is taken as an example:
+
:[[File:IDK-1107WR-40WVA1E eGTouchCalibrator 2.png|400px|IDK-1107WR-40WVA1E eGTouchCalibrator 2.png]] [[File:IDK-1107WR-40WVA1E eGTouchCalibrator 3.png|400px|IDK-1107WR-40WVA1E eGTouchCalibrator 3.png]]
 +
 
 +
<section begin="howtos"></section>
 +
 
 +
== HOWTOs ==
 +
 
 +
=== How to fix display resolution ===
 +
 
 +
Set resolution in '''u-boot command mode''' Set HDMI 640x480 and VGA 1920x1080 is taken as an example:
  
 
{| class="wikitable" style="margin-left: 2em;"
 
{| class="wikitable" style="margin-left: 2em;"
 
|-
 
|-
|# setenv mmcargs setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} video=mxcfb0:dev=hdmi,'''640x480'''M@60,if=RGB24 video=mxcfb1:dev=lcd,'''1920x1080'''M@60,if=RGB24 video=mxcfb2:off;boot
+
| # setenv mmcargs setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} video=mxcfb0:dev=hdmi,'''640x480'''M@60,if=RGB24 video=mxcfb1:dev=lcd,'''1920x1080'''M@60,if=RGB24 video=mxcfb2:off;boot
 
|}
 
|}
  
Line 331: Line 384:
 
{| class="wikitable" style="margin-left: 2em;"
 
{| class="wikitable" style="margin-left: 2em;"
 
|-
 
|-
|# setenv mmcargs setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} video=mxcfb0:dev=hdmi,'''1920x1080'''M@60,if=RGB24 video=mxcfb1:dev=lcd,'''640x480'''M@60,if=RGB24 video=mxcfb2:off;boot
+
| # setenv mmcargs setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} video=mxcfb0:dev=hdmi,'''1920x1080'''M@60,if=RGB24 video=mxcfb1:dev=lcd,'''640x480'''M@60,if=RGB24 video=mxcfb2:off;boot
 
|}
 
|}
  
===How to get the current display mode===
+
=== How to get the current display mode ===
<div style="margin-left: 1em;"><source lang="TEXT">
+
<div style="margin-left: 1em;"><syntaxhighlight lang="TEXT">
 
# cat /sys/class/graphics/fb0/mode
 
# cat /sys/class/graphics/fb0/mode
 
U:1920x1080p-60
 
U:1920x1080p-60
</source></div>
+
</syntaxhighlight></div>
 
+
=== How to get the supported display modes ===
===How to get the supported display modes===
+
<div style="margin-left: 1em;"><syntaxhighlight lang="TEXT">
<div style="margin-left: 1em;"><source lang="TEXT">
+
 
# cat /sys/class/graphics/fb0/modes
 
# cat /sys/class/graphics/fb0/modes
 
U:1280x720p-120
 
U:1280x720p-120
Line 365: Line 417:
 
U:720x480p-60
 
U:720x480p-60
 
U:640x480p-60
 
U:640x480p-60
</source></div>
+
</syntaxhighlight></div>
 
+
=== How to get the monitor's EDID ===
===How to get the monitor's EDID===
+
<div style="margin-left: 1em;"><syntaxhighlight lang="TEXT">
<div style="margin-left: 1em;"><source lang="TEXT">
+
 
# i2cdump -f -y -r 0x00-0x7F 2 0x50
 
# i2cdump -f -y -r 0x00-0x7F 2 0x50
 
No size specified (using byte-data access)
 
No size specified (using byte-data access)
Line 380: Line 431:
 
60: 4b 18 52 11 00 0a 20 20 20 20 20 20 00 00 00 fc    K?R?.?      ...?
 
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
 
70: 00 56 41 32 32 34 38 20 53 45 52 49 45 53 00 34    .VA2248 SERIES.4
</source></div>
+
</syntaxhighlight></div>
 +
=== How to control the screen blanking ===
 +
 
 +
'''to blank the primary display'''
 +
 
 +
:<code># echo 1 > /sys/class/graphics/fb0/blank</code>
 +
 
 +
'''to unblank the primary display'''
 +
 
 +
:<code># echo 0 > /sys/class/graphics/fb0/blank</code>
 +
 
 +
'''to set auto-blanking timeout seconds'''<br/>The default linux framebuffer support will blank a console after 600 seconds of no activity.
  
===How to control the screen blanking===
 
'''to blank the primary display'''<br>
 
: <code># echo 1 > /sys/class/graphics/fb0/blank</code>
 
'''to unblank the primary display'''<br>
 
: <code># echo 0 > /sys/class/graphics/fb0/blank</code>
 
'''to set auto-blanking timeout seconds'''<br>
 
The default linux framebuffer support will blank a console after 600 seconds of no activity.
 
 
:kernel space
 
:kernel space
::specify kernel parameter 'consoleblank=<n>' (where <n> means timeout seconds) in u-boot's parameter, bootargs_base
+
::specify kernel parameter 'consoleblank=&lt;n&gt;' (where &lt;n&gt; means timeout seconds) in u-boot's parameter, bootargs_base
 
:user space
 
:user space
 
::use the command, <code>setterm</code>
 
::use the command, <code>setterm</code>
  
===How to customize u-boot logo===
+
=== How to customize u-boot logo ===
 +
 
 
The following operations demonstrate how to customize one 1024*768 boot logo for RSB-4410 with 4410ABV1080.
 
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
 
*get one 1024*768 8bpp BMP ready, or convert from PPM to BMP file
: <tt>$ ppmtobmp -bpp=8 uboot_logo.ppm > uboot_logo.bmp</tt>
+
 
 +
:<tt>$ ppmtobmp -bpp=8 uboot_logo.ppm > uboot_logo.bmp</tt>
  
 
*convert to C file
 
*convert to C file
: <tt>$ xxd -i uboot_logo.bmp > uboot_logo.c</tt>
+
 
 +
:<tt>$ xxd -i uboot_logo.bmp > uboot_logo.c</tt>
  
 
*create new <tt>android/bootable/bootloader/uboot-imx/board/freescale/common/adv_bmp_reversed_1024x768.c</tt>
 
*create new <tt>android/bootable/bootloader/uboot-imx/board/freescale/common/adv_bmp_reversed_1024x768.c</tt>
<div style="margin-left: 2em;"><source lang="C">
+
<div style="margin-left: 2em;"><syntaxhighlight lang="C">
 
unsigned char adv_bmp_reversed_1024x768[] = {
 
unsigned char adv_bmp_reversed_1024x768[] = {
 
//hexvalue copyed from uboot_logo.c
 
//hexvalue copyed from uboot_logo.c
Line 411: Line 469:
 
}
 
}
 
unsigned int adv_bmp_reversed_1024x768_size = sizeof(adv_bmp_reversed_1024x768);
 
unsigned int adv_bmp_reversed_1024x768_size = sizeof(adv_bmp_reversed_1024x768);
</source></div>
+
</syntaxhighlight></div>
 
+
*<tt>android/bootable/bootloader/uboot-imx/board/freescale/common/Makefile</tt>
* <tt>android/bootable/bootloader/uboot-imx/board/freescale/common/Makefile</tt>
+
<div style="margin-left: 2em;"><syntaxhighlight lang="make">
<div style="margin-left: 2em;"><source lang="make">
+
 
#COBJS-${CONFIG_ADVANTECH}  += adv_bmp_reversed_800x235.o   
 
#COBJS-${CONFIG_ADVANTECH}  += adv_bmp_reversed_800x235.o   
 
COBJS-${CONFIG_ADVANTECH}  += adv_bmp_reversed_1024x768.o  
 
COBJS-${CONFIG_ADVANTECH}  += adv_bmp_reversed_1024x768.o  
</source></div>
+
</syntaxhighlight></div>
 
+
*<tt>android/bootable/bootloader/uboot-imx/board/freescale/mx6q_rsb-4410/mx6q_rsb-4410.c</tt>
* <tt>android/bootable/bootloader/uboot-imx/board/freescale/mx6q_rsb-4410/mx6q_rsb-4410.c</tt>
+
<div style="margin-left: 2em;"><syntaxhighlight lang="C">
<div style="margin-left: 2em;"><source lang="C">
+
 
//extern unsigned char adv_bmp_reversed_800x235[];
 
//extern unsigned char adv_bmp_reversed_800x235[];
 
//extern int adv_bmp_reversed_800x235_size;
 
//extern int adv_bmp_reversed_800x235_size;
 
extern unsigned char adv_bmp_reversed_1024x768[];
 
extern unsigned char adv_bmp_reversed_1024x768[];
 
extern int adv_bmp_reversed_1024x768_size;
 
extern int adv_bmp_reversed_1024x768_size;
</source></div>
+
</syntaxhighlight></div>
 
:
 
:
<div style="margin-left: 2em;"><source lang="C">
+
<div style="margin-left: 2em;"><syntaxhighlight lang="C">
 
#if defined CONFIG_ADVANTECH  
 
#if defined CONFIG_ADVANTECH  
 
     // AUO 7.0 inch color TFT LCD module G070VW01 V0  
 
     // AUO 7.0 inch color TFT LCD module G070VW01 V0  
Line 440: Line 496:
 
       FB_MODE_IS_DETAILED,  
 
       FB_MODE_IS_DETAILED,  
 
#else
 
#else
</source></div>
+
</syntaxhighlight></div>
 
:
 
:
<div style="margin-left: 2em;"><source lang="C">
+
<div style="margin-left: 2em;"><syntaxhighlight lang="C">
 
#ifdef CONFIG_ADVANTECH  
 
#ifdef CONFIG_ADVANTECH  
 
   // The di_clk_val is set according to LVDS display panel spec.  
 
   // The di_clk_val is set according to LVDS display panel spec.  
Line 450: Line 506:
 
     ret = ipuv3_fb_init(&lvds_xga, di, IPU_PIX_FMT_RGB666, DI_PCLK_LDB, 70412617);  
 
     ret = ipuv3_fb_init(&lvds_xga, di, IPU_PIX_FMT_RGB666, DI_PCLK_LDB, 70412617);  
 
#else
 
#else
</source></div>
+
</syntaxhighlight></div>
 
:
 
:
<div style="margin-left: 2em;"><source lang="C">
+
<div style="margin-left: 2em;"><syntaxhighlight lang="C">
 
if defined(CONFIG_ADVANTECH)  
 
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_800x235_size);  
 
     addr = ioremap_nocache(iomem_to_phys(addr), adv_bmp_reversed_1024x768_size);  
 
     addr = ioremap_nocache(iomem_to_phys(addr), adv_bmp_reversed_1024x768_size);  
 
#else
 
#else
</source></div>
+
</syntaxhighlight></div>
 
:
 
:
<div style="margin-left: 2em;"><source lang="C">
+
<div style="margin-left: 2em;"><syntaxhighlight lang="C">
 
#if defined(CONFIG_ADVANTECH)
 
#if defined(CONFIG_ADVANTECH)
 
     //memcpy((char *)addr, (char *)adv_bmp_reversed_800x235, adv_bmp_reversed_800x235_size);
 
     //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);
 
     memcpy((char *)addr, (char *)adv_bmp_reversed_1024x768, adv_bmp_reversed_1024x768_size);
 
#else
 
#else
</source></div>
+
</syntaxhighlight></div>
 
+
*<tt>android/bootable/bootloader/uboot-imx/include/configs/mx6q_rsb-4410_1G.h</tt>
* <tt>android/bootable/bootloader/uboot-imx/include/configs/mx6q_rsb-4410_1G.h</tt>
+
<div style="margin-left: 2em;"><syntaxhighlight lang="C">
<div style="margin-left: 2em;"><source lang="C">
+
 
#define CONFIG_SPLASH_SCREEN
 
#define CONFIG_SPLASH_SCREEN
</source></div>
+
</syntaxhighlight></div>
 
+
*<tt>android/bootable/bootloader/uboot-imx/include/configs/mx6q_rsb-4410_1G_android.h</tt>
* <tt>android/bootable/bootloader/uboot-imx/include/configs/mx6q_rsb-4410_1G_android.h</tt>
+
<div style="margin-left: 2em;"><syntaxhighlight lang="C">
<div style="margin-left: 2em;"><source lang="C">
+
 
//"lvds_num=1\0"
 
//"lvds_num=1\0"
 
"lvds_num=0\0"
 
"lvds_num=0\0"
</source></div>
+
</syntaxhighlight></div>
 
+
*u-boot parameter
* u-boot parameter
+
  
 
{| class="wikitable" style="margin-left: 2em;"
 
{| class="wikitable" style="margin-left: 2em;"
 
|-
 
|-
|<tt>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'</tt>
+
| <tt>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'</tt>
 
|}
 
|}
  
===How to customize Android logo===
+
=== How to customize Android logo ===
 +
 
 
The following operations demonstrate how to customize one Android logo for RSB-4410 with 4410ABV1080.
 
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
 
*replace android/frameworks/base/core/res/assets/images/android-logo-mask.png with the new 24bpp PNG file
<section end=howtos/>
 
  
===How to modify dts file for setting different framebuffer===
+
<section end="howtos"></section>
Example:
+
 
Because there is one ipu in i.MX6 SOLO,we set LVDS and HDMI as our default display.
+
=== 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.
 
If we want to change HDMI and VGA as our default display ,we have to modify and re-compile dts file.
Line 517: Line 572:
  
 
We want to change to HDMI+VGA
 
We want to change to HDMI+VGA
 +
 
  &lcd {
 
  &lcd {
 
         pinctrl-0 = <&pinctrl_ipu1_4>;
 
         pinctrl-0 = <&pinctrl_ipu1_4>;
Line 531: Line 587:
 
Then re-compile dts file and replace
 
Then re-compile dts file and replace
  
==Limitation==
+
== Limitation ==
===i.MX6 Dual Display Capilities===
+
 
 +
=== i.MX6 Dual Display Capilities ===
  
:[[Image:Imx6 dual display cpabilities.png|1000px]]
+
:[[File:Imx6 dual display cpabilities.png|1000px|Imx6 dual display cpabilities.png]]
  
i.MX6 Q/D  
+
i.MX6 Q/D
  
 
*If you want to support two Full HD resloution , you have to allocate on two different ipu
 
*If you want to support two Full HD resloution , you have to allocate on two different ipu
Line 545: Line 602:
  
 
<!--
 
<!--
<div style="margin-left: 2em;"><source lang="C">
+
<div style="margin-left: 2em;"><span _fck_mw_customtag="true" _fck_mw_tagname="source" _fck_mw_tagtype="t" lang="C" _fck_mw_tagattributes="lang" class="fck_mw_special">fckLR</span></div>
</source></div>
+
 
-->
 
-->

Revision as of 08:16, 3 November 2016

fckLRWarning: Display title "Android Display Features" overrides earlier display title "Linux Display Features".fckLR

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

  • u-boot environment variable
set bootargs_base 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,},

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


HOWTOs

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

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