1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/display/bridge/toshiba,tc358767.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Toshiba TC358767 eDP bridge bindings
8
9maintainers:
10  - Andrey Gusakov <andrey.gusakov@cogentembedded.com>
11
12description: The TC358767 is bridge device which converts DSI/DPI to eDP/DP
13
14properties:
15  compatible:
16    const: toshiba,tc358767
17
18  reg:
19    enum:
20      - 0x68
21      - 0x0f
22    description: |
23        i2c address of the bridge, 0x68 or 0x0f, depending on bootstrap pins
24
25  clock-names:
26    const: "ref"
27
28  clocks:
29    maxItems: 1
30    description: |
31        OF device-tree clock specification for refclk input. The reference.
32        clock rate must be 13 MHz, 19.2 MHz, 26 MHz, or 38.4 MHz.
33
34  shutdown-gpios:
35    maxItems: 1
36    description: |
37        OF device-tree gpio specification for SD pin(active high shutdown input)
38
39  reset-gpios:
40    maxItems: 1
41    description: |
42        OF device-tree gpio specification for RSTX pin(active low system reset)
43
44  toshiba,hpd-pin:
45    $ref: /schemas/types.yaml#/definitions/uint32
46    enum:
47      - 0
48      - 1
49    description: TC358767 GPIO pin number to which HPD is connected to (0 or 1)
50
51  ports:
52    $ref: /schemas/graph.yaml#/properties/ports
53
54    properties:
55      port@0:
56        $ref: /schemas/graph.yaml#/properties/port
57        description: |
58            DSI input port. The remote endpoint phandle should be a
59            reference to a valid DSI output endpoint node
60
61      port@1:
62        $ref: /schemas/graph.yaml#/properties/port
63        description: |
64            DPI input port. The remote endpoint phandle should be a
65            reference to a valid DPI output endpoint node
66
67      port@2:
68        $ref: /schemas/graph.yaml#/properties/port
69        description: |
70            eDP/DP output port. The remote endpoint phandle should be a
71            reference to a valid eDP panel input endpoint node. This port is
72            optional, treated as DP panel if not defined
73
74    oneOf:
75      - required:
76          - port@0
77      - required:
78          - port@1
79
80
81required:
82  - compatible
83  - reg
84  - clock-names
85  - clocks
86  - ports
87
88additionalProperties: false
89
90examples:
91  - |
92    #include <dt-bindings/gpio/gpio.h>
93
94    /* DPI input and eDP output */
95
96    i2c {
97        #address-cells = <1>;
98        #size-cells = <0>;
99
100        edp-bridge@68 {
101            compatible = "toshiba,tc358767";
102            reg = <0x68>;
103            shutdown-gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
104            reset-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;
105            clock-names = "ref";
106            clocks = <&edp_refclk>;
107
108            ports {
109                #address-cells = <1>;
110                #size-cells = <0>;
111
112                port@1 {
113                    reg = <1>;
114
115                    bridge_in_0: endpoint {
116                        remote-endpoint = <&dpi_out>;
117                    };
118                };
119
120                port@2 {
121                    reg = <2>;
122
123                    bridge_out: endpoint {
124                        remote-endpoint = <&panel_in>;
125                    };
126                };
127            };
128        };
129    };
130  - |
131    /* DPI input and DP output */
132
133    i2c {
134        #address-cells = <1>;
135        #size-cells = <0>;
136
137        edp-bridge@68 {
138            compatible = "toshiba,tc358767";
139            reg = <0x68>;
140            shutdown-gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
141            reset-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;
142            clock-names = "ref";
143            clocks = <&edp_refclk>;
144
145            ports {
146                #address-cells = <1>;
147                #size-cells = <0>;
148
149                port@1 {
150                    reg = <1>;
151
152                    bridge_in_1: endpoint {
153                        remote-endpoint = <&dpi_out>;
154                    };
155                };
156            };
157        };
158    };
159