stm32mp1: Add DDR support and its security with TZC400

The DDR driver is under dual license, BSD and GPLv2.
The configuration parameters are taken from device tree.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
diff --git a/plat/st/stm32mp1/bl2_plat_setup.c b/plat/st/stm32mp1/bl2_plat_setup.c
index 84484e1..9f2d8bd 100644
--- a/plat/st/stm32mp1/bl2_plat_setup.c
+++ b/plat/st/stm32mp1/bl2_plat_setup.c
@@ -22,6 +22,7 @@
 #include <stm32mp1_private.h>
 #include <stm32mp1_context.h>
 #include <stm32mp1_pwr.h>
+#include <stm32mp1_ram.h>
 #include <stm32mp1_rcc.h>
 #include <stm32mp1_reset.h>
 #include <string.h>
@@ -35,10 +36,18 @@
 
 void bl2_platform_setup(void)
 {
+	int ret;
+
 	if (dt_check_pmic()) {
 		initialize_pmic();
 	}
 
+	ret = stm32mp1_ddr_probe();
+	if (ret < 0) {
+		ERROR("Invalid DDR init: error %d\n", ret);
+		panic();
+	}
+
 	INFO("BL2 runs SP_MIN setup\n");
 }
 
@@ -146,5 +155,7 @@
 		ERROR("Cannot save boot interface\n");
 	}
 
+	stm32mp1_arch_security_setup();
+
 	stm32mp1_io_setup();
 }