xref: /linux/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml (revision ec8a42e7343234802b9054874fe01810880289ce)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2# Copyright (C) 2019 Renesas Electronics Corp.
3%YAML 1.2
4---
5$id: http://devicetree.org/schemas/media/i2c/maxim,max9286.yaml#
6$schema: http://devicetree.org/meta-schemas/core.yaml#
7
8title: Maxim Integrated Quad GMSL Deserializer
9
10maintainers:
11  - Jacopo Mondi <jacopo+renesas@jmondi.org>
12  - Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
13  - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
14  - Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
15
16description: |
17  The MAX9286 deserializer receives video data on up to 4 Gigabit Multimedia
18  Serial Links (GMSL) and outputs them on a CSI-2 D-PHY port using up to 4 data
19  lanes.
20
21  In addition to video data, the GMSL links carry a bidirectional control
22  channel that encapsulates I2C messages. The MAX9286 forwards all I2C traffic
23  not addressed to itself to the other side of the links, where a GMSL
24  serializer will output it on a local I2C bus. In the other direction all I2C
25  traffic received over GMSL by the MAX9286 is output on the local I2C bus.
26
27properties:
28  '#address-cells':
29    const: 1
30
31  '#size-cells':
32    const: 0
33
34  compatible:
35    const: maxim,max9286
36
37  reg:
38    description: I2C device address
39    maxItems: 1
40
41  poc-supply:
42    description: Regulator providing Power over Coax to the cameras
43
44  enable-gpios:
45    description: GPIO connected to the \#PWDN pin with inverted polarity
46    maxItems: 1
47
48  gpio-controller: true
49
50  '#gpio-cells':
51    const: 2
52
53  ports:
54    type: object
55    description: |
56      The connections to the MAX9286 GMSL and its endpoint nodes are modelled
57      using the OF graph bindings in accordance with the video interface
58      bindings defined in
59      Documentation/devicetree/bindings/media/video-interfaces.txt.
60
61      The following table lists the port number corresponding to each device
62      port.
63
64        Port            Description
65        ----------------------------------------
66        Port 0          GMSL Input 0
67        Port 1          GMSL Input 1
68        Port 2          GMSL Input 2
69        Port 3          GMSL Input 3
70        Port 4          CSI-2 Output
71
72    properties:
73      '#address-cells':
74        const: 1
75
76      '#size-cells':
77        const: 0
78
79      port@[0-3]:
80        type: object
81        properties:
82          reg:
83            enum: [ 0, 1, 2, 3 ]
84
85          endpoint:
86            type: object
87
88            properties:
89              remote-endpoint:
90                description: |
91                 phandle to the remote GMSL source endpoint subnode in the
92                 remote node port.
93
94            required:
95              - remote-endpoint
96
97        required:
98          - reg
99          - endpoint
100
101        additionalProperties: false
102
103      port@4:
104        type: object
105        properties:
106          reg:
107            const: 4
108
109          endpoint:
110            type: object
111
112            properties:
113              remote-endpoint:
114                description: phandle to the remote CSI-2 sink endpoint.
115
116              data-lanes:
117                description: array of physical CSI-2 data lane indexes.
118
119            required:
120              - remote-endpoint
121              - data-lanes
122
123        required:
124          - reg
125          - endpoint
126
127        additionalProperties: false
128
129    required:
130      - port@4
131
132  i2c-mux:
133    type: object
134    description: |
135      Each GMSL link is modelled as a child bus of an i2c bus
136      multiplexer/switch, in accordance with bindings described in
137      Documentation/devicetree/bindings/i2c/i2c-mux.txt.
138
139    properties:
140      '#address-cells':
141        const: 1
142
143      '#size-cells':
144        const: 0
145
146    patternProperties:
147      "^i2c@[0-3]$":
148        type: object
149        description: |
150          Child node of the i2c bus multiplexer which represents a GMSL link.
151          Each serializer device on the GMSL link remote end is represented with
152          an i2c-mux child node. The MAX9286 chip supports up to 4 GMSL
153          channels.
154
155        properties:
156          '#address-cells':
157            const: 1
158
159          '#size-cells':
160            const: 0
161
162          reg:
163            description: The index of the GMSL channel.
164            maxItems: 1
165
166        patternProperties:
167          "^camera@[a-f0-9]+$":
168            type: object
169            description: |
170              The remote camera device, composed by a GMSL serializer and a
171              connected video source.
172
173            properties:
174              compatible:
175                description: The remote device compatible string.
176
177              reg:
178                minItems: 2
179                maxItems: 3
180                description: |
181                  The I2C addresses to be assigned to the remote devices through
182                  address reprogramming. The number of entries depends on the
183                  requirements of the currently connected remote device.
184
185              port:
186                type: object
187
188                properties:
189                  endpoint:
190                    type: object
191
192                    properties:
193                      remote-endpoint:
194                        description: phandle to the MAX9286 sink endpoint.
195
196                    required:
197                      - remote-endpoint
198
199                    additionalProperties: false
200
201                required:
202                  - endpoint
203
204                additionalProperties: false
205
206            required:
207              - compatible
208              - reg
209              - port
210
211            additionalProperties: false
212
213        additionalProperties: false
214
215    additionalProperties: false
216
217required:
218  - compatible
219  - reg
220  - ports
221  - i2c-mux
222  - gpio-controller
223
224additionalProperties: false
225
226examples:
227  - |
228    #include <dt-bindings/gpio/gpio.h>
229
230    i2c@e66d8000 {
231      #address-cells = <1>;
232      #size-cells = <0>;
233
234      reg = <0 0xe66d8000>;
235
236      gmsl-deserializer@2c {
237        compatible = "maxim,max9286";
238        reg = <0x2c>;
239        poc-supply = <&camera_poc_12v>;
240        enable-gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
241
242        gpio-controller;
243        #gpio-cells = <2>;
244
245        ports {
246          #address-cells = <1>;
247          #size-cells = <0>;
248
249          port@0 {
250            reg = <0>;
251
252            max9286_in0: endpoint {
253              remote-endpoint = <&rdacm20_out0>;
254            };
255          };
256
257          port@1 {
258            reg = <1>;
259
260            max9286_in1: endpoint {
261              remote-endpoint = <&rdacm20_out1>;
262            };
263          };
264
265          port@2 {
266            reg = <2>;
267
268            max9286_in2: endpoint {
269              remote-endpoint = <&rdacm20_out2>;
270            };
271          };
272
273          port@3 {
274            reg = <3>;
275
276            max9286_in3: endpoint {
277              remote-endpoint = <&rdacm20_out3>;
278            };
279          };
280
281          port@4 {
282            reg = <4>;
283
284            max9286_out: endpoint {
285              data-lanes = <1 2 3 4>;
286              remote-endpoint = <&csi40_in>;
287            };
288          };
289        };
290
291        i2c-mux {
292          #address-cells = <1>;
293          #size-cells = <0>;
294
295          i2c@0 {
296            #address-cells = <1>;
297            #size-cells = <0>;
298            reg = <0>;
299
300            camera@51 {
301              compatible = "imi,rdacm20";
302              reg = <0x51>, <0x61>;
303
304              port {
305                rdacm20_out0: endpoint {
306                  remote-endpoint = <&max9286_in0>;
307                };
308              };
309
310            };
311          };
312
313          i2c@1 {
314            #address-cells = <1>;
315            #size-cells = <0>;
316            reg = <1>;
317
318            camera@52 {
319              compatible = "imi,rdacm20";
320              reg = <0x52>, <0x62>;
321
322              port {
323                rdacm20_out1: endpoint {
324                  remote-endpoint = <&max9286_in1>;
325                };
326              };
327            };
328          };
329
330          i2c@2 {
331            #address-cells = <1>;
332            #size-cells = <0>;
333            reg = <2>;
334
335            camera@53 {
336              compatible = "imi,rdacm20";
337              reg = <0x53>, <0x63>;
338
339              port {
340                rdacm20_out2: endpoint {
341                  remote-endpoint = <&max9286_in2>;
342                };
343              };
344            };
345          };
346
347          i2c@3 {
348            #address-cells = <1>;
349            #size-cells = <0>;
350            reg = <3>;
351
352            camera@54 {
353              compatible = "imi,rdacm20";
354              reg = <0x54>, <0x64>;
355
356              port {
357                rdacm20_out3: endpoint {
358                  remote-endpoint = <&max9286_in3>;
359                };
360              };
361            };
362          };
363        };
364      };
365    };
366