l2c2x0.txt 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. * ARM L2 Cache Controller
  2. ARM cores often have a separate L2C210/L2C220/L2C310 (also known as PL210/PL220/
  3. PL310 and variants) based level 2 cache controller. All these various implementations
  4. of the L2 cache controller have compatible programming models (Note 1).
  5. Some of the properties that are just prefixed "cache-*" are taken from section
  6. 3.7.3 of the ePAPR v1.1 specification which can be found at:
  7. https://www.power.org/wp-content/uploads/2012/06/Power_ePAPR_APPROVED_v1.1.pdf
  8. The ARM L2 cache representation in the device tree should be done as follows:
  9. Required properties:
  10. - compatible : should be one of:
  11. "arm,pl310-cache"
  12. "arm,l220-cache"
  13. "arm,l210-cache"
  14. "bcm,bcm11351-a2-pl310-cache": DEPRECATED by "brcm,bcm11351-a2-pl310-cache"
  15. "brcm,bcm11351-a2-pl310-cache": For Broadcom bcm11351 chipset where an
  16. offset needs to be added to the address before passing down to the L2
  17. cache controller
  18. "marvell,aurora-system-cache": Marvell Controller designed to be
  19. compatible with the ARM one, with system cache mode (meaning
  20. maintenance operations on L1 are broadcasted to the L2 and L2
  21. performs the same operation).
  22. "marvell,aurora-outer-cache": Marvell Controller designed to be
  23. compatible with the ARM one with outer cache mode.
  24. "marvell,tauros3-cache": Marvell Tauros3 cache controller, compatible
  25. with arm,pl310-cache controller.
  26. - cache-unified : Specifies the cache is a unified cache.
  27. - cache-level : Should be set to 2 for a level 2 cache.
  28. - reg : Physical base address and size of cache controller's memory mapped
  29. registers.
  30. Optional properties:
  31. - arm,data-latency : Cycles of latency for Data RAM accesses. Specifies 3 cells of
  32. read, write and setup latencies. Minimum valid values are 1. Controllers
  33. without setup latency control should use a value of 0.
  34. - arm,tag-latency : Cycles of latency for Tag RAM accesses. Specifies 3 cells of
  35. read, write and setup latencies. Controllers without setup latency control
  36. should use 0. Controllers without separate read and write Tag RAM latency
  37. values should only use the first cell.
  38. - arm,dirty-latency : Cycles of latency for Dirty RAMs. This is a single cell.
  39. - arm,filter-ranges : <start length> Starting address and length of window to
  40. filter. Addresses in the filter window are directed to the M1 port. Other
  41. addresses will go to the M0 port.
  42. - arm,io-coherent : indicates that the system is operating in an hardware
  43. I/O coherent mode. Valid only when the arm,pl310-cache compatible
  44. string is used.
  45. - interrupts : 1 combined interrupt.
  46. - cache-size : specifies the size in bytes of the cache
  47. - cache-sets : specifies the number of associativity sets of the cache
  48. - cache-block-size : specifies the size in bytes of a cache block
  49. - cache-line-size : specifies the size in bytes of a line in the cache,
  50. if this is not specified, the line size is assumed to be equal to the
  51. cache block size
  52. - cache-id-part: cache id part number to be used if it is not present
  53. on hardware
  54. - wt-override: If present then L2 is forced to Write through mode
  55. - arm,double-linefill : Override double linefill enable setting. Enable if
  56. non-zero, disable if zero.
  57. - arm,double-linefill-incr : Override double linefill on INCR read. Enable
  58. if non-zero, disable if zero.
  59. - arm,double-linefill-wrap : Override double linefill on WRAP read. Enable
  60. if non-zero, disable if zero.
  61. - arm,prefetch-drop : Override prefetch drop enable setting. Enable if non-zero,
  62. disable if zero.
  63. - arm,prefetch-offset : Override prefetch offset value. Valid values are
  64. 0-7, 15, 23, and 31.
  65. - arm,shared-override : The default behavior of the L220 or PL310 cache
  66. controllers with respect to the shareable attribute is to transform "normal
  67. memory non-cacheable transactions" into "cacheable no allocate" (for reads)
  68. or "write through no write allocate" (for writes).
  69. On systems where this may cause DMA buffer corruption, this property must be
  70. specified to indicate that such transforms are precluded.
  71. - arm,parity-enable : enable parity checking on the L2 cache (L220 or PL310).
  72. - arm,parity-disable : disable parity checking on the L2 cache (L220 or PL310).
  73. - arm,outer-sync-disable : disable the outer sync operation on the L2 cache.
  74. Some core tiles, especially ARM PB11MPCore have a faulty L220 cache that
  75. will randomly hang unless outer sync operations are disabled.
  76. - prefetch-data : Data prefetch. Value: <0> (forcibly disable), <1>
  77. (forcibly enable), property absent (retain settings set by firmware)
  78. - prefetch-instr : Instruction prefetch. Value: <0> (forcibly disable),
  79. <1> (forcibly enable), property absent (retain settings set by
  80. firmware)
  81. - arm,dynamic-clock-gating : L2 dynamic clock gating. Value: <0> (forcibly
  82. disable), <1> (forcibly enable), property absent (OS specific behavior,
  83. preferably retain firmware settings)
  84. - arm,standby-mode: L2 standby mode enable. Value <0> (forcibly disable),
  85. <1> (forcibly enable), property absent (OS specific behavior,
  86. preferably retain firmware settings)
  87. Example:
  88. L2: cache-controller {
  89. compatible = "arm,pl310-cache";
  90. reg = <0xfff12000 0x1000>;
  91. arm,data-latency = <1 1 1>;
  92. arm,tag-latency = <2 2 2>;
  93. arm,filter-ranges = <0x80000000 0x8000000>;
  94. cache-unified;
  95. cache-level = <2>;
  96. interrupts = <45>;
  97. };
  98. Note 1: The description in this document doesn't apply to integrated L2
  99. cache controllers as found in e.g. Cortex-A15/A7/A57/A53. These
  100. integrated L2 controllers are assumed to be all preconfigured by
  101. early secure boot code. Thus no need to deal with their configuration
  102. in the kernel at all.