Skip to content

Commit e9f9946

Browse files
clementlegerpalmer-dabbelt
authored andcommitted
dt-bindings: riscv: add Zca, Zcf, Zcd and Zcb ISA extension description
Add description for Zca, Zcf, Zcd and Zcb extensions which are part the Zc* standard extensions for code size reduction. Additional validation rules are added since Zcb depends on Zca, Zcf, depends on Zca and F, Zcd depends on Zca and D and finally, Zcf can not be present on rv64. Signed-off-by: Clément Léger <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Reviewed-by: Charlie Jenkins <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent ca54464 commit e9f9946

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

Documentation/devicetree/bindings/riscv/extensions.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,38 @@ properties:
220220
instructions as ratified at commit 6d33919 ("Merge pull request #158
221221
from hirooih/clmul-fix-loop-end-condition") of riscv-bitmanip.
222222
223+
- const: zca
224+
description: |
225+
The Zca extension part of Zc* standard extensions for code size
226+
reduction, as ratified in commit 8be3419c1c0 ("Zcf doesn't exist on
227+
RV64 as it contains no instructions") of riscv-code-size-reduction,
228+
merged in the riscv-isa-manual by commit dbc79cf28a2 ("Initial seed
229+
of zc.adoc to src tree.").
230+
231+
- const: zcb
232+
description: |
233+
The Zcb extension part of Zc* standard extensions for code size
234+
reduction, as ratified in commit 8be3419c1c0 ("Zcf doesn't exist on
235+
RV64 as it contains no instructions") of riscv-code-size-reduction,
236+
merged in the riscv-isa-manual by commit dbc79cf28a2 ("Initial seed
237+
of zc.adoc to src tree.").
238+
239+
- const: zcd
240+
description: |
241+
The Zcd extension part of Zc* standard extensions for code size
242+
reduction, as ratified in commit 8be3419c1c0 ("Zcf doesn't exist on
243+
RV64 as it contains no instructions") of riscv-code-size-reduction,
244+
merged in the riscv-isa-manual by commit dbc79cf28a2 ("Initial seed
245+
of zc.adoc to src tree.").
246+
247+
- const: zcf
248+
description: |
249+
The Zcf extension part of Zc* standard extensions for code size
250+
reduction, as ratified in commit 8be3419c1c0 ("Zcf doesn't exist on
251+
RV64 as it contains no instructions") of riscv-code-size-reduction,
252+
merged in the riscv-isa-manual by commit dbc79cf28a2 ("Initial seed
253+
of zc.adoc to src tree.").
254+
223255
- const: zfa
224256
description:
225257
The standard Zfa extension for additional floating point
@@ -519,5 +551,51 @@ properties:
519551
Registers in the AX45MP datasheet.
520552
https://www.andestech.com/wp-content/uploads/AX45MP-1C-Rev.-5.0.0-Datasheet.pdf
521553

554+
allOf:
555+
# Zcb depends on Zca
556+
- if:
557+
contains:
558+
const: zcb
559+
then:
560+
contains:
561+
const: zca
562+
# Zcd depends on Zca and D
563+
- if:
564+
contains:
565+
const: zcd
566+
then:
567+
allOf:
568+
- contains:
569+
const: zca
570+
- contains:
571+
const: d
572+
# Zcf depends on Zca and F
573+
- if:
574+
contains:
575+
const: zcf
576+
then:
577+
allOf:
578+
- contains:
579+
const: zca
580+
- contains:
581+
const: f
582+
583+
allOf:
584+
# Zcf extension does not exist on rv64
585+
- if:
586+
properties:
587+
riscv,isa-extensions:
588+
contains:
589+
const: zcf
590+
riscv,isa-base:
591+
contains:
592+
const: rv64i
593+
then:
594+
properties:
595+
riscv,isa-extensions:
596+
not:
597+
contains:
598+
const: zcf
599+
522600
additionalProperties: true
523601
...

0 commit comments

Comments
 (0)