Page 1 of 1

Suspend to ram

Posted: Sat Nov 01, 2014 8:52 am
by exyn
Using the at91 3.10 branch suspend to ram works on my custom board with a sama5d31. However I am only able to wake it and get the system running again if I suspend less than 10-15 seconds or so. The ddr clock starts up again but the (linux) system is dead. First thought was that the memory doesn't go in to self refresh but it should only last at the most a couple of hundred milliseconds then if I'm correct (the lppdr memory I'm using requires a refresh every 64 ms)?

Regards,
exyn

Re: Suspend to ram

Posted: Mon Nov 03, 2014 3:34 pm
by exyn
I can repeatedly suspend the system more or less exactly 20 seconds but anything more than that the system is dead. Ddr clock starts up as stated above but the system is completely non-responsive.

/exyn 

Re: Suspend to ram

Posted: Wed Nov 05, 2014 3:08 pm
by peda
(I'm a coworker of exyn)

I wanted to fill in that it appears as if the problem indeed is that the LPDDR1-SDRAM does not enter self-refresh. Which is strange. The linux code in arch/arm/mach-at91/pm_slowclock.S writes a 1 (SELFREFRESH) in the LPCB field of the low-power register of the MPDDRC. Reading the docs on that field states the following for the SELFREFRESH command:
The MPDDRC issues a self-refresh command to the DDR-SDRAM device, the clock(s) is/are deactivated and the CKE signal is set low. The DDR-SDRAM device leaves the self-refresh mode when accessed and reenters it after the access.
However, the CKE signal remains at 1.8V (so, perhaps it isn't all that strange that the memory apparently isn't entering self-refresh).

Anyway, what else must be setup for the MPDDRC to actually issue the self-refresh command?

Re: Suspend to ram

Posted: Sat Nov 08, 2014 8:21 am
by exyn
After having some contact with Atmels support this seems to be a bug in the processor. There is a workaround so (though I suppose they will introduce it in the at91 kernel repo), if anyone is having trouble send me a pm and I can send you a diff.

/exyn