Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

A20-SOM wake up from NMI_N

Featured Replies

I am making some testing over A20-SOM from Olimex. I have a signal connected to NMI_N pin and with a legacy distribution, with power_start=0 on FEX, I am able to poweroff the board from command line (while the board is still powered) and then poweron/weakup the board raising up the signal on NMI_N.

However, I need to do this on an armbian mainline distribution. I poweroff the board from command line (but keep the board powered), the PWR_LED keeps turn on and the board should wakeup when I turn on the signal on NMI_N and it does on my legacy distribution but not in armbian.

Has anyone any clue, advice/tip to make this work in armbian? I really don't know where to start. 

 

if this helps, here are the docs of A20-SOM and AXP209:

http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf

https://www.olimex.com/Products/SOM/A20/A20-SOM/resources/A20-SOM-user-manual.pdf

 


Many thanks for considering my request!

2 hours ago, PaulMorrison said:

I have a signal connected to NMI_N pin and with a legacy distribution, with power_start=0 on FEX, I am able to poweroff the board from command line (while the board is still powered) and then poweron/weakup the board raising up the signal on NMI_N.

What exact Kernel & Distribution were you using here ?

 

2 hours ago, PaulMorrison said:

an armbian mainline distribution.

copy the Link of: armbianmonitor -u

 

4 hours ago, PaulMorrison said:

I am able to poweroff the board from command line (while the board is still powered) and then poweron/weakup the board raising up the signal on NMI_N.

It is not powered off completely in this state, it is sitting in a standby mode in the legacy u-boot.

 

4 hours ago, PaulMorrison said:

However, I need to do this on an armbian mainline distribution. I poweroff the board from command line (but keep the board powered), the PWR_LED keeps turn on and the board should wakeup when I turn on the signal on NMI_N and it does on my legacy distribution but not in armbian.

Both mainline u-boot and kernel do not support such functionality unless you implement it by yourself.

  • Author
3 hours ago, Tido said:

What exact Kernel & Distribution were you using here ? 

 

copy the Link of: armbianmonitor -u

 

 

I'm using Armbian_5.41_Olimex-som-a20_Debian_stretch_next_4.14.40

i will post armbianmonitor -u later, need to fix something first but I can try attach armhwinfo.log if that helps

 

 

 

2 hours ago, zador.blood.stained said:

It is not powered off completely in this state, it is sitting in a standby mode in the legacy u-boot.

 

Both mainline u-boot and kernel do not support such functionality unless you implement it by yourself.

 

standby ok, but i was able to do it in legacy without implementing anything

 

35 minutes ago, PaulMorrison said:

i was able to do it in legacy without implementing anything

Yes, this is already implemented in the legacy/BSP stack. Since mainline u-boot and kernel were made from scratch rather than by porting the Allwinner code, this functionality and many other things were not added.

  • Author
On 6/15/2018 at 4:35 PM, zador.blood.stained said:

Yes, this is already implemented in the legacy/BSP stack. Since mainline u-boot and kernel were made from scratch rather than by porting the Allwinner code, this functionality and many other things were not added.

 

This is what I was looking for, thanks. I really need to implement this for mainline, has anyone any clue, advice/tip ?

 

Any alternative to wake up from suspend/hibernate would be usefull as well

1 hour ago, PaulMorrison said:

I really need to implement this for mainline, has anyone any clue, advice/tip ?

You may want to look at the legacy stack implementation:

  • when power_start != 1 kernel reboots instead of shutting down, so you have to modify or replace the poweroff hook
  • AXP209 PMIC "scratchpad" registers are used as a non-volatile storage to hold the suspend/wait for interrupts flag
  • u-boot checks the PMIC scratchpad to differentiate between normal boot, normal reboot and reboot to suspend
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.