summaryrefslogtreecommitdiff
path: root/plat/imx/imx8qxp/imx8qxp_psci.c
AgeCommit message (Collapse)Author
2018-10-23imx8qxp: add support for cpuidleAnson Huang
This patch adds support for cpuidle with CPU powerdown, there will be 3 idle states in Linux kernel: 1: wfi; 2: cpu power down; 3: cluster power down. As Linux kernel needs a broadcast timer for waking up CPU when whole CLUSTER is powerdown, GPT is adopted as broadcast timer, and to make the clock & power management easy for Linux kernel to avoid many workaround/hake in Linux kernel, TF-A will handle GPT's power & clock management as well as registers save/restore when suspend/resume. Also, psci power states are used to determine CORE/CLUSTER/SYSTEM power state to distinguish CPU idle and SYSTEM suspend which share same domain_suspend callback. The SoC IPs register mmap regions are merged into 1 large section to cover all the SoC IPs register ranges TF-A needs, this is to save mmap regions and make it simple. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-09-08imx8qm/imx8qxp: support random CPU resume when system suspendAnson Huang
Using sc_pm_set_cpu_resume API instead of sc_pm_set_cpu_resume_addr to support random CPU resume for system suspend, as Linux kernel now supports non CPU0 suspend, we have to specify the CPU ID for SCFW to wake up when system resume. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-08-15imx8qxp: put DRC into OFF mode when Linux suspendAnson Huang
SCFW has supported DDR retention, so now DRC can be into OFF mode instead of STBY when Linux suspend. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-06-20imx8qxp: support SC_R_IRQSTR_SCU2 OFF in system suspendAnson Huang
SC_R_IRQSTR_SCU2 can be OFF in system suspend if there is no wakeup irq enabled from non-secure OS partion. Add wakeup source check to decide if turning off SC_R_IRQSTR_SCU2 or NOT when suspend. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-06-20imx8qxp: turn off DB when linux suspendAnson Huang
DB is NOT necessary for irqsteer on i.MX8QXP, it can be OFF when linux suspend. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-06-20imx8qxp: support MU power off during suspendAnson Huang
Add MU power off support for suspend, it needs to be re-initialized after system resume. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-06-11plat: imx: Fix the IRQSTR power modes for iMX8QM/QXPNitin Garg
make sure to put IRQSTEER SCU into correct power modes. Signed-off-by: Nitin Garg <nitin.garg@nxp.com>
2018-06-11plat: freescale: update the license identifier with SPDX short identifierBai Ping
clean up the license identifier with short SPDX short identifier. Signed-off-by: Bai Ping <ping.bai@nxp.com>
2018-06-11plat: imx: add gic save/restore for imx8qm/qxpBai Ping
In order to save power when AP side is suspend, the DBLOG need to be put into low power mode. GIC need to be power off to save power. before GIC power off, we need to save the GIC setting, then after resume, we need to restore the gic setting. irqsteer need to be used to wakeup the AP side when wakeup interrupt is pending for AP side. Signed-off-by: Bai Ping <ping.bai@nxp.com>
2018-06-11imx8qxp: add return value for cpu kill functionAnson Huang
Enable USE_COHERENT_MEM feature to make sure no cache coherence issue and avoid cache operations in many places; Add return value for cpu kill function. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-06-11Add low power state requests:Ranjani Vaidyanathan
1. Request to DRC switch to STBY in low power. 2. Set GIC to LP mode once GIC interface has been disabled in low power flow. Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
2018-06-11plat: freescale: imx8qm/qxp: add poweroffRobin Gong
Add power off interface for Linux. Currently poweroff the whole board,may change to poweroff partition if necessary. sync with the below scfw commit: commit 0e1f8aa5d6c6a6d9b8c05d5a84bbd613b301d367 Author: Chuck Cannon <chuck.cannon@freescale.com> Date: Tue Nov 28 13:56:29 2017 -0600 Use SC_R_BOARD_R1 to control the base board reset. Signed-off-by: Chuck Cannon <chuck.cannon@freescale.com> Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2018-06-11Request the appropriate modes for runtime and low power for DDR, MU,Ranjani Vaidyanathan
system interconnect etc. Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
2018-06-11imx8qxp: add A35 cluster low power mode in suspendAnson Huang
Request A35 cluster low power mode to off to SCFW, when suspend, SCFW will turn off A35 cluster. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-06-11imx8qxp: add suspend/resume supportAnson Huang
Add suspend/resume support with all CPUs power down. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-06-11i.mx8qm/i.mx8qxp: psci: add power off supportAnson Huang
Add system_off pcsi callback to avoid below kernel message when doing power off: [11613.953711] reboot: Power down [11613.958318] systemd-shutdow: 8 output lines suppressed due to ratelimiting [11613.965285] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00 [11613.965285] [11613.974441] CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 4.9.11-03354-g0e1 [11613.982369] Hardware name: Freescale i.MX8QXP LPDDR4 ARM2 (DT) [11613.988216] Call trace: [11613.990681] [<ffff0000080882bc>] dump_backtrace+0x0/0x1a8 [11613.996092] [<ffff000008088478>] show_stack+0x14/0x1c [11614.001154] [<ffff0000083aaf98>] dump_stack+0x8c/0xac [11614.006213] [<ffff000008162aac>] panic+0x124/0x28c [11614.011016] [<ffff0000080c0b20>] complete_and_exit+0x0/0x20 [11614.016600] [<ffff0000080dc6d8>] SyS_reboot+0x168/0x244 [11614.021829] [<ffff000008082ef0>] el0_svc_naked+0x24/0x28 [11614.027153] Kernel Offset: disabled [11614.030646] Memory Limit: none [11614.040755] ---[ end Kernel panic - not syncing: Attempted to kill init! exi0 [11614.040755] As there is no system power off SCFW API available now, so just simply do wfi and never return when system_off is called. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-06-11imx8qxp: add board reset supportAnson Huang
Add i.MX8QXP board reset support. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-06-08Add i.MX8QXP supportAnson Huang
Add i.MX8QXP platform support. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Signed-off-by: Bai Ping <ping.bai@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>