Debian Codegraph @

dtschema/schemas/types.yaml

raw
1 # SPDX-License-Identifier: BSD-2-Clause
2 # Copyright 2018 Linaro Ltd.
3 $id: http://devicetree.org/schemas/types.yaml#
4 $schema: http://devicetree.org/meta-schemas/base.yaml#
5
6 title: Core devicetree property data types
7
8 description: Schema for core devicetree data types. Binding schema can reference
9 these types.
10
11 maintainers:
12 - Rob Herring <[email protected]>
13
14 select: true
15
16 definitions:
17 flag:
18 oneOf:
19 - type: boolean
20 const: true
21 - type: 'null'
22 non-unique-string-array:
23 type: array
24 items: { type: string }
25 minItems: 1
26 string-array:
27 allOf:
28 - $ref: "#/definitions/non-unique-string-array"
29 - uniqueItems: true
30 string:
31 allOf:
32 - $ref: "#/definitions/string-array"
33 - maxItems: 1
34 uint8:
35 type: integer
36 typeSize: 8
37 minimum: 0
38 maximum: 0xff
39 uint8-array:
40 type: array
41 minItems: 1
42 items:
43 $ref: "#/definitions/uint8"
44 uint8-matrix:
45 type: array
46 minItems: 1
47 items:
48 $ref: "#/definitions/uint8-array"
49
50 int8:
51 type: integer
52 typeSize: 8
53 minimum: -128
54 maximum: 127
55 int8-array:
56 type: array
57 minItems: 1
58 items:
59 $ref: "#/definitions/int8"
60 int8-matrix:
61 type: array
62 minItems: 1
63 items:
64 $ref: "#/definitions/int8-array"
65
66 uint16:
67 type: integer
68 typeSize: 16
69 minimum: 0
70 maximum: 0xffff
71 uint16-array:
72 type: array
73 minItems: 1
74 items:
75 $ref: "#/definitions/uint16"
76 uint16-matrix:
77 type: array
78 minItems: 1
79 items:
80 $ref: "#/definitions/uint16-array"
81
82 int16:
83 type: integer
84 typeSize: 16
85 minimum: -8192
86 maximum: 8191
87 int16-array:
88 type: array
89 minItems: 1
90 items:
91 $ref: "#/definitions/int16"
92 int16-matrix:
93 type: array
94 minItems: 1
95 items:
96 $ref: "#/definitions/int16-array"
97
98 uint32:
99 type: integer
100 typeSize: 32
101 minimum: 0
102 maximum: 0xffffffff
103 uint32-array:
104 type: array
105 minItems: 1
106 items:
107 $ref: "#/definitions/uint32"
108 uint32-matrix:
109 type: array
110 minItems: 1
111 items:
112 $ref: "#/definitions/uint32-array"
113
114 int32:
115 type: integer
116 minimum: -2147483648
117 maximum: 2147483647
118 int32-array:
119 type: array
120 minItems: 1
121 items:
122 $ref: "#/definitions/int32"
123 int32-matrix:
124 type: array
125 minItems: 1
126 items:
127 $ref: "#/definitions/int32-array"
128
129 int64:
130 type: integer
131 typeSize: 64
132 minimum: -9223372036854775808
133 maximum: 9223372036854775807
134 int64-array:
135 type: array
136 minItems: 1
137 items:
138 $ref: "#/definitions/int64"
139 int64-matrix:
140 type: array
141 minItems: 1
142 items:
143 $ref: "#/definitions/int64-array"
144
145 uint64:
146 type: integer
147 typeSize: 64
148 minimum: 0
149 maximum: 0xffffffffffffffff
150 uint64-array:
151 type: array
152 minItems: 1
153 items:
154 $ref: "#/definitions/uint64"
155 uint64-matrix:
156 type: array
157 minItems: 1
158 items:
159 $ref: "#/definitions/uint64-array"
160
161 phandle:
162 $ref: "#/definitions/phandle-array"
163 maxItems: 1
164 items:
165 maxItems: 1
166 phandle-array:
167 type: array
168 minItems: 1
169 items:
170 type: array
171 minItems: 1
172 items:
173 - oneOf:
174 - type: integer
175 minimum: 1
176 maximum: 0xffffffff
177 - type: integer
178 const: 0
179 additionalItems:
180 $ref: "#/definitions/uint32"
181
182 address:
183 $ref: "#/definitions/uint32-matrix"
184 items:
185 minItems: 1
186 maxItems: 5 # At most 3 address cells and 2 size cells