summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacky Bai <ping.bai@nxp.com>2020-03-24 17:04:11 +0800
committerDong Aisheng <aisheng.dong@nxp.com>2021-11-02 17:08:39 +0800
commitf863fe3d778a598557503085555be14654a2295e (patch)
treed77ee091ca52222063356b4e55b741890837edff
parentaad5af3768628f697335a4cfbe496b0d710a4d4e (diff)
MLK-23671-01 soc: imx: Add the rpm always on flag if necessary
Some power domain need to be runtime always on to keep the peripherals's weekup ability, for such power domain, add the 'GENPD_FLAG_RPM_ALWAYS_ON' flag. Signed-off-by: Jacky Bai <ping.bai@nxp.com> Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
-rw-r--r--Documentation/devicetree/bindings/power/fsl,imx8m-genpd.txt1
-rw-r--r--drivers/soc/imx/imx8m_pm_domains.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/power/fsl,imx8m-genpd.txt b/Documentation/devicetree/bindings/power/fsl,imx8m-genpd.txt
index ce2a1dffd641..8f7d5f3e5d8a 100644
--- a/Documentation/devicetree/bindings/power/fsl,imx8m-genpd.txt
+++ b/Documentation/devicetree/bindings/power/fsl,imx8m-genpd.txt
@@ -20,6 +20,7 @@ Optional properties:
- parent-domains: the phandle to the parent power domain
- active-wakeup: keep the PM domain powered in case the attached device wakeup
is enabled.
+ - rpm-always-on: keep the PM domain powered except for system suspend.
example:
vpu_g1_pd: vpug1-pd {
diff --git a/drivers/soc/imx/imx8m_pm_domains.c b/drivers/soc/imx/imx8m_pm_domains.c
index 72d328f29b38..6a0178c5727a 100644
--- a/drivers/soc/imx/imx8m_pm_domains.c
+++ b/drivers/soc/imx/imx8m_pm_domains.c
@@ -181,8 +181,10 @@ static int imx8m_pm_domain_probe(struct platform_device *pdev)
domain->pd.power_on = imx8m_pd_power_on;
if (of_property_read_bool(np, "active-wakeup"))
domain->pd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;
+ if (of_property_read_bool(np, "rpm-always-on"))
+ domain->pd.flags |= GENPD_FLAG_RPM_ALWAYS_ON;
- pm_genpd_init(&domain->pd, NULL, true);
+ pm_genpd_init(&domain->pd, NULL, !(domain->pd.flags & GENPD_FLAG_RPM_ALWAYS_ON));
ret = of_genpd_add_provider_simple(np, &domain->pd);
if (ret) {