xref: /freebsd/sys/contrib/device-tree/Bindings/media/i2c/adv7180.yaml (revision ebacd8013fe5f7fdf9f6a5b286f6680dd2891036)
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
7title: Analog Devices ADV7180 analog video decoder family
8
9maintainers:
10  - Lars-Peter Clausen <lars@metafoo.de>
11
12description:
13  The adv7180 family devices are used to capture analog video to different
14  digital interfaces like MIPI CSI-2 or parallel video.
15
16properties:
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  reset-gpios:
39    maxItems: 1
40
41  adv,force-bt656-4:
42    description:
43      Indicates that the output is a BT.656-4 compatible stream.
44    type: boolean
45
46  port:
47    $ref: /schemas/graph.yaml#/$defs/port-base
48    unevaluatedProperties: false
49
50    properties:
51      endpoint:
52        $ref: /schemas/media/video-interfaces.yaml#
53        unevaluatedProperties: false
54
55  ports: true
56
57additionalProperties: false
58
59required:
60  - compatible
61  - reg
62
63allOf:
64  - if:
65      properties:
66        compatible:
67          enum:
68            - adi,adv7180
69            - adi,adv7182
70            - adi,adv7280
71            - adi,adv7280-m
72            - adi,adv7281
73            - adi,adv7281-m
74            - adi,adv7281-ma
75            - adi,adv7282
76            - adi,adv7282-m
77    then:
78      required:
79        - port
80
81  - if:
82      properties:
83        compatible:
84          contains:
85            const: adi,adv7180cp
86    then:
87      properties:
88        ports:
89          $ref: /schemas/graph.yaml#/properties/ports
90          properties:
91            port@3:
92              $ref: /schemas/graph.yaml#/properties/port
93              description: Output port
94
95          patternProperties:
96            "^port@[0-2]$":
97              $ref: /schemas/graph.yaml#/properties/port
98              description: Input port
99
100          required:
101            - port@3
102
103      required:
104        - ports
105
106  - if:
107      properties:
108        compatible:
109          contains:
110            const: adi,adv7180st
111    then:
112      properties:
113        ports:
114          $ref: /schemas/graph.yaml#/properties/ports
115          properties:
116            port@6:
117              $ref: /schemas/graph.yaml#/properties/port
118              description: Output port
119
120          patternProperties:
121            "^port@[0-5]$":
122              $ref: /schemas/graph.yaml#/properties/port
123              description: Input port
124
125          required:
126            - port@6
127
128      required:
129        - ports
130
131examples:
132  - |
133    i2c {
134            #address-cells = <1>;
135            #size-cells = <0>;
136
137            composite-in@20 {
138                    compatible = "adi,adv7180";
139                    reg = <0x20>;
140
141                    port {
142                            adv7180: endpoint {
143                                    bus-width = <8>;
144                                    remote-endpoint = <&vin1ep>;
145                            };
146                    };
147            };
148
149    };
150
151  - |
152    i2c {
153            #address-cells = <1>;
154            #size-cells = <0>;
155
156            composite-in@20 {
157                    compatible = "adi,adv7180cp";
158                    reg = <0x20>;
159
160                    ports {
161                            #address-cells = <1>;
162                            #size-cells = <0>;
163
164                            port@0 {
165                                    reg = <0>;
166                                    adv7180_in: endpoint {
167                                            remote-endpoint = <&composite_con_in>;
168                                    };
169                            };
170
171                            port@3 {
172                                    reg = <3>;
173                                    adv7180_out: endpoint {
174                                            remote-endpoint = <&vin4_in>;
175                                    };
176                            };
177                    };
178            };
179    };
180