Skip to content

Commit 07a3c03

Browse files
committed
Merge tag 'riscv-cache-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/drivers
RISC-V cache drivers for v6.16 SiFive: Add support for the Eswin EIC7700 SoC, which needs to make sure of the non-standard cache-ops provided by the ccache driver. Bindings: Conversions for two Marvell bindings to yaml, and additions of two soc-specific compatibles to the axm45mp bindings. Signed-off-by: Conor Dooley <[email protected]> * tag 'riscv-cache-for-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: dt-bindings: cache: add QiLai compatible to ax45mp dt-bindings: cache: Convert marvell,tauros2-cache to DT schema dt-bindings: cache: Convert marvell,{feroceon,kirkwood}-cache to DT schema dt-bindings: cache: add specific RZ/Five compatible to ax45mp cache: sifive_ccache: Add ESWIN EIC7700 support dt-bindings: cache: sifive,ccache0: Add ESWIN EIC7700 SoC compatibility Link: https://lore.kernel.org/r/20250516-liability-facility-667fc14a2a85@spud Signed-off-by: Arnd Bergmann <[email protected]>
2 parents a65dc23 + 51b081c commit 07a3c03

File tree

7 files changed

+146
-37
lines changed

7 files changed

+146
-37
lines changed

Documentation/devicetree/bindings/cache/andestech,ax45mp-cache.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ select:
2828
properties:
2929
compatible:
3030
items:
31+
- enum:
32+
- andestech,qilai-ax45mp-cache
33+
- renesas,r9a07g043f-ax45mp-cache
3134
- const: andestech,ax45mp-cache
3235
- const: cache
3336

@@ -65,12 +68,27 @@ required:
6568
- cache-size
6669
- cache-unified
6770

71+
allOf:
72+
- if:
73+
properties:
74+
compatible:
75+
contains:
76+
const: andestech,qilai-ax45mp-cache
77+
78+
then:
79+
properties:
80+
cache-sets:
81+
const: 2048
82+
cache-size:
83+
const: 2097152
84+
6885
examples:
6986
- |
7087
#include <dt-bindings/interrupt-controller/irq.h>
7188
7289
cache-controller@13400000 {
73-
compatible = "andestech,ax45mp-cache", "cache";
90+
compatible = "renesas,r9a07g043f-ax45mp-cache", "andestech,ax45mp-cache",
91+
"cache";
7492
reg = <0x13400000 0x100000>;
7593
interrupts = <508 IRQ_TYPE_LEVEL_HIGH>;
7694
cache-line-size = <64>;

Documentation/devicetree/bindings/cache/marvell,feroceon-cache.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/cache/marvell,kirkwood-cache.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Marvell Feroceon/Kirkwood Cache
8+
9+
maintainers:
10+
- Andrew Lunn <[email protected]>
11+
- Gregory Clement <[email protected]>
12+
13+
properties:
14+
compatible:
15+
enum:
16+
- marvell,feroceon-cache
17+
- marvell,kirkwood-cache
18+
19+
reg:
20+
maxItems: 1
21+
22+
allOf:
23+
- if:
24+
properties:
25+
compatible:
26+
contains:
27+
const: marvell,kirkwood-cache
28+
then:
29+
required:
30+
- reg
31+
else:
32+
properties:
33+
reg: false
34+
35+
required:
36+
- compatible
37+
38+
additionalProperties: false
39+
40+
examples:
41+
- |
42+
l2-cache@20128 {
43+
compatible = "marvell,kirkwood-cache";
44+
reg = <0x20128 0x4>;
45+
};

Documentation/devicetree/bindings/cache/marvell,tauros2-cache.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/cache/marvell,tauros2-cache.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Marvell Tauros2 Cache
8+
9+
maintainers:
10+
- Andrew Lunn <[email protected]>
11+
- Gregory Clement <[email protected]>
12+
13+
properties:
14+
compatible:
15+
const: marvell,tauros2-cache
16+
17+
marvell,tauros2-cache-features:
18+
description: >
19+
Specify the features supported for the tauros2 cache. The features include:
20+
21+
- CACHE_TAUROS2_PREFETCH_ON (1 << 0)
22+
- CACHE_TAUROS2_LINEFILL_BURST8 (1 << 1)
23+
24+
The definition can be found at arch/arm/include/asm/hardware/cache-tauros2.h
25+
$ref: /schemas/types.yaml#/definitions/uint32
26+
maximum: 0x3
27+
28+
required:
29+
- compatible
30+
- marvell,tauros2-cache-features
31+
32+
additionalProperties: false
33+
34+
examples:
35+
- |
36+
l2-cache {
37+
compatible = "marvell,tauros2-cache";
38+
marvell,tauros2-cache-features = <0x3>;
39+
};

Documentation/devicetree/bindings/cache/sifive,ccache0.yaml

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ properties:
3939
- const: cache
4040
- items:
4141
- enum:
42+
- eswin,eic7700-l3-cache
4243
- starfive,jh7100-ccache
4344
- starfive,jh7110-ccache
4445
- const: sifive,ccache0
@@ -55,10 +56,10 @@ properties:
5556
enum: [2, 3]
5657

5758
cache-sets:
58-
enum: [1024, 2048]
59+
enum: [1024, 2048, 4096]
5960

6061
cache-size:
61-
const: 2097152
62+
enum: [2097152, 4194304]
6263

6364
cache-unified: true
6465

@@ -89,6 +90,7 @@ allOf:
8990
compatible:
9091
contains:
9192
enum:
93+
- eswin,eic7700-l3-cache
9294
- sifive,fu740-c000-ccache
9395
- starfive,jh7100-ccache
9496
- starfive,jh7110-ccache
@@ -108,6 +110,22 @@ allOf:
108110
Must contain entries for DirError, DataError and DataFail signals.
109111
maxItems: 3
110112

113+
- if:
114+
properties:
115+
compatible:
116+
contains:
117+
const: eswin,eic7700-l3-cache
118+
119+
then:
120+
properties:
121+
cache-size:
122+
const: 4194304
123+
124+
else:
125+
properties:
126+
cache-size:
127+
const: 2097152
128+
111129
- if:
112130
properties:
113131
compatible:
@@ -122,11 +140,31 @@ allOf:
122140
cache-sets:
123141
const: 2048
124142

125-
else:
143+
- if:
144+
properties:
145+
compatible:
146+
contains:
147+
enum:
148+
- microchip,mpfs-ccache
149+
- sifive,fu540-c000-ccache
150+
151+
then:
126152
properties:
127153
cache-sets:
128154
const: 1024
129155

156+
- if:
157+
properties:
158+
compatible:
159+
contains:
160+
enum:
161+
- eswin,eic7700-l3-cache
162+
163+
then:
164+
properties:
165+
cache-sets:
166+
const: 4096
167+
130168
- if:
131169
properties:
132170
compatible:

drivers/cache/sifive_ccache.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ static void ccache_config_read(void)
118118
}
119119

120120
static const struct of_device_id sifive_ccache_ids[] = {
121+
{ .compatible = "eswin,eic7700-l3-cache",
122+
.data = (void *)(QUIRK_NONSTANDARD_CACHE_OPS) },
121123
{ .compatible = "sifive,fu540-c000-ccache" },
122124
{ .compatible = "sifive,fu740-c000-ccache" },
123125
{ .compatible = "starfive,jh7100-ccache",

0 commit comments

Comments
 (0)