AnsweredAssumed Answered

imx6 dual lite can not to control gpio

Question asked by Alleen Wang on Dec 23, 2015
Latest reply on Dec 23, 2015 by Alleen Wang

Hi All,

 

I used a custom board (cpu is imx6dl), and I want to control gpio : MX6QDL_PAD_ENET_TXD0__GPIO1_IO30.

 

First, I add "MX6QDL_PAD_ENET_TXD0__GPIO1_IO30" into kernel_imx/arch/arm/boot/dts/imx6dl-sabresd-common.dtsi.

 

&iomuxc {

  pinctrl-names = "default";

  pinctrl-0 = <&pinctrl_hog_1>, <&pinctrl_hog_2>;

 

 

  hog {

  pinctrl_hog_2: hoggrp-2 {

  fsl,pins = <

  /* MAX17135 */

  MX6QDL_PAD_EIM_A17__GPIO2_IO21 0x80000000

  MX6QDL_PAD_EIM_D17__GPIO3_IO17 0x80000000

  MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x80000000

  MX6QDL_PAD_EIM_A18__GPIO2_IO20 0x80000000

  MX6QDL_PAD_EIM_OE__GPIO2_IO25 0x80000000

  /* elan touch */

  MX6QDL_PAD_EIM_A20__GPIO2_IO18 0x80000000

  MX6QDL_PAD_EIM_DA8__GPIO3_IO08 0x80000000

  MX6QDL_PAD_EIM_D28__GPIO3_IO28 0x170b0

 

 

                /* GPIO Control */

                MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000

  >;

  };

  };

};

 

After, When I control this gpio on the driver, it always show 0.

 

gpio_request(30, "gpio-control-test");

gpio_direction_output(30, 1);

gpio_get_value(30)  <---------- ALWAYS 0 !!!

 

But, when I check this pin power, It always is High.

Even I set this gpio was "0" ...

 

So, My problem is ...

 

1. The gpio value always 0.

2. The gpio power always high.

 

Any one to help me on this issue?

 

PS. I have already cancel other gpio setting about "MX6QDL_PAD_ENET_TXD0".

 

Thanks!!!

 

BR.

 

Alleen Wang

Outcomes