MLK-11281-6 ARM: imx: add lpsr support for imx7d
authorAnson Huang <b20788@freescale.com>
Thu, 23 Jul 2015 11:05:16 +0000 (19:05 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:03 +0000 (14:49 -0500)
commit1fa8f3a839f4f6927a9807143058edb7ba2aa43b
treee64473956f2e77dfaf5e22d56ea7d6e7e544254b
parent5487ea9cb841689d90dd54a9ffc98eaf43be9000
MLK-11281-6 ARM: imx: add lpsr support for imx7d

Add LPSR mode support if dtb contains "fsl,enable-lpsr" property,
when echo mem to make system enter DSM mode, whole SOC will be
powered down except LPSR, SNVS domain and DDR chip's power,
that means all modules in SOC domain will be powered down,
including ccm, iomuxc, gpc....

So, all drivers need to restore their iomux settings and
clk settings after resume;

When system enters LPSR mode, can be waked up by long press
ON/OFF button or using RTC alarm.

In LPSR mode resume, ROM will read the entry point in LPSR
register, make DRAM exit retention mode and jump to DRAM
to resume kernel immediately, so before entering LPSR mode,
we need to set the resume entry correctly in LPSR register
and clear it after resume.

Signed-off-by: Anson Huang <b20788@freescale.com>
arch/arm/mach-imx/mx7.h
arch/arm/mach-imx/pm-imx7.c
arch/arm/mach-imx/suspend-imx7.S