config.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. /*
  2. * Copyright 2015, Freescale Semiconductor
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef _ASM_ARMV8_FSL_LAYERSCAPE_CONFIG_H_
  7. #define _ASM_ARMV8_FSL_LAYERSCAPE_CONFIG_H_
  8. #include <linux/kconfig.h>
  9. #include <fsl_ddrc_version.h>
  10. #define CONFIG_STANDALONE_LOAD_ADDR 0x80300000
  11. /*
  12. * Reserve secure memory
  13. * To be aligned with MMU block size
  14. */
  15. #define CONFIG_SYS_MEM_RESERVE_SECURE (2048 * 1024) /* 2MB */
  16. #ifdef CONFIG_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_LS2_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
  30. #define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_LS2_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. /* ARM A57 CORE ERRATA */
  94. #define CONFIG_ARM_ERRATA_826974
  95. #define CONFIG_ARM_ERRATA_828024
  96. #define CONFIG_ARM_ERRATA_829520
  97. #define CONFIG_ARM_ERRATA_833471
  98. #define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
  99. #elif defined(CONFIG_FSL_LSCH2)
  100. #define CONFIG_SYS_FSL_OCRAM_BASE 0x10000000 /* initial RAM */
  101. #define SYS_FSL_OCRAM_SPACE_SIZE 0x00200000 /* 2M space */
  102. #define CONFIG_SYS_FSL_OCRAM_SIZE 0x00020000 /* Real size 128K */
  103. #define DCSR_DCFG_SBEESR2 0x20140534
  104. #define DCSR_DCFG_MBEESR2 0x20140544
  105. #define CONFIG_SYS_FSL_CCSR_SCFG_BE
  106. #define CONFIG_SYS_FSL_ESDHC_BE
  107. #define CONFIG_SYS_FSL_WDOG_BE
  108. #define CONFIG_SYS_FSL_DSPI_BE
  109. #define CONFIG_SYS_FSL_QSPI_BE
  110. #define CONFIG_SYS_FSL_CCSR_GUR_BE
  111. #define CONFIG_SYS_FSL_PEX_LUT_BE
  112. /* SoC related */
  113. #ifdef CONFIG_LS1043A
  114. #define CONFIG_SYS_FMAN_V3
  115. #define CONFIG_SYS_NUM_FMAN 1
  116. #define CONFIG_SYS_NUM_FM1_DTSEC 7
  117. #define CONFIG_SYS_NUM_FM1_10GEC 1
  118. #define CONFIG_SYS_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
  119. #define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_DDR_BLOCK1_SIZE
  120. #define QE_MURAM_SIZE 0x6000UL
  121. #define MAX_QE_RISC 1
  122. #define QE_NUM_OF_SNUM 28
  123. #define CONFIG_SYS_FSL_IFC_BE
  124. #define CONFIG_SYS_FSL_SFP_VER_3_2
  125. #define CONFIG_SYS_FSL_SEC_MON_BE
  126. #define CONFIG_SYS_FSL_SFP_BE
  127. #define CONFIG_SYS_FSL_SRK_LE
  128. #define CONFIG_KEY_REVOCATION
  129. /* SMMU Defintions */
  130. #define SMMU_BASE 0x09000000
  131. /* Generic Interrupt Controller Definitions */
  132. #define GICD_BASE 0x01401000
  133. #define GICC_BASE 0x01402000
  134. #define GICH_BASE 0x01404000
  135. #define GICV_BASE 0x01406000
  136. #define GICD_SIZE 0x1000
  137. #define GICC_SIZE 0x2000
  138. #define GICH_SIZE 0x2000
  139. #define GICV_SIZE 0x2000
  140. #ifdef CONFIG_HAS_FEATURE_GIC64K_ALIGN
  141. #define GICD_BASE_64K 0x01410000
  142. #define GICC_BASE_64K 0x01420000
  143. #define GICH_BASE_64K 0x01440000
  144. #define GICV_BASE_64K 0x01460000
  145. #define GICD_SIZE_64K 0x10000
  146. #define GICC_SIZE_64K 0x20000
  147. #define GICH_SIZE_64K 0x20000
  148. #define GICV_SIZE_64K 0x20000
  149. #endif
  150. #define DCFG_CCSR_SVR 0x1ee00a4
  151. #define REV1_0 0x10
  152. #define REV1_1 0x11
  153. #define GIC_ADDR_BIT 31
  154. #define SCFG_GIC400_ALIGN 0x1570188
  155. #define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
  156. #elif defined(CONFIG_ARCH_LS1012A)
  157. #define GICD_BASE 0x01401000
  158. #define GICC_BASE 0x01402000
  159. #define CONFIG_SYS_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
  160. #define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_DDR_BLOCK1_SIZE
  161. #elif defined(CONFIG_ARCH_LS1046A)
  162. #define CONFIG_SYS_FMAN_V3
  163. #define CONFIG_SYS_NUM_FMAN 1
  164. #define CONFIG_SYS_NUM_FM1_DTSEC 8
  165. #define CONFIG_SYS_NUM_FM1_10GEC 2
  166. #define CONFIG_SYS_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
  167. #define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_DDR_BLOCK1_SIZE
  168. #define CONFIG_SYS_FSL_IFC_BE
  169. #define CONFIG_SYS_FSL_SFP_VER_3_2
  170. #define CONFIG_SYS_FSL_SNVS_LE
  171. #define CONFIG_SYS_FSL_SFP_BE
  172. #define CONFIG_SYS_FSL_SRK_LE
  173. #define CONFIG_KEY_REVOCATION
  174. /* SMMU Defintions */
  175. #define SMMU_BASE 0x09000000
  176. /* Generic Interrupt Controller Definitions */
  177. #define GICD_BASE 0x01410000
  178. #define GICC_BASE 0x01420000
  179. #define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
  180. #else
  181. #error SoC not defined
  182. #endif
  183. #endif
  184. #endif /* _ASM_ARMV8_FSL_LAYERSCAPE_CONFIG_H_ */