Porting LVDS LCD With Low Resolution to i.MX6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Porting LVDS LCD With Low Resolution to i.MX6

Porting LVDS LCD With Low Resolution to i.MX6

Some customers often use LVDS LCD with low resolution on i.MX6 platform, such as 320x240, but by defualt , linux bsp doesn't support low frequency pixel clock for LVDS module input.

Question:

    When we port LVDS LCD with 320x240 resolution to android4.2.2, we found pixel clock is not correct, it always output 38.9MHz, it is no probem for big resolution , for example 1024x768, but the clock we need for 320x240 LCD is 6.4MHz.

    According to the quesiton, Let us check IPU & LDB clock in i.MX6 datasheet at first :

LVDS-IMX6.png

IPU-CLOCKpng.png

From above table, if ldb clock is from IPU, we will not get 6.4MHz pixel clock, so we will have to adjust its source clock:

The following steps are procedure that ports LVDS LCD with 320x240 resolution to i.MX6Q.

1. Adding LVDS LCD timing structure to ldb.c

static struct fb_videomode ldb_modedb[] = {
{
      "LDB-XGA", 60, 320, 240, 155914,
      38, 20,
      15, 4,
      30, 3,
      0,
      FB_VMODE_NONINTERLACED,
      FB_MODE_IS_DETAILED,

},

{

     "LDB-1080P60", 60, 1920, 1080, 7692,

     100, 40,

     30, 3,

     10, 2,

     0,

     FB_VMODE_NONINTERLACED,

     FB_MODE_IS_DETAILED,},

};

2.Modifying clock source of ldb module

Checking /arch/arm/mach-mx6/clock.c, we can find there are 3 ldb's clock source : &pll5_video_main_clk, &pll2_pfd_352M, &pll2_pfd_400M,

static int _clk_ldb_di1_set_parent(struct clk *clk, struct clk *parent)

{

       u32 reg, mux;

       int rev = mx6q_revision();

       reg = __raw_readl(MXC_CCM_CS2CDR)

              & ~MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_MASK;

       mux = _get_mux6(parent, &pll5_video_main_clk,

              &pll2_pfd_352M, &pll2_pfd_400M,

              (rev == IMX_CHIP_REVISION_1_0) ?

               &pll3_pfd_540M :       /* MX6Q TO1.0 */

               &mmdc_ch1_axi_clk[0],     /* MX6Q TO1.1 and MX6DL */

              &pll3_usb_otg_main_clk, NULL);

       reg |= (mux << MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_OFFSET);

       __raw_writel(reg, MXC_CCM_CS2CDR);

       return 0;

}

By default, pll2_pfd_352M is configured as the clock source of ldb:

clk_set_parent(&ldb_di0_clk, &pll2_pfd_352M);

       clk_set_parent(&ldb_di1_clk, &pll2_pfd_352M);

We should change the clock source to be pll5_video_main_clk

clk_set_parent(&ldb_di0_clk, &pll5_video_main_clk,);

       clk_set_parent(&ldb_di1_clk, &pll5_video_main_clk,);

3. Configuring initial clock in board-mx6q_sabresd.c

static struct ipuv3_fb_platform_data sabresd_fb_data[] = {

       { /*fb0*/

       .disp_dev = "ldb",

       .interface_pix_fmt = IPU_PIX_FMT_RGB666,

       .mode_str = "LDB-XGA",

       .default_bpp = 16,

       .int_clk = false,

       .late_init = false,

}

int_clk=false means LDB clock is from PLL2_PFD_352 or pll5_video_main_clk; int_clk=true mean LDB clock if from IPU.

OK, after doing above steps, LVDS LCD with low resolution should normally work.

Freescale TICS team

Weidong.sun

2015-08-18

Labels (3)
Comments
m_c

Hello Weidong,

  We use i.MX6 quad platform and our kernel verison is 3.10.53.

  We can use lvds lcd with 1024x768/65M on i.MX6 quad platform successfully, but we get problem when we change the resolution of lvds lcd to 640x240/13M.

  So, we follow your steps above and try to see whether we can get 6.4M pixel clock. The test fails.

