1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2# Copyright (C) 2019,2020 Lubomir Rintel <lkundrak@v3.sk>
3%YAML 1.2
4---
5$id: http://devicetree.org/schemas/display/bridge/chrontel,ch7033.yaml#
6$schema: http://devicetree.org/meta-schemas/core.yaml#
7
8title: Chrontel CH7033 Video Encoder Device Tree Bindings
9
10maintainers:
11  - Lubomir Rintel <lkundrak@v3.sk>
12
13properties:
14  compatible:
15    const: chrontel,ch7033
16
17  chrontel,byteswap:
18    $ref: /schemas/types.yaml#/definitions/uint8
19    enum:
20      - 0  # BYTE_SWAP_RGB
21      - 1  # BYTE_SWAP_RBG
22      - 2  # BYTE_SWAP_GRB
23      - 3  # BYTE_SWAP_GBR
24      - 4  # BYTE_SWAP_BRG
25      - 5  # BYTE_SWAP_BGR
26    description: |
27      Set the byteswap value of the bridge. This is optional and if not
28      set value of BYTE_SWAP_BGR is used.
29
30  reg:
31    maxItems: 1
32    description: I2C address of the device
33
34  ports:
35    $ref: /schemas/graph.yaml#/properties/ports
36
37    properties:
38      port@0:
39        $ref: /schemas/graph.yaml#/properties/port
40        description: |
41          Video port for RGB input.
42
43      port@1:
44        $ref: /schemas/graph.yaml#/properties/port
45        description: |
46          DVI port, should be connected to a node compatible with the
47          dvi-connector binding.
48
49    required:
50      - port@0
51      - port@1
52
53required:
54  - compatible
55  - reg
56  - ports
57
58additionalProperties: false
59
60examples:
61  - |
62    i2c {
63        #address-cells = <1>;
64        #size-cells = <0>;
65
66        vga-dvi-encoder@76 {
67            compatible = "chrontel,ch7033";
68            reg = <0x76>;
69
70            ports {
71                #address-cells = <1>;
72                #size-cells = <0>;
73
74                port@0 {
75                    reg = <0>;
76                    endpoint {
77                        remote-endpoint = <&lcd0_rgb_out>;
78                    };
79                };
80
81                port@1 {
82                    reg = <1>;
83                    endpoint {
84                        remote-endpoint = <&dvi_in>;
85                    };
86                };
87
88            };
89        };
90    };
91