I.MX 8M MINI SYSFS GPIO Control Issue

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

I.MX 8M MINI SYSFS GPIO Control Issue

跳至解决方案
1,302 次查看
dan_hilgert
Contributor II

I am trying to use GPIO1_IO11 as a digital output.

Here are the commands I using in kernel space:

echo 11 > /sys/class/gpio/export

echo out > /sys/class/gpio/gpio11/direction

echo 0 > /sys/class/gpio/gpio11/value

The pin state is high no matter what.

I cat the files in /sys/class/gpio/gpio11/ and I don't see anything obviously wrong. 

I have verified the pin is not being used by any other nodes in the device tree. 

Has anyone ran into this before? Can anyone point me in the right direction to identify what I am doing wrong here? 

Thanks 

0 项奖励
回复
1 解答
1,295 次查看
igorpadykov
NXP Employee
NXP Employee

Hi dan_hilgert

 

for i.MX8M Mini gpio usage one can look at:

https://variwiki.com/index.php?title=DART-MX8M_GPIO&release=RELEASE_DUNFELL_V1.0_DART-MX8M-MINI

 

Best regards
igor

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,285 次查看
dan_hilgert
Contributor II

igor, thanks for the pointer. 

I had added the specific pin node with the info for the pin I wanted to control.

dan_hilgert_1-1608145762250.png

 


However, I was not adding the pinctl-0 property in the iomuxc node.

dan_hilgert_0-1608145626314.png

Once I did that, I had full control over the pin. 

Thanks again,

Dan

 

0 项奖励
回复
1,296 次查看
igorpadykov
NXP Employee
NXP Employee

Hi dan_hilgert

 

for i.MX8M Mini gpio usage one can look at:

https://variwiki.com/index.php?title=DART-MX8M_GPIO&release=RELEASE_DUNFELL_V1.0_DART-MX8M-MINI

 

Best regards
igor

0 项奖励
回复