feat(stm32mp2): add some platform helpers
Update STM32MP2 the platform files.
Implement the helpers for STM32MP2, as we have them for STM32MP1:
stm32mp_is_single_core, stm32mp_check_closed_device and
stm32mp_is_auth_supported
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I1554efdb05338f07b292e77175db5a564cc25c78
diff --git a/plat/st/stm32mp2/stm32mp2_private.c b/plat/st/stm32mp2/stm32mp2_private.c
index 2070cea..63e878c 100644
--- a/plat/st/stm32mp2/stm32mp2_private.c
+++ b/plat/st/stm32mp2/stm32mp2_private.c
@@ -319,6 +319,54 @@
}
}
+/* Return true when SoC provides a single Cortex-A35 core, and false otherwise */
+bool stm32mp_is_single_core(void)
+{
+ bool single_core = false;
+
+ switch (get_part_number()) {
+ case STM32MP251A_PART_NB:
+ case STM32MP251C_PART_NB:
+ case STM32MP251D_PART_NB:
+ case STM32MP251F_PART_NB:
+ single_core = true;
+ break;
+ default:
+ break;
+ }
+
+ return single_core;
+}
+
+/* Return true when device is in closed state */
+uint32_t stm32mp_check_closed_device(void)
+{
+ return STM32MP_CHIP_SEC_OPEN;
+}
+
+/* Return true when device supports secure boot */
+bool stm32mp_is_auth_supported(void)
+{
+ bool supported = false;
+
+ switch (get_part_number()) {
+ case STM32MP251C_PART_NB:
+ case STM32MP251F_PART_NB:
+ case STM32MP253C_PART_NB:
+ case STM32MP253F_PART_NB:
+ case STM32MP255C_PART_NB:
+ case STM32MP255F_PART_NB:
+ case STM32MP257C_PART_NB:
+ case STM32MP257F_PART_NB:
+ supported = true;
+ break;
+ default:
+ break;
+ }
+
+ return supported;
+}
+
bool stm32mp_is_wakeup_from_standby(void)
{
/* TODO add source code to determine if platform is waking up from standby mode */