1#
2# Copyright (c) 2018-2022, Renesas Electronics Corporation. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7PROGRAMMABLE_RESET_ADDRESS	:= 0
8COLD_BOOT_SINGLE_CPU		:= 1
9ARM_CCI_PRODUCT_ID		:= 500
10TRUSTED_BOARD_BOOT		:= 1
11RESET_TO_BL31			:= 1
12GENERATE_COT			:= 1
13RESET_TO_BL2			:= 1
14ENABLE_SVE_FOR_NS		:= 0
15
16CRASH_REPORTING			:= 1
17HANDLE_EA_EL3_FIRST_NS		:= 1
18
19# This option gets enabled automatically if the TRUSTED_BOARD_BOOT
20# is set via root Makefile, but Renesas support Trusted-Boot without
21# Crypto module.
22override CRYPTO_SUPPORT		:= 0
23
24$(eval $(call add_define,PLAT_EXTRA_LD_SCRIPT))
25
26ifeq (${SPD},none)
27  SPD_NONE:=1
28  $(eval $(call add_define,SPD_NONE))
29endif
30
31# LSI setting common define
32RCAR_H3:=0
33RCAR_M3:=1
34RCAR_M3N:=2
35RCAR_E3:=3
36RCAR_H3N:=4
37RCAR_D3:=5
38RCAR_V3M:=6
39RCAR_AUTO:=99
40RZ_G2M:=100
41RZ_G2H:=101
42RZ_G2N:=102
43RZ_G2E:=103
44$(eval $(call add_define,RCAR_H3))
45$(eval $(call add_define,RCAR_M3))
46$(eval $(call add_define,RCAR_M3N))
47$(eval $(call add_define,RCAR_E3))
48$(eval $(call add_define,RCAR_H3N))
49$(eval $(call add_define,RCAR_D3))
50$(eval $(call add_define,RCAR_V3M))
51$(eval $(call add_define,RCAR_AUTO))
52$(eval $(call add_define,RZ_G2M))
53$(eval $(call add_define,RZ_G2H))
54$(eval $(call add_define,RZ_G2N))
55$(eval $(call add_define,RZ_G2E))
56
57RCAR_CUT_10:=0
58RCAR_CUT_11:=1
59RCAR_CUT_13:=3
60RCAR_CUT_20:=10
61RCAR_CUT_30:=20
62$(eval $(call add_define,RCAR_CUT_10))
63$(eval $(call add_define,RCAR_CUT_11))
64$(eval $(call add_define,RCAR_CUT_13))
65$(eval $(call add_define,RCAR_CUT_20))
66$(eval $(call add_define,RCAR_CUT_30))
67
68# Enable workarounds for selected Cortex-A53 erratas.
69ERRATA_A53_835769  := 1
70ERRATA_A53_843419  := 1
71ERRATA_A53_855873  := 1
72ERRATA_A53_1530924 := 1
73
74# Enable workarounds for selected Cortex-A57 erratas.
75ERRATA_A57_859972  := 1
76ERRATA_A57_813419  := 1
77ERRATA_A57_1319537 := 1
78
79PLAT_INCLUDES	:=	-Iplat/renesas/common/include/registers	\
80			-Iplat/renesas/common/include		\
81			-Iplat/renesas/common
82
83PLAT_BL_COMMON_SOURCES	:=	drivers/renesas/common/iic_dvfs/iic_dvfs.c \
84				plat/renesas/common/rcar_common.c
85
86include drivers/arm/gic/v2/gicv2.mk
87RCAR_GIC_SOURCES	:=	${GICV2_SOURCES} \
88				plat/common/plat_gicv2.c
89
90BL2_SOURCES	+=	${RCAR_GIC_SOURCES}				\
91			lib/cpus/aarch64/cortex_a53.S			\
92			lib/cpus/aarch64/cortex_a57.S			\
93			${LIBFDT_SRCS}					\
94			common/desc_image_load.c			\
95			plat/renesas/common/aarch64/platform_common.c	\
96			plat/renesas/common/aarch64/plat_helpers.S	\
97			plat/renesas/common/bl2_interrupt_error.c	\
98			plat/renesas/common/bl2_secure_setting.c	\
99			plat/renesas/common/plat_storage.c		\
100			plat/renesas/common/bl2_plat_mem_params_desc.c	\
101			plat/renesas/common/plat_image_load.c		\
102			plat/renesas/common/bl2_cpg_init.c		\
103			drivers/renesas/common/console/rcar_printf.c	\
104			drivers/renesas/common/scif/scif.S		\
105			drivers/renesas/common/common.c			\
106			drivers/renesas/common/io/io_emmcdrv.c		\
107			drivers/renesas/common/io/io_memdrv.c		\
108			drivers/renesas/common/io/io_rcar.c		\
109			drivers/renesas/common/auth/auth_mod.c		\
110			drivers/renesas/common/rpc/rpc_driver.c		\
111			drivers/renesas/common/dma/dma_driver.c		\
112			drivers/renesas/common/avs/avs_driver.c		\
113			drivers/renesas/common/delay/micro_delay.c	\
114			drivers/renesas/common/emmc/emmc_interrupt.c	\
115			drivers/renesas/common/emmc/emmc_utility.c	\
116			drivers/renesas/common/emmc/emmc_mount.c	\
117			drivers/renesas/common/emmc/emmc_init.c		\
118			drivers/renesas/common/emmc/emmc_read.c		\
119			drivers/renesas/common/emmc/emmc_cmd.c		\
120			drivers/renesas/common/watchdog/swdt.c		\
121			drivers/renesas/common/rom/rom_api.c		\
122			drivers/io/io_storage.c
123
124BL31_SOURCES	+=	${RCAR_GIC_SOURCES}				\
125			lib/cpus/aarch64/cortex_a53.S			\
126			lib/cpus/aarch64/cortex_a57.S			\
127			plat/common/plat_psci_common.c			\
128			plat/renesas/common/plat_topology.c		\
129			plat/renesas/common/aarch64/plat_helpers.S	\
130			plat/renesas/common/aarch64/platform_common.c	\
131			plat/renesas/common/bl31_plat_setup.c		\
132			plat/renesas/common/plat_pm.c			\
133			drivers/renesas/common/console/rcar_console.S	\
134			drivers/renesas/common/console/rcar_printf.c	\
135			drivers/renesas/common/delay/micro_delay.c	\
136			drivers/renesas/common/pwrc/call_sram.S		\
137			drivers/renesas/common/pwrc/pwrc.c		\
138			drivers/renesas/common/common.c			\
139			drivers/arm/cci/cci.c
140
141include lib/xlat_tables_v2/xlat_tables.mk
142PLAT_BL_COMMON_SOURCES	+=	${XLAT_TABLES_LIB_SRCS}
143