imx6 dual lite can not to control gpio

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

imx6 dual lite can not to control gpio

855 Views
alleenwang
Contributor II

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

Labels (3)
Tags (2)
0 Kudos
2 Replies

443 Views
igorpadykov
NXP Employee
NXP Employee

Hi Alleen

could you try to set MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000

to 0x0f0b0. Description of gpio usage can be found in linux documentation:

http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/gpio/gpio.txt

Best regards

igor

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

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

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

0 Kudos

443 Views
alleenwang
Contributor II

Hi Igor,

Thanks for your help!

I have already to modify 0x80000000 to 0x0f0b0.

But I still have this issue.

Any other suggestions?

Thanks!!!

BR.

Alleen Wang

0 Kudos