Commit c24502fd authored by Jacky Bai's avatar Jacky Bai

plat: imx8mn: enable gpu & ddrmix ccgr if noc power down

NOC power down will trigger the RDC memory regions reload
if any of the region is eabled.The GPU bus and DDRMIX clock
must be enable during the RDC memory region config reload
stage.
Signed-off-by: default avatarJacky Bai <ping.bai@nxp.com>
parent f2e052b4
......@@ -547,6 +547,8 @@ static void imx8mm_tz380_init(void)
| TZC_ATTR_REGION_EN_MASK | TZC_ATTR_SP_ALL);
}
#define CCGR(x) (0x4000 + (x) * 16)
void noc_wrapper_pre_suspend(unsigned int proc_num)
{
uint32_t val;
......@@ -563,9 +565,17 @@ void noc_wrapper_pre_suspend(unsigned int proc_num)
mmio_write_32(IMX_GPC_BASE + MST_CPU_MAPPING, val);
/* noc can only be power down when all the pu domain is off */
if (!pu_domain_status)
if (!pu_domain_status) {
/* enable noc power down */
imx_noc_slot_config(true);
/*
* below clocks must be enabled to make sure RDC MRCs
* can be successfully reloaded.
*/
mmio_setbits_32(IMX_CCM_BASE + 0xa300, (0x1 << 28));
mmio_write_32(IMX_CCM_BASE + CCGR(5), 0x3);
mmio_write_32(IMX_CCM_BASE + CCGR(87), 0x3);
}
}
/*
* gic redistributor context save must be called when
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment