config.h 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright 2015, Freescale Semiconductor
  4. */
  5. #ifndef _ASM_ARMV8_FSL_LAYERSCAPE_CONFIG_H_
  6. #define _ASM_ARMV8_FSL_LAYERSCAPE_CONFIG_H_
  7. #include <linux/kconfig.h>
  8. #include <fsl_ddrc_version.h>
  9. #define CONFIG_STANDALONE_LOAD_ADDR 0x80300000
  10. /*
  11. * Reserve secure memory
  12. * To be aligned with MMU block size
  13. */
  14. #define CONFIG_SYS_MEM_RESERVE_SECURE (66 * 1024 * 1024) /* 66MB */
  15. #define SPL_TLB_SETBACK 0x1000000 /* 16MB under effective memory top */
  16. #ifdef CONFIG_ARCH_LS2080A
  17. #define CONFIG_SYS_FSL_CLUSTER_CLOCKS { 1, 1, 4, 4 }
  18. #define SRDS_MAX_LANES 8
  19. #define CONFIG_SYS_PAGE_SIZE 0x10000
  20. #ifndef L1_CACHE_BYTES
  21. #define L1_CACHE_SHIFT 6
  22. #define L1_CACHE_BYTES BIT(L1_CACHE_SHIFT)
  23. #define CONFIG_FSL_TZASC_400
  24. #endif
  25. #define CONFIG_SYS_FSL_OCRAM_BASE 0x18000000 /* initial RAM */
  26. #define SYS_FSL_OCRAM_SPACE_SIZE 0x00200000 /* 2M space */
  27. #define CONFIG_SYS_FSL_OCRAM_SIZE 0x00020000 /* Real size 128K */
  28. /* DDR */
  29. #define CONFIG_SYS_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
  30. #define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_DDR_BLOCK1_SIZE
  31. #define CONFIG_SYS_FSL_CCSR_GUR_LE
  32. #define CONFIG_SYS_FSL_CCSR_SCFG_LE
  33. #define CONFIG_SYS_FSL_ESDHC_LE
  34. #define CONFIG_SYS_FSL_IFC_LE
  35. #define CONFIG_SYS_FSL_PEX_LUT_LE
  36. #define CONFIG_SYS_MEMAC_LITTLE_ENDIAN
  37. /* Generic Interrupt Controller Definitions */
  38. #define GICD_BASE 0x06000000
  39. #define GICR_BASE 0x06100000
  40. /* SMMU Defintions */
  41. #define SMMU_BASE 0x05000000 /* GR0 Base */
  42. /* SFP */
  43. #define CONFIG_SYS_FSL_SFP_VER_3_4
  44. #define CONFIG_SYS_FSL_SFP_LE
  45. #define CONFIG_SYS_FSL_SRK_LE
  46. /* Security Monitor */
  47. #define CONFIG_SYS_FSL_SEC_MON_LE
  48. /* Secure Boot */
  49. #define CONFIG_ESBC_HDR_LS
  50. /* DCFG - GUR */
  51. #define CONFIG_SYS_FSL_CCSR_GUR_LE
  52. /* Cache Coherent Interconnect */
  53. #define CCI_MN_BASE 0x04000000
  54. #define CCI_MN_RNF_NODEID_LIST 0x180
  55. #define CCI_MN_DVM_DOMAIN_CTL 0x200
  56. #define CCI_MN_DVM_DOMAIN_CTL_SET 0x210
  57. #define CCI_HN_F_0_BASE (CCI_MN_BASE + 0x200000)
  58. #define CCI_HN_F_1_BASE (CCI_MN_BASE + 0x210000)
  59. #define CCN_HN_F_SAM_CTL 0x8 /* offset on base HN_F base */
  60. #define CCN_HN_F_SAM_NODEID_MASK 0x7f
  61. #define CCN_HN_F_SAM_NODEID_DDR0 0x4
  62. #define CCN_HN_F_SAM_NODEID_DDR1 0xe
  63. #define CCI_RN_I_0_BASE (CCI_MN_BASE + 0x800000)
  64. #define CCI_RN_I_2_BASE (CCI_MN_BASE + 0x820000)
  65. #define CCI_RN_I_6_BASE (CCI_MN_BASE + 0x860000)
  66. #define CCI_RN_I_12_BASE (CCI_MN_BASE + 0x8C0000)
  67. #define CCI_RN_I_16_BASE (CCI_MN_BASE + 0x900000)
  68. #define CCI_RN_I_20_BASE (CCI_MN_BASE + 0x940000)
  69. #define CCI_S0_QOS_CONTROL_BASE(x) ((CCI_RN_I_0_BASE + (x * 0x10000)) + 0x10)
  70. #define CCI_S1_QOS_CONTROL_BASE(x) ((CCI_RN_I_0_BASE + (x * 0x10000)) + 0x110)
  71. #define CCI_S2_QOS_CONTROL_BASE(x) ((CCI_RN_I_0_BASE + (x * 0x10000)) + 0x210)
  72. #define CCI_AUX_CONTROL_BASE(x) ((CCI_RN_I_0_BASE + (x * 0x10000)) + 0x0500)
  73. /* TZ Protection Controller Definitions */
  74. #define TZPC_BASE 0x02200000
  75. #define TZPCR0SIZE_BASE (TZPC_BASE)
  76. #define TZPCDECPROT_0_STAT_BASE (TZPC_BASE + 0x800)
  77. #define TZPCDECPROT_0_SET_BASE (TZPC_BASE + 0x804)
  78. #define TZPCDECPROT_0_CLR_BASE (TZPC_BASE + 0x808)
  79. #define TZPCDECPROT_1_STAT_BASE (TZPC_BASE + 0x80C)
  80. #define TZPCDECPROT_1_SET_BASE (TZPC_BASE + 0x810)
  81. #define TZPCDECPROT_1_CLR_BASE (TZPC_BASE + 0x814)
  82. #define TZPCDECPROT_2_STAT_BASE (TZPC_BASE + 0x818)
  83. #define TZPCDECPROT_2_SET_BASE (TZPC_BASE + 0x81C)
  84. #define TZPCDECPROT_2_CLR_BASE (TZPC_BASE + 0x820)
  85. #define DCSR_CGACRE5 0x700070914ULL
  86. #define EPU_EPCMPR5 0x700060914ULL
  87. #define EPU_EPCCR5 0x700060814ULL
  88. #define EPU_EPSMCR5 0x700060228ULL
  89. #define EPU_EPECR5 0x700060314ULL
  90. #define EPU_EPCTR5 0x700060a14ULL
  91. #define EPU_EPGCR 0x700060000ULL
  92. #define CONFIG_SYS_FSL_ERRATUM_A008751
  93. #define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
  94. #elif defined(CONFIG_ARCH_LS1088A)
  95. #define CONFIG_SYS_FSL_NUM_CC_PLLS 3
  96. #define CONFIG_SYS_FSL_CLUSTER_CLOCKS { 1, 1 }
  97. #define CONFIG_GICV3
  98. #define CONFIG_FSL_TZPC_BP147
  99. #define CONFIG_FSL_TZASC_400
  100. #define CONFIG_SYS_PAGE_SIZE 0x10000
  101. #define SRDS_MAX_LANES 4
  102. /* TZ Protection Controller Definitions */
  103. #define TZPC_BASE 0x02200000
  104. #define TZPCR0SIZE_BASE (TZPC_BASE)
  105. #define TZPCDECPROT_0_STAT_BASE (TZPC_BASE + 0x800)
  106. #define TZPCDECPROT_0_SET_BASE (TZPC_BASE + 0x804)
  107. #define TZPCDECPROT_0_CLR_BASE (TZPC_BASE + 0x808)
  108. #define TZPCDECPROT_1_STAT_BASE (TZPC_BASE + 0x80C)
  109. #define TZPCDECPROT_1_SET_BASE (TZPC_BASE + 0x810)
  110. #define TZPCDECPROT_1_CLR_BASE (TZPC_BASE + 0x814)
  111. #define TZPCDECPROT_2_STAT_BASE (TZPC_BASE + 0x818)
  112. #define TZPCDECPROT_2_SET_BASE (TZPC_BASE + 0x81C)
  113. #define TZPCDECPROT_2_CLR_BASE (TZPC_BASE + 0x820)
  114. /* Generic Interrupt Controller Definitions */
  115. #define GICD_BASE 0x06000000
  116. #define GICR_BASE 0x06100000
  117. /* SMMU Defintions */
  118. #define SMMU_BASE 0x05000000 /* GR0 Base */
  119. /* DDR */
  120. #define CONFIG_SYS_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
  121. #define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_DDR_BLOCK1_SIZE
  122. #define CONFIG_SYS_FSL_CCSR_GUR_LE
  123. #define CONFIG_SYS_FSL_CCSR_SCFG_LE
  124. #define CONFIG_SYS_FSL_ESDHC_LE
  125. #define CONFIG_SYS_FSL_IFC_LE
  126. #define CONFIG_SYS_FSL_PEX_LUT_LE
  127. #define CONFIG_SYS_MEMAC_LITTLE_ENDIAN
  128. /* SFP */
  129. #define CONFIG_SYS_FSL_SFP_VER_3_4
  130. #define CONFIG_SYS_FSL_SFP_LE
  131. #define CONFIG_SYS_FSL_SRK_LE
  132. /* Security Monitor */
  133. #define CONFIG_SYS_FSL_SEC_MON_LE
  134. /* Secure Boot */
  135. #define CONFIG_ESBC_HDR_LS
  136. /* DCFG - GUR */
  137. #define CONFIG_SYS_FSL_CCSR_GUR_LE
  138. #define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
  139. #define CONFIG_SYS_FSL_OCRAM_BASE 0x18000000 /* initial RAM */
  140. #define SYS_FSL_OCRAM_SPACE_SIZE 0x00200000 /* 2M space */
  141. #define CONFIG_SYS_FSL_OCRAM_SIZE 0x00020000 /* Real size 128K */
  142. #elif defined(CONFIG_FSL_LSCH2)
  143. #define CONFIG_SYS_FSL_OCRAM_BASE 0x10000000 /* initial RAM */
  144. #define SYS_FSL_OCRAM_SPACE_SIZE 0x00200000 /* 2M space */
  145. #define CONFIG_SYS_FSL_OCRAM_SIZE 0x00020000 /* Real size 128K */
  146. #define DCSR_DCFG_SBEESR2 0x20140534
  147. #define DCSR_DCFG_MBEESR2 0x20140544
  148. #define CONFIG_SYS_FSL_CCSR_SCFG_BE
  149. #define CONFIG_SYS_FSL_ESDHC_BE
  150. #define CONFIG_SYS_FSL_WDOG_BE
  151. #define CONFIG_SYS_FSL_DSPI_BE
  152. #define CONFIG_SYS_FSL_QSPI_BE
  153. #define CONFIG_SYS_FSL_CCSR_GUR_BE
  154. #define CONFIG_SYS_FSL_PEX_LUT_BE
  155. /* SoC related */
  156. #ifdef CONFIG_ARCH_LS1043A
  157. #define CONFIG_SYS_FMAN_V3
  158. #define CONFIG_SYS_NUM_FMAN 1
  159. #define CONFIG_SYS_NUM_FM1_DTSEC 7
  160. #define CONFIG_SYS_NUM_FM1_10GEC 1
  161. #define CONFIG_SYS_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
  162. #define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_DDR_BLOCK1_SIZE
  163. #define QE_MURAM_SIZE 0x6000UL
  164. #define MAX_QE_RISC 1
  165. #define QE_NUM_OF_SNUM 28
  166. #define CONFIG_SYS_FSL_IFC_BE
  167. #define CONFIG_SYS_FSL_SFP_VER_3_2
  168. #define CONFIG_SYS_FSL_SEC_MON_BE
  169. #define CONFIG_SYS_FSL_SFP_BE
  170. #define CONFIG_SYS_FSL_SRK_LE
  171. #define CONFIG_KEY_REVOCATION
  172. /* SMMU Defintions */
  173. #define SMMU_BASE 0x09000000
  174. /* Generic Interrupt Controller Definitions */
  175. #define GICD_BASE 0x01401000
  176. #define GICC_BASE 0x01402000
  177. #define GICH_BASE 0x01404000
  178. #define GICV_BASE 0x01406000
  179. #define GICD_SIZE 0x1000
  180. #define GICC_SIZE 0x2000
  181. #define GICH_SIZE 0x2000
  182. #define GICV_SIZE 0x2000
  183. #ifdef CONFIG_HAS_FEATURE_GIC64K_ALIGN
  184. #define GICD_BASE_64K 0x01410000
  185. #define GICC_BASE_64K 0x01420000
  186. #define GICH_BASE_64K 0x01440000
  187. #define GICV_BASE_64K 0x01460000
  188. #define GICD_SIZE_64K 0x10000
  189. #define GICC_SIZE_64K 0x20000
  190. #define GICH_SIZE_64K 0x20000
  191. #define GICV_SIZE_64K 0x20000
  192. #endif
  193. #define DCFG_CCSR_SVR 0x1ee00a4
  194. #define REV1_0 0x10
  195. #define REV1_1 0x11
  196. #define GIC_ADDR_BIT 31
  197. #define SCFG_GIC400_ALIGN 0x1570188
  198. #define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
  199. #elif defined(CONFIG_ARCH_LS1012A)
  200. #define GICD_BASE 0x01401000
  201. #define GICC_BASE 0x01402000
  202. #define CONFIG_SYS_FSL_SFP_VER_3_2
  203. #define CONFIG_SYS_FSL_SEC_MON_BE
  204. #define CONFIG_SYS_FSL_SFP_BE
  205. #define CONFIG_SYS_FSL_SRK_LE
  206. #define CONFIG_KEY_REVOCATION
  207. #define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
  208. #define CONFIG_SYS_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
  209. #define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_DDR_BLOCK1_SIZE
  210. #elif defined(CONFIG_ARCH_LS1046A)
  211. #define CONFIG_SYS_FMAN_V3
  212. #define CONFIG_SYS_NUM_FMAN 1
  213. #define CONFIG_SYS_NUM_FM1_DTSEC 8
  214. #define CONFIG_SYS_NUM_FM1_10GEC 2
  215. #define CONFIG_SYS_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
  216. #define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_DDR_BLOCK1_SIZE
  217. #define CONFIG_SYS_FSL_IFC_BE
  218. #define CONFIG_SYS_FSL_SFP_VER_3_2
  219. #define CONFIG_SYS_FSL_SEC_MON_BE
  220. #define CONFIG_SYS_FSL_SFP_BE
  221. #define CONFIG_SYS_FSL_SRK_LE
  222. #define CONFIG_KEY_REVOCATION
  223. /* SMMU Defintions */
  224. #define SMMU_BASE 0x09000000
  225. /* Generic Interrupt Controller Definitions */
  226. #define GICD_BASE 0x01410000
  227. #define GICC_BASE 0x01420000
  228. #define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
  229. #else
  230. #error SoC not defined
  231. #endif
  232. #endif
  233. #endif /* _ASM_ARMV8_FSL_LAYERSCAPE_CONFIG_H_ */