Skip to content

Commit a4dc1ca

Browse files
committed
dt-bindings: riscv: Fix CPU schema errors
Fix the errors in the RiscV CPU DT schema: Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: 'timebase-frequency' is a required property Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@1: 'timebase-frequency' is a required property Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: compatible:0: 'riscv' is not one of ['sifive,rocket0', 'sifive,e5', 'sifive,e51', 'sifive,u54-mc', 'sifive,u54', 'sifive,u5'] Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: compatible: ['riscv'] is too short Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: 'timebase-frequency' is a required property The DT spec allows for 'timebase-frequency' to be in 'cpu' or 'cpus' node and RiscV requires it in /cpus node, so make it disallowed in cpu nodes. Fixes: 4fd669a ("dt-bindings: riscv: convert cpu binding to json-schema") Cc: Palmer Dabbelt <palmer@sifive.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: linux-riscv@lists.infradead.org Acked-by: Paul Walmsley <paul.walmsley@sifive.com> Signed-off-by: Rob Herring <robh@kernel.org>
1 parent ce0c94e commit a4dc1ca

1 file changed

Lines changed: 13 additions & 16 deletions

File tree

  • Documentation/devicetree/bindings/riscv

‎Documentation/devicetree/bindings/riscv/cpus.yaml‎

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,17 @@ description: |
2424
2525
properties:
2626
compatible:
27-
items:
28-
- enum:
29-
- sifive,rocket0
30-
- sifive,e5
31-
- sifive,e51
32-
- sifive,u54-mc
33-
- sifive,u54
34-
- sifive,u5
35-
- const: riscv
27+
oneOf:
28+
- items:
29+
- enum:
30+
- sifive,rocket0
31+
- sifive,e5
32+
- sifive,e51
33+
- sifive,u54-mc
34+
- sifive,u54
35+
- sifive,u5
36+
- const: riscv
37+
- const: riscv # Simulator only
3638
description:
3739
Identifies that the hart uses the RISC-V instruction set
3840
and identifies the type of the hart.
@@ -66,12 +68,8 @@ properties:
6668
insensitive, letters in the riscv,isa string must be all
6769
lowercase to simplify parsing.
6870

69-
timebase-frequency:
70-
type: integer
71-
minimum: 1
72-
description:
73-
Specifies the clock frequency of the system timer in Hz.
74-
This value is common to all harts on a single system image.
71+
# RISC-V requires 'timebase-frequency' in /cpus, so disallow it here
72+
timebase-frequency: false
7573

7674
interrupt-controller:
7775
type: object
@@ -93,7 +91,6 @@ properties:
9391

9492
required:
9593
- riscv,isa
96-
- timebase-frequency
9794
- interrupt-controller
9895

9996
examples:

0 commit comments

Comments
 (0)