summaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorJi Luo <ji.luo@nxp.com>2019-01-11 09:46:53 +0800
committerJi Luo <ji.luo@nxp.com>2020-05-15 17:34:14 +0800
commit1b6471585e469603e1a259a5c1987626627454e3 (patch)
tree35d383efc0901814522a242fcde7ab3843b54e84 /board/freescale
parent39992a017ee543c99cd82a1a7452c552eca4230e (diff)
MA-13937 Enable CAAM for imx8q
The CAAM driver in u-boot will use JR0 by default, but for imx8q, both JR0 and JR1 are assigned to SECO and A core should never access them. Power on the JR3 in this patchset and use it to complete the CAAM operations for imx8q. Test: CAAM self test cases pass for imx8q. below patches are merged to this commit: MA-13964 imx8q: Kick the CAAM JR before kicking the SMMU MA-13969 Fix CAAM build warnings Change-Id: Ie3d77d1f2910e7f4c257c797c12b5c8a30ad936a Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit d6e0fdcde5773fed4804cdacf927808bd2da3d7d)
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/imx8qm_mek/imx8qm_mek.c8
-rw-r--r--board/freescale/imx8qxp_mek/imx8qxp_mek.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/board/freescale/imx8qm_mek/imx8qm_mek.c b/board/freescale/imx8qm_mek/imx8qm_mek.c
index 435126c80c..3fba72873d 100644
--- a/board/freescale/imx8qm_mek/imx8qm_mek.c
+++ b/board/freescale/imx8qm_mek/imx8qm_mek.c
@@ -65,6 +65,14 @@ int board_early_init_f(void)
setup_iomux_uart();
+/* Dual bootloader feature will require CAAM access, but JR0 and JR1 will be
+ * assigned to seco for imx8, use JR3 instead.
+ */
+#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_DUAL_BOOTLOADER)
+ sc_pm_set_resource_power_mode(-1, SC_R_CAAM_JR3, SC_PM_PW_MODE_ON);
+ sc_pm_set_resource_power_mode(-1, SC_R_CAAM_JR3_OUT, SC_PM_PW_MODE_ON);
+#endif
+
return 0;
}
diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c
index 2ddfec778a..f4d3cc6dd3 100644
--- a/board/freescale/imx8qxp_mek/imx8qxp_mek.c
+++ b/board/freescale/imx8qxp_mek/imx8qxp_mek.c
@@ -62,6 +62,14 @@ int board_early_init_f(void)
setup_iomux_uart();
+/* Dual bootloader feature will require CAAM access, but JR0 and JR1 will be
+ * assigned to seco for imx8, use JR3 instead.
+ */
+#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_DUAL_BOOTLOADER)
+ sc_pm_set_resource_power_mode(-1, SC_R_CAAM_JR3, SC_PM_PW_MODE_ON);
+ sc_pm_set_resource_power_mode(-1, SC_R_CAAM_JR3_OUT, SC_PM_PW_MODE_ON);
+#endif
+
return 0;
}