2 * Copyright 2015, Freescale Semiconductor
4 * SPDX-License-Identifier: GPL-2.0+
7 #ifndef _ASM_ARMV8_FSL_LAYERSCAPE_CONFIG_H_
8 #define _ASM_ARMV8_FSL_LAYERSCAPE_CONFIG_H_
10 #include <linux/kconfig.h>
11 #include <fsl_ddrc_version.h>
13 #define CONFIG_STANDALONE_LOAD_ADDR 0x80300000
15 #ifdef CONFIG_SYS_FSL_DDR4
16 #define CONFIG_SYS_FSL_DDRC_GEN4
18 #define CONFIG_SYS_FSL_DDRC_ARM_GEN3 /* Enable Freescale ARM DDR3 driver */
21 #ifndef CONFIG_ARCH_LS1012A
22 #define CONFIG_SYS_FSL_DDR /* Freescale DDR driver */
23 #define CONFIG_SYS_FSL_DDR_VER FSL_DDR_VER_5_0
27 * Reserve secure memory
28 * To be aligned with MMU block size
30 #define CONFIG_SYS_MEM_RESERVE_SECURE (2048 * 1024) /* 2MB */
33 #define CONFIG_SYS_FSL_IFC_BANK_COUNT 8
34 #define CONFIG_NUM_DDR_CONTROLLERS 3
35 #define CONFIG_SYS_FSL_HAS_DP_DDR /* Runtime check to confirm */
36 #define CONFIG_SYS_FSL_CLUSTER_CLOCKS { 1, 1, 4, 4 }
37 #define SRDS_MAX_LANES 8
38 #define CONFIG_SYS_FSL_SRDS_1
39 #define CONFIG_SYS_FSL_SRDS_2
40 #define CONFIG_SYS_PAGE_SIZE 0x10000
41 #ifndef L1_CACHE_BYTES
42 #define L1_CACHE_SHIFT 6
43 #define L1_CACHE_BYTES BIT(L1_CACHE_SHIFT)
46 #define CONFIG_SYS_FSL_OCRAM_BASE 0x18000000 /* initial RAM */
47 #define CONFIG_SYS_FSL_OCRAM_SIZE 0x00200000 /* 2M */
50 #define CONFIG_SYS_FSL_DDR_LE
51 #define CONFIG_SYS_LS2_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
52 #define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_LS2_DDR_BLOCK1_SIZE
54 #define CONFIG_SYS_FSL_CCSR_GUR_LE
55 #define CONFIG_SYS_FSL_CCSR_SCFG_LE
56 #define CONFIG_SYS_FSL_ESDHC_LE
57 #define CONFIG_SYS_FSL_IFC_LE
58 #define CONFIG_SYS_FSL_PEX_LUT_LE
60 #define CONFIG_SYS_MEMAC_LITTLE_ENDIAN
62 /* Generic Interrupt Controller Definitions */
63 #define GICD_BASE 0x06000000
64 #define GICR_BASE 0x06100000
67 #define SMMU_BASE 0x05000000 /* GR0 Base */
70 #define CONFIG_SYS_FSL_SFP_VER_3_4
71 #define CONFIG_SYS_FSL_SFP_LE
72 #define CONFIG_SYS_FSL_SRK_LE
75 #define CONFIG_SYS_FSL_SEC_LE
76 #define CONFIG_SYS_FSL_SEC_COMPAT 5
78 /* Security Monitor */
79 #define CONFIG_SYS_FSL_SEC_MON_LE
82 #define CONFIG_ESBC_HDR_LS
85 #define CONFIG_SYS_FSL_CCSR_GUR_LE
87 /* Cache Coherent Interconnect */
88 #define CCI_MN_BASE 0x04000000
89 #define CCI_MN_RNF_NODEID_LIST 0x180
90 #define CCI_MN_DVM_DOMAIN_CTL 0x200
91 #define CCI_MN_DVM_DOMAIN_CTL_SET 0x210
93 #define CCI_HN_F_0_BASE (CCI_MN_BASE + 0x200000)
94 #define CCI_HN_F_1_BASE (CCI_MN_BASE + 0x210000)
95 #define CCN_HN_F_SAM_CTL 0x8 /* offset on base HN_F base */
96 #define CCN_HN_F_SAM_NODEID_MASK 0x7f
97 #define CCN_HN_F_SAM_NODEID_DDR0 0x4
98 #define CCN_HN_F_SAM_NODEID_DDR1 0xe
100 #define CCI_RN_I_0_BASE (CCI_MN_BASE + 0x800000)
101 #define CCI_RN_I_2_BASE (CCI_MN_BASE + 0x820000)
102 #define CCI_RN_I_6_BASE (CCI_MN_BASE + 0x860000)
103 #define CCI_RN_I_12_BASE (CCI_MN_BASE + 0x8C0000)
104 #define CCI_RN_I_16_BASE (CCI_MN_BASE + 0x900000)
105 #define CCI_RN_I_20_BASE (CCI_MN_BASE + 0x940000)
107 #define CCI_S0_QOS_CONTROL_BASE(x) ((CCI_RN_I_0_BASE + (x * 0x10000)) + 0x10)
108 #define CCI_S1_QOS_CONTROL_BASE(x) ((CCI_RN_I_0_BASE + (x * 0x10000)) + 0x110)
109 #define CCI_S2_QOS_CONTROL_BASE(x) ((CCI_RN_I_0_BASE + (x * 0x10000)) + 0x210)
111 #define CCI_AUX_CONTROL_BASE(x) ((CCI_RN_I_0_BASE + (x * 0x10000)) + 0x0500)
113 /* TZ Protection Controller Definitions */
114 #define TZPC_BASE 0x02200000
115 #define TZPCR0SIZE_BASE (TZPC_BASE)
116 #define TZPCDECPROT_0_STAT_BASE (TZPC_BASE + 0x800)
117 #define TZPCDECPROT_0_SET_BASE (TZPC_BASE + 0x804)
118 #define TZPCDECPROT_0_CLR_BASE (TZPC_BASE + 0x808)
119 #define TZPCDECPROT_1_STAT_BASE (TZPC_BASE + 0x80C)
120 #define TZPCDECPROT_1_SET_BASE (TZPC_BASE + 0x810)
121 #define TZPCDECPROT_1_CLR_BASE (TZPC_BASE + 0x814)
122 #define TZPCDECPROT_2_STAT_BASE (TZPC_BASE + 0x818)
123 #define TZPCDECPROT_2_SET_BASE (TZPC_BASE + 0x81C)
124 #define TZPCDECPROT_2_CLR_BASE (TZPC_BASE + 0x820)
126 #define DCSR_CGACRE5 0x700070914ULL
127 #define EPU_EPCMPR5 0x700060914ULL
128 #define EPU_EPCCR5 0x700060814ULL
129 #define EPU_EPSMCR5 0x700060228ULL
130 #define EPU_EPECR5 0x700060314ULL
131 #define EPU_EPCTR5 0x700060a14ULL
132 #define EPU_EPGCR 0x700060000ULL
134 #define CONFIG_SYS_FSL_ERRATUM_A008336
135 #define CONFIG_SYS_FSL_ERRATUM_A008511
136 #define CONFIG_SYS_FSL_ERRATUM_A008514
137 #define CONFIG_SYS_FSL_ERRATUM_A008585
138 #define CONFIG_SYS_FSL_ERRATUM_A008751
139 #define CONFIG_SYS_FSL_ERRATUM_A009635
140 #define CONFIG_SYS_FSL_ERRATUM_A009663
141 #define CONFIG_SYS_FSL_ERRATUM_A009801
142 #define CONFIG_SYS_FSL_ERRATUM_A009803
143 #define CONFIG_SYS_FSL_ERRATUM_A009942
144 #define CONFIG_SYS_FSL_ERRATUM_A010165
146 /* ARM A57 CORE ERRATA */
147 #define CONFIG_ARM_ERRATA_826974
148 #define CONFIG_ARM_ERRATA_828024
149 #define CONFIG_ARM_ERRATA_829520
150 #define CONFIG_ARM_ERRATA_833471
152 #define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
153 #elif defined(CONFIG_FSL_LSCH2)
154 #define CONFIG_NUM_DDR_CONTROLLERS 1
155 #define CONFIG_SYS_FSL_SEC_COMPAT 5
156 #define CONFIG_SYS_FSL_OCRAM_BASE 0x10000000 /* initial RAM */
157 #define CONFIG_SYS_FSL_OCRAM_SIZE 0x00200000 /* 2M */
158 #define CONFIG_SYS_CCSRBAR_DEFAULT 0x01000000
160 #define CONFIG_SYS_FSL_CCSR_SCFG_BE
161 #define CONFIG_SYS_FSL_ESDHC_BE
162 #define CONFIG_SYS_FSL_WDOG_BE
163 #define CONFIG_SYS_FSL_DSPI_BE
164 #define CONFIG_SYS_FSL_QSPI_BE
165 #define CONFIG_SYS_FSL_CCSR_GUR_BE
166 #define CONFIG_SYS_FSL_PEX_LUT_BE
167 #define CONFIG_SYS_FSL_SEC_BE
169 #define CONFIG_SYS_FSL_SRDS_1
172 #ifdef CONFIG_LS1043A
173 #define CONFIG_SYS_FMAN_V3
174 #define CONFIG_SYS_NUM_FMAN 1
175 #define CONFIG_SYS_NUM_FM1_DTSEC 7
176 #define CONFIG_SYS_NUM_FM1_10GEC 1
177 #define CONFIG_SYS_FSL_IFC_BANK_COUNT 4
178 #define CONFIG_SYS_FSL_DDR_BE
179 #define CONFIG_SYS_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
180 #define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_DDR_BLOCK1_SIZE
182 #define QE_MURAM_SIZE 0x6000UL
183 #define MAX_QE_RISC 1
184 #define QE_NUM_OF_SNUM 28
186 #define CONFIG_SYS_FSL_IFC_BE
187 #define CONFIG_SYS_FSL_SFP_VER_3_2
188 #define CONFIG_SYS_FSL_SEC_MON_BE
189 #define CONFIG_SYS_FSL_SFP_BE
190 #define CONFIG_SYS_FSL_SRK_LE
191 #define CONFIG_KEY_REVOCATION
193 /* SMMU Defintions */
194 #define SMMU_BASE 0x09000000
196 /* Generic Interrupt Controller Definitions */
197 #define GICD_BASE 0x01401000
198 #define GICC_BASE 0x01402000
200 #define CONFIG_SYS_FSL_ERRATUM_A008850
201 #define CONFIG_SYS_FSL_ERRATUM_A009663
202 #define CONFIG_SYS_FSL_ERRATUM_A009929
203 #define CONFIG_SYS_FSL_ERRATUM_A009942
204 #define CONFIG_SYS_FSL_ERRATUM_A009660
205 #define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
206 #elif defined(CONFIG_ARCH_LS1012A)
207 #undef CONFIG_SYS_FSL_DDRC_ARM_GEN3
209 #define GICD_BASE 0x01401000
210 #define GICC_BASE 0x01402000
211 #elif defined(CONFIG_ARCH_LS1046A)
212 #define CONFIG_SYS_FMAN_V3
213 #define CONFIG_SYS_NUM_FMAN 1
214 #define CONFIG_SYS_NUM_FM1_DTSEC 8
215 #define CONFIG_SYS_NUM_FM1_10GEC 2
216 #define CONFIG_SYS_FSL_IFC_BANK_COUNT 4
217 #define CONFIG_SYS_FSL_DDR_BE
218 #define CONFIG_SYS_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
219 #define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_DDR_BLOCK1_SIZE
221 #define CONFIG_SYS_FSL_SRDS_2
222 #define CONFIG_SYS_FSL_IFC_BE
223 #define CONFIG_SYS_FSL_SFP_VER_3_2
224 #define CONFIG_SYS_FSL_SNVS_LE
225 #define CONFIG_SYS_FSL_SFP_BE
226 #define CONFIG_SYS_FSL_SRK_LE
227 #define CONFIG_KEY_REVOCATION
229 /* SMMU Defintions */
230 #define SMMU_BASE 0x09000000
232 /* Generic Interrupt Controller Definitions */
233 #define GICD_BASE 0x01410000
234 #define GICC_BASE 0x01420000
236 #define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
238 #define CONFIG_SYS_FSL_ERRATUM_A008511
239 #define CONFIG_SYS_FSL_ERRATUM_A009801
240 #define CONFIG_SYS_FSL_ERRATUM_A009803
241 #define CONFIG_SYS_FSL_ERRATUM_A009942
242 #define CONFIG_SYS_FSL_ERRATUM_A010165
244 #error SoC not defined
248 #endif /* _ASM_ARMV8_FSL_LAYERSCAPE_CONFIG_H_ */