From: Oleksij Rempel <[email protected]>

commit 8148d2136002da2e2887caf6a07bbd9c033f14f3 upstream.

One of the Freescale recommended sequences for power off with external
PMIC is the following:
...
3.  SoC is programming PMIC for power off when standby is asserted.
4.  In CCM STOP mode, Standby is asserted, PMIC gates SoC supplies.

See:
http://www.nxp.com/assets/documents/data/en/reference-manuals/IMX6DQRM.pdf
page 5083

This patch implements step 4. of this sequence.

Signed-off-by: Oleksij Rempel <[email protected]>
Signed-off-by: Shawn Guo <[email protected]>
[xl: Just register pm_power_off handler if "fsl,pmic-stby-poweroff" is
set since commit 57b59efd81b4("ARM: imx: add suspend/resume with FastMix
OFF support") has backported imx6_pm_stby_poweroff_probe and
imx6_pm_stby_poweroff.]
Signed-off-by: Xiaolei Wang <[email protected]>
---
 arch/arm/mach-imx/pm-imx6.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c
index 6958e4ee3363..afbafedc36e9 100644
--- a/arch/arm/mach-imx/pm-imx6.c
+++ b/arch/arm/mach-imx/pm-imx6.c
@@ -1292,6 +1292,8 @@ void __init imx6_pm_ccm_init(const char *ccm_compat)
        val = readl_relaxed(ccm_base + CLPCR);
        val &= ~BM_CLPCR_LPM;
        writel_relaxed(val, ccm_base + CLPCR);
+       if (of_property_read_bool(np, "fsl,pmic-stby-poweroff"))
+               imx6_pm_stby_poweroff_probe();
 
        of_node_put(np);
 }
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#10871): 
https://lists.yoctoproject.org/g/linux-yocto/message/10871
Mute This Topic: https://lists.yoctoproject.org/mt/88687771/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to