1*fac71e4eSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2*fac71e4eSEmmanuel Vadot%YAML 1.2
3*fac71e4eSEmmanuel Vadot---
4*fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/cache/l2c2x0.yaml#
5*fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*fac71e4eSEmmanuel Vadot
7*fac71e4eSEmmanuel Vadottitle: ARM L2 Cache Controller
8*fac71e4eSEmmanuel Vadot
9*fac71e4eSEmmanuel Vadotmaintainers:
10*fac71e4eSEmmanuel Vadot  - Rob Herring <robh@kernel.org>
11*fac71e4eSEmmanuel Vadot
12*fac71e4eSEmmanuel Vadotdescription: |+
13*fac71e4eSEmmanuel Vadot  ARM cores often have a separate L2C210/L2C220/L2C310 (also known as PL210/
14*fac71e4eSEmmanuel Vadot  PL220/PL310 and variants) based level 2 cache controller. All these various
15*fac71e4eSEmmanuel Vadot  implementations of the L2 cache controller have compatible programming
16*fac71e4eSEmmanuel Vadot  models (Note 1). Some of the properties that are just prefixed "cache-*" are
17*fac71e4eSEmmanuel Vadot  taken from section 3.7.3 of the Devicetree Specification which can be found
18*fac71e4eSEmmanuel Vadot  at:
19*fac71e4eSEmmanuel Vadot  https://www.devicetree.org/specifications/
20*fac71e4eSEmmanuel Vadot
21*fac71e4eSEmmanuel Vadot  Note 1: The description in this document doesn't apply to integrated L2
22*fac71e4eSEmmanuel Vadot    cache controllers as found in e.g. Cortex-A15/A7/A57/A53. These
23*fac71e4eSEmmanuel Vadot    integrated L2 controllers are assumed to be all preconfigured by
24*fac71e4eSEmmanuel Vadot    early secure boot code. Thus no need to deal with their configuration
25*fac71e4eSEmmanuel Vadot    in the kernel at all.
26*fac71e4eSEmmanuel Vadot
27*fac71e4eSEmmanuel VadotallOf:
28*fac71e4eSEmmanuel Vadot  - $ref: /schemas/cache-controller.yaml#
29*fac71e4eSEmmanuel Vadot
30*fac71e4eSEmmanuel Vadotproperties:
31*fac71e4eSEmmanuel Vadot  compatible:
32*fac71e4eSEmmanuel Vadot    oneOf:
33*fac71e4eSEmmanuel Vadot      - enum:
34*fac71e4eSEmmanuel Vadot          - arm,pl310-cache
35*fac71e4eSEmmanuel Vadot          - arm,l220-cache
36*fac71e4eSEmmanuel Vadot          - arm,l210-cache
37*fac71e4eSEmmanuel Vadot            # DEPRECATED by "brcm,bcm11351-a2-pl310-cache"
38*fac71e4eSEmmanuel Vadot          - bcm,bcm11351-a2-pl310-cache
39*fac71e4eSEmmanuel Vadot            # For Broadcom bcm11351 chipset where an
40*fac71e4eSEmmanuel Vadot            # offset needs to be added to the address before passing down to the L2
41*fac71e4eSEmmanuel Vadot            # cache controller
42*fac71e4eSEmmanuel Vadot          - brcm,bcm11351-a2-pl310-cache
43*fac71e4eSEmmanuel Vadot            # Marvell Controller designed to be
44*fac71e4eSEmmanuel Vadot            # compatible with the ARM one, with system cache mode (meaning
45*fac71e4eSEmmanuel Vadot            # maintenance operations on L1 are broadcasted to the L2 and L2
46*fac71e4eSEmmanuel Vadot            # performs the same operation).
47*fac71e4eSEmmanuel Vadot          - marvell,aurora-system-cache
48*fac71e4eSEmmanuel Vadot            # Marvell Controller designed to be
49*fac71e4eSEmmanuel Vadot            # compatible with the ARM one with outer cache mode.
50*fac71e4eSEmmanuel Vadot          - marvell,aurora-outer-cache
51*fac71e4eSEmmanuel Vadot      - items:
52*fac71e4eSEmmanuel Vadot           # Marvell Tauros3 cache controller, compatible
53*fac71e4eSEmmanuel Vadot           # with arm,pl310-cache controller.
54*fac71e4eSEmmanuel Vadot          - const: marvell,tauros3-cache
55*fac71e4eSEmmanuel Vadot          - const: arm,pl310-cache
56*fac71e4eSEmmanuel Vadot
57*fac71e4eSEmmanuel Vadot  cache-level:
58*fac71e4eSEmmanuel Vadot    const: 2
59*fac71e4eSEmmanuel Vadot
60*fac71e4eSEmmanuel Vadot  cache-unified: true
61*fac71e4eSEmmanuel Vadot  cache-size: true
62*fac71e4eSEmmanuel Vadot  cache-sets: true
63*fac71e4eSEmmanuel Vadot  cache-block-size: true
64*fac71e4eSEmmanuel Vadot  cache-line-size: true
65*fac71e4eSEmmanuel Vadot
66*fac71e4eSEmmanuel Vadot  reg:
67*fac71e4eSEmmanuel Vadot    maxItems: 1
68*fac71e4eSEmmanuel Vadot
69*fac71e4eSEmmanuel Vadot  arm,data-latency:
70*fac71e4eSEmmanuel Vadot    description: Cycles of latency for Data RAM accesses. Specifies 3 cells of
71*fac71e4eSEmmanuel Vadot      read, write and setup latencies. Minimum valid values are 1. Controllers
72*fac71e4eSEmmanuel Vadot      without setup latency control should use a value of 0.
73*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
74*fac71e4eSEmmanuel Vadot    minItems: 2
75*fac71e4eSEmmanuel Vadot    maxItems: 3
76*fac71e4eSEmmanuel Vadot    items:
77*fac71e4eSEmmanuel Vadot      minimum: 0
78*fac71e4eSEmmanuel Vadot      maximum: 8
79*fac71e4eSEmmanuel Vadot
80*fac71e4eSEmmanuel Vadot  arm,tag-latency:
81*fac71e4eSEmmanuel Vadot    description: Cycles of latency for Tag RAM accesses. Specifies 3 cells of
82*fac71e4eSEmmanuel Vadot      read, write and setup latencies. Controllers without setup latency control
83*fac71e4eSEmmanuel Vadot      should use 0. Controllers without separate read and write Tag RAM latency
84*fac71e4eSEmmanuel Vadot      values should only use the first cell.
85*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
86*fac71e4eSEmmanuel Vadot    minItems: 1
87*fac71e4eSEmmanuel Vadot    maxItems: 3
88*fac71e4eSEmmanuel Vadot    items:
89*fac71e4eSEmmanuel Vadot      minimum: 0
90*fac71e4eSEmmanuel Vadot      maximum: 8
91*fac71e4eSEmmanuel Vadot
92*fac71e4eSEmmanuel Vadot  arm,dirty-latency:
93*fac71e4eSEmmanuel Vadot    description: Cycles of latency for Dirty RAMs. This is a single cell.
94*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
95*fac71e4eSEmmanuel Vadot    minimum: 1
96*fac71e4eSEmmanuel Vadot    maximum: 8
97*fac71e4eSEmmanuel Vadot
98*fac71e4eSEmmanuel Vadot  arm,filter-ranges:
99*fac71e4eSEmmanuel Vadot    description: <start length> Starting address and length of window to
100*fac71e4eSEmmanuel Vadot      filter. Addresses in the filter window are directed to the M1 port. Other
101*fac71e4eSEmmanuel Vadot      addresses will go to the M0 port.
102*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
103*fac71e4eSEmmanuel Vadot    items:
104*fac71e4eSEmmanuel Vadot      minItems: 2
105*fac71e4eSEmmanuel Vadot      maxItems: 2
106*fac71e4eSEmmanuel Vadot
107*fac71e4eSEmmanuel Vadot  arm,io-coherent:
108*fac71e4eSEmmanuel Vadot    description: indicates that the system is operating in an hardware
109*fac71e4eSEmmanuel Vadot      I/O coherent mode. Valid only when the arm,pl310-cache compatible
110*fac71e4eSEmmanuel Vadot      string is used.
111*fac71e4eSEmmanuel Vadot    type: boolean
112*fac71e4eSEmmanuel Vadot
113*fac71e4eSEmmanuel Vadot  interrupts:
114*fac71e4eSEmmanuel Vadot    # Either a single combined interrupt or up to 9 individual interrupts
115*fac71e4eSEmmanuel Vadot    minItems: 1
116*fac71e4eSEmmanuel Vadot    maxItems: 9
117*fac71e4eSEmmanuel Vadot
118*fac71e4eSEmmanuel Vadot  cache-id-part:
119*fac71e4eSEmmanuel Vadot    description: cache id part number to be used if it is not present
120*fac71e4eSEmmanuel Vadot      on hardware
121*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
122*fac71e4eSEmmanuel Vadot
123*fac71e4eSEmmanuel Vadot  wt-override:
124*fac71e4eSEmmanuel Vadot    description: If present then L2 is forced to Write through mode
125*fac71e4eSEmmanuel Vadot    type: boolean
126*fac71e4eSEmmanuel Vadot
127*fac71e4eSEmmanuel Vadot  arm,double-linefill:
128*fac71e4eSEmmanuel Vadot    description: Override double linefill enable setting. Enable if
129*fac71e4eSEmmanuel Vadot      non-zero, disable if zero.
130*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
131*fac71e4eSEmmanuel Vadot    enum: [0, 1]
132*fac71e4eSEmmanuel Vadot
133*fac71e4eSEmmanuel Vadot  arm,double-linefill-incr:
134*fac71e4eSEmmanuel Vadot    description: Override double linefill on INCR read. Enable
135*fac71e4eSEmmanuel Vadot      if non-zero, disable if zero.
136*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
137*fac71e4eSEmmanuel Vadot    enum: [0, 1]
138*fac71e4eSEmmanuel Vadot
139*fac71e4eSEmmanuel Vadot  arm,double-linefill-wrap:
140*fac71e4eSEmmanuel Vadot    description: Override double linefill on WRAP read. Enable
141*fac71e4eSEmmanuel Vadot      if non-zero, disable if zero.
142*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
143*fac71e4eSEmmanuel Vadot    enum: [0, 1]
144*fac71e4eSEmmanuel Vadot
145*fac71e4eSEmmanuel Vadot  arm,prefetch-drop:
146*fac71e4eSEmmanuel Vadot    description: Override prefetch drop enable setting. Enable if non-zero,
147*fac71e4eSEmmanuel Vadot      disable if zero.
148*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
149*fac71e4eSEmmanuel Vadot    enum: [0, 1]
150*fac71e4eSEmmanuel Vadot
151*fac71e4eSEmmanuel Vadot  arm,prefetch-offset:
152*fac71e4eSEmmanuel Vadot    description: Override prefetch offset value.
153*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
154*fac71e4eSEmmanuel Vadot    enum: [0, 1, 2, 3, 4, 5, 6, 7, 15, 23, 31]
155*fac71e4eSEmmanuel Vadot
156*fac71e4eSEmmanuel Vadot  arm,shared-override:
157*fac71e4eSEmmanuel Vadot    description: The default behavior of the L220 or PL310 cache
158*fac71e4eSEmmanuel Vadot      controllers with respect to the shareable attribute is to transform "normal
159*fac71e4eSEmmanuel Vadot      memory non-cacheable transactions" into "cacheable no allocate" (for reads)
160*fac71e4eSEmmanuel Vadot      or "write through no write allocate" (for writes).
161*fac71e4eSEmmanuel Vadot      On systems where this may cause DMA buffer corruption, this property must
162*fac71e4eSEmmanuel Vadot      be specified to indicate that such transforms are precluded.
163*fac71e4eSEmmanuel Vadot    type: boolean
164*fac71e4eSEmmanuel Vadot
165*fac71e4eSEmmanuel Vadot  arm,parity-enable:
166*fac71e4eSEmmanuel Vadot    description: enable parity checking on the L2 cache (L220 or PL310).
167*fac71e4eSEmmanuel Vadot    type: boolean
168*fac71e4eSEmmanuel Vadot
169*fac71e4eSEmmanuel Vadot  arm,parity-disable:
170*fac71e4eSEmmanuel Vadot    description: disable parity checking on the L2 cache (L220 or PL310).
171*fac71e4eSEmmanuel Vadot    type: boolean
172*fac71e4eSEmmanuel Vadot
173*fac71e4eSEmmanuel Vadot  marvell,ecc-enable:
174*fac71e4eSEmmanuel Vadot    description: enable ECC protection on the L2 cache
175*fac71e4eSEmmanuel Vadot    type: boolean
176*fac71e4eSEmmanuel Vadot
177*fac71e4eSEmmanuel Vadot  arm,outer-sync-disable:
178*fac71e4eSEmmanuel Vadot    description: disable the outer sync operation on the L2 cache.
179*fac71e4eSEmmanuel Vadot      Some core tiles, especially ARM PB11MPCore have a faulty L220 cache that
180*fac71e4eSEmmanuel Vadot      will randomly hang unless outer sync operations are disabled.
181*fac71e4eSEmmanuel Vadot    type: boolean
182*fac71e4eSEmmanuel Vadot
183*fac71e4eSEmmanuel Vadot  prefetch-data:
184*fac71e4eSEmmanuel Vadot    description: |
185*fac71e4eSEmmanuel Vadot      Data prefetch. Value: <0> (forcibly disable), <1>
186*fac71e4eSEmmanuel Vadot      (forcibly enable), property absent (retain settings set by firmware)
187*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
188*fac71e4eSEmmanuel Vadot    enum: [0, 1]
189*fac71e4eSEmmanuel Vadot
190*fac71e4eSEmmanuel Vadot  prefetch-instr:
191*fac71e4eSEmmanuel Vadot    description: |
192*fac71e4eSEmmanuel Vadot      Instruction prefetch. Value: <0> (forcibly disable),
193*fac71e4eSEmmanuel Vadot      <1> (forcibly enable), property absent (retain settings set by
194*fac71e4eSEmmanuel Vadot      firmware)
195*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
196*fac71e4eSEmmanuel Vadot    enum: [0, 1]
197*fac71e4eSEmmanuel Vadot
198*fac71e4eSEmmanuel Vadot  arm,dynamic-clock-gating:
199*fac71e4eSEmmanuel Vadot    description: |
200*fac71e4eSEmmanuel Vadot      L2 dynamic clock gating. Value: <0> (forcibly
201*fac71e4eSEmmanuel Vadot      disable), <1> (forcibly enable), property absent (OS specific behavior,
202*fac71e4eSEmmanuel Vadot      preferably retain firmware settings)
203*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
204*fac71e4eSEmmanuel Vadot    enum: [0, 1]
205*fac71e4eSEmmanuel Vadot
206*fac71e4eSEmmanuel Vadot  arm,standby-mode:
207*fac71e4eSEmmanuel Vadot    description: L2 standby mode enable. Value <0> (forcibly disable),
208*fac71e4eSEmmanuel Vadot      <1> (forcibly enable), property absent (OS specific behavior,
209*fac71e4eSEmmanuel Vadot      preferably retain firmware settings)
210*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
211*fac71e4eSEmmanuel Vadot    enum: [0, 1]
212*fac71e4eSEmmanuel Vadot
213*fac71e4eSEmmanuel Vadot  arm,early-bresp-disable:
214*fac71e4eSEmmanuel Vadot    description: Disable the CA9 optimization Early BRESP (PL310)
215*fac71e4eSEmmanuel Vadot    type: boolean
216*fac71e4eSEmmanuel Vadot
217*fac71e4eSEmmanuel Vadot  arm,full-line-zero-disable:
218*fac71e4eSEmmanuel Vadot    description: Disable the CA9 optimization Full line of zero
219*fac71e4eSEmmanuel Vadot      write (PL310)
220*fac71e4eSEmmanuel Vadot    type: boolean
221*fac71e4eSEmmanuel Vadot
222*fac71e4eSEmmanuel Vadotrequired:
223*fac71e4eSEmmanuel Vadot  - compatible
224*fac71e4eSEmmanuel Vadot  - cache-unified
225*fac71e4eSEmmanuel Vadot  - reg
226*fac71e4eSEmmanuel Vadot
227*fac71e4eSEmmanuel VadotadditionalProperties: false
228*fac71e4eSEmmanuel Vadot
229*fac71e4eSEmmanuel Vadotexamples:
230*fac71e4eSEmmanuel Vadot  - |
231*fac71e4eSEmmanuel Vadot    cache-controller@fff12000 {
232*fac71e4eSEmmanuel Vadot        compatible = "arm,pl310-cache";
233*fac71e4eSEmmanuel Vadot        reg = <0xfff12000 0x1000>;
234*fac71e4eSEmmanuel Vadot        arm,data-latency = <1 1 1>;
235*fac71e4eSEmmanuel Vadot        arm,tag-latency = <2 2 2>;
236*fac71e4eSEmmanuel Vadot        arm,filter-ranges = <0x80000000 0x8000000>;
237*fac71e4eSEmmanuel Vadot        cache-unified;
238*fac71e4eSEmmanuel Vadot        cache-level = <2>;
239*fac71e4eSEmmanuel Vadot        interrupts = <45>;
240*fac71e4eSEmmanuel Vadot    };
241*fac71e4eSEmmanuel Vadot
242*fac71e4eSEmmanuel Vadot...
243