Lines Matching +full:dt +full:- +full:schema

1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 ---
5 # All the top-level keys are standard json-schema keywords except for
10 $id: http://devicetree.org/schemas/example-schema.yaml#
11 # $schema is the meta-schema this schema should be validated with.
12 $schema: http://devicetree.org/meta-schemas/core.yaml#
17 - Rob Herring <robh@kernel.org>
20 A more detailed multi-line description of the binding.
29 # 'select' is a schema applied to a DT node to determine if this binding
30 # schema should be applied to the node. It is optional and by default the
33 # In this case, a 'false' schema will never match.
36 # A dictionary of DT properties for this binding schema
38 # More complicated schema can use oneOf (XOR), anyOf (OR), or allOf (AND)
42 # The boolean schema must be a list of schemas.
44 - items:
51 - enum:
52 - vendor,soc4-ip
53 - vendor,soc3-ip
54 - vendor,soc2-ip
55 - const: vendor,soc1-ip
58 - items:
60 - const: vendor,soc1-ip
63 # The core schema already checks that reg values are numbers, so device
64 # specific schema don't need to do those checks.
68 - description: core registers
69 - description: aux registers
72 reg-names:
73 # The core schema enforces this (*-names) is a string array
75 - const: core
76 - const: aux
86 clock-names:
87 # For single-entry lists in clocks, resets etc., the xxx-names often do not
89 # just skip the xxx-names.
91 - const: bus
97 - description: tx or combined interrupt
98 - description: rx interrupt
106 interrupt-names:
110 - const: tx irq
111 - const: rx irq
114 '#interrupt-cells':
116 # The core schema handles that this must be a single integer.
119 interrupt-controller: true
123 clock-frequency:
124 # The type is set in the core schema. Per-device schema only need to set
131 foo-gpios:
135 # *-supply is always a single phandle, so nothing more to define.
136 foo-supply: true
138 # Vendor-specific properties
140 # Vendor-specific properties have slightly different schema requirements than
143 vendor,int-property:
144 description: Vendor-specific properties must have a description
148 vendor,bool-property:
149 description: Vendor-specific properties must have a description. Boolean
150 properties are one case where the json-schema 'type' keyword can be used
154 vendor,string-array-property:
155 description: Vendor-specific properties should reference a type in the
156 core schema.
157 $ref: /schemas/types.yaml#/definitions/string-array
159 - enum: [foo, bar]
160 - enum: [baz, boo]
162 vendor,property-in-standard-units-microvolt:
163 description: Vendor-specific properties having a standard unit suffix
167 vendor,int-array-variable-length-and-constrained-values:
170 $ref: /schemas/types.yaml#/definitions/uint32-array
177 child-node:
178 description: Child nodes are just another property from a json-schema
180 type: object # DT nodes are json objects
184 vendor,a-child-node-property:
185 description: Child node properties have all the same schema
190 - vendor,a-child-node-property
194 # 'vendor,bool-property' is only allowed when 'vendor,string-array-property'
196 vendor,bool-property: [ 'vendor,string-array-property' ]
199 vendor,string-array-property: [ 'vendor,bool-property' ]
202 - compatible
203 - reg
204 - interrupts
205 - interrupt-controller
207 # if/then schema can be used to handle conditions on a property affecting
211 # For multiple 'if' schema, group them under an 'allOf'.
214 # the binding into separate schema documents.
216 - if:
220 const: vendor,soc2-ip
223 - foo-supply
227 foo-supply: false
228 # Altering schema depending on presence of properties is usually done by
230 - if:
232 - vendor,bool-property
235 vendor,int-property:
238 # Ideally, the schema should have this line otherwise any other properties
240 # 'pinctrl-*' which are added automatically by the tooling.
242 # This can't be used in cases where another schema is referenced
244 # If and only if another schema is referenced and arbitrary children nodes can
252 # Examples have a default #address-cells and #size-cells value of 1. This can
256 # Any includes used have to be explicitly included. Use 4-space indentation.
257 - |
259 compatible = "vendor,soc4-ip", "vendor,soc1-ip";
262 reg-names = "core", "aux";
264 interrupt-controller;