xref: /linux/Documentation/devicetree/bindings/soc/mobileye/mobileye,eyeq5-olb.yaml (revision 9f3a2ba62c7226a6604b8aaeb92b5ff906fa4e6b)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/soc/mobileye/mobileye,eyeq5-olb.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Mobileye EyeQ SoC system controller
8
9maintainers:
10  - Grégory Clement <gregory.clement@bootlin.com>
11  - Théo Lebrun <theo.lebrun@bootlin.com>
12  - Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
13
14description:
15  OLB ("Other Logic Block") is a hardware block grouping smaller blocks. Clocks,
16  resets, pinctrl are being handled from here. EyeQ5 and EyeQ6L host a single
17  instance. EyeQ6H hosts seven instances.
18
19properties:
20  compatible:
21    items:
22      - enum:
23          - mobileye,eyeq5-olb
24          - mobileye,eyeq6l-olb
25          - mobileye,eyeq6h-acc-olb
26          - mobileye,eyeq6h-central-olb
27          - mobileye,eyeq6h-east-olb
28          - mobileye,eyeq6h-west-olb
29          - mobileye,eyeq6h-south-olb
30          - mobileye,eyeq6h-ddr0-olb
31          - mobileye,eyeq6h-ddr1-olb
32      - const: syscon
33
34  reg:
35    maxItems: 1
36
37  '#reset-cells':
38    description:
39      First cell is domain and optional if compatible has a single reset domain.
40      Second cell is reset index inside that domain.
41    enum: [ 1, 2 ]
42
43  '#clock-cells':
44    const: 1
45
46  clocks:
47    maxItems: 1
48    description:
49      Input parent clock to all PLLs. Expected to be the main crystal.
50
51  clock-names:
52    const: ref
53
54patternProperties:
55  '-pins?$':
56    type: object
57    description: Pin muxing configuration.
58    $ref: /schemas/pinctrl/pinmux-node.yaml#
59    additionalProperties: false
60    properties:
61      pins: true
62      function:
63        enum: [gpio,
64               # Bank A
65               timer0, timer1, timer2, timer5, uart0, uart1, can0, can1, spi0,
66               spi1, refclk0,
67               # Bank B
68               timer3, timer4, timer6, uart2, can2, spi2, spi3, mclk0]
69      bias-disable: true
70      bias-pull-down: true
71      bias-pull-up: true
72      drive-strength: true
73    required:
74      - pins
75      - function
76    allOf:
77      - if:
78          properties:
79            function:
80              const: gpio
81        then:
82          properties:
83            pins:
84              items: # PA0 - PA28, PB0 - PB22
85                pattern: '^(P(A|B)1?[0-9]|PA2[0-8]|PB2[0-2])$'
86      - if:
87          properties:
88            function:
89              const: timer0
90        then:
91          properties:
92            pins:
93              items:
94                enum: [PA0, PA1]
95      - if:
96          properties:
97            function:
98              const: timer1
99        then:
100          properties:
101            pins:
102              items:
103                enum: [PA2, PA3]
104      - if:
105          properties:
106            function:
107              const: timer2
108        then:
109          properties:
110            pins:
111              items:
112                enum: [PA4, PA5]
113      - if:
114          properties:
115            function:
116              const: timer5
117        then:
118          properties:
119            pins:
120              items:
121                enum: [PA6, PA7, PA8, PA9]
122      - if:
123          properties:
124            function:
125              const: uart0
126        then:
127          properties:
128            pins:
129              items:
130                enum: [PA10, PA11]
131      - if:
132          properties:
133            function:
134              const: uart1
135        then:
136          properties:
137            pins:
138              items:
139                enum: [PA12, PA13]
140      - if:
141          properties:
142            function:
143              const: can0
144        then:
145          properties:
146            pins:
147              items:
148                enum: [PA14, PA15]
149      - if:
150          properties:
151            function:
152              const: can1
153        then:
154          properties:
155            pins:
156              items:
157                enum: [PA16, PA17]
158      - if:
159          properties:
160            function:
161              const: spi0
162        then:
163          properties:
164            pins:
165              items:
166                enum: [PA18, PA19, PA20, PA21, PA22]
167      - if:
168          properties:
169            function:
170              const: spi1
171        then:
172          properties:
173            pins:
174              items:
175                enum: [PA23, PA24, PA25, PA26, PA27]
176      - if:
177          properties:
178            function:
179              const: refclk0
180        then:
181          properties:
182            pins:
183              items:
184                enum: [PA28]
185      - if:
186          properties:
187            function:
188              const: timer3
189        then:
190          properties:
191            pins:
192              items:
193                enum: [PB0, PB1]
194      - if:
195          properties:
196            function:
197              const: timer4
198        then:
199          properties:
200            pins:
201              items:
202                enum: [PB2, PB3]
203      - if:
204          properties:
205            function:
206              const: timer6
207        then:
208          properties:
209            pins:
210              items:
211                enum: [PB4, PB5, PB6, PB7]
212      - if:
213          properties:
214            function:
215              const: uart2
216        then:
217          properties:
218            pins:
219              items:
220                enum: [PB8, PB9]
221      - if:
222          properties:
223            function:
224              const: can2
225        then:
226          properties:
227            pins:
228              items:
229                enum: [PB10, PB11]
230      - if:
231          properties:
232            function:
233              const: spi2
234        then:
235          properties:
236            pins:
237              items:
238                enum: [PB12, PB13, PB14, PB15, PB16]
239      - if:
240          properties:
241            function:
242              const: spi3
243        then:
244          properties:
245            pins:
246              items:
247                enum: [PB17, PB18, PB19, PB20, PB21]
248      - if:
249          properties:
250            function:
251              const: mclk0
252        then:
253          properties:
254            pins:
255              items:
256                enum: [PB22]
257
258required:
259  - compatible
260  - reg
261  - '#clock-cells'
262  - clocks
263  - clock-names
264
265additionalProperties: false
266
267allOf:
268    # Compatibles exposing a single reset domain.
269  - if:
270      properties:
271        compatible:
272          contains:
273            enum:
274              - mobileye,eyeq6h-acc-olb
275              - mobileye,eyeq6h-east-olb
276              - mobileye,eyeq6h-west-olb
277    then:
278      properties:
279        '#reset-cells':
280          const: 1
281      required:
282        - '#reset-cells'
283
284    # Compatibles exposing two reset domains.
285  - if:
286      properties:
287        compatible:
288          contains:
289            enum:
290              - mobileye,eyeq5-olb
291              - mobileye,eyeq6l-olb
292    then:
293      properties:
294        '#reset-cells':
295          const: 2
296      required:
297        - '#reset-cells'
298
299    # Compatibles not exposing resets.
300  - if:
301      properties:
302        compatible:
303          contains:
304            enum:
305              - mobileye,eyeq6h-central-olb
306              - mobileye,eyeq6h-south-olb
307              - mobileye,eyeq6h-ddr0-olb
308              - mobileye,eyeq6h-ddr1-olb
309    then:
310      properties:
311        '#reset-cells': false
312
313    # Only EyeQ5 has pinctrl in OLB.
314  - if:
315      not:
316        properties:
317          compatible:
318            contains:
319              const: mobileye,eyeq5-olb
320    then:
321      patternProperties:
322        '-pins?$': false
323
324examples:
325  - |
326    soc {
327      #address-cells = <2>;
328      #size-cells = <2>;
329
330      system-controller@e00000 {
331        compatible = "mobileye,eyeq5-olb", "syscon";
332        reg = <0 0xe00000 0x0 0x400>;
333        #reset-cells = <2>;
334        #clock-cells = <1>;
335        clocks = <&xtal>;
336        clock-names = "ref";
337      };
338    };
339  - |
340    soc {
341      #address-cells = <2>;
342      #size-cells = <2>;
343
344      system-controller@d2003000 {
345        compatible = "mobileye,eyeq6h-acc-olb", "syscon";
346        reg = <0x0 0xd2003000 0x0 0x1000>;
347        #reset-cells = <1>;
348        #clock-cells = <1>;
349        clocks = <&xtal>;
350        clock-names = "ref";
351      };
352    };
353