AnsweredAssumed Answered

imx6q port lvds lcd in linux-4.1.15

Question asked by fulin chen on Apr 28, 2016
Latest reply on May 3, 2016 by fulin chen

Dear Community,

I'm in trouble,The question is as follows:

i added and modified nodes in arch/arm/boot/dts/imx6qdl-sabresd.dtsi:

        mxcfb1: fb@0 {

                compatible = "fsl,mxc_sdc_fb";

                disp_dev = "ldb";

                /*interface_pix_fmt = "RGB666";*/

                interface_pix_fmt = "RGB24";

                mode_str ="LDB-1080P60";

                default_bpp = <32>;

                int_clk = <0>;

                late_init = <0>;

               pwn-gpios = <&gpio1 2 1>;

               en-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>;

                status = "okay";

        };

...

&ldb {

        status = "okay";

        lvds-channel@0 {

                fsl,data-mapping = "spwg";

                fsl,data-width = <18>;

                status = "okay";

                display-timings {

                        native-mode = <&timing0>;

                        timing0: hsd100pxn1 {

                                clock-frequency = <83000000>;

                                hactive = <1920>;

                                vactive = <1080>;

                                hback-porch = <80>;

                                hfront-porch = <68>;

                                vback-porch = <15>;

                                vfront-porch = <15>;

                                hsync-len = <12>;

                                vsync-len = <8>;

                        };

                };

        };

 

        lvds-channel@1 {

                              ...(omitted)

                        };

                };

        };

};

 

and cat arch/arm/boot/dts/imx6q-sabresd.dts

&ldb {

        lvds-channel@0 {

                crtc = "ipu1-di0";//ipu2-di0 is it mind about this?

        };

 

 

        lvds-channel@1 {

                crtc = "ipu1-di1";//ipu2-di1

        };

};

 

 

&mxcfb1 {

        status = "okay";

};

 

 

&mxcfb2 {

        status = "disabled"; //okay

};

 

then the kernel log is:

....

MIPI DSI driver module loaded

mxc_sdc_fb fb@0: registered mxc display driver ldb

imx-ipuv3 2400000.ipu: IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)

...

 

it's black on the screen, no penguins logo. i thank is power sequence problem. my old kernel is linux-3.0, it is code have this in arch/arm/mach-mx6/board-mx6q_sabresd.c:

#define SABRESD_LCD_POWER_ON    IMX_GPIO_NR(1, 2)

#define SABRESD_LCD_BKLIGHT_PWN IMX_GPIO_NR(1, 7)

#define SABRESD_LCD_EN      IMX_GPIO_NR(4, 5)

 

static void lvdsPower(void) {

    gpio_request(SABRESD_LCD_POWER_ON, "lcd_power_on");

    gpio_direction_output(SABRESD_LCD_POWER_ON, 1);

    msleep(10);

    gpio_set_value(SABRESD_LCD_POWER_ON, 0);

    msleep(10);

    gpio_set_value(SABRESD_LCD_POWER_ON, 1);

   

    gpio_request(SABRESD_LCD_EN, "lcd_en");

    gpio_direction_output(SABRESD_LCD_EN, 1);

    gpio_set_value(SABRESD_LCD_EN, 1);

    gpio_export(SABRESD_LCD_EN,false);

    //gpio_request(PWM1_OUT, "pwm1_out");

    //gpio_direction_output(PWM1_OUT, 1);

    //gpio_set_value(PWM1_OUT, 1);

    gpio_request(SABRESD_LCD_BKLIGHT_PWN, "lcd_bl_on");

    gpio_direction_output(SABRESD_LCD_BKLIGHT_PWN, 0);

    gpio_set_value(SABRESD_LCD_BKLIGHT_PWN, 0);

}

 

static void __init mx6_sabresd_board_init(void)

{

...

     lvdsPower();

...

}

 

but i haven't seen any gpio sets of power sequence in dts file, our board have no Power management chip, where should i add gpios of power on and lcd en?

 

and i had used usdh0 for my sd card, so backlight_pwm:

        pinctrl_pwm1: pwm1grp {

            fsl,pins = <

               /*MX6QDL_PAD_SD1_DAT3__PWM1_OUT     0x1b0b1*/  i had commented out

            >;

        };

 

old code in linux-3.0:

    imx6q_add_mxc_pwm(0);

    imx6q_add_mxc_pwm(1);

    imx6q_add_mxc_pwm(2);

    imx6q_add_mxc_pwm(3);

    imx6q_add_mxc_pwm_backlight(0, &mx6_sabresd_pwm_backlight_data);

 

how to set fsl,pins of  pinctrl_pwm1?

My question is a bit of a mess, i am a new hand.

Looking forward to your reply!

 

thank you,

fulinux.

Outcomes