summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/media/i2c/adv7180.yaml
blob: e0084b272b25a194d4ad9c6414c78bd5116755f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/adv7180.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices ADV7180 analog video decoder family

maintainers:
  - Lars-Peter Clausen <lars@metafoo.de>

description:
  The adv7180 family devices are used to capture analog video to different
  digital interfaces like MIPI CSI-2 or parallel video.

properties:
  compatible:
    items:
      - enum:
        - adi,adv7180
        - adi,adv7180cp
        - adi,adv7180st
        - adi,adv7182
        - adi,adv7280
        - adi,adv7280-m
        - adi,adv7281
        - adi,adv7281-m
        - adi,adv7281-ma
        - adi,adv7282
        - adi,adv7282-m

  reg:
    maxItems: 1

  powerdown-gpios:
    maxItems: 1

  port:
    type: object
    description:
      A node containing a single endpoint as doucmented in
      Documentation/devicetree/bindings/media/video-interfaces.txt

  ports:
    type: object
    description:
      A node containing input and output port nodes with endpoint definitions
      as documented in
      Documentation/devicetree/bindings/media/video-interfaces.txt

additionalProperties: false

required:
  - compatible
  - reg

allOf:
  - if:
      properties:
        compatible:
          items:
            - enum:
              - adi,adv7180
              - adi,adv7182
              - adi,adv7280
              - adi,adv7280-m
              - adi,adv7281
              - adi,adv7281-m
              - adi,adv7281-ma
              - adi,adv7282
              - adi,adv7282-m
    then:
      required:
        - port

  - if:
      properties:
        compatible:
          contains:
            const: adi,adv7180cp
    then:
      properties:
        ports:
          properties:
            '#address-cells':
              const: 1
            '#size-cells':
              const: 0
            port@3:
              type: object
              description: Output port

          patternProperties:
            "^port@[0-2]$":
              type: object
              description: Input port

          required:
            - port@3

          additionalProperties: false

      required:
        - ports

  - if:
      properties:
        compatible:
          contains:
            const: adi,adv7180st
    then:
      properties:
        ports:
          properties:
            '#address-cells':
              const: 1
            '#size-cells':
              const: 0
            port@6:
              type: object
              description: Output port

          patternProperties:
            "^port@[0-5]$":
              type: object
              description: Input port

          required:
            - port@6

          additionalProperties: false

      required:
        - ports

examples:
  - |
    i2c {
            #address-cells = <1>;
            #size-cells = <0>;

            composite-in@20 {
                    compatible = "adi,adv7180";
                    reg = <0x20>;

                    port {
                            adv7180: endpoint {
                                    bus-width = <8>;
                                    remote-endpoint = <&vin1ep>;
                            };
                    };
            };

    };

  - |
    i2c {
            #address-cells = <1>;
            #size-cells = <0>;

            composite-in@20 {
                    compatible = "adi,adv7180cp";
                    reg = <0x20>;

                    ports {
                            #address-cells = <1>;
                            #size-cells = <0>;

                            port@0 {
                                    reg = <0>;
                                    adv7180_in: endpoint {
                                            remote-endpoint = <&composite_con_in>;
                                    };
                            };

                            port@3 {
                                    reg = <3>;
                                    adv7180_out: endpoint {
                                            remote-endpoint = <&vin4_in>;
                                    };
                            };
                    };
            };
    };