xref: /linux/Documentation/devicetree/bindings/cache/sifive,ccache0.yaml (revision 3d70b9853b44d3f034acaf5e3be7d5228daddef4)
1dc8ea920SConor Dooley# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2dc8ea920SConor Dooley# Copyright (C) 2020 SiFive, Inc.
3dc8ea920SConor Dooley%YAML 1.2
4dc8ea920SConor Dooley---
5dc8ea920SConor Dooley$id: http://devicetree.org/schemas/cache/sifive,ccache0.yaml#
6dc8ea920SConor Dooley$schema: http://devicetree.org/meta-schemas/core.yaml#
7dc8ea920SConor Dooley
8dc8ea920SConor Dooleytitle: SiFive Composable Cache Controller
9dc8ea920SConor Dooley
10dc8ea920SConor Dooleymaintainers:
11dc8ea920SConor Dooley  - Paul Walmsley <paul.walmsley@sifive.com>
12dc8ea920SConor Dooley
13dc8ea920SConor Dooleydescription:
14dc8ea920SConor Dooley  The SiFive Composable Cache Controller is used to provide access to fast copies
15dc8ea920SConor Dooley  of memory for masters in a Core Complex. The Composable Cache Controller also
16dc8ea920SConor Dooley  acts as directory-based coherency manager.
17dc8ea920SConor Dooley  All the properties in ePAPR/DeviceTree specification applies for this platform.
18dc8ea920SConor Dooley
19dc8ea920SConor Dooleyselect:
20dc8ea920SConor Dooley  properties:
21dc8ea920SConor Dooley    compatible:
22dc8ea920SConor Dooley      contains:
23dc8ea920SConor Dooley        enum:
24dc8ea920SConor Dooley          - sifive,ccache0
25dc8ea920SConor Dooley          - sifive,fu540-c000-ccache
26dc8ea920SConor Dooley          - sifive,fu740-c000-ccache
27dc8ea920SConor Dooley
28dc8ea920SConor Dooley  required:
29dc8ea920SConor Dooley    - compatible
30dc8ea920SConor Dooley
31dc8ea920SConor Dooleyproperties:
32dc8ea920SConor Dooley  compatible:
33dc8ea920SConor Dooley    oneOf:
34dc8ea920SConor Dooley      - items:
35dc8ea920SConor Dooley          - enum:
36dc8ea920SConor Dooley              - sifive,ccache0
37dc8ea920SConor Dooley              - sifive,fu540-c000-ccache
38dc8ea920SConor Dooley              - sifive,fu740-c000-ccache
39dc8ea920SConor Dooley          - const: cache
40dc8ea920SConor Dooley      - items:
41*3d70b985SEmil Renner Berthing          - enum:
42*3d70b985SEmil Renner Berthing              - starfive,jh7100-ccache
43*3d70b985SEmil Renner Berthing              - starfive,jh7110-ccache
44dc8ea920SConor Dooley          - const: sifive,ccache0
45dc8ea920SConor Dooley          - const: cache
46dc8ea920SConor Dooley      - items:
47dc8ea920SConor Dooley          - const: microchip,mpfs-ccache
48dc8ea920SConor Dooley          - const: sifive,fu540-c000-ccache
49dc8ea920SConor Dooley          - const: cache
50dc8ea920SConor Dooley
51dc8ea920SConor Dooley  cache-block-size:
52dc8ea920SConor Dooley    const: 64
53dc8ea920SConor Dooley
54dc8ea920SConor Dooley  cache-level:
55dc8ea920SConor Dooley    enum: [2, 3]
56dc8ea920SConor Dooley
57dc8ea920SConor Dooley  cache-sets:
58dc8ea920SConor Dooley    enum: [1024, 2048]
59dc8ea920SConor Dooley
60dc8ea920SConor Dooley  cache-size:
61dc8ea920SConor Dooley    const: 2097152
62dc8ea920SConor Dooley
63dc8ea920SConor Dooley  cache-unified: true
64dc8ea920SConor Dooley
65dc8ea920SConor Dooley  interrupts:
66dc8ea920SConor Dooley    minItems: 3
67dc8ea920SConor Dooley    items:
68dc8ea920SConor Dooley      - description: DirError interrupt
69dc8ea920SConor Dooley      - description: DataError interrupt
70dc8ea920SConor Dooley      - description: DataFail interrupt
71dc8ea920SConor Dooley      - description: DirFail interrupt
72dc8ea920SConor Dooley
73dc8ea920SConor Dooley  reg:
74dc8ea920SConor Dooley    maxItems: 1
75dc8ea920SConor Dooley
76dc8ea920SConor Dooley  next-level-cache: true
77dc8ea920SConor Dooley
78dc8ea920SConor Dooley  memory-region:
79dc8ea920SConor Dooley    maxItems: 1
80dc8ea920SConor Dooley    description: |
81dc8ea920SConor Dooley      The reference to the reserved-memory for the L2 Loosely Integrated Memory region.
82dc8ea920SConor Dooley      The reserved memory node should be defined as per the bindings in reserved-memory.txt.
83dc8ea920SConor Dooley
84dc8ea920SConor DooleyallOf:
85dc8ea920SConor Dooley  - $ref: /schemas/cache-controller.yaml#
86dc8ea920SConor Dooley
87dc8ea920SConor Dooley  - if:
88dc8ea920SConor Dooley      properties:
89dc8ea920SConor Dooley        compatible:
90dc8ea920SConor Dooley          contains:
91dc8ea920SConor Dooley            enum:
92dc8ea920SConor Dooley              - sifive,fu740-c000-ccache
93*3d70b985SEmil Renner Berthing              - starfive,jh7100-ccache
94dc8ea920SConor Dooley              - starfive,jh7110-ccache
95dc8ea920SConor Dooley              - microchip,mpfs-ccache
96dc8ea920SConor Dooley
97dc8ea920SConor Dooley    then:
98dc8ea920SConor Dooley      properties:
99dc8ea920SConor Dooley        interrupts:
100dc8ea920SConor Dooley          description: |
101dc8ea920SConor Dooley            Must contain entries for DirError, DataError, DataFail, DirFail signals.
102dc8ea920SConor Dooley          minItems: 4
103dc8ea920SConor Dooley
104dc8ea920SConor Dooley    else:
105dc8ea920SConor Dooley      properties:
106dc8ea920SConor Dooley        interrupts:
107dc8ea920SConor Dooley          description: |
108dc8ea920SConor Dooley            Must contain entries for DirError, DataError and DataFail signals.
109dc8ea920SConor Dooley          maxItems: 3
110dc8ea920SConor Dooley
111dc8ea920SConor Dooley  - if:
112dc8ea920SConor Dooley      properties:
113dc8ea920SConor Dooley        compatible:
114dc8ea920SConor Dooley          contains:
115dc8ea920SConor Dooley            enum:
116dc8ea920SConor Dooley              - sifive,fu740-c000-ccache
117*3d70b985SEmil Renner Berthing              - starfive,jh7100-ccache
118dc8ea920SConor Dooley              - starfive,jh7110-ccache
119dc8ea920SConor Dooley
120dc8ea920SConor Dooley    then:
121dc8ea920SConor Dooley      properties:
122dc8ea920SConor Dooley        cache-sets:
123dc8ea920SConor Dooley          const: 2048
124dc8ea920SConor Dooley
125dc8ea920SConor Dooley    else:
126dc8ea920SConor Dooley      properties:
127dc8ea920SConor Dooley        cache-sets:
128dc8ea920SConor Dooley          const: 1024
129dc8ea920SConor Dooley
130dc8ea920SConor Dooley  - if:
131dc8ea920SConor Dooley      properties:
132dc8ea920SConor Dooley        compatible:
133dc8ea920SConor Dooley          contains:
134dc8ea920SConor Dooley            const: sifive,ccache0
135dc8ea920SConor Dooley
136dc8ea920SConor Dooley    then:
137dc8ea920SConor Dooley      properties:
138dc8ea920SConor Dooley        cache-level:
139dc8ea920SConor Dooley          enum: [2, 3]
140dc8ea920SConor Dooley
141dc8ea920SConor Dooley    else:
142dc8ea920SConor Dooley      properties:
143dc8ea920SConor Dooley        cache-level:
144dc8ea920SConor Dooley          const: 2
145dc8ea920SConor Dooley
146dc8ea920SConor DooleyadditionalProperties: false
147dc8ea920SConor Dooley
148dc8ea920SConor Dooleyrequired:
149dc8ea920SConor Dooley  - compatible
150dc8ea920SConor Dooley  - cache-block-size
151dc8ea920SConor Dooley  - cache-level
152dc8ea920SConor Dooley  - cache-sets
153dc8ea920SConor Dooley  - cache-size
154dc8ea920SConor Dooley  - cache-unified
155dc8ea920SConor Dooley  - interrupts
156dc8ea920SConor Dooley  - reg
157dc8ea920SConor Dooley
158dc8ea920SConor Dooleyexamples:
159dc8ea920SConor Dooley  - |
160dc8ea920SConor Dooley    cache-controller@2010000 {
161dc8ea920SConor Dooley        compatible = "sifive,fu540-c000-ccache", "cache";
162dc8ea920SConor Dooley        cache-block-size = <64>;
163dc8ea920SConor Dooley        cache-level = <2>;
164dc8ea920SConor Dooley        cache-sets = <1024>;
165dc8ea920SConor Dooley        cache-size = <2097152>;
166dc8ea920SConor Dooley        cache-unified;
167dc8ea920SConor Dooley        reg = <0x2010000 0x1000>;
168dc8ea920SConor Dooley        interrupt-parent = <&plic0>;
169dc8ea920SConor Dooley        interrupts = <1>,
170dc8ea920SConor Dooley                     <2>,
171dc8ea920SConor Dooley                     <3>;
172dc8ea920SConor Dooley        next-level-cache = <&L25>;
173dc8ea920SConor Dooley        memory-region = <&l2_lim>;
174dc8ea920SConor Dooley    };
175