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
Update Makefile for configuring OP-TEE for sama7g5.
Rename file name for sama5d2 functions to 'platform_sama5d2.c'.
Update Makefile to compile initialize functions for each device.

Signed-off-by: Tony Han <tony.han@microchip.com>
  • Loading branch information
TonyHan11 committed Oct 24, 2023
1 parent ad2eb43 commit aa664a2
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
30 changes: 30 additions & 0 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,33 +15,62 @@ $(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)
else
include core/arch/arm/cpu/cortex-a5.mk
$(call force,CFG_SAMA5D2,y)
endif

$(call force,CFG_TEE_CORE_NB_CORE,1)
$(call force,CFG_ATMEL_UART,y)
ifeq ($(PLATFORM_FLAVOR),sama7g54_ek)
$(call force,CFG_GIC,y)
else
$(call force,CFG_ATMEL_SAIC,y)
endif
$(call force,CFG_ATMEL_TCB,y)
$(call force,CFG_NO_SMP,y)
ifeq ($(PLATFORM_FLAVOR),sama7g54_ek)
$(call force,CFG_TZC400,y)
else
$(call force,CFG_PL310,y)
$(call force,CFG_PL310_LOCKED,y)
endif
$(call force,CFG_AT91_MATRIX,y)
$(call force,CFG_DRIVERS_CLK,y)
$(call force,CFG_DRIVERS_CLK_DT,y)
$(call force,CFG_DRIVERS_CLK_FIXED,y)
$(call force,CFG_DRIVERS_SAM_CLK,y)
ifeq ($(PLATFORM_FLAVOR),sama7g54_ek)
$(call force,CFG_DRIVERS_SAMA7G5_CLK,y)
else
$(call force,CFG_DRIVERS_SAMA5D2_CLK,y)
endif
$(call force,CFG_PSCI_ARM32,y)
$(call force,CFG_SM_PLATFORM_HANDLER,y)
$(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 ($(PLATFORM_FLAVOR),sama7g54_ek)
$(call force,CFG_TZDRAM_START,0x60000000)
else
$(call force,CFG_TZDRAM_START,0x20000000)
endif
$(call force,CFG_TZDRAM_SIZE,0x800000)

CFG_MMAP_REGIONS ?= 24

ifeq ($(PLATFORM_FLAVOR),sama7g54_ek)
CFG_SHMEM_START = 0x61000000
CFG_SCMI_SHMEM_START = 0x61400000
CFG_DT_ADDR = 0x61500000
CFG_DRIVERS_PINCTRL ?= y
CFG_ATMEL_PIO ?= y
endif
CFG_SHMEM_START ?= 0x21000000
CFG_SHMEM_SIZE ?= 0x400000

Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion core/arch/arm/plat-sam/sub.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
global-incdirs-y += .
srcs-y += main.c freq.c sam_sfr.c
srcs-y += sam_sfr.c freq.c
srcs-$(CFG_SAMA5D2) += platform_sama5d2.c
srcs-$(CFG_SAMA7G5) += platform_sama7g5.c
srcs-$(CFG_AT91_MATRIX) += matrix.c
srcs-$(CFG_PL310) += sam_pl310.c
srcs-$(CFG_SCMI_MSG_DRIVERS) += scmi_server.c
Expand Down

0 comments on commit aa664a2

Please sign in to comment.