SolidRun / linux-fslc

Linux kernel source tree
Other
12 stars 26 forks source link

CPU doesnt boot from deep sleep memory mode #62

Open BMValeev opened 5 years ago

BMValeev commented 5 years ago

I've configured gpio-keys as wakeup source, and tried to wakeup options in sleep mode: 1)with echo standby > /sys/power/state everything works ok 2) with echo mem > /sys/power/state, cpu stutdowns, but when I try to push button, current consumption increase from 100 mA to 350mA, but there are no reaction on the ttymcx0. After a while the board resets with reason :WDOG.

The log of the suspending:
root@solidrun-imx6:~# echo mem > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
PM: suspend of devices complete after 49.228 msecs
PM: late suspend of devices complete after 0.914 msecs
PM: noirq suspend of devices complete after 0.908 msecs
Disabling non-boot CPUs ...
CPU1: shutdown

I use kernel with latest meta-solidrun-arm-imx6 commit rocko branch ` SRCBRANCH = "solidrun-imx_4.9.x_1.0.0_ga" SRCREV = "3b4f1a2b7c57f198641c0a45e23fe7255a164daf" LOCALVERSION = "-mx6-sr"

SRC_URI = "git://github.com/SolidRun/linux-fslc.git;branch=${SRCBRANCH} \ file://defconfig"`

I'm not sure, but as I understand the problem may be connected wit hardware due to topic: https://community.nxp.com/thread/441037 So I use Hummingboard pro Upd. I've went to last commit in this repository, without any progress in DSM resume

jnettlet commented 5 years ago

please add no_console_suspend to your kernel boot options. This will allow you to see on the console what is happening during suspend and resume. You can also enable the uart as wakeup source and test this.

BMValeev commented 5 years ago

please add no_console_suspend to your kernel boot options. This will allow you to see on the console what is happening during suspend and resume. You can also enable the uart as wakeup source and test this.

Actually, attached log is received with "no_console_suspend" option. I've tested DSM with "echo enabled > /sys/bus/platform/drivers/imx-uart/2020000.serial/tty/ttymxc0/power/wakeup" option. And as I said, standby works, but with DSM kernel hangs during resume. I've also tested with latest commit in repo, without any success.

root@solidrun-imx6:~# echo enabled > /sys/bus/platform/drivers/imx-uart/2020000.serial/tty/ttymxc0/power/wakeup         
root@solidrun-imx6:~# echo standby > /sys/power/state                                                                   
PM: Syncing filesystems ... done.                                                                                       
Freezing user space processes ... (elapsed 0.001 seconds) done.                                                         
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.                                                    
PM: suspend of devices complete after 57.197 msecs                                                                      
PM: late suspend of devices complete after 0.764 msecs                                                                  
PM: noirq suspend of devices complete after 0.824 msecs                                                                 
Disabling non-boot CPUs ...                                                                                             
IRQ17 no longer affine to CPU1                                                                                          
CPU1: shutdown                                                                                                          
Enabling non-boot CPUs ...                                                                                              
CPU1 is up                                                                                                              
PM: noirq resume of devices complete after 0.832 msecs                                                                  
PM: early resume of devices complete after 0.430 msecs                                                                  
PM: resume of devices complete after 7.852 msecs                                                                        
Restarting tasks ... imx-spdif sound-spdif: ASoC: CPU DAI (null) not registered                                         
imx-spdif sound-spdif: snd_soc_register_card failed: -517                                                               
done.  
root@solidrun-imx6:~# echo mem > /sys/power/state                                                                       
PM: Syncing filesystems ... done.                                                                                       
Freezing user space processes ... (elapsed 0.001 seconds) done.                                                         
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.                                                    
PM: suspend of devices complete after 19.184 msecs                                                                      
PM: late suspend of devices complete after 0.757 msecs                                                                  
PM: noirq suspend of devices complete after 0.815 msecs                                                                 
Disabling non-boot CPUs ...                                                                                             
IRQ17 no longer affine to CPU1                                                                                          
CPU1: shutdown  

Again, above is written console log for suspend and DSM

BMValeev commented 5 years ago

Also, I've tested exactly same kernel commit, (different dts and u-boot) with another ( custom ) board. The DSM mode works properly for that board.

echo mem > /sys/power/state                                                                                             
PM: Syncing filesystems ... done.                                                                                       
Freezing user space processes ... (elapsed 0.001 seconds) done.                                                         
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.                                                    
PM: suspend of devices complete after 43.893 msecs                                                                      
PM: late suspend of devices complete after 0.635 msecs                                                                  
PM: noirq suspend of devices complete after 0.692 msecs                                                                 
Disabling non-boot CPUs ...                                                                                             
CPU1: shutdown                                                                                                          
Enabling non-boot CPUs ...                                                                                              
CPU1 is up                                                                                                              
PM: noirq resume of devices complete after 0.307 msecs                                                                  
PM: early resume of devices complete after 0.334 msecs                                                                  
mxc_sdc_fb fb@0: 1920x1080 h_sync,r,l: 44,88,148  v_sync,l,u: 5,4,36 pixclock=148500000 Hz                              
imx-ipuv3 2400000.ipu: try ipu internal clk                                                                             
imx-ipuv3 2400000.ipu: disp=1, pixel_clk=148500000 148500000 parent=148500000 div=1                                     
PM: resume of devices complete after 71.103 msecs                                                                       
Restarting tasks ... done.   

So, is it possible, that main reason in the dts file for humminboard? UPD. I've tested also with same uboot as in the custom board (2014v), but with original for hummingboard dts file. DSM resume also leads to immediate wdog reset

UPD2 It seems that problem connects with usom I2-EXW rev 1.5 with mmc and wireless, because imx6dl-hummingboard.dts on the board I2-3C works with DSM and can resume. But removing -#include "imx6qdl-sr-som-ti.dtsi" -#include "imx6qdl-sr-som-emmc.dtsi" from dts file doesn't solve problem

BMValeev commented 5 years ago

Do you have anything regarding that issue?