How to declare a GPIO pin in devicetree ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to declare a GPIO pin in devicetree ?

跳至解决方案
1,124 次查看
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

标签 (1)
标记 (3)
1 解答
963 次查看
Yuri
NXP Employee
NXP Employee

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.

在原帖中查看解决方案

1 回复
964 次查看
Yuri
NXP Employee
NXP Employee

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.