  The below is lvds setting we use:

  1. Adding lvds lcd timing structure on arch\arm\boot\dts\lec-imx6.dtsi

lvds-channel@0 {

fsl,data-mapping = "spwg"; /* spwg or jeida */

fsl,data-width = <24>;

primary;

status = "okay";

display-timings {

native-mode = <&timing0>;

timing0: hsd100pxn1 {

clock-frequency = <6400000>;

hactive = <320>;

vactive = <240>;

hback-porch = <38>;

hfront-porch = <20>;

vback-porch = <15>;

vfront-porch = <4>;

hsync-len = <30>;

vsync-len = <3>;

};

};

  };

  2. Modifying clock source of ldb module on arch\arm\mach-imx\clk-imx6q.c

/*

* Kernel parameter 'ldb_di_clk_sel' is used to select parent of ldb_di_clk,

* among the following clocks.

*   'pll5_video_div'

*   'pll2_pfd0_352m'

*   'pll2_pfd2_396m'

*   'mmdc_ch1_axi'

*   'pll3_usb_otg'

* Example format: ldb_di_clk_sel=pll5_video_div

* If the kernel parameter is absent or invalid, pll2_pfd0_352m will be

* selected by default.

*/

// modified by johnson here

static int ldb_di_sel = 0;

  3. Configuring initial clock on arch\arm\boot\dts\lec-imx6.dtsi

mxcfb3: fb@2 { /* IPU2 DI0: /dev/fb3=LVDS, fb4=IPU2's overlay

* Solo/DL: IPU1, fb2 shared with par. RGB, no overlay */

compatible = "fsl,mxc_sdc_fb";

disp_dev = "ldb";

interface_pix_fmt = "RGB666";

default_bpp = <16>;

int_clk = <0>;

late_init = <0>;

status = "okay";

};

  Do you have any suggestion about this problem???

Hi,

