GPIO commands not working: "device or resource busy"

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

GPIO commands not working: "device or resource busy"

Jump to solution
2,835 Views
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 Kudos
Reply
1 Solution
2,767 Views
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.

View solution in original post

0 Kudos
Reply
3 Replies
2,806 Views
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 Kudos
Reply
2,780 Views
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 Kudos
Reply
2,768 Views
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 Kudos
Reply