How to config IMX6DL DI0_PIN15 as LCD_ENABLE signel in device tree

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

How to config IMX6DL DI0_PIN15 as LCD_ENABLE signel in device tree

1,668 Views
linw
Contributor I

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

0 Kudos
5 Replies

1,196 Views
linw
Contributor I

I config it ad below ,but it still can't be pull up in the driver!!!!

    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";

         pinctrl-0 = <&pinctrl_ipu1_1>;

        my_lcd = <&gpio4 17 GPIO_ACTIVE_HIGH>;        //DI0_PIN15对应这个脚 应该  但是还是拉不高

         disp-power-on-supply = <®_mipi_dsi_pwr_on>;

         status = "ok";

     };     

I have try the 3 way to request, but still can not pull up the pin, don't konw why???

     ret = gpio_request_one(plat_data->gpio_int, GPIOF_OUT_INIT_HIGH, "my_lcd");

     if (ret)

         printk("shit.........xxxxxx,shady---->error\n");

     if (gpio_request(plat_data->gpio_int, "my_lcd"))

         printk("shit.........xxxxxx,shady---->error\n");

     ret = gpio_direction_output(plat_data->gpio_int, 1);

     ret = devm_gpio_request_one(&pdev->dev, plat_data->gpio_int,

                     GPIOF_OUT_INIT_HIGH,

                     "my_lcd");

     if (ret)

         printk("shit.........xxxxxx,shady---->error\n");

     printk("xxoutputshady----> = ret = %d\n", ret);

     lcd_enable = gpio_get_value(plat_data->gpio_int);

     printk("init hi..shady---->get_lcd_eanble = %d\n", lcd_enable);

     /* set high and read */

     gpio_set_value(plat_data->gpio_int, 1);

     lcd_enable = gpio_get_value(plat_data->gpio_int);

0 Kudos

1,196 Views
igorpadykov
NXP Employee
NXP Employee

Hi lin

DI0_PIN15 is special pin (can not be used as gpio) controlled by

microcode in file ipu_disp.c, refer to atatched Linux Manual Table 6-1. IPU Driver Files

and imx6qdl-sabresd.dtsi

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,196 Views
linw
Contributor I

Hi igorpadykov:

     As far as I have know, the DI0_PIN15 can be config as a gpio, cuz that's what I really do that in my android 4.3 driver

     and you can find a marco MX6DL_PAD_DI0_PIN15__GPIO_4_17 in the kernel code

     so I wanna do it again in the android 5

0 Kudos

1,196 Views
igorpadykov
NXP Employee
NXP Employee

suggest to connect jtag or use memtool and

check iomux registers for this pin, then write to this register directly.

~igor

0 Kudos

1,196 Views
linw
Contributor I

yep, that's a good idea!!

0 Kudos