xref: /freebsd/sys/contrib/device-tree/Bindings/media/i2c/maxim,max96717.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1*0e8011faSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*0e8011faSEmmanuel Vadot# Copyright (C) 2024 Collabora Ltd.
3*0e8011faSEmmanuel Vadot%YAML 1.2
4*0e8011faSEmmanuel Vadot---
5*0e8011faSEmmanuel Vadot$id: http://devicetree.org/schemas/media/i2c/maxim,max96717.yaml#
6*0e8011faSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7*0e8011faSEmmanuel Vadot
8*0e8011faSEmmanuel Vadottitle: MAX96717 CSI-2 to GMSL2 Serializer
9*0e8011faSEmmanuel Vadot
10*0e8011faSEmmanuel Vadotmaintainers:
11*0e8011faSEmmanuel Vadot  - Julien Massot <julien.massot@collabora.com>
12*0e8011faSEmmanuel Vadot
13*0e8011faSEmmanuel Vadotdescription:
14*0e8011faSEmmanuel Vadot  The MAX96717 serializer converts MIPI CSI-2 D-PHY formatted input
15*0e8011faSEmmanuel Vadot  into GMSL2 serial outputs. The device allows the GMSL2 link to
16*0e8011faSEmmanuel Vadot  simultaneously transmit bidirectional control-channel data while forward
17*0e8011faSEmmanuel Vadot  video transmissions are in progress. The MAX96717 can connect to one
18*0e8011faSEmmanuel Vadot  remotely located deserializer using industry-standard coax or STP
19*0e8011faSEmmanuel Vadot  interconnects. The device cans operate in pixel or tunnel mode. In pixel mode
20*0e8011faSEmmanuel Vadot  the MAX96717 can select the MIPI datatype, while the tunnel mode forward all the MIPI
21*0e8011faSEmmanuel Vadot  data received by the serializer.
22*0e8011faSEmmanuel Vadot  The MAX96717 supports Reference Over Reverse (channel),
23*0e8011faSEmmanuel Vadot  to generate a clock output for the sensor from the GMSL reverse channel.
24*0e8011faSEmmanuel Vadot
25*0e8011faSEmmanuel Vadot  The GMSL2 serial link operates at a fixed rate of 3Gbps or 6Gbps in the
26*0e8011faSEmmanuel Vadot  forward direction and 187.5Mbps in the reverse direction.
27*0e8011faSEmmanuel Vadot  MAX96717F only supports a fixed rate of 3Gbps in the forward direction.
28*0e8011faSEmmanuel Vadot
29*0e8011faSEmmanuel Vadotproperties:
30*0e8011faSEmmanuel Vadot  compatible:
31*0e8011faSEmmanuel Vadot    oneOf:
32*0e8011faSEmmanuel Vadot      - const: maxim,max96717f
33*0e8011faSEmmanuel Vadot      - items:
34*0e8011faSEmmanuel Vadot          - enum:
35*0e8011faSEmmanuel Vadot              - maxim,max96717
36*0e8011faSEmmanuel Vadot          - const: maxim,max96717f
37*0e8011faSEmmanuel Vadot
38*0e8011faSEmmanuel Vadot  '#gpio-cells':
39*0e8011faSEmmanuel Vadot    const: 2
40*0e8011faSEmmanuel Vadot    description:
41*0e8011faSEmmanuel Vadot      First cell is the GPIO pin number, second cell is the flags. The GPIO pin
42*0e8011faSEmmanuel Vadot      number must be in range of [0, 10].
43*0e8011faSEmmanuel Vadot
44*0e8011faSEmmanuel Vadot  gpio-controller: true
45*0e8011faSEmmanuel Vadot
46*0e8011faSEmmanuel Vadot  '#clock-cells':
47*0e8011faSEmmanuel Vadot    const: 0
48*0e8011faSEmmanuel Vadot
49*0e8011faSEmmanuel Vadot  reg:
50*0e8011faSEmmanuel Vadot    maxItems: 1
51*0e8011faSEmmanuel Vadot
52*0e8011faSEmmanuel Vadot  ports:
53*0e8011faSEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
54*0e8011faSEmmanuel Vadot
55*0e8011faSEmmanuel Vadot    properties:
56*0e8011faSEmmanuel Vadot      port@0:
57*0e8011faSEmmanuel Vadot        $ref: /schemas/graph.yaml#/$defs/port-base
58*0e8011faSEmmanuel Vadot        unevaluatedProperties: false
59*0e8011faSEmmanuel Vadot        description: CSI-2 Input port
60*0e8011faSEmmanuel Vadot
61*0e8011faSEmmanuel Vadot        properties:
62*0e8011faSEmmanuel Vadot          endpoint:
63*0e8011faSEmmanuel Vadot            $ref: /schemas/media/video-interfaces.yaml#
64*0e8011faSEmmanuel Vadot            unevaluatedProperties: false
65*0e8011faSEmmanuel Vadot
66*0e8011faSEmmanuel Vadot            properties:
67*0e8011faSEmmanuel Vadot              data-lanes:
68*0e8011faSEmmanuel Vadot                minItems: 1
69*0e8011faSEmmanuel Vadot                maxItems: 4
70*0e8011faSEmmanuel Vadot
71*0e8011faSEmmanuel Vadot              lane-polarities:
72*0e8011faSEmmanuel Vadot                minItems: 1
73*0e8011faSEmmanuel Vadot                maxItems: 5
74*0e8011faSEmmanuel Vadot
75*0e8011faSEmmanuel Vadot            required:
76*0e8011faSEmmanuel Vadot              - data-lanes
77*0e8011faSEmmanuel Vadot
78*0e8011faSEmmanuel Vadot      port@1:
79*0e8011faSEmmanuel Vadot        $ref: /schemas/graph.yaml#/properties/port
80*0e8011faSEmmanuel Vadot        unevaluatedProperties: false
81*0e8011faSEmmanuel Vadot        description: GMSL Output port
82*0e8011faSEmmanuel Vadot
83*0e8011faSEmmanuel Vadot    required:
84*0e8011faSEmmanuel Vadot      - port@1
85*0e8011faSEmmanuel Vadot
86*0e8011faSEmmanuel Vadot  i2c-gate:
87*0e8011faSEmmanuel Vadot    $ref: /schemas/i2c/i2c-gate.yaml
88*0e8011faSEmmanuel Vadot    unevaluatedProperties: false
89*0e8011faSEmmanuel Vadot    description:
90*0e8011faSEmmanuel Vadot      The MAX96717 will forward the I2C requests from the
91*0e8011faSEmmanuel Vadot      incoming GMSL2 link. Therefore, it supports an i2c-gate
92*0e8011faSEmmanuel Vadot      subnode to configure a sensor.
93*0e8011faSEmmanuel Vadot
94*0e8011faSEmmanuel Vadotrequired:
95*0e8011faSEmmanuel Vadot  - compatible
96*0e8011faSEmmanuel Vadot  - reg
97*0e8011faSEmmanuel Vadot  - ports
98*0e8011faSEmmanuel Vadot
99*0e8011faSEmmanuel VadotadditionalProperties: false
100*0e8011faSEmmanuel Vadot
101*0e8011faSEmmanuel Vadotexamples:
102*0e8011faSEmmanuel Vadot  - |
103*0e8011faSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
104*0e8011faSEmmanuel Vadot    #include <dt-bindings/media/video-interfaces.h>
105*0e8011faSEmmanuel Vadot
106*0e8011faSEmmanuel Vadot    i2c {
107*0e8011faSEmmanuel Vadot        #address-cells = <1>;
108*0e8011faSEmmanuel Vadot        #size-cells = <0>;
109*0e8011faSEmmanuel Vadot        serializer: serializer@40 {
110*0e8011faSEmmanuel Vadot            compatible = "maxim,max96717f";
111*0e8011faSEmmanuel Vadot            reg = <0x40>;
112*0e8011faSEmmanuel Vadot            gpio-controller;
113*0e8011faSEmmanuel Vadot            #gpio-cells = <2>;
114*0e8011faSEmmanuel Vadot            #clock-cells = <0>;
115*0e8011faSEmmanuel Vadot
116*0e8011faSEmmanuel Vadot            ports {
117*0e8011faSEmmanuel Vadot                #address-cells = <1>;
118*0e8011faSEmmanuel Vadot                #size-cells = <0>;
119*0e8011faSEmmanuel Vadot
120*0e8011faSEmmanuel Vadot                port@0 {
121*0e8011faSEmmanuel Vadot                    reg = <0>;
122*0e8011faSEmmanuel Vadot                    max96717f_csi_in: endpoint {
123*0e8011faSEmmanuel Vadot                        data-lanes = <1 2 3 4>;
124*0e8011faSEmmanuel Vadot                        remote-endpoint = <&sensor_out>;
125*0e8011faSEmmanuel Vadot                    };
126*0e8011faSEmmanuel Vadot                };
127*0e8011faSEmmanuel Vadot
128*0e8011faSEmmanuel Vadot                port@1 {
129*0e8011faSEmmanuel Vadot                    reg = <1>;
130*0e8011faSEmmanuel Vadot                    max96917f_gmsl_out: endpoint {
131*0e8011faSEmmanuel Vadot                        remote-endpoint = <&deser_gmsl_in>;
132*0e8011faSEmmanuel Vadot                    };
133*0e8011faSEmmanuel Vadot                };
134*0e8011faSEmmanuel Vadot            };
135*0e8011faSEmmanuel Vadot
136*0e8011faSEmmanuel Vadot            i2c-gate {
137*0e8011faSEmmanuel Vadot                #address-cells = <1>;
138*0e8011faSEmmanuel Vadot                #size-cells = <0>;
139*0e8011faSEmmanuel Vadot                sensor@10 {
140*0e8011faSEmmanuel Vadot                    compatible = "st,st-vgxy61";
141*0e8011faSEmmanuel Vadot                    reg = <0x10>;
142*0e8011faSEmmanuel Vadot                    reset-gpios = <&serializer 0 GPIO_ACTIVE_LOW>;
143*0e8011faSEmmanuel Vadot                    clocks = <&serializer>;
144*0e8011faSEmmanuel Vadot                    VCORE-supply = <&v1v2>;
145*0e8011faSEmmanuel Vadot                    VDDIO-supply = <&v1v8>;
146*0e8011faSEmmanuel Vadot                    VANA-supply = <&v2v8>;
147*0e8011faSEmmanuel Vadot                    port {
148*0e8011faSEmmanuel Vadot                        sensor_out: endpoint {
149*0e8011faSEmmanuel Vadot                            data-lanes = <1 2 3 4>;
150*0e8011faSEmmanuel Vadot                            remote-endpoint = <&max96717f_csi_in>;
151*0e8011faSEmmanuel Vadot                        };
152*0e8011faSEmmanuel Vadot                    };
153*0e8011faSEmmanuel Vadot                };
154*0e8011faSEmmanuel Vadot            };
155*0e8011faSEmmanuel Vadot        };
156*0e8011faSEmmanuel Vadot    };
157*0e8011faSEmmanuel Vadot...
158