18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci%YAML 1.2
38c2ecf20Sopenharmony_ci---
48c2ecf20Sopenharmony_ci$id: http://devicetree.org/schemas/arm/l2c2x0.yaml#
58c2ecf20Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cititle: ARM L2 Cache Controller
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_cimaintainers:
108c2ecf20Sopenharmony_ci  - Rob Herring <robh@kernel.org>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_cidescription: |+
138c2ecf20Sopenharmony_ci  ARM cores often have a separate L2C210/L2C220/L2C310 (also known as PL210/
148c2ecf20Sopenharmony_ci  PL220/PL310 and variants) based level 2 cache controller. All these various
158c2ecf20Sopenharmony_ci  implementations of the L2 cache controller have compatible programming
168c2ecf20Sopenharmony_ci  models (Note 1). Some of the properties that are just prefixed "cache-*" are
178c2ecf20Sopenharmony_ci  taken from section 3.7.3 of the Devicetree Specification which can be found
188c2ecf20Sopenharmony_ci  at:
198c2ecf20Sopenharmony_ci  https://www.devicetree.org/specifications/
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci  Note 1: The description in this document doesn't apply to integrated L2
228c2ecf20Sopenharmony_ci    cache controllers as found in e.g. Cortex-A15/A7/A57/A53. These
238c2ecf20Sopenharmony_ci    integrated L2 controllers are assumed to be all preconfigured by
248c2ecf20Sopenharmony_ci    early secure boot code. Thus no need to deal with their configuration
258c2ecf20Sopenharmony_ci    in the kernel at all.
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ciallOf:
288c2ecf20Sopenharmony_ci  - $ref: /schemas/cache-controller.yaml#
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ciproperties:
318c2ecf20Sopenharmony_ci  compatible:
328c2ecf20Sopenharmony_ci    oneOf:
338c2ecf20Sopenharmony_ci      - enum:
348c2ecf20Sopenharmony_ci          - arm,pl310-cache
358c2ecf20Sopenharmony_ci          - arm,l220-cache
368c2ecf20Sopenharmony_ci          - arm,l210-cache
378c2ecf20Sopenharmony_ci            # DEPRECATED by "brcm,bcm11351-a2-pl310-cache"
388c2ecf20Sopenharmony_ci          - bcm,bcm11351-a2-pl310-cache
398c2ecf20Sopenharmony_ci            # For Broadcom bcm11351 chipset where an
408c2ecf20Sopenharmony_ci            # offset needs to be added to the address before passing down to the L2
418c2ecf20Sopenharmony_ci            # cache controller
428c2ecf20Sopenharmony_ci          - brcm,bcm11351-a2-pl310-cache
438c2ecf20Sopenharmony_ci            # Marvell Controller designed to be
448c2ecf20Sopenharmony_ci            # compatible with the ARM one, with system cache mode (meaning
458c2ecf20Sopenharmony_ci            # maintenance operations on L1 are broadcasted to the L2 and L2
468c2ecf20Sopenharmony_ci            # performs the same operation).
478c2ecf20Sopenharmony_ci          - marvell,aurora-system-cache
488c2ecf20Sopenharmony_ci            # Marvell Controller designed to be
498c2ecf20Sopenharmony_ci            # compatible with the ARM one with outer cache mode.
508c2ecf20Sopenharmony_ci          - marvell,aurora-outer-cache
518c2ecf20Sopenharmony_ci      - items:
528c2ecf20Sopenharmony_ci           # Marvell Tauros3 cache controller, compatible
538c2ecf20Sopenharmony_ci           # with arm,pl310-cache controller.
548c2ecf20Sopenharmony_ci          - const: marvell,tauros3-cache
558c2ecf20Sopenharmony_ci          - const: arm,pl310-cache
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci  cache-level:
588c2ecf20Sopenharmony_ci    const: 2
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci  cache-unified: true
618c2ecf20Sopenharmony_ci  cache-size: true
628c2ecf20Sopenharmony_ci  cache-sets: true
638c2ecf20Sopenharmony_ci  cache-block-size: true
648c2ecf20Sopenharmony_ci  cache-line-size: true
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci  reg:
678c2ecf20Sopenharmony_ci    maxItems: 1
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci  arm,data-latency:
708c2ecf20Sopenharmony_ci    description: Cycles of latency for Data RAM accesses. Specifies 3 cells of
718c2ecf20Sopenharmony_ci      read, write and setup latencies. Minimum valid values are 1. Controllers
728c2ecf20Sopenharmony_ci      without setup latency control should use a value of 0.
738c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32-array
748c2ecf20Sopenharmony_ci    minItems: 2
758c2ecf20Sopenharmony_ci    maxItems: 3
768c2ecf20Sopenharmony_ci    items:
778c2ecf20Sopenharmony_ci      minimum: 0
788c2ecf20Sopenharmony_ci      maximum: 8
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ci  arm,tag-latency:
818c2ecf20Sopenharmony_ci    description: Cycles of latency for Tag RAM accesses. Specifies 3 cells of
828c2ecf20Sopenharmony_ci      read, write and setup latencies. Controllers without setup latency control
838c2ecf20Sopenharmony_ci      should use 0. Controllers without separate read and write Tag RAM latency
848c2ecf20Sopenharmony_ci      values should only use the first cell.
858c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32-array
868c2ecf20Sopenharmony_ci    minItems: 1
878c2ecf20Sopenharmony_ci    maxItems: 3
888c2ecf20Sopenharmony_ci    items:
898c2ecf20Sopenharmony_ci      minimum: 0
908c2ecf20Sopenharmony_ci      maximum: 8
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci  arm,dirty-latency:
938c2ecf20Sopenharmony_ci    description: Cycles of latency for Dirty RAMs. This is a single cell.
948c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
958c2ecf20Sopenharmony_ci    minimum: 1
968c2ecf20Sopenharmony_ci    maximum: 8
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_ci  arm,filter-ranges:
998c2ecf20Sopenharmony_ci    description: <start length> Starting address and length of window to
1008c2ecf20Sopenharmony_ci      filter. Addresses in the filter window are directed to the M1 port. Other
1018c2ecf20Sopenharmony_ci      addresses will go to the M0 port.
1028c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32-array
1038c2ecf20Sopenharmony_ci    items:
1048c2ecf20Sopenharmony_ci      minItems: 2
1058c2ecf20Sopenharmony_ci      maxItems: 2
1068c2ecf20Sopenharmony_ci
1078c2ecf20Sopenharmony_ci  arm,io-coherent:
1088c2ecf20Sopenharmony_ci    description: indicates that the system is operating in an hardware
1098c2ecf20Sopenharmony_ci      I/O coherent mode. Valid only when the arm,pl310-cache compatible
1108c2ecf20Sopenharmony_ci      string is used.
1118c2ecf20Sopenharmony_ci    type: boolean
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ci  interrupts:
1148c2ecf20Sopenharmony_ci    # Either a single combined interrupt or up to 9 individual interrupts
1158c2ecf20Sopenharmony_ci    minItems: 1
1168c2ecf20Sopenharmony_ci    maxItems: 9
1178c2ecf20Sopenharmony_ci
1188c2ecf20Sopenharmony_ci  cache-id-part:
1198c2ecf20Sopenharmony_ci    description: cache id part number to be used if it is not present
1208c2ecf20Sopenharmony_ci      on hardware
1218c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
1228c2ecf20Sopenharmony_ci
1238c2ecf20Sopenharmony_ci  wt-override:
1248c2ecf20Sopenharmony_ci    description: If present then L2 is forced to Write through mode
1258c2ecf20Sopenharmony_ci    type: boolean
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_ci  arm,double-linefill:
1288c2ecf20Sopenharmony_ci    description: Override double linefill enable setting. Enable if
1298c2ecf20Sopenharmony_ci      non-zero, disable if zero.
1308c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
1318c2ecf20Sopenharmony_ci    enum: [0, 1]
1328c2ecf20Sopenharmony_ci
1338c2ecf20Sopenharmony_ci  arm,double-linefill-incr:
1348c2ecf20Sopenharmony_ci    description: Override double linefill on INCR read. Enable
1358c2ecf20Sopenharmony_ci      if non-zero, disable if zero.
1368c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
1378c2ecf20Sopenharmony_ci    enum: [0, 1]
1388c2ecf20Sopenharmony_ci
1398c2ecf20Sopenharmony_ci  arm,double-linefill-wrap:
1408c2ecf20Sopenharmony_ci    description: Override double linefill on WRAP read. Enable
1418c2ecf20Sopenharmony_ci      if non-zero, disable if zero.
1428c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
1438c2ecf20Sopenharmony_ci    enum: [0, 1]
1448c2ecf20Sopenharmony_ci
1458c2ecf20Sopenharmony_ci  arm,prefetch-drop:
1468c2ecf20Sopenharmony_ci    description: Override prefetch drop enable setting. Enable if non-zero,
1478c2ecf20Sopenharmony_ci      disable if zero.
1488c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
1498c2ecf20Sopenharmony_ci    enum: [0, 1]
1508c2ecf20Sopenharmony_ci
1518c2ecf20Sopenharmony_ci  arm,prefetch-offset:
1528c2ecf20Sopenharmony_ci    description: Override prefetch offset value.
1538c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
1548c2ecf20Sopenharmony_ci    enum: [0, 1, 2, 3, 4, 5, 6, 7, 15, 23, 31]
1558c2ecf20Sopenharmony_ci
1568c2ecf20Sopenharmony_ci  arm,shared-override:
1578c2ecf20Sopenharmony_ci    description: The default behavior of the L220 or PL310 cache
1588c2ecf20Sopenharmony_ci      controllers with respect to the shareable attribute is to transform "normal
1598c2ecf20Sopenharmony_ci      memory non-cacheable transactions" into "cacheable no allocate" (for reads)
1608c2ecf20Sopenharmony_ci      or "write through no write allocate" (for writes).
1618c2ecf20Sopenharmony_ci      On systems where this may cause DMA buffer corruption, this property must
1628c2ecf20Sopenharmony_ci      be specified to indicate that such transforms are precluded.
1638c2ecf20Sopenharmony_ci    type: boolean
1648c2ecf20Sopenharmony_ci
1658c2ecf20Sopenharmony_ci  arm,parity-enable:
1668c2ecf20Sopenharmony_ci    description: enable parity checking on the L2 cache (L220 or PL310).
1678c2ecf20Sopenharmony_ci    type: boolean
1688c2ecf20Sopenharmony_ci
1698c2ecf20Sopenharmony_ci  arm,parity-disable:
1708c2ecf20Sopenharmony_ci    description: disable parity checking on the L2 cache (L220 or PL310).
1718c2ecf20Sopenharmony_ci    type: boolean
1728c2ecf20Sopenharmony_ci
1738c2ecf20Sopenharmony_ci  marvell,ecc-enable:
1748c2ecf20Sopenharmony_ci    description: enable ECC protection on the L2 cache
1758c2ecf20Sopenharmony_ci    type: boolean
1768c2ecf20Sopenharmony_ci
1778c2ecf20Sopenharmony_ci  arm,outer-sync-disable:
1788c2ecf20Sopenharmony_ci    description: disable the outer sync operation on the L2 cache.
1798c2ecf20Sopenharmony_ci      Some core tiles, especially ARM PB11MPCore have a faulty L220 cache that
1808c2ecf20Sopenharmony_ci      will randomly hang unless outer sync operations are disabled.
1818c2ecf20Sopenharmony_ci    type: boolean
1828c2ecf20Sopenharmony_ci
1838c2ecf20Sopenharmony_ci  prefetch-data:
1848c2ecf20Sopenharmony_ci    description: |
1858c2ecf20Sopenharmony_ci      Data prefetch. Value: <0> (forcibly disable), <1>
1868c2ecf20Sopenharmony_ci      (forcibly enable), property absent (retain settings set by firmware)
1878c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
1888c2ecf20Sopenharmony_ci    enum: [0, 1]
1898c2ecf20Sopenharmony_ci
1908c2ecf20Sopenharmony_ci  prefetch-instr:
1918c2ecf20Sopenharmony_ci    description: |
1928c2ecf20Sopenharmony_ci      Instruction prefetch. Value: <0> (forcibly disable),
1938c2ecf20Sopenharmony_ci      <1> (forcibly enable), property absent (retain settings set by
1948c2ecf20Sopenharmony_ci      firmware)
1958c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
1968c2ecf20Sopenharmony_ci    enum: [0, 1]
1978c2ecf20Sopenharmony_ci
1988c2ecf20Sopenharmony_ci  arm,dynamic-clock-gating:
1998c2ecf20Sopenharmony_ci    description: |
2008c2ecf20Sopenharmony_ci      L2 dynamic clock gating. Value: <0> (forcibly
2018c2ecf20Sopenharmony_ci      disable), <1> (forcibly enable), property absent (OS specific behavior,
2028c2ecf20Sopenharmony_ci      preferably retain firmware settings)
2038c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
2048c2ecf20Sopenharmony_ci    enum: [0, 1]
2058c2ecf20Sopenharmony_ci
2068c2ecf20Sopenharmony_ci  arm,standby-mode:
2078c2ecf20Sopenharmony_ci    description: L2 standby mode enable. Value <0> (forcibly disable),
2088c2ecf20Sopenharmony_ci      <1> (forcibly enable), property absent (OS specific behavior,
2098c2ecf20Sopenharmony_ci      preferably retain firmware settings)
2108c2ecf20Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
2118c2ecf20Sopenharmony_ci    enum: [0, 1]
2128c2ecf20Sopenharmony_ci
2138c2ecf20Sopenharmony_ci  arm,early-bresp-disable:
2148c2ecf20Sopenharmony_ci    description: Disable the CA9 optimization Early BRESP (PL310)
2158c2ecf20Sopenharmony_ci    type: boolean
2168c2ecf20Sopenharmony_ci
2178c2ecf20Sopenharmony_ci  arm,full-line-zero-disable:
2188c2ecf20Sopenharmony_ci    description: Disable the CA9 optimization Full line of zero
2198c2ecf20Sopenharmony_ci      write (PL310)
2208c2ecf20Sopenharmony_ci    type: boolean
2218c2ecf20Sopenharmony_ci
2228c2ecf20Sopenharmony_cirequired:
2238c2ecf20Sopenharmony_ci  - compatible
2248c2ecf20Sopenharmony_ci  - cache-unified
2258c2ecf20Sopenharmony_ci  - reg
2268c2ecf20Sopenharmony_ci
2278c2ecf20Sopenharmony_ciadditionalProperties: false
2288c2ecf20Sopenharmony_ci
2298c2ecf20Sopenharmony_ciexamples:
2308c2ecf20Sopenharmony_ci  - |
2318c2ecf20Sopenharmony_ci    cache-controller@fff12000 {
2328c2ecf20Sopenharmony_ci        compatible = "arm,pl310-cache";
2338c2ecf20Sopenharmony_ci        reg = <0xfff12000 0x1000>;
2348c2ecf20Sopenharmony_ci        arm,data-latency = <1 1 1>;
2358c2ecf20Sopenharmony_ci        arm,tag-latency = <2 2 2>;
2368c2ecf20Sopenharmony_ci        arm,filter-ranges = <0x80000000 0x8000000>;
2378c2ecf20Sopenharmony_ci        cache-unified;
2388c2ecf20Sopenharmony_ci        cache-level = <2>;
2398c2ecf20Sopenharmony_ci        interrupts = <45>;
2408c2ecf20Sopenharmony_ci    };
2418c2ecf20Sopenharmony_ci
2428c2ecf20Sopenharmony_ci...
243