From bdec516ee862bfadc25a4d0c02a3b8d859c1fa25 Mon Sep 17 00:00:00 2001 From: Sebastien Pasdeloup Date: Fri, 18 Dec 2020 11:50:40 +0100 Subject: [PATCH] feat(stm32mp1): introduce new flag for STM32MP13 STM32MP13 is a variant of STM32MP1, with a single Cortex-A7, and no Cortex-M4. There is only one DDR port. SP_min is not supported, only OP-TEE can be used as monitor. STM32MP13 uses the header v2.0 format for stm32image generation for BL2. Change-Id: Ie5b0e3230c5e064fe96f3561fc5b3208914dea53 Signed-off-by: Yann Gautier --- docs/plat/stm32mp1.rst | 29 +++++++++++++++++++--- plat/st/stm32mp1/platform.mk | 21 ++++++++++++++++ plat/st/stm32mp1/sp_min/sp_min-stm32mp1.mk | 4 +++ 3 files changed, 51 insertions(+), 3 deletions(-) diff --git a/docs/plat/stm32mp1.rst b/docs/plat/stm32mp1.rst index cefc21f12..7ae98b1d2 100644 --- a/docs/plat/stm32mp1.rst +++ b/docs/plat/stm32mp1.rst @@ -2,15 +2,34 @@ STMicroelectronics STM32MP1 =========================== STM32MP1 is a microprocessor designed by STMicroelectronics -based on a dual Arm Cortex-A7. +based on Arm Cortex-A7. It is an Armv7-A platform, using dedicated code from TF-A. -The STM32MP1 chip also embeds a Cortex-M4. More information can be found on `STM32MP1 Series`_ page. STM32MP1 Versions ----------------- -The STM32MP1 series is available in 3 different lines which are pin-to-pin compatible: + +There are 2 variants for STM32MP1: STM32MP13 and STM32MP15 + +STM32MP13 Versions +~~~~~~~~~~~~~~~~~~ +The STM32MP13 series is available in 3 different lines which are pin-to-pin compatible: + +- STM32MP131: Single Cortex-A7 core +- STM32MP133: STM32MP131 + 2*CAN, ETH2(GMAC), ADC1 +- STM32MP135: STM32MP133 + DCMIPP, LTDC + +Each line comes with a security option (cryptography & secure boot) and a Cortex-A frequency option: + +- A Cortex-A7 @ 650 MHz +- C Secure Boot + HW Crypto + Cortex-A7 @ 650 MHz +- D Cortex-A7 @ 900 MHz +- F Secure Boot + HW Crypto + Cortex-A7 @ 900 MHz + +STM32MP15 Versions +~~~~~~~~~~~~~~~~~~ +The STM32MP15 series is available in 3 different lines which are pin-to-pin compatible: - STM32MP157: Dual Cortex-A7 cores, Cortex-M4 core @ 209 MHz, 3D GPU, DSI display interface and CAN FD - STM32MP153: Dual Cortex-A7 cores, Cortex-M4 core @ 209 MHz and CAN FD @@ -131,6 +150,10 @@ Other configuration flags: | Default: 115200 - | ``STM32_TF_VERSION``: to manage BL2 monotonic counter. | Default: 0 +- | ``STM32MP13``: to select STM32MP13 variant configuration. + | Default: 0 +- | ``STM32MP15``: to select STM32MP15 variant configuration. + | Default: 1 Boot with FIP diff --git a/plat/st/stm32mp1/platform.mk b/plat/st/stm32mp1/platform.mk index ddfc5e703..6b8b71250 100644 --- a/plat/st/stm32mp1/platform.mk +++ b/plat/st/stm32mp1/platform.mk @@ -24,6 +24,22 @@ STM32_TF_VERSION ?= 0 # Enable dynamic memory mapping PLAT_XLAT_TABLES_DYNAMIC := 1 +ifeq ($(STM32MP13),1) +STM32MP13 := 1 +STM32MP15 := 0 + +# DDR controller with single AXI port and 16-bit interface +STM32MP_DDR_DUAL_AXI_PORT:= 0 +STM32MP_DDR_32BIT_INTERFACE:= 0 + +# STM32 image header version v2.0 +STM32_HEADER_VERSION_MAJOR:= 2 +STM32_HEADER_VERSION_MINOR:= 0 +else +#STM32MP15 +STM32MP13 := 0 +STM32MP15 := 1 + # DDR controller with dual AXI port and 32-bit interface STM32MP_DDR_DUAL_AXI_PORT:= 1 STM32MP_DDR_32BIT_INTERFACE:= 1 @@ -31,6 +47,7 @@ STM32MP_DDR_32BIT_INTERFACE:= 1 # STM32 image header version v1.0 STM32_HEADER_VERSION_MAJOR:= 1 STM32_HEADER_VERSION_MINOR:= 0 +endif # STM32 image header binary type for BL2 STM32_HEADER_BL2_BINARY_TYPE:= 0x10 @@ -174,6 +191,8 @@ $(eval $(call assert_booleans,\ STM32MP_UART_PROGRAMMER \ STM32MP_USB_PROGRAMMER \ STM32MP_USE_STM32IMAGE \ + STM32MP13 \ + STM32MP15 \ ))) $(eval $(call assert_numerics,\ @@ -203,6 +222,8 @@ $(eval $(call add_defines,\ STM32MP_UART_PROGRAMMER \ STM32MP_USB_PROGRAMMER \ STM32MP_USE_STM32IMAGE \ + STM32MP13 \ + STM32MP15 \ ))) # Include paths and source files diff --git a/plat/st/stm32mp1/sp_min/sp_min-stm32mp1.mk b/plat/st/stm32mp1/sp_min/sp_min-stm32mp1.mk index b506e9527..c3fc2cb39 100644 --- a/plat/st/stm32mp1/sp_min/sp_min-stm32mp1.mk +++ b/plat/st/stm32mp1/sp_min/sp_min-stm32mp1.mk @@ -4,6 +4,10 @@ # SPDX-License-Identifier: BSD-3-Clause # +ifeq ($(STM32MP13),1) +$(error "SP_min is not supported on STM32MP13 platform") +endif + SP_MIN_WITH_SECURE_FIQ := 1 ifneq ($(STM32MP_USE_STM32IMAGE),1)