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,ds90cf364a # For the DS90CF364A FPD-Link LVDS Receiver
43              - ti,ds90cf384a # For the DS90CF384A FPD-Link LVDS Receiver
44          - const: lvds-decoder # Generic LVDS decoders compatible fallback
45      - enum:
46          - thine,thc63lvdm83d # For the THC63LVDM83D LVDS serializer
47
48  ports:
49    $ref: /schemas/graph.yaml#/properties/ports
50
51    properties:
52      port@0:
53        $ref: /schemas/graph.yaml#/$defs/port-base
54        unevaluatedProperties: false
55        description: |
56          For LVDS encoders, port 0 is the parallel input
57          For LVDS decoders, port 0 is the LVDS input
58
59        properties:
60          endpoint:
61            $ref: /schemas/media/video-interfaces.yaml#
62            unevaluatedProperties: false
63
64            properties:
65              data-mapping:
66                enum:
67                  - jeida-18
68                  - jeida-24
69                  - vesa-24
70                description: |
71                  The color signals mapping order. See details in
72                  Documentation/devicetree/bindings/display/lvds.yaml
73
74      port@1:
75        $ref: /schemas/graph.yaml#/properties/port
76        description: |
77          For LVDS encoders, port 1 is the LVDS output
78          For LVDS decoders, port 1 is the parallel output
79
80    required:
81      - port@0
82      - port@1
83
84  pclk-sample:
85    description:
86      Data sampling on rising or falling edge.
87    enum:
88      - 0  # Falling edge
89      - 1  # Rising edge
90    default: 0
91
92  powerdown-gpios:
93    description:
94      The GPIO used to control the power down line of this device.
95    maxItems: 1
96
97  power-supply: true
98
99allOf:
100  - if:
101      not:
102        properties:
103          compatible:
104            contains:
105              const: lvds-decoder
106    then:
107      properties:
108        ports:
109          properties:
110            port@0:
111              properties:
112                endpoint:
113                  properties:
114                    data-mapping: false
115
116  - if:
117      not:
118        properties:
119          compatible:
120            contains:
121              const: lvds-encoder
122    then:
123      properties:
124        pclk-sample: false
125
126required:
127  - compatible
128  - ports
129
130additionalProperties: false
131
132
133examples:
134  - |
135    lvds-encoder {
136      compatible = "ti,ds90c185", "lvds-encoder";
137
138      ports {
139        #address-cells = <1>;
140        #size-cells = <0>;
141
142        port@0 {
143          reg = <0>;
144
145          lvds_enc_in: endpoint {
146            remote-endpoint = <&display_out_rgb>;
147          };
148        };
149
150        port@1 {
151          reg = <1>;
152
153          lvds_enc_out: endpoint {
154            remote-endpoint = <&lvds_panel_in>;
155          };
156        };
157      };
158    };
159
160  - |
161    lvds-decoder {
162      compatible = "ti,ds90cf384a", "lvds-decoder";
163
164      ports {
165        #address-cells = <1>;
166        #size-cells = <0>;
167
168        port@0 {
169          reg = <0>;
170
171          lvds_dec_in: endpoint {
172            remote-endpoint = <&display_out_lvds>;
173          };
174        };
175
176        port@1 {
177          reg = <1>;
178
179          lvds_dec_out: endpoint {
180            remote-endpoint = <&rgb_panel_in>;
181          };
182        };
183      };
184    };
185
186...
187