Tests:R-CAR-GEN3-Suspend-to-RAM

This document describes how to test the Suspend-to-RAM functionality of R-Car Gen3 based boards.

Kernel Version and Configuration
v4.8-rc2

This kernel version was chosen as support for the R-Car M3-W (r8a7796) SoC was first included in v4.8-rc1 and rc2 ought to be a little more mature than that.

The defconfig used with INITRD options enabled to facilitate booting to userspace without ethernet for NFS root. The reasons for this were:
 * Ethernet is not enabled on the salvator-x/r8a7796 in v4.8-rc2
 * Ethernet does not resume correctly on salvator-x/r8a7795 in v4.8-rc2

Hardware Environment

 * Board/Soc:
 * Salvator-X/r8a7795 (R-Car H3 SoC)
 * Salvator-X/r8a7796 (R-Car M3-W SoC)

Verify Suspend-to-RAM Support
Suspend to RAM may be initiated using the following command:


 * 1) echo mem > /sys/power/state

After a short time the system will resume. This is a side-effect of the behaviour of firmware on the boards tested. None the less is can be verified that suspend to ram is functioning correctly as indicated by the following kernel logs observed on r8a7796/salvator-x.

[ 263.476681] PM: Syncing filesystems ... done. [ 263.481654] Freezing user space processes ... (elapsed 0.001 seconds) done. [ 263.491358] Double checking all user space processes after OOM killer disable... (elapsed 0.000 seconds) [ 263.501011] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. [ 263.509584] Suspending console(s) (use no_console_suspend to debug) [ 263.516503] PM: suspend of devices complete after 0.387 msecs [ 263.516632] PM: late suspend of devices complete after 0.123 msecs [ 263.516741] PM: noirq suspend of devices complete after 0.106 msecs [ 263.516743] Disabling non-boot CPUs ... [ 263.517017] PM: noirq resume of devices complete after 0.246 msecs [ 263.517160] PM: early resume of devices complete after 0.132 msecs [ 263.517353] PM: resume of devices complete after 0.189 msecs [ 263.518074] renesas-cpg-mssr e6150000.clock-controller: Cannot get module clock 402: -2 [ 263.518080] renesas_wdt e6020000.watchdog: failed to add to PM domain always-on: -517 [ 263.574050] Restarting tasks ... done.

= SMP Considerations =


 * The above has been tested using the defconfig which enables SMP.
 * For the r8a7795 multiple CPUs are defined in DT and SMP is in operation.
 * Uni-processor operation was also tested on rhe r8a7795 by removing the pmu node and nodes for CPUS 1 - 3.
 * On the r8a7796 only one CPU is present in DT and the system boots as uni-processor.