config.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. #else
  78. #error SoC not defined
  79. #endif
  80. #endif /* _ASM_ARMV8_FSL_LAYERSCAPE_CONFIG_H_ */