AnsweredAssumed Answered

How to config IMX6DL DI0_PIN15 as LCD_ENABLE signel in device tree

Question asked by lin w on Oct 22, 2015
Latest reply on Nov 5, 2015 by lin w

my fb config GPIO:

     mxcfb1: fb@0 {

         compatible = "fsl,mxc_sdc_fb";

         disp_dev = "ldb";

         interface_pix_fmt = "RGB24";

         mode_str ="1280x800@60";

         default_bpp = <18>;

         int_clk = <0>;

         late_init = <0>;

         pinctrl-names = "default";

         my_lcd_pin = <&pinctrl_mylcd>;  /// or pinctrl-0 = <&pinctrl_ipu1_1>;

         status = "ok";

     }; 

 

ping config :

     mylcdmux {

         pinctrl_mylcd: mylcd {

             fsl,pins = <

                 MX6QDL_PAD_DI0_PIN15__LCD_ENABLE 0x1b0b1

             >;

         };

     };

 

 

code in driver :

     plat_data->gpio_int = of_get_named_gpio(np, "my_lcd_pin", 0);   //  of_get_named_gpio(np, "default", 1);  ???

     if (plat_data->gpio_int == -EPROBE_DEFER)

         return -1;

        

     if (!gpio_is_valid(plat_data->gpio_int)) {

         printk("ERROR, emmmxxoo--->failed to get interrupt gpio\n");

         return 1;

     }

     lcd_enable = gpio_get_value(plat_data->gpio_int);

     printk("shady---->lcd_eanble = %d\n", lcd_enable);

 

 

cmdline is:

console=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,LDBXGA,if=RGB24,bpp=18 video=mxcfb1:off video=mxcfb2:off fbmem=10M fb0base

=0x27b00000 vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale androidboot.selinux=disabled androidboot.dm_v

erity=disabled

Outcomes