Skip to content

Commit 17e4732

Browse files
committed
dt-bindings: riscv: sifive-l2: add a PolarFire SoC compatible
The l2 cache on PolarFire SoC is cross between that of the fu540 and the fu740. It has the extra interrupt from the fu740 but the lower number of cache-sets. Add a specific compatible to avoid the likes of: mpfs-polarberry.dtb: cache-controller@2010000: interrupts: [[1], [3], [4], [2]] is too long Fixes: 34fc9cc ("riscv: dts: microchip: correct L2 cache interrupts") Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
1 parent 1709c70 commit 17e4732

File tree

1 file changed

+49
-30
lines changed

1 file changed

+49
-30
lines changed

Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml

Lines changed: 49 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ description:
1717
acts as directory-based coherency manager.
1818
All the properties in ePAPR/DeviceTree specification applies for this platform.
1919

20-
allOf:
21-
- $ref: /schemas/cache-controller.yaml#
22-
2320
select:
2421
properties:
2522
compatible:
@@ -33,11 +30,16 @@ select:
3330

3431
properties:
3532
compatible:
36-
items:
37-
- enum:
38-
- sifive,fu540-c000-ccache
39-
- sifive,fu740-c000-ccache
40-
- const: cache
33+
oneOf:
34+
- items:
35+
- enum:
36+
- sifive,fu540-c000-ccache
37+
- sifive,fu740-c000-ccache
38+
- const: cache
39+
- items:
40+
- const: microchip,mpfs-ccache
41+
- const: sifive,fu540-c000-ccache
42+
- const: cache
4143

4244
cache-block-size:
4345
const: 64
@@ -72,29 +74,46 @@ properties:
7274
The reference to the reserved-memory for the L2 Loosely Integrated Memory region.
7375
The reserved memory node should be defined as per the bindings in reserved-memory.txt.
7476
75-
if:
76-
properties:
77-
compatible:
78-
contains:
79-
const: sifive,fu540-c000-ccache
77+
allOf:
78+
- $ref: /schemas/cache-controller.yaml#
8079

81-
then:
82-
properties:
83-
interrupts:
84-
description: |
85-
Must contain entries for DirError, DataError and DataFail signals.
86-
maxItems: 3
87-
cache-sets:
88-
const: 1024
89-
90-
else:
91-
properties:
92-
interrupts:
93-
description: |
94-
Must contain entries for DirError, DataError, DataFail, DirFail signals.
95-
minItems: 4
96-
cache-sets:
97-
const: 2048
80+
- if:
81+
properties:
82+
compatible:
83+
contains:
84+
enum:
85+
- sifive,fu740-c000-ccache
86+
- microchip,mpfs-ccache
87+
88+
then:
89+
properties:
90+
interrupts:
91+
description: |
92+
Must contain entries for DirError, DataError, DataFail, DirFail signals.
93+
minItems: 4
94+
95+
else:
96+
properties:
97+
interrupts:
98+
description: |
99+
Must contain entries for DirError, DataError and DataFail signals.
100+
maxItems: 3
101+
102+
- if:
103+
properties:
104+
compatible:
105+
contains:
106+
const: sifive,fu740-c000-ccache
107+
108+
then:
109+
properties:
110+
cache-sets:
111+
const: 2048
112+
113+
else:
114+
properties:
115+
cache-sets:
116+
const: 1024
98117

99118
additionalProperties: false
100119

0 commit comments

Comments
 (0)