Two LVDS channels in separate mode with different frequencies on i.MX6DL

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

Two LVDS channels in separate mode with different frequencies on i.MX6DL

904 Views
NunoVilaca
Contributor II

We have 2 distinct displays connected to lvds in separate mode.    

Here's have the dtb:

&ldb {
   lvds-channel@0 {
      crtc = "ipu1-di0";
      fsl,data-mapping = "spwg";
      fsl,data-width = <24>;
      status = "okay";
      display-timings {
      native-mode = <&timing0>;
      timing0: lcd12 {
         clock-frequency = <40000000>;
         hactive = <800>;
         vactive = <600>;
         hback-porch = <88>;
         hfront-porch = <40>;
         vback-porch = <23>;
         vfront-porch = <39>;
         hsync-len = <128>;
         vsync-len = <4>;
         bpp = <24>;
       };
      };         
   };
   lvds-channel@1 {
      crtc = "ipu1-di1";
      fsl,data-mapping = "spwg";
      fsl,data-width = <24>;
      status = "okay";
      display-timings {
      native-mode = <&timing7>;
      timing7: lcd7 {
          clock-frequency = <51206400>;
          hactive = <1024>;
          vactive = <600>;
          hback-porch = <140>;
          hfront-porch = <160>;
          vback-porch = <20>;
          vfront-porch = <12>;
          hsync-len = <20>;
          vsync-len = <3>;
       };
      };
   };
};

Resolution and image is ok, but the frequency of the second display is set to 40Mhz, instead of the 51Mhz.

Debugging the kernel, i get the following output:

lvds0:

imx-ipuv3 2400000.ipu: dev 0 panel size = 800 x 600
imx-ipuv3 2400000.ipu: pixel clk = 40000000
imx-ipuv3 2400000.ipu: use special clk parent
imx-ipuv3 2400000.ipu: round pixel clk:39999998
imx-ipuv3 2400000.ipu: div:1
‍‍‍‍‍‍‍‍‍‍‍‍

lvds1:

imx-ipuv3 2400000.ipu: dev 1 panel size = 1024 x 600
imx-ipuv3 2400000.ipu: pixel clk = 51205000
imx-ipuv3 2400000.ipu: use special clk parent
imx-ipuv3 2400000.ipu: round pixel clk:39999998
imx-ipuv3 2400000.ipu: div:1
imx-ipuv3 2400000.ipu: IPU DMFC DC HIGH RESOLUTION: 1(0~3), 5B(4,5), 5F(6,7)

So It seems the device tree is ok, but the clock is being set to the parent, that seems to be the same as the lvds0. 

How can i fix this? it works well with some displays, that can tolerate this difference but not with others. 

We tested this in both kernel 3.10.53 and 4.1.15.

Tags (1)
0 Kudos
1 Reply

617 Views
igorpadykov
NXP Employee
NXP Employee

Hi Nuno

for clock parents one can look at linux/arch/arm/boot/dts/imx6qdl-sabresd.dtsi :
&clks {
    fsl,ldb-di0-parent = <&clks IMX6QDL_CLK_PLL2_PFD0_352M>;
    fsl,ldb-di1-parent = <&clks IMX6QDL_CLK_PLL2_PFD0_352M>;
};
linux-imx.git - i.MX Linux Kernel 

and  linux/arch/arm/mach-imx/clk-imx6q.c :
linux-imx.git - i.MX Linux Kernel 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos