Skip to content

Commit

Permalink
plat-sam: add support for Microchip sama7g54-ek board
Browse files Browse the repository at this point in the history
Add the main functions for sama7g54 initialize, including:
 - console_init()
 - Matrix, TZC, TZPM, interrupt related
Update conf.mk and Makefile for sama7g5 OP-TEE support.

Signed-off-by: Tony Han <tony.han@microchip.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
  • Loading branch information
TonyHan11 authored and jforissier committed Apr 2, 2024
1 parent d10f2b2 commit fc57019
Show file tree
Hide file tree
Showing 4 changed files with 965 additions and 6 deletions.
31 changes: 25 additions & 6 deletions core/arch/arm/plat-sam/conf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ flavor_dts_file-sama5d2xult = at91-sama5d2_xplained.dts
flavor_dts_file-sama5d2_xplained = at91-sama5d2_xplained.dts
flavor_dts_file-sama5d27_som1_ek = at91-sama5d27_som1_ek.dts
flavor_dts_file-sama5d27_wlsom1_ek = at91-sama5d27_wlsom1_ek.dts
flavor_dts_file-sama7g54_ek = at91-sama7g54_ek.dts

ifeq ($(PLATFORM_FLAVOR),sama5d2xult)
$(warning "sama5d2xult is deprecated, please use sama5d2_xplained")
Expand All @@ -14,16 +15,23 @@ $(error Invalid platform flavor $(PLATFORM_FLAVOR))
endif
CFG_EMBED_DTB_SOURCE_FILE ?= $(flavor_dts_file-$(PLATFORM_FLAVOR))

ifeq ($(PLATFORM_FLAVOR),sama7g54_ek)
include core/arch/arm/cpu/cortex-a7.mk
$(call force,CFG_SAMA7G5,y)
$(call force,CFG_GIC,y)
$(call force,CFG_TZC400,y)
else
include core/arch/arm/cpu/cortex-a5.mk
$(call force,CFG_SAMA5D2,y)
$(call force,CFG_ATMEL_SAIC,y)
$(call force,CFG_PL310,y)
$(call force,CFG_PL310_LOCKED,y)
endif

$(call force,CFG_TEE_CORE_NB_CORE,1)
$(call force,CFG_ATMEL_UART,y)
$(call force,CFG_ATMEL_SAIC,y)
$(call force,CFG_ATMEL_TCB,y)
$(call force,CFG_NO_SMP,y)
$(call force,CFG_PL310,y)
$(call force,CFG_PL310_LOCKED,y)
$(call force,CFG_AT91_MATRIX,y)
$(call force,CFG_DRIVERS_CLK,y)
$(call force,CFG_DRIVERS_CLK_DT,y)
Expand All @@ -36,7 +44,12 @@ $(call force,CFG_CORE_HAS_GENERIC_TIMER,n)
# These values are forced because of matrix configuration for secure area.
# When modifying these, always update matrix settings in
# matrix_configure_slave_h64mx().
ifeq ($(CFG_SAMA7G5),y)
$(call force,CFG_TZDRAM_START,0x60000000)
endif
ifeq ($(CFG_SAMA5D2),y)
$(call force,CFG_TZDRAM_START,0x20000000)
endif
$(call force,CFG_TZDRAM_SIZE,0x800000)

# This value is forced because these feature aren't used by SAM platforms.
Expand All @@ -45,16 +58,16 @@ $(call force,CFG_CORE_DYN_SHM,n)

CFG_MMAP_REGIONS ?= 24

CFG_SHMEM_START ?= 0x21000000
CFG_SHMEM_START ?= ($(CFG_TZDRAM_START) + 0x1000000)
CFG_SHMEM_SIZE ?= 0x400000

CFG_SCMI_SHMEM_START ?= 0x21400000
CFG_SCMI_SHMEM_START ?= ($(CFG_TZDRAM_START) + 0x1400000)
CFG_SCMI_SHMEM_SIZE ?= 0x1000

CFG_TEE_RAM_VA_SIZE ?= 0x100000

# Device tree related configuration
CFG_DT_ADDR ?= 0x21500000
CFG_DT_ADDR ?= ($(CFG_TZDRAM_START) + 0x1500000)
CFG_GENERATE_DTB_OVERLAY ?= y

CFG_WITH_SOFTWARE_PRNG ?= n
Expand Down Expand Up @@ -114,6 +127,12 @@ $(call force,CFG_SCMI_MSG_SMT_FASTCALL_ENTRY,y)
endif

CFG_DRIVERS_NVMEM ?= y
ifeq ($(CFG_SAMA7G5),y)
CFG_ATMEL_SFC ?= n
CFG_NVMEM_DIE_ID ?= n
CFG_NVMEM_HUK ?= n
else
CFG_ATMEL_SFC ?= y
CFG_NVMEM_DIE_ID ?= y
CFG_NVMEM_HUK ?= y
endif
Loading

0 comments on commit fc57019

Please sign in to comment.