  I have a LCD display with same resolution 240*320 . The kernel is 3.10.53 for Lollipop. So I am using dtsi files. We  are expecting 5.6 or 7 MHZ but always getting 24 Mhz when PLL5 clock is used instead of PLL2 . Did you able to set 6.4M pixel clock for your board?.. Other than the changes documented by Wigros  Sun , any other additional changes required for Low resolution LCD to work on I.MX6 with kernel version 3.10.53?

Thanks & Regards,

Anjali

%3CLINGO-SUB%20id%3D%22lingo-sub-1119681%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EPorting%20LVDS%20LCD%20With%20Low%20Resolution%20to%20i.MX6%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1119681%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ESome%20customers%20often%20use%20LVDS%20LCD%20with%20low%20resolution%20on%20i.MX6%20platform%2C%20such%20as%20320x240%2C%20but%20by%20defualt%20%2C%20linux%20bsp%20doesn't%20support%20low%20frequency%20pixel%20clock%20for%20LVDS%20module%20input.%20%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2018pt%3B%22%3E%3CSTRONG%3EQuestion%3C%2FSTRONG%3E%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20When%20we%20port%20LVDS%20LCD%20with%20320x240%20resolution%20to%20android4.2.2%2C%20we%20found%20pixel%20clock%20is%20not%20correct%2C%20it%20always%20output%2038.9MHz%2C%20it%20is%20no%20probem%20for%20big%20resolution%20%2C%20for%20example%201024x768%2C%20but%20the%20clock%20we%20need%20for%20320x240%20LCD%20is%206.4MHz.%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20According%20to%20the%20quesiton%2C%20Let%20us%20check%20IPU%20%26amp%3B%20LDB%20clock%20in%20i.MX6%20datasheet%20at%20first%20%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LVDS-IMX6.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LVDS-IMX6.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F52626iA072E950F26858DF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22LVDS-IMX6.png%22%20alt%3D%22LVDS-IMX6.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22IPU-CLOCKpng.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22IPU-CLOCKpng.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F52582iB49ED28D8FF73BF7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22IPU-CLOCKpng.png%22%20alt%3D%22IPU-CLOCKpng.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EFrom%20above%20table%2C%20if%20ldb%20clock%20is%20from%20IPU%2C%20we%20will%20not%20get%206.4MHz%20pixel%20clock%2C%20so%20we%20will%20have%20to%20adjust%20its%20source%20clock%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThe%20following%20steps%20are%20procedure%20that%20ports%20LVDS%20LCD%20with%20320x240%20resolution%20to%20i.MX6Q.%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012pt%3B%22%3E%3CSTRONG%3E1.%20Adding%20LVDS%20LCD%20timing%20structure%20to%20ldb.c%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-family%3A%20'Calibri'%2C'sans-serif'%3B%20background%3A%20white%3B%22%3Estatic%20struct%20fb_videomode%20ldb_modedb%5B%5D%20%3D%20%7B%3CBR%20%2F%3E%20%7B%3CBR%20%2F%3E%3CEM%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22LDB-XGA%22%2C%2060%2C%20320%2C%20240%2C%20155914%2C%3C%2FSTRONG%3E%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2038%2C%2020%2C%3C%2FSTRONG%3E%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2015%2C%204%2C%3C%2FSTRONG%3E%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2030%2C%203%2C%3C%2FSTRONG%3E%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200%2C%3C%2FSTRONG%3E%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20FB_VMODE_NONINTERLACED%2C%3C%2FSTRONG%3E%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20FB_MODE_IS_DETAILED%2C%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-family%3A%20'Calibri'%2C'sans-serif'%3B%20background%3A%20white%3B%22%3E%7D%2C%3C%2FSPAN%3E%3C%2FP%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%3C%2FTD%3E%3CTD%3E%7B%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22LDB-1080P60%22%2C%2060%2C%201920%2C%201080%2C%207692%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20100%2C%2040%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2030%2C%203%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2010%2C%202%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20FB_VMODE_NONINTERLACED%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20FB_MODE_IS_DETAILED%2C%7D%2C%3C%2FP%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%7D%3B%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012pt%3B%22%3E%3CSTRONG%3E2.Modifying%20clock%20source%20of%20ldb%20module%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012pt%3B%22%3EChecking%20%2Farch%2Farm%2Fmach-mx6%2Fclock.c%2C%20we%20can%20find%20there%20are%203%20ldb's%20clock%20source%20%3A%20%3C%2FSPAN%3E%3CSTRONG%3E%26amp%3Bpll5_video_main_clk%2C%3C%2FSTRONG%3E%20%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.5pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3E%26amp%3B%3CSTRONG%3Epll2_pfd_352M%2C%20%3C%2FSTRONG%3E%3C%2FSPAN%3E%26amp%3B%3CSTRONG%3Epll2_pfd_400M%2C%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3Estatic%20int%20_clk_ldb_di1_set_parent(struct%20clk%20*clk%2C%20struct%20clk%20*parent)%3C%2FP%3E%3CP%3E%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20u32%20reg%2C%20mux%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20int%20rev%20%3D%20mx6q_revision()%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20reg%20%3D%20__raw_readl(MXC_CCM_CS2CDR)%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26amp%3B%20~MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_MASK%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20mux%20%3D%20_get_mux6(parent%2C%20%26amp%3Bpll5_video_main_clk%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26amp%3Bpll2_pfd_352M%2C%20%26amp%3Bpll2_pfd_400M%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20(rev%20%3D%3D%20IMX_CHIP_REVISION_1_0)%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26amp%3Bpll3_pfd_540M%20%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*%20MX6Q%20TO1.0%20*%2F%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26amp%3Bmmdc_ch1_axi_clk%5B0%5D%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*%20MX6Q%20TO1.1%20and%20MX6DL%20*%2F%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26amp%3Bpll3_usb_otg_main_clk%2C%20NULL)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20reg%20%7C%3D%20(mux%20%26lt%3B%26lt%3B%20MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_OFFSET)%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20__raw_writel(reg%2C%20MXC_CCM_CS2CDR)%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%200%3B%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012pt%3B%22%3E%3CSTRONG%3EBy%20default%2C%20%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.5pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012pt%3B%22%3E%3CSTRONG%3Epll2_pfd_352M%20is%20configured%20as%20the%20clock%20source%20of%20ldb%3A%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22text-indent%3A%2021.0pt%3B%22%3Eclk_set_parent(%26amp%3Bldb_di0_clk%2C%20%26amp%3Bpll2_pfd_352M)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20clk_set_parent(%26amp%3Bldb_di1_clk%2C%20%26amp%3Bpll2_pfd_352M)%3B%3C%2FP%3E%3CP%3EWe%20should%20change%20the%20clock%20source%20to%20be%20%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2012pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3Epll5_video_main_clk%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22text-indent%3A%2021.0pt%3B%22%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20red%3B%22%3Eclk_set_parent(%26amp%3Bldb_di0_clk%2C%20%26amp%3Bpll5_video_main_clk%2C)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20red%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20clk_set_parent(%26amp%3Bldb_di1_clk%2C%20%26amp%3Bpll5_video_main_clk%2C)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012pt%3B%22%3E%3CSTRONG%3E3.%20Configuring%20initial%20clock%20in%20board-mx6q_sabresd.c%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Estatic%20struct%20ipuv3_fb_platform_data%20sabresd_fb_data%5B%5D%20%3D%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%20%2F*fb0*%2F%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.disp_dev%20%3D%20%22ldb%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.interface_pix_fmt%20%3D%20IPU_PIX_FMT_RGB666%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.mode_str%20%3D%20%22LDB-XGA%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.default_bpp%20%3D%2016%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.int_clk%20%3D%20%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%3CSTRONG%3Efalse%3C%2FSTRONG%3E%3C%2FSPAN%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.late_init%20%3D%20false%2C%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3CP%3Eint_clk%3Dfalse%20means%20LDB%20clock%20is%20from%20%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.5pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3EPLL2_PFD_352%20or%20%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.5pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3Epll5_video_main_clk%3C%2FSPAN%3E%3B%20int_clk%3Dtrue%20mean%20LDB%20clock%20if%20from%20IPU.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.5pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.5pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.5pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3EOK%2C%20after%20doing%20above%20steps%2C%20LVDS%20LCD%20with%20low%20resolution%20should%20normally%20work.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.5pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.5pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.5pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3EFreescale%20TICS%20team%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.5pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3EWeidong.sun%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.5pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3E2015-08-18%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1119681%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAndroid%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX6_All%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1119683%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Porting%20LVDS%20LCD%20With%20Low%20Resolution%20to%20i.MX6%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1119683%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%20I%20have%20a%20LCD%20display%20with%20same%20resolution%20240*320%20.%20The%20kernel%20is%203.10.53%20for%20Lollipop.%20So%20I%20am%20using%20dtsi%20files.%20We%26nbsp%3B%20are%20expecting%205.6%20or%207%20MHZ%20but%20always%20getting%2024%20Mhz%20when%20PLL5%20clock%20is%20used%20instead%20of%20PLL2%20.%20Did%20you%20able%20to%20set%20%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E6.4M%20pixel%20clock%3C%2FSPAN%3E%20for%20your%20board%3F..%20Other%20than%20the%20changes%20documented%20by%20Wigros%26nbsp%3B%20Sun%20%2C%20any%20other%20additional%20changes%20required%20for%20Low%20resolution%20LCD%20to%20work%20on%20I.MX6%20with%20kernel%20version%203.10.53%3F%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThanks%20%26amp%3B%20Regards%2C%3C%2FP%3E%3CP%3EAnjali%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1119682%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Porting%20LVDS%20LCD%20With%20Low%20Resolution%20to%20i.MX6%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1119682%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3EHello%20Weidong%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%26nbsp%3B%20We%20use%20i.MX6%20quad%20platform%20and%20our%20kernel%20verison%20is%203.10.53.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%26nbsp%3B%20We%20can%20use%20lvds%20lcd%20with%201024x768%2F65M%20on%20i.MX6%20quad%20platform%20successfully%2C%20but%20we%20get%20problem%20when%20we%20change%20the%20resolution%20of%20lvds%20lcd%20to%20640x240%2F13M.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%26nbsp%3B%20So%2C%20we%20follow%20your%20steps%20above%20and%20try%20to%20see%20whether%20we%20can%20get%206.4M%20pixel%20clock.%20The%20test%20fails.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%26nbsp%3B%20The%20below%20is%20lvds%20setting%20we%20use%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%26nbsp%3B%201.%20Adding%20lvds%20lcd%20timing%20structure%20on%20arch%5Carm%5Cboot%5Cdts%5Clec-imx6.dtsi%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20lvds-channel%400%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20fsl%2Cdata-mapping%20%3D%20%22spwg%22%3B%20%2F*%20spwg%20or%20jeida%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20fsl%2Cdata-width%20%3D%20%26lt%3B24%26gt%3B%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20primary%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20status%20%3D%20%22okay%22%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20display-timings%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20native-mode%20%3D%20%26lt%3B%26amp%3Btiming0%26gt%3B%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20timing0%3A%20hsd100pxn1%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20clock-frequency%20%3D%20%26lt%3B6400000%26gt%3B%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20hactive%20%3D%20%26lt%3B320%26gt%3B%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20vactive%20%3D%20%26lt%3B240%26gt%3B%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20hback-porch%20%3D%20%26lt%3B38%26gt%3B%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20hfront-porch%20%3D%20%26lt%3B20%26gt%3B%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20vback-porch%20%3D%20%26lt%3B15%26gt%3B%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20vfront-porch%20%3D%20%26lt%3B4%26gt%3B%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20hsync-len%20%3D%20%26lt%3B30%26gt%3B%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20vsync-len%20%3D%20%26lt%3B3%26gt%3B%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%26nbsp%3B%20%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%26nbsp%3B%202.%20Modifying%20clock%20source%20of%20ldb%20module%20on%20arch%5Carm%5Cmach-imx%5Cclk-imx6q.c%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20%2F*%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20*%20Kernel%20parameter%20'ldb_di_clk_sel'%20is%20used%20to%20select%20parent%20of%20ldb_di_clk%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20*%20among%20the%20following%20clocks.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20*%26nbsp%3B%26nbsp%3B%20'pll5_video_div'%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20*%26nbsp%3B%26nbsp%3B%20'pll2_pfd0_352m'%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20*%26nbsp%3B%26nbsp%3B%20'pll2_pfd2_396m'%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20*%26nbsp%3B%26nbsp%3B%20'mmdc_ch1_axi'%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20*%26nbsp%3B%26nbsp%3B%20'pll3_usb_otg'%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20*%20Example%20format%3A%20ldb_di_clk_sel%3Dpll5_video_div%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20*%20If%20the%20kernel%20parameter%20is%20absent%20or%20invalid%2C%20pll2_pfd0_352m%20will%20be%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20*%20selected%20by%20default.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20%2F%2F%20modified%20by%20johnson%20here%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20static%20int%20ldb_di_sel%20%3D%200%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%26nbsp%3B%203.%20Configuring%20initial%20clock%20on%20arch%5Carm%5Cboot%5Cdts%5Clec-imx6.dtsi%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20mxcfb3%3A%20fb%402%20%7B%20%2F*%20IPU2%20DI0%3A%20%2Fdev%2Ffb3%3DLVDS%2C%20fb4%3DIPU2's%20overlay%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20*%20Solo%2FDL%3A%20IPU1%2C%20fb2%20shared%20with%20par.%20RGB%2C%20no%20overlay%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20compatible%20%3D%20%22fsl%2Cmxc_sdc_fb%22%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20disp_dev%20%3D%20%22ldb%22%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20interface_pix_fmt%20%3D%20%22RGB666%22%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20default_bpp%20%3D%20%26lt%3B16%26gt%3B%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20int_clk%20%3D%20%26lt%3B0%26gt%3B%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20late_init%20%3D%20%26lt%3B0%26gt%3B%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20status%20%3D%20%22okay%22%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%20%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22color%3A%20%231f497d%3B%22%3E%26nbsp%3B%20Do%20you%20have%20any%20suggestion%20about%20this%20problem%3F%3F%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎08-17-2015 11:45 PM
Updated by: