OMAP: AM437X: Add rtc_only with ddr in self-refresh support
authorKeerthy <j-keerthy@ti.com>
Fri, 2 Nov 2018 10:28:10 +0000 (15:58 +0530)
committerTero Kristo <t-kristo@ti.com>
Tue, 6 Nov 2018 13:03:47 +0000 (15:03 +0200)
commit67a592af12145f2586962700c8533b1614bffa73
tree9b865006bf9990d191551af0d07a97f00b57aabb
parentf0e7066bed1b7e6b9f230daa2a5a6f0d2dff1627
OMAP: AM437X: Add rtc_only with ddr in self-refresh support

During RTC-only suspend, power is lost to the wkup domain, so we need to
save and restore the state of that domain. We also need to store some
information within the RTC registers so that u-boot can do the right thing
at powerup.

The state is entered by getting the RTC to bring the pmic_power_en line low
which will instruct the PMIC to disable the appropriate power rails after
putting DDR into self-refresh mode. To bring pmic_power_en low, we need to
get an ALARM2 event. Since we are running from SRAM at that point, it means
calculating what the next second is (via ASM) and programming that into the
RTC. This patch also adds support for wake up source detection.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
arch/arm/mach-omap2/pm33xx-core.c
drivers/soc/ti/Kconfig
drivers/soc/ti/pm33xx.c
include/linux/platform_data/pm33xx.h