How to declare a GPIO pin in devicetree ?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to declare a GPIO pin in devicetree ?

Jump to solution
543 Views
toanjunifer
Senior Contributor I

Hi NXP,

As question above, I get a trouble when approach GPIO in iMX6UL-EVK board. 

After find out location of GPIO 25 pin, I try to configure it by: 

$ echo 25 > /sys/class/gpio/export

$ echo "out" > /sys/class/gpio/gpio25/direction

$ echo 1 > /sys/class/gpio/gpio25/value

And I test with a red LED. But LED is still no light. (LED is working good with other device and GPIO pin is exactly. )

Does this problem is belong to declare GPIO pin devicetree ? And what should I do now ?

Thank you so much,

         Toan

Labels (1)
1 Solution
382 Views
Yuri
NXP TechSupport
NXP TechSupport

Hello,

 

 

  use imx6ul.dtsi : gpio1 should be included; usrt2 disabled. 

 

imx6ul.dtsi\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

Have a great day,

Yuri

 

 

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

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored

Please open a new thread and refer to the closed one, if you have a related question at a later point in time.

View solution in original post

1 Reply
383 Views
Yuri
NXP TechSupport
NXP TechSupport

Hello,

 

 

  use imx6ul.dtsi : gpio1 should be included; usrt2 disabled. 

 

imx6ul.dtsi\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

Have a great day,

Yuri

 

 

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

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored

Please open a new thread and refer to the closed one, if you have a related question at a later point in time.