Jump to content

Odroid N2 - Shut down using push button GPIO


7825asp

Recommended Posts

If possible, I would like to shutdown or wake up the Odroid N2 using a GPIO button. I followed the guide here: https://wiki.odroid.com/odroid-n2/application_note/gpio/gpio_key_wakeup. The button LED works, but the button does not trigger shutdown or wake up using pin 9 and 11. Has anyone gotten a power button to work on the Odroid N2? Is there a specific Odroid module/software that isn't installed by default in Armbian?

 

Additions to /boot/boot.ini

setenv gpiopower "479"
setenv bootargs ${bootargs} gpiopower=${gpiopower}

 

After these additions, /proc/cmdline shows "gpiopower=479" as expected.

 

I'm running Armbian 21.02.2 Buster on the Odroid N2 (kernel 5.10.16-meson64), running headless with OS installed on eMMC.

The power button and led hardware is functioning as expected when tested with a multi-meter.

 

Thank you!

Link to comment
Share on other sites

HardKernel has added non-standard "features" to their kernels in the past. For example, see THIS POST. This may be one of them.

 

Notably, kernel arguments are generally of the MODULE.PARAMETER=VALUE form, and "gpiopower" doesn't fit that at all.

 

So, if you want the kernel to handle it, you can enable it by specifying a DTB overlay, adding "gpio-poweroff" to your specified GPIO pin. See these examples:

Else you can write a script to monitor that GPIO and call shutdown when desired.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines