config.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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 <fsl_ddrc_version.h>
  9. #ifdef CONFIG_SYS_FSL_DDR4
  10. #define CONFIG_SYS_FSL_DDRC_GEN4
  11. #else
  12. #define CONFIG_SYS_FSL_DDRC_ARM_GEN3 /* Enable Freescale ARM DDR3 driver */
  13. #endif
  14. #define CONFIG_SYS_FSL_DDR /* Freescale DDR driver */
  15. #define CONFIG_SYS_FSL_DDR_VER FSL_DDR_VER_5_0
  16. #if defined(CONFIG_LS2085A)
  17. #define CONFIG_MAX_CPUS 16
  18. #define CONFIG_SYS_FSL_IFC_BANK_COUNT 8
  19. #define CONFIG_NUM_DDR_CONTROLLERS 3
  20. #define CONFIG_SYS_FSL_CLUSTER_CLOCKS { 1, 1, 4, 4 }
  21. #define SRDS_MAX_LANES 8
  22. #define CONFIG_SYS_FSL_SRDS_1
  23. #define CONFIG_SYS_FSL_SRDS_2
  24. #define CONFIG_SYS_PAGE_SIZE 0x10000
  25. #define CONFIG_SYS_CACHELINE_SIZE 64
  26. #ifndef L1_CACHE_BYTES
  27. #define L1_CACHE_SHIFT 6
  28. #define L1_CACHE_BYTES BIT(L1_CACHE_SHIFT)
  29. #endif
  30. #define CONFIG_SYS_FSL_OCRAM_BASE 0x18000000 /* initial RAM */
  31. #define CONFIG_SYS_FSL_OCRAM_SIZE 0x00200000 /* 2M */
  32. /* DDR */
  33. #define CONFIG_SYS_FSL_DDR_LE
  34. #define CONFIG_SYS_LS2_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
  35. #define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_LS2_DDR_BLOCK1_SIZE
  36. #define CONFIG_SYS_FSL_CCSR_GUR_LE
  37. #define CONFIG_SYS_FSL_CCSR_SCFG_LE
  38. #define CONFIG_SYS_FSL_ESDHC_LE
  39. #define CONFIG_SYS_FSL_IFC_LE
  40. #define CONFIG_SYS_MEMAC_LITTLE_ENDIAN
  41. /* Generic Interrupt Controller Definitions */
  42. #define GICD_BASE 0x06000000
  43. #define GICR_BASE 0x06100000
  44. /* SMMU Defintions */
  45. #define SMMU_BASE 0x05000000 /* GR0 Base */
  46. /* Cache Coherent Interconnect */
  47. #define CCI_MN_BASE 0x04000000
  48. #define CCI_MN_RNF_NODEID_LIST 0x180
  49. #define CCI_MN_DVM_DOMAIN_CTL 0x200
  50. #define CCI_MN_DVM_DOMAIN_CTL_SET 0x210
  51. #define CCI_RN_I_0_BASE (CCI_MN_BASE + 0x800000)
  52. #define CCI_RN_I_2_BASE (CCI_MN_BASE + 0x820000)
  53. #define CCI_RN_I_6_BASE (CCI_MN_BASE + 0x860000)
  54. #define CCI_RN_I_12_BASE (CCI_MN_BASE + 0x8C0000)
  55. #define CCI_RN_I_16_BASE (CCI_MN_BASE + 0x900000)
  56. #define CCI_RN_I_20_BASE (CCI_MN_BASE + 0x940000)
  57. #define CCI_S0_QOS_CONTROL_BASE(x) ((CCI_RN_I_0_BASE + (x * 0x10000)) + 0x10)
  58. #define CCI_S1_QOS_CONTROL_BASE(x) ((CCI_RN_I_0_BASE + (x * 0x10000)) + 0x110)
  59. #define CCI_S2_QOS_CONTROL_BASE(x) ((CCI_RN_I_0_BASE + (x * 0x10000)) + 0x210)
  60. /* TZ Protection Controller Definitions */
  61. #define TZPC_BASE 0x02200000
  62. #define TZPCR0SIZE_BASE (TZPC_BASE)
  63. #define TZPCDECPROT_0_STAT_BASE (TZPC_BASE + 0x800)
  64. #define TZPCDECPROT_0_SET_BASE (TZPC_BASE + 0x804)
  65. #define TZPCDECPROT_0_CLR_BASE (TZPC_BASE + 0x808)
  66. #define TZPCDECPROT_1_STAT_BASE (TZPC_BASE + 0x80C)
  67. #define TZPCDECPROT_1_SET_BASE (TZPC_BASE + 0x810)
  68. #define TZPCDECPROT_1_CLR_BASE (TZPC_BASE + 0x814)
  69. #define TZPCDECPROT_2_STAT_BASE (TZPC_BASE + 0x818)
  70. #define TZPCDECPROT_2_SET_BASE (TZPC_BASE + 0x81C)
  71. #define TZPCDECPROT_2_CLR_BASE (TZPC_BASE + 0x820)
  72. #define CONFIG_SYS_FSL_ERRATUM_A008336
  73. #define CONFIG_SYS_FSL_ERRATUM_A008511
  74. #define CONFIG_SYS_FSL_ERRATUM_A008514
  75. #define CONFIG_SYS_FSL_ERRATUM_A008585
  76. #define CONFIG_SYS_FSL_ERRATUM_A008751
  77. #elif defined(CONFIG_LS1043A)
  78. #define CONFIG_MAX_CPUS 4
  79. #define CONFIG_SYS_CACHELINE_SIZE 64
  80. #define CONFIG_SYS_FMAN_V3
  81. #define CONFIG_SYS_NUM_FMAN 1
  82. #define CONFIG_SYS_NUM_FM1_DTSEC 7
  83. #define CONFIG_SYS_NUM_FM1_10GEC 1
  84. #define CONFIG_SYS_FSL_IFC_BANK_COUNT 4
  85. #define CONFIG_NUM_DDR_CONTROLLERS 1
  86. #define CONFIG_SYS_CCSRBAR_DEFAULT 0x01000000
  87. #define CONFIG_SYS_FSL_SEC_COMPAT 5
  88. #define CONFIG_SYS_FSL_OCRAM_BASE 0x10000000 /* initial RAM */
  89. #define CONFIG_SYS_FSL_OCRAM_SIZE 0x200000 /* 2 MiB */
  90. #define CONFIG_SYS_FSL_DDR_BE
  91. #define CONFIG_SYS_LS1_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
  92. #define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_LS1_DDR_BLOCK1_SIZE
  93. #define CONFIG_SYS_FSL_CCSR_GUR_BE
  94. #define CONFIG_SYS_FSL_CCSR_SCFG_BE
  95. #define CONFIG_SYS_FSL_IFC_BE
  96. #define CONFIG_SYS_FSL_ESDHC_BE
  97. #define CONFIG_SYS_FSL_WDOG_BE
  98. #define CONFIG_SYS_FSL_DSPI_BE
  99. #define CONFIG_SYS_FSL_QSPI_BE
  100. #define QE_MURAM_SIZE 0x6000UL
  101. #define MAX_QE_RISC 1
  102. #define QE_NUM_OF_SNUM 28
  103. #define SRDS_MAX_LANES 4
  104. #define CONFIG_SYS_FSL_SRDS_1
  105. #define CONFIG_SYS_FSL_PCIE_COMPAT "fsl,qoriq-pcie-v2.4"
  106. #define CONFIG_SYS_FSL_SFP_VER_3_2
  107. #define CONFIG_SYS_FSL_SNVS_LE
  108. #define CONFIG_SYS_FSL_SEC_LE
  109. #define CONFIG_SYS_FSL_SFP_BE
  110. #define CONFIG_SYS_FSL_SRK_LE
  111. #define CONFIG_KEY_REVOCATION
  112. /* SMMU Defintions */
  113. #define SMMU_BASE 0x09000000
  114. /* Generic Interrupt Controller Definitions */
  115. #define GICD_BASE 0x01401000
  116. #define GICC_BASE 0x01402000
  117. #else
  118. #error SoC not defined
  119. #endif
  120. #endif /* _ASM_ARMV8_FSL_LAYERSCAPE_CONFIG_H_ */