1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2016 Freescale Semiconductor, Inc.
4 * Copyright 2017-2018 NXP
5 * Author: Dong Aisheng <aisheng.dong@nxp.com>
10 #include <linux/of_address.h>
12 #define SMC_PMCTRL 0x10
13 #define BP_PMCTRL_PSTOPO 16
14 #define PSTOPO_PSTOP3 0x3
16 void __init imx7ulp_pm_init(void)
18 struct device_node *np;
19 void __iomem *smc1_base;
21 np = of_find_compatible_node(NULL, NULL, "fsl,imx7ulp-smc1");
22 smc1_base = of_iomap(np, 0);
25 /* Partial Stop mode 3 with system/bus clock enabled */
26 writel_relaxed(PSTOPO_PSTOP3 << BP_PMCTRL_PSTOPO,
27 smc1_base + SMC_PMCTRL);