Software Shutdown Triggered by Jetson GPIO

Continuing the discussion from How to soft Shutdown Jetson nano with GPIO:

Would you advise me which GPIO is assigned for the software shutdown in the device tree?
I suppose that “gpio1” in the device tree, is not a Jetson GPIO but a MAX77620 PMC’s GPIO.
Thanks.

hello tfuru2,

I’m wondering why you’re not using $ sudo shutdown --poweroff to send software shutdown request ?

I’d like to have a button to shutdown Jetson easy.
I know that Jetson Nano dev kit has the power button header for that purpose. But some third party Jetson boxes have fixed power buttons which are located at operation unfriendly position (like box bottom). I’m wondering if I can put another power button with GPIO for such boxes.
Thanks.

hello tfuru2,

are you going to develop customize board?
there’re signals route to carrier board, please check [Figure 5-2. System Power and Control Block Diagram] in the Jetson Nano Product Design Guide for reference.

No, I’m not going to design a custom board.
At this time, I’d like to know if L4T actually has a built-in mechanism to do shutdown triggered by GPIO, which is described at How to soft Shutdown Jetson nano with GPIO. If so, I’d like to know how to map Jetson’s GPIO to the shutdown trigger.
Thanks.

hello tfuru2,

you may have a try to toggle the GPIO value.
please check the GPIO number of spmic-default-output-high
for example,

# cat /sys/kernel/debug/gpio | grep spmic
 gpio-505 (                    |spmic-default-output) out hi

after that,
please toggle the pin values to check the behavior,
for example,
# echo 505 > /sys/class/gpio/export
# cat /sys/class/gpio/gpio505/value
# echo 0 > /sys/class/gpio/gpio505/value

I’ve test it remotely and it seems the target has shutdown with above commands.
please do have a try to confirm the behavior, thanks

JerryChang,

Thank you very much for your answer.
I have tried the command you provided, and have confirmed that it worked for shutdown.
However, it seems that the solution is not what I expected from the following points.

  1. I suppose that gpio-505 is connected to MAX77620 PMC inside Jetson module. So we cannot reach for the pin.
  2. The command cuts the power to Jetson as soon as it is issued. So we have no time to shutdown L4T Linux safely.

If my understanding is correct, I’m going to consider other idea.
e.g. Running a Linux daemon process to watch GPIO and do sofeware shutdown.

Thanks.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.