configs: stm32mp25: add support of NAND and NOR boot

Add support of UBI boot and activate the needed
configuration for U-Boot environment in UBI volume for
NAND or in a MTD partition for NOR device, SPI Flash:
ENV_OFFSET, ENV_OFFSET_REDUND, ENV_SECT_SIZE is
aligned with the default MTD partition on NOR device
of the STMicroelectronics boards.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
diff --git a/board/st/stm32mp2/stm32mp2.c b/board/st/stm32mp2/stm32mp2.c
index 6e4f19b..2547f2e 100644
--- a/board/st/stm32mp2/stm32mp2.c
+++ b/board/st/stm32mp2/stm32mp2.c
@@ -138,6 +138,19 @@
 			return ENVL_MMC;
 		else
 			return ENVL_NOWHERE;
+
+	case BOOT_FLASH_NAND:
+	case BOOT_FLASH_SPINAND:
+		if (CONFIG_IS_ENABLED(ENV_IS_IN_UBI))
+			return ENVL_UBI;
+		else
+			return ENVL_NOWHERE;
+
+	case BOOT_FLASH_NOR:
+		if (CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH))
+			return ENVL_SPI_FLASH;
+		else
+			return ENVL_NOWHERE;
 	default:
 		return ENVL_NOWHERE;
 	}