• Home
  • Raw
  • Download

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

1 .. SPDX-License-Identifier: GPL-2.0
3 Writing DeviceTree Bindings in json-schema
6 Devicetree bindings are written using json-schema vocabulary. Schema files are
11 Schema Contents
12 ---------------
14 Each schema doc is a structured json-schema which is defined by a set of
15 top-level properties. Generally, there is one binding defined per file. The
16 top-level json-schema properties used are:
19 A json-schema unique identifier string. The string must be a valid
20 URI typically containing the binding's filename and path. For DT schema, it must
22 references to other files specified in schema "$ref" properties. A $ref value
25 of the current schema file's '$id' value. A URL is used even for local files,
28 $schema
29 Indicates the meta-schema the schema file adheres to.
32 A one line description on the contents of the binding schema.
35 A DT specific property. Contains a list of email address(es)
39 Optional. A multi-line text block containing any detailed
45 Optional. A json-schema used to match nodes for applying the
46 schema. By default without 'select', nodes are matched against their possible
55 A set of sub-schema defining all the DT properties for the
56 binding. The exact schema syntax depends on whether properties are known,
59 A property can also define a child DT node with child properties defined
62 For more details on properties sections, see 'Property Schema' section.
68 A list of DT properties from the 'properties' section that
77 Property Schema
78 ---------------
80 The 'properties' section of the schema contains all the DT properties for a
81 binding. Each property contains a set of constraints using json-schema
83 validation of DT files.
86 binding schema need to be defined such as how many values are valid or what
89 Vendor specific properties will typically need more detailed schema. With the
93 The Devicetree schemas don't exactly match the YAML encoded DT data produced by
95 boilerplate. The tools process the schema files to produce the final schema for
98 The default for arrays in json-schema is they are variable sized and allow more
109 -------
114 The DT schema project must be installed in order to validate the DT schema
115 binding documents and validate DTS files using the DT schema. The DT schema
118 pip3 install git+https://github.com/devicetree-org/dt-schema.git@master
120 Several executables (dt-doc-validate, dt-mk-schema, dt-validate) will be
129 apt-get install libyaml-dev
133 dnf -y install libyaml-devel
138 The DT schema binding documents must be validated using the meta-schema (the
139 schema for the schema) to ensure they are both valid json-schema and valid
140 binding schema. All of the DT binding documents can be validated using the
145 In order to perform validation of DT source files, use the ``dtbs_check`` target::
149 Note that ``dtbs_check`` will skip any binding schema files with errors. It is
151 binding schema files.
157 It is also possible to run checks with a single schema file by setting the
158 ``DT_SCHEMA_FILES`` variable to a specific schema file.
162 make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/trivial-devices.yaml
163 make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/trivial-devices.yaml
166 json-schema Resources
167 ---------------------
170 `JSON-Schema Specifications <http://json-schema.org/>`_
172 `Using JSON Schema Book <http://usingjsonschema.com/>`_