Merge tag 'v5.9' into next
[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     type: object
40     description:
41       A node containing a single endpoint as doucmented in
42       Documentation/devicetree/bindings/media/video-interfaces.txt
43
44   ports:
45     type: object
46     description:
47       A node containing input and output port nodes with endpoint definitions
48       as documented in
49       Documentation/devicetree/bindings/media/video-interfaces.txt
50
51 additionalProperties: false
52
53 required:
54   - compatible
55   - reg
56
57 allOf:
58   - if:
59       properties:
60         compatible:
61           enum:
62             - adi,adv7180
63             - adi,adv7182
64             - adi,adv7280
65             - adi,adv7280-m
66             - adi,adv7281
67             - adi,adv7281-m
68             - adi,adv7281-ma
69             - adi,adv7282
70             - adi,adv7282-m
71     then:
72       required:
73         - port
74
75   - if:
76       properties:
77         compatible:
78           contains:
79             const: adi,adv7180cp
80     then:
81       properties:
82         ports:
83           properties:
84             '#address-cells':
85               const: 1
86             '#size-cells':
87               const: 0
88             port@3:
89               type: object
90               description: Output port
91
92           patternProperties:
93             "^port@[0-2]$":
94               type: object
95               description: Input port
96
97           required:
98             - port@3
99
100           additionalProperties: false
101
102       required:
103         - ports
104
105   - if:
106       properties:
107         compatible:
108           contains:
109             const: adi,adv7180st
110     then:
111       properties:
112         ports:
113           properties:
114             '#address-cells':
115               const: 1
116             '#size-cells':
117               const: 0
118             port@6:
119               type: object
120               description: Output port
121
122           patternProperties:
123             "^port@[0-5]$":
124               type: object
125               description: Input port
126
127           required:
128             - port@6
129
130           additionalProperties: false
131
132       required:
133         - ports
134
135 examples:
136   - |
137     i2c {
138             #address-cells = <1>;
139             #size-cells = <0>;
140
141             composite-in@20 {
142                     compatible = "adi,adv7180";
143                     reg = <0x20>;
144
145                     port {
146                             adv7180: endpoint {
147                                     bus-width = <8>;
148                                     remote-endpoint = <&vin1ep>;
149                             };
150                     };
151             };
152
153     };
154
155   - |
156     i2c {
157             #address-cells = <1>;
158             #size-cells = <0>;
159
160             composite-in@20 {
161                     compatible = "adi,adv7180cp";
162                     reg = <0x20>;
163
164                     ports {
165                             #address-cells = <1>;
166                             #size-cells = <0>;
167
168                             port@0 {
169                                     reg = <0>;
170                                     adv7180_in: endpoint {
171                                             remote-endpoint = <&composite_con_in>;
172                                     };
173                             };
174
175                             port@3 {
176                                     reg = <3>;
177                                     adv7180_out: endpoint {
178                                             remote-endpoint = <&vin4_in>;
179                                     };
180                             };
181                     };
182             };
183     };