WIP FPC-III support
[linux/fpc-iii.git] / Documentation / devicetree / bindings / media / i2c / maxim,max9286.yaml
blob68ee8c7d9e79d1dedce31456bc97c415ead67dbe
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#
8 title: Maxim Integrated Quad GMSL Deserializer
10 maintainers:
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>
16 description: |
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.
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.
27 properties:
28   '#address-cells':
29     const: 1
31   '#size-cells':
32     const: 0
34   compatible:
35     const: maxim,max9286
37   reg:
38     description: I2C device address
39     maxItems: 1
41   poc-supply:
42     description: Regulator providing Power over Coax to the cameras
44   enable-gpios:
45     description: GPIO connected to the \#PWDN pin with inverted polarity
46     maxItems: 1
48   gpio-controller: true
50   '#gpio-cells':
51     const: 2
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.
61       The following table lists the port number corresponding to each device
62       port.
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
72     properties:
73       '#address-cells':
74         const: 1
76       '#size-cells':
77         const: 0
79       port@[0-3]:
80         type: object
81         properties:
82           reg:
83             enum: [ 0, 1, 2, 3 ]
85           endpoint:
86             type: object
88             properties:
89               remote-endpoint:
90                 description: |
91                  phandle to the remote GMSL source endpoint subnode in the
92                  remote node port.
94             required:
95               - remote-endpoint
97         required:
98           - reg
99           - endpoint
101         additionalProperties: false
103       port@4:
104         type: object
105         properties:
106           reg:
107             const: 4
109           endpoint:
110             type: object
112             properties:
113               remote-endpoint:
114                 description: phandle to the remote CSI-2 sink endpoint.
116               data-lanes:
117                 description: array of physical CSI-2 data lane indexes.
119             required:
120               - remote-endpoint
121               - data-lanes
123         required:
124           - reg
125           - endpoint
127         additionalProperties: false
129     required:
130       - port@4
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.
139     properties:
140       '#address-cells':
141         const: 1
143       '#size-cells':
144         const: 0
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.
155         properties:
156           '#address-cells':
157             const: 1
159           '#size-cells':
160             const: 0
162           reg:
163             description: The index of the GMSL channel.
164             maxItems: 1
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.
173             properties:
174               compatible:
175                 description: The remote device compatible string.
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.
185               port:
186                 type: object
188                 properties:
189                   endpoint:
190                     type: object
192                     properties:
193                       remote-endpoint:
194                         description: phandle to the MAX9286 sink endpoint.
196                     required:
197                       - remote-endpoint
199                     additionalProperties: false
201                 required:
202                   - endpoint
204                 additionalProperties: false
206             required:
207               - compatible
208               - reg
209               - port
211             additionalProperties: false
213         additionalProperties: false
215     additionalProperties: false
217 required:
218   - compatible
219   - reg
220   - ports
221   - i2c-mux
222   - gpio-controller
224 additionalProperties: false
226 examples:
227   - |
228     #include <dt-bindings/gpio/gpio.h>
230     i2c@e66d8000 {
231       #address-cells = <1>;
232       #size-cells = <0>;
234       reg = <0 0xe66d8000>;
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>;
242         gpio-controller;
243         #gpio-cells = <2>;
245         ports {
246           #address-cells = <1>;
247           #size-cells = <0>;
249           port@0 {
250             reg = <0>;
252             max9286_in0: endpoint {
253               remote-endpoint = <&rdacm20_out0>;
254             };
255           };
257           port@1 {
258             reg = <1>;
260             max9286_in1: endpoint {
261               remote-endpoint = <&rdacm20_out1>;
262             };
263           };
265           port@2 {
266             reg = <2>;
268             max9286_in2: endpoint {
269               remote-endpoint = <&rdacm20_out2>;
270             };
271           };
273           port@3 {
274             reg = <3>;
276             max9286_in3: endpoint {
277               remote-endpoint = <&rdacm20_out3>;
278             };
279           };
281           port@4 {
282             reg = <4>;
284             max9286_out: endpoint {
285               data-lanes = <1 2 3 4>;
286               remote-endpoint = <&csi40_in>;
287             };
288           };
289         };
291         i2c-mux {
292           #address-cells = <1>;
293           #size-cells = <0>;
295           i2c@0 {
296             #address-cells = <1>;
297             #size-cells = <0>;
298             reg = <0>;
300             camera@51 {
301               compatible = "imi,rdacm20";
302               reg = <0x51>, <0x61>;
304               port {
305                 rdacm20_out0: endpoint {
306                   remote-endpoint = <&max9286_in0>;
307                 };
308               };
310             };
311           };
313           i2c@1 {
314             #address-cells = <1>;
315             #size-cells = <0>;
316             reg = <1>;
318             camera@52 {
319               compatible = "imi,rdacm20";
320               reg = <0x52>, <0x62>;
322               port {
323                 rdacm20_out1: endpoint {
324                   remote-endpoint = <&max9286_in1>;
325                 };
326               };
327             };
328           };
330           i2c@2 {
331             #address-cells = <1>;
332             #size-cells = <0>;
333             reg = <2>;
335             camera@53 {
336               compatible = "imi,rdacm20";
337               reg = <0x53>, <0x63>;
339               port {
340                 rdacm20_out2: endpoint {
341                   remote-endpoint = <&max9286_in2>;
342                 };
343               };
344             };
345           };
347           i2c@3 {
348             #address-cells = <1>;
349             #size-cells = <0>;
350             reg = <3>;
352             camera@54 {
353               compatible = "imi,rdacm20";
354               reg = <0x54>, <0x64>;
356               port {
357                 rdacm20_out3: endpoint {
358                   remote-endpoint = <&max9286_in3>;
359                 };
360               };
361             };
362           };
363         };
364       };
365     };