GPIO commands not working: "device or resource busy"

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

GPIO commands not working: "device or resource busy"

跳至解决方案
2,825 次查看
Bob_NXP_user
Contributor III

Hi everybody,

I'm using iMX93QSB and i'm tryng to debug GPIO interface of the processor using prebuild linux image. I would like to change the P2_6 pin of the GPIO expander PCAL6524HEAZ which drives the selection pin fo the TMUX used on the board.

Thanks to the driver I can see the GPIO expander as the gpiochip 4 and I should be able to move the pins by using libgpiod commands like: gpioset -t0 -c 4 22=1 . 

But when I try to access to pin 22 (that is corresponding to P2_6) I receive the following message:

Bob_NXP_user_0-1718267172262.png

so I checked the gpioinfo and I notice pin 22 is used by "consumer = ?":

Bob_NXP_user_1-1718267325681.png

I cannot understand why isn't possible to change a gpio pin that's routed in order to be a selection pin.

Bob_NXP_user_3-1718267773734.png

Bob_NXP_user_4-1718267916945.png

 

Can you help me? How can I change my selection mode from command line?

Regards,

Roberto

 

0 项奖励
回复
1 解答
2,757 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

I have not used device-tree-compiler to decompile .dtb in dts but I suggest you take a look on the next post, it could be helpful.

Also, please follow the steps on Yocto user's guide  before use Devshell.

Best regards.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
2,796 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

 

That GPIO is used for shared GPIO mux on QSB board.

 

It is defined here.

 

To use it, you need to change the definition on that node to make it available.

 

Best regards.

0 项奖励
回复
2,770 次查看
Bob_NXP_user
Contributor III

Hello @JorgeCas ,Thanks for answering,

Is it possible to modify .dtb file within Linux shell? Someone on the internet suggests to use device-tree-compiler to decompile .dtb in dts, change what you need and then compile it again. But when I try to install with: sudo apt-get install device-tree-compiler, I receive:

Bob_NXP_user_0-1718351718135.png

Can you help me please? Thanks in advance.

Best regards,

Roberto

0 项奖励
回复
2,758 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

I have not used device-tree-compiler to decompile .dtb in dts but I suggest you take a look on the next post, it could be helpful.

Also, please follow the steps on Yocto user's guide  before use Devshell.

Best regards.

0 项奖励
回复