summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacky Bai <ping.bai@nxp.com>2020-03-24 17:04:11 +0800
committerJacky Bai <ping.bai@nxp.com>2020-03-26 20:12:12 +0800
commitd376118ae37c59c9c2d53ed4c16fae89529632a8 (patch)
treea496a9595677acf43f28c645419b7f26d881bc48
parentfedb5f3827ee974b5c57b2b22b400e5bf204e6fb (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) {