blob: f769be7112843a28ddea64a76d97f082d94be5dc [file] [log] [blame]
Biju Das4ec2d8f2020-12-16 08:57:59 +00001#
Manish V Badarkhe37f97b62022-01-08 22:40:46 +00002# Copyright (c) 2018-2022, Renesas Electronics Corporation. All rights reserved.
Biju Das4ec2d8f2020-12-16 08:57:59 +00003#
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
Arvind Ram Prakash11b9b492022-11-22 14:41:00 -060013RESET_TO_BL2 := 1
Biju Das4ec2d8f2020-12-16 08:57:59 +000014ENABLE_SVE_FOR_NS := 0
Biju Das4ec2d8f2020-12-16 08:57:59 +000015
16CRASH_REPORTING := 1
Manish Pandey0e3379d2022-10-10 11:43:08 +010017HANDLE_EA_EL3_FIRST_NS := 1
Biju Das4ec2d8f2020-12-16 08:57:59 +000018
Manish V Badarkhe37f97b62022-01-08 22:40:46 +000019# 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
Biju Das4ec2d8f2020-12-16 08:57:59 +000024$(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
Biju Das54f6a432020-12-07 16:31:01 +000040RZ_G2M:=100
Lad Prabhakar9c86f412021-04-19 16:59:55 +010041RZ_G2H:=101
Lad Prabhakared2e11d2021-04-19 17:03:56 +010042RZ_G2N:=102
Lad Prabhakar83472842021-03-19 10:53:23 +000043RZ_G2E:=103
Biju Das4ec2d8f2020-12-16 08:57:59 +000044$(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))
Biju Das54f6a432020-12-07 16:31:01 +000052$(eval $(call add_define,RZ_G2M))
Lad Prabhakar9c86f412021-04-19 16:59:55 +010053$(eval $(call add_define,RZ_G2H))
Lad Prabhakared2e11d2021-04-19 17:03:56 +010054$(eval $(call add_define,RZ_G2N))
Lad Prabhakar83472842021-03-19 10:53:23 +000055$(eval $(call add_define,RZ_G2E))
Biju Das54f6a432020-12-07 16:31:01 +000056
Biju Das4ec2d8f2020-12-16 08:57:59 +000057RCAR_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
Toshiyuki Ogasahara44289fb2021-07-12 19:28:58 +090072ERRATA_A53_1530924 := 1
Biju Das4ec2d8f2020-12-16 08:57:59 +000073
74# Enable workarounds for selected Cortex-A57 erratas.
75ERRATA_A57_859972 := 1
76ERRATA_A57_813419 := 1
Toshiyuki Ogasahara44289fb2021-07-12 19:28:58 +090077ERRATA_A57_1319537 := 1
Biju Das4ec2d8f2020-12-16 08:57:59 +000078
79PLAT_INCLUDES := -Iplat/renesas/common/include/registers \
80 -Iplat/renesas/common/include \
81 -Iplat/renesas/common
82
Biju Das5cd4e332020-12-16 09:43:41 +000083PLAT_BL_COMMON_SOURCES := drivers/renesas/common/iic_dvfs/iic_dvfs.c \
84 plat/renesas/common/rcar_common.c
85
Toshiyuki Ogasaharaa2f9c182021-07-12 19:43:45 +090086include drivers/arm/gic/v2/gicv2.mk
87RCAR_GIC_SOURCES := ${GICV2_SOURCES} \
Biju Das4ec2d8f2020-12-16 08:57:59 +000088 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 \
Biju Dasa19da322020-12-16 11:21:33 +000095 plat/renesas/common/aarch64/platform_common.c \
96 plat/renesas/common/aarch64/plat_helpers.S \
Biju Das45803282020-12-16 11:28:07 +000097 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 \
Biju Das73e52b82020-12-16 10:36:17 +0000103 drivers/renesas/common/console/rcar_printf.c \
104 drivers/renesas/common/scif/scif.S \
Biju Das4ec2d8f2020-12-16 08:57:59 +0000105 drivers/renesas/common/common.c \
Biju Das030163c2020-12-16 10:05:41 +0000106 drivers/renesas/common/io/io_emmcdrv.c \
107 drivers/renesas/common/io/io_memdrv.c \
108 drivers/renesas/common/io/io_rcar.c \
Biju Dasc9cf87a2020-12-16 11:11:09 +0000109 drivers/renesas/common/auth/auth_mod.c \
Biju Dasf0f30b02020-12-16 11:15:33 +0000110 drivers/renesas/common/rpc/rpc_driver.c \
Biju Dasc951a332020-12-16 11:02:59 +0000111 drivers/renesas/common/dma/dma_driver.c \
Biju Das0520cdf2020-12-16 11:13:06 +0000112 drivers/renesas/common/avs/avs_driver.c \
Biju Dasee13d8f2020-12-16 10:46:36 +0000113 drivers/renesas/common/delay/micro_delay.c \
Biju Das4c325592020-12-16 09:53:19 +0000114 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 \
Biju Das50758f22020-12-16 11:00:21 +0000120 drivers/renesas/common/watchdog/swdt.c \
Biju Das907c8652020-12-16 10:56:03 +0000121 drivers/renesas/common/rom/rom_api.c \
Biju Das4ec2d8f2020-12-16 08:57:59 +0000122 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 \
Biju Das45803282020-12-16 11:28:07 +0000128 plat/renesas/common/plat_topology.c \
Biju Dasa19da322020-12-16 11:21:33 +0000129 plat/renesas/common/aarch64/plat_helpers.S \
130 plat/renesas/common/aarch64/platform_common.c \
Biju Das45803282020-12-16 11:28:07 +0000131 plat/renesas/common/bl31_plat_setup.c \
132 plat/renesas/common/plat_pm.c \
Biju Das73e52b82020-12-16 10:36:17 +0000133 drivers/renesas/common/console/rcar_console.S \
134 drivers/renesas/common/console/rcar_printf.c \
Biju Dasee13d8f2020-12-16 10:46:36 +0000135 drivers/renesas/common/delay/micro_delay.c \
Biju Das112cc422020-12-16 10:27:45 +0000136 drivers/renesas/common/pwrc/call_sram.S \
137 drivers/renesas/common/pwrc/pwrc.c \
Biju Das4ec2d8f2020-12-16 08:57:59 +0000138 drivers/renesas/common/common.c \
139 drivers/arm/cci/cci.c
Biju Das5cd4e332020-12-16 09:43:41 +0000140
141include lib/xlat_tables_v2/xlat_tables.mk
Biju Das5cd4e332020-12-16 09:43:41 +0000142PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS}