GPIO reset/shutdown pins?

I read @theophile 's post on gpio-poweroff with great interest. This feature is used on Raspberry Pi setups together with the fact that, after poweroff, shorting physical pins 5 and 6 triggers a reboot (pin 5 is a reset pin, pin 6 is the ground).

Is there such a reset feature on the Radxa Zero ?

Besides, the Raspberry Pi series also has a gpio-shutdown overlay, is this something we can implement with the Radxa Zero ?

If you just want to use a GPIO to tell the OS to either shutdown or reboot, you can do that with gpio-keys-polled. Here’s an overlay I’m using to trigger shutdown:

For reboot/reset, you could use the same principle to send a different keycode that you don’t otherwise use, and then set up a udev rule or something to issue the reboot command when that keypress is detected.

There’s a separate gpio-restart driver that functions similarly to the gpio-poweroff driver, in that it uses a GPIO output to signal an external power controller to perform a power reset. I’ve never attempted to use that though so I’m not sure if it would work “out of the box,” or whether it might have the same kind of handler registration conflict that required the patches to make gpio-shutdown work.

Got it, plenty of options on poweroff then !

I actually ment after poweroff, if the power stays on, is there a pin on which one could trigger a reset later on. It’s implemented for an RPi here.

But it appears the RZ still draws 200mA after poweroff (measured at home), which is roughly the same as when it’s idle, so there’s no point going into that state. The RPi “only” pulled 40mA from the power after a poweroff sequence, which made it interesting.