1# SPDX-License-Identifier: GPL-2.0-only
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/display/bridge/ti,tfp410.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: TFP410 DPI to DVI encoder
8
9maintainers:
10  - Tomi Valkeinen <tomi.valkeinen@ti.com>
11  - Jyri Sarha <jsarha@ti.com>
12
13properties:
14  compatible:
15    const: ti,tfp410
16
17  reg:
18    description: I2C address of the device.
19    maxItems: 1
20
21  powerdown-gpios:
22    maxItems: 1
23
24  ti,deskew:
25    description:
26      Data de-skew value in 350ps increments, from 0 to 7, as configured
27      through the DK[3:1] pins. The de-skew multiplier is computed as
28      (DK[3:1] - 4), so it ranges from -4 to 3.
29    $ref: /schemas/types.yaml#/definitions/uint32
30    minimum: 0
31    maximum: 7
32
33  ports:
34    description:
35      A node containing input and output port nodes with endpoint
36      definitions as documented in
37      Documentation/devicetree/bindings/media/video-interfaces.txt
38    type: object
39
40    properties:
41      port@0:
42        description: DPI input port.
43        type: object
44
45        properties:
46          reg:
47            const: 0
48
49          endpoint:
50            type: object
51
52            properties:
53              pclk-sample:
54                description:
55                  Endpoint sampling edge.
56                enum:
57                  - 0  # Falling edge
58                  - 1  # Rising edge
59                default: 0
60
61              bus-width:
62                description:
63                  Endpoint bus width.
64                enum:
65                  - 12  # 12 data lines connected and dual-edge mode
66                  - 24  # 24 data lines connected and single-edge mode
67                default: 24
68
69      port@1:
70        description: DVI output port.
71        type: object
72
73        properties:
74          reg:
75            const: 1
76
77          endpoint:
78            type: object
79
80    required:
81      - port@0
82      - port@1
83
84required:
85  - compatible
86  - ports
87
88if:
89  required:
90    - reg
91then:
92  properties:
93    ti,deskew: false
94else:
95  required:
96    - ti,deskew
97
98additionalProperties: false
99
100examples:
101  - |
102    #include <dt-bindings/gpio/gpio.h>
103
104    tfp410: encoder {
105        compatible = "ti,tfp410";
106        powerdown-gpios = <&twl_gpio 2 GPIO_ACTIVE_LOW>;
107        ti,deskew = <3>;
108
109        ports {
110            #address-cells = <1>;
111            #size-cells = <0>;
112
113            port@0 {
114                reg = <0>;
115                tfp410_in: endpoint {
116                    pclk-sample = <1>;
117                    bus-width = <24>;
118                    remote-endpoint = <&dpi_out>;
119                };
120            };
121
122            port@1 {
123                reg = <1>;
124                tfp410_out: endpoint {
125                    remote-endpoint = <&dvi_connector_in>;
126                };
127            };
128        };
129    };
130
131...
132