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
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#/$defs/port-base
57        unevaluatedProperties: false
58        description: |
59            DSI input port. The remote endpoint phandle should be a
60            reference to a valid DSI output endpoint node
61
62        properties:
63          endpoint:
64            $ref: /schemas/media/video-interfaces.yaml#
65            unevaluatedProperties: false
66
67            properties:
68              data-lanes:
69                description: array of physical DSI data lane indexes.
70                minItems: 1
71                items:
72                  - const: 1
73                  - const: 2
74                  - const: 3
75                  - const: 4
76
77      port@1:
78        $ref: /schemas/graph.yaml#/properties/port
79        description: |
80            DPI input/output port. The remote endpoint phandle should be a
81            reference to a valid DPI output or input endpoint node.
82
83      port@2:
84        $ref: /schemas/graph.yaml#/properties/port
85        description: |
86            eDP/DP output port. The remote endpoint phandle should be a
87            reference to a valid eDP panel input endpoint node. This port is
88            optional, treated as DP panel if not defined
89
90    oneOf:
91      - required:
92          - port@0
93      - required:
94          - port@1
95
96
97required:
98  - compatible
99  - reg
100  - clock-names
101  - clocks
102  - ports
103
104additionalProperties: false
105
106examples:
107  - |
108    #include <dt-bindings/gpio/gpio.h>
109
110    /* DPI input and eDP output */
111
112    i2c {
113        #address-cells = <1>;
114        #size-cells = <0>;
115
116        edp-bridge@68 {
117            compatible = "toshiba,tc358767";
118            reg = <0x68>;
119            shutdown-gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
120            reset-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;
121            clock-names = "ref";
122            clocks = <&edp_refclk>;
123
124            ports {
125                #address-cells = <1>;
126                #size-cells = <0>;
127
128                port@1 {
129                    reg = <1>;
130
131                    bridge_in_0: endpoint {
132                        remote-endpoint = <&dpi_out>;
133                    };
134                };
135
136                port@2 {
137                    reg = <2>;
138
139                    bridge_out: endpoint {
140                        remote-endpoint = <&panel_in>;
141                    };
142                };
143            };
144        };
145    };
146  - |
147    /* DPI input and DP output */
148
149    i2c {
150        #address-cells = <1>;
151        #size-cells = <0>;
152
153        edp-bridge@68 {
154            compatible = "toshiba,tc358767";
155            reg = <0x68>;
156            shutdown-gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
157            reset-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;
158            clock-names = "ref";
159            clocks = <&edp_refclk>;
160
161            ports {
162                #address-cells = <1>;
163                #size-cells = <0>;
164
165                port@1 {
166                    reg = <1>;
167
168                    bridge_in_1: endpoint {
169                        remote-endpoint = <&dpi_out>;
170                    };
171                };
172            };
173        };
174    };
175