aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2019-09-24 15:37:56 -0400
committerRob Herring <robh@kernel.org>2019-10-23 15:42:44 -0400
commit9af865d95bd730c1d1035acd5dd6df105da98d0c (patch)
tree92517f363c6c156fda15726d56764700cd15ff86
parentf437ade3296bacaddb6d7882ba0515940f01daf4 (diff)
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: 4fd669a8c487 ("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>
-rw-r--r--Documentation/devicetree/bindings/riscv/cpus.yaml29
1 files changed, 13 insertions, 16 deletions
diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml
index b261a3015f84..04819ad379c2 100644
--- a/Documentation/devicetree/bindings/riscv/cpus.yaml
+++ b/Documentation/devicetree/bindings/riscv/cpus.yaml
@@ -24,15 +24,17 @@ description: |
24 24
25properties: 25properties:
26 compatible: 26 compatible:
27 items: 27 oneOf:
28 - enum: 28 - items:
29 - sifive,rocket0 29 - enum:
30 - sifive,e5 30 - sifive,rocket0
31 - sifive,e51 31 - sifive,e5
32 - sifive,u54-mc 32 - sifive,e51
33 - sifive,u54 33 - sifive,u54-mc
34 - sifive,u5 34 - sifive,u54
35 - const: riscv 35 - sifive,u5
36 - const: riscv
37 - const: riscv # Simulator only
36 description: 38 description:
37 Identifies that the hart uses the RISC-V instruction set 39 Identifies that the hart uses the RISC-V instruction set
38 and identifies the type of the hart. 40 and identifies the type of the hart.
@@ -66,12 +68,8 @@ properties:
66 insensitive, letters in the riscv,isa string must be all 68 insensitive, letters in the riscv,isa string must be all
67 lowercase to simplify parsing. 69 lowercase to simplify parsing.
68 70
69 timebase-frequency: 71 # RISC-V requires 'timebase-frequency' in /cpus, so disallow it here
70 type: integer 72 timebase-frequency: false
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.
75 73
76 interrupt-controller: 74 interrupt-controller:
77 type: object 75 type: object
@@ -93,7 +91,6 @@ properties:
93 91
94required: 92required:
95 - riscv,isa 93 - riscv,isa
96 - timebase-frequency
97 - interrupt-controller 94 - interrupt-controller
98 95
99examples: 96examples: