Thanks!!! Great help. My system now wakes up when the power button is hit. In our implementation the power switch is hooked directly to the ONOFF pin. There is no GPIO used.
There is still a problem because the system does not return to a usable state. The video locks up with my wallpaper and a white block. The keyboard and mouse are unresponsive. The serial console is usable so the system is alive.
Here is the dmesg output from suspend to wake up. Do you see anything that looks suspicious? Right after wake up I do get the following console message: mxc_hdmi mxc_hdmi: PHY PLL not locked
init: anacron main process (5258) killed by TERM signal
PM: Syncing filesystems ... done.
PM: Preparing system for mem sleep
Freezing user space processes ... (elapsed 0.01 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
PM: Entering mem sleep
Suspending console(s) (use no_console_suspend to debug)
ehci_fsl_bus_suspend begins, Host 1
ehci_fsl_bus_suspend ends, Host 1
USB Host suspend begins
ehci_fsl_drv_suspend, pm event
host suspend ends
udc suspend begins
USB Host suspend begins
ehci_fsl_drv_suspend, pm event
host suspend ends
add wake up source irq 36
add wake up source irq 51
PM: suspend of devices complete after 48.710 msecs
PM: late suspend of devices complete after 0.645 msecs
Disabling non-boot CPUs ...
CPU1: shutdown
CPU2: shutdown
CPU3: shutdown
Enabling non-boot CPUs ...
CPU1: Booted secondary processor
Calibrating delay loop (skipped) already calibrated this CPU
i.MXC CPU frequency driver
CPU1 is up
CPU2: Booted secondary processor
Calibrating delay loop (skipped) already calibrated this CPU
i.MXC CPU frequency driver
CPU2 is up
CPU3: Booted secondary processor
Calibrating delay loop (skipped) already calibrated this CPU
i.MXC CPU frequency driver
CPU3 is up
PM: early resume of devices complete after 0.485 msecs
=======snvs_pwrkey_interrupt()lpstatus 0x40040000, lp_cr 0x21
set snvs as DUMP PMIC MODE
imx-ipuv3 imx-ipuv3.0: IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)
imx-ipuv3 imx-ipuv3.1: IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)
mxc_hdmi mxc_hdmi: PHY PLL not locked
mxc_hdmi mxc_hdmi: PHY PLL not locked
remove wake up source irq 51
remove wake up source irq 36
ehci fsl drv resume begins: DR
ehci_fsl_drv_resume,pm event, wait for wakeup irq if needed
USB Gadget resume begins
fsl_udc_resume, Wait for wakeup thread finishes
ehci_fsl_bus_resume begins, DR
ehci fsl drv resume begins: Host 1
ehci_fsl_drv_resume,pm event, wait for wakeup irq if needed
ehci_fsl_bus_resume begins, Host 1
ehci_fsl_bus_resume ends, Host 1
PM: resume of devices complete after 1398.805 msecs
PM: Finishing wakeup.
Restarting tasks ... done.
eth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=1:07, irq=-1)
ADDRCONF(NETDEV_UP): eth0: link is not ready
PHY: 1:07 - Link is Up - 1000/Full
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready