1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/display/bridge/lvds-codec.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Transparent LVDS encoders and decoders
8
9maintainers:
10  - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
11
12description: |
13  This binding supports transparent LVDS encoders and decoders that don't
14  require any configuration.
15
16  LVDS is a physical layer specification defined in ANSI/TIA/EIA-644-A. Multiple
17  incompatible data link layers have been used over time to transmit image data
18  to LVDS panels. This binding targets devices compatible with the following
19  specifications only.
20
21  [JEIDA] "Digital Interface Standards for Monitor", JEIDA-59-1999, February
22  1999 (Version 1.0), Japan Electronic Industry Development Association (JEIDA)
23  [LDI] "Open LVDS Display Interface", May 1999 (Version 0.95), National
24  Semiconductor
25  [VESA] "VESA Notebook Panel Standard", October 2007 (Version 1.0), Video
26  Electronics Standards Association (VESA)
27
28  Those devices have been marketed under the FPD-Link and FlatLink brand names
29  among others.
30
31properties:
32  compatible:
33    oneOf:
34      - items:
35          - enum:
36              - ti,ds90c185   # For the TI DS90C185 FPD-Link Serializer
37              - ti,ds90c187   # For the TI DS90C187 FPD-Link Serializer
38              - ti,sn75lvds83 # For the TI SN75LVDS83 FlatLink transmitter
39          - const: lvds-encoder # Generic LVDS encoder compatible fallback
40      - items:
41          - enum:
42              - ti,ds90cf384a # For the DS90CF384A FPD-Link LVDS Receiver
43          - const: lvds-decoder # Generic LVDS decoders compatible fallback
44      - enum:
45          - thine,thc63lvdm83d # For the THC63LVDM83D LVDS serializer
46
47  ports:
48    $ref: /schemas/graph.yaml#/properties/ports
49
50    properties:
51      port@0:
52        $ref: /schemas/graph.yaml#/$defs/port-base
53        description: |
54          For LVDS encoders, port 0 is the parallel input
55          For LVDS decoders, port 0 is the LVDS input
56
57        properties:
58          endpoint:
59            $ref: /schemas/media/video-interfaces.yaml#
60            unevaluatedProperties: false
61
62            properties:
63              data-mapping:
64                enum:
65                  - jeida-18
66                  - jeida-24
67                  - vesa-24
68                description: |
69                  The color signals mapping order. See details in
70                  Documentation/devicetree/bindings/display/panel/lvds.yaml
71
72      port@1:
73        $ref: /schemas/graph.yaml#/properties/port
74        description: |
75          For LVDS encoders, port 1 is the LVDS output
76          For LVDS decoders, port 1 is the parallel output
77
78    required:
79      - port@0
80      - port@1
81
82  pclk-sample:
83    description:
84      Data sampling on rising or falling edge.
85    enum:
86      - 0  # Falling edge
87      - 1  # Rising edge
88    default: 0
89
90  powerdown-gpios:
91    description:
92      The GPIO used to control the power down line of this device.
93    maxItems: 1
94
95  power-supply: true
96
97allOf:
98  - if:
99      not:
100        properties:
101          compatible:
102            contains:
103              const: lvds-decoder
104    then:
105      properties:
106        ports:
107          properties:
108            port@0:
109              properties:
110                endpoint:
111                  properties:
112                    data-mapping: false
113
114  - if:
115      not:
116        properties:
117          compatible:
118            contains:
119              const: lvds-encoder
120    then:
121      properties:
122        pclk-sample: false
123
124required:
125  - compatible
126  - ports
127
128additionalProperties: false
129
130
131examples:
132  - |
133    lvds-encoder {
134      compatible = "ti,ds90c185", "lvds-encoder";
135
136      ports {
137        #address-cells = <1>;
138        #size-cells = <0>;
139
140        port@0 {
141          reg = <0>;
142
143          lvds_enc_in: endpoint {
144            remote-endpoint = <&display_out_rgb>;
145          };
146        };
147
148        port@1 {
149          reg = <1>;
150
151          lvds_enc_out: endpoint {
152            remote-endpoint = <&lvds_panel_in>;
153          };
154        };
155      };
156    };
157
158  - |
159    lvds-decoder {
160      compatible = "ti,ds90cf384a", "lvds-decoder";
161
162      ports {
163        #address-cells = <1>;
164        #size-cells = <0>;
165
166        port@0 {
167          reg = <0>;
168
169          lvds_dec_in: endpoint {
170            remote-endpoint = <&display_out_lvds>;
171          };
172        };
173
174        port@1 {
175          reg = <1>;
176
177          lvds_dec_out: endpoint {
178            remote-endpoint = <&rgb_panel_in>;
179          };
180        };
181      };
182    };
183
184...
185