Merge commit '81fd23e2b3ccf71c807e671444e8accaba98ca53' of https://git.pengutronix...
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / media / i2c / adv7180.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/media/i2c/adv7180.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Analog Devices ADV7180 analog video decoder family
8
9 maintainers:
10   - Lars-Peter Clausen <lars@metafoo.de>
11
12 description:
13   The adv7180 family devices are used to capture analog video to different
14   digital interfaces like MIPI CSI-2 or parallel video.
15
16 properties:
17   compatible:
18     items:
19       - enum:
20           - adi,adv7180
21           - adi,adv7180cp
22           - adi,adv7180st
23           - adi,adv7182
24           - adi,adv7280
25           - adi,adv7280-m
26           - adi,adv7281
27           - adi,adv7281-m
28           - adi,adv7281-ma
29           - adi,adv7282
30           - adi,adv7282-m
31
32   reg:
33     maxItems: 1
34
35   powerdown-gpios:
36     maxItems: 1
37
38   port:
39     $ref: /schemas/graph.yaml#/$defs/port-base
40     unevaluatedProperties: false
41
42     properties:
43       endpoint:
44         $ref: /schemas/media/video-interfaces.yaml#
45         unevaluatedProperties: false
46
47   ports: true
48
49 additionalProperties: false
50
51 required:
52   - compatible
53   - reg
54
55 allOf:
56   - if:
57       properties:
58         compatible:
59           enum:
60             - adi,adv7180
61             - adi,adv7182
62             - adi,adv7280
63             - adi,adv7280-m
64             - adi,adv7281
65             - adi,adv7281-m
66             - adi,adv7281-ma
67             - adi,adv7282
68             - adi,adv7282-m
69     then:
70       required:
71         - port
72
73   - if:
74       properties:
75         compatible:
76           contains:
77             const: adi,adv7180cp
78     then:
79       properties:
80         ports:
81           $ref: /schemas/graph.yaml#/properties/ports
82           properties:
83             port@3:
84               $ref: /schemas/graph.yaml#/properties/port
85               description: Output port
86
87           patternProperties:
88             "^port@[0-2]$":
89               $ref: /schemas/graph.yaml#/properties/port
90               description: Input port
91
92           required:
93             - port@3
94
95       required:
96         - ports
97
98   - if:
99       properties:
100         compatible:
101           contains:
102             const: adi,adv7180st
103     then:
104       properties:
105         ports:
106           $ref: /schemas/graph.yaml#/properties/ports
107           properties:
108             port@6:
109               $ref: /schemas/graph.yaml#/properties/port
110               description: Output port
111
112           patternProperties:
113             "^port@[0-5]$":
114               $ref: /schemas/graph.yaml#/properties/port
115               description: Input port
116
117           required:
118             - port@6
119
120       required:
121         - ports
122
123 examples:
124   - |
125     i2c {
126             #address-cells = <1>;
127             #size-cells = <0>;
128
129             composite-in@20 {
130                     compatible = "adi,adv7180";
131                     reg = <0x20>;
132
133                     port {
134                             adv7180: endpoint {
135                                     bus-width = <8>;
136                                     remote-endpoint = <&vin1ep>;
137                             };
138                     };
139             };
140
141     };
142
143   - |
144     i2c {
145             #address-cells = <1>;
146             #size-cells = <0>;
147
148             composite-in@20 {
149                     compatible = "adi,adv7180cp";
150                     reg = <0x20>;
151
152                     ports {
153                             #address-cells = <1>;
154                             #size-cells = <0>;
155
156                             port@0 {
157                                     reg = <0>;
158                                     adv7180_in: endpoint {
159                                             remote-endpoint = <&composite_con_in>;
160                                     };
161                             };
162
163                             port@3 {
164                                     reg = <3>;
165                                     adv7180_out: endpoint {
166                                             remote-endpoint = <&vin4_in>;
167                                     };
168                             };
169                     };
170             };
171     };