Lines Matching +full:json +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#
14 title: An example schema annotated with jsonschema details
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 - enum:
56 - vendor,soc1-ip
59 - items:
61 - const: vendor,soc1-ip
64 # The core schema already checks that reg values are numbers, so device
65 # specific schema don't need to do those checks.
69 - description: core registers
70 - description: aux registers
73 reg-names:
74 # The core schema enforces this (*-names) is a string array
76 - const: core
77 - const: aux
87 clock-names:
89 - const: bus
95 - description: tx or combined interrupt
96 - description: rx interrupt
104 interrupt-names:
108 - const: tx irq
109 - const: rx irq
112 '#interrupt-cells':
114 # The core schema handles that this must be a single integer.
117 interrupt-controller: true
121 clock-frequency:
122 # The type is set in the core schema. Per device schema only need to set
129 foo-gpios:
133 # *-supply is always a single phandle, so nothing more to define.
134 foo-supply: true
138 # Vendor specific properties have slightly different schema requirements than
141 vendor,int-property:
146 vendor,bool-property:
148 properties are one case where the json-schema 'type' keyword can be used
152 vendor,string-array-property:
154 core schema.
155 $ref: /schemas/types.yaml#/definitions/string-array
157 - enum: [foo, bar]
158 - enum: [baz, boo]
160 vendor,property-in-standard-units-microvolt:
165 child-node:
166 description: Child nodes are just another property from a json-schema
168 type: object # DT nodes are json objects
170 vendor,a-child-node-property:
171 description: Child node properties have all the same schema
176 - vendor,a-child-node-property
180 # 'vendor,bool-property' is only allowed when 'vendor,string-array-property'
182 vendor,bool-property: [ 'vendor,string-array-property' ]
185 vendor,string-array-property: [ 'vendor,bool-property' ]
188 - compatible
189 - reg
190 - interrupts
191 - interrupt-controller
193 # if/then schema can be used to handle conditions on a property affecting
197 # For multiple 'if' schema, group them under an 'allOf'.
200 # the binding into separate schema documents.
202 - if:
206 const: vendor,soc2-ip
209 - foo-supply
210 # Altering schema depending on presence of properties is usually done by
212 - if:
214 - vendor,bool-property
217 vendor,int-property:
220 # Ideally, the schema should have this line otherwise any other properties
222 # 'pinctrl-*' which are added automatically by the tooling.
224 # This can't be used in cases where another schema is referenced
226 # If and only if another schema is referenced and arbitrary children nodes can
234 # Examples have a default #address-cells and #size-cells value of 1. This can
239 - |
241 compatible = "vendor,soc4-ip", "vendor,soc1-ip";
244 reg-names = "core", "aux";
246 interrupt-controller;