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