GNU Linux-libre 6.1.90-gnu
[releases.git] / Documentation / devicetree / bindings / usb / analogix,anx7411.yaml
1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/usb/analogix,anx7411.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Analogix ANX7411 Type-C controller bindings
8
9 maintainers:
10   - Xin Ji <xji@analogixsemi.com>
11
12 properties:
13   compatible:
14     enum:
15       - analogix,anx7411
16
17   reg:
18     maxItems: 1
19
20   interrupts:
21     maxItems: 1
22
23   connector:
24     type: object
25     $ref: ../connector/usb-connector.yaml
26     unevaluatedProperties: false
27
28     description:
29       Properties for usb c connector.
30
31     properties:
32       compatible:
33         const: usb-c-connector
34
35       power-role: true
36
37       data-role: true
38
39       try-power-role: true
40
41     required:
42       - compatible
43
44 required:
45   - compatible
46   - reg
47   - connector
48
49 additionalProperties: false
50
51 examples:
52   - |
53     #include <dt-bindings/interrupt-controller/irq.h>
54     i2c {
55         #address-cells = <1>;
56         #size-cells = <0>;
57
58         typec@2c {
59             compatible = "analogix,anx7411";
60             reg = <0x2c>;
61             interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
62             interrupt-parent = <&gpio0>;
63
64             typec_con: connector {
65                 compatible = "usb-c-connector";
66                 power-role = "dual";
67                 data-role = "dual";
68                 try-power-role = "source";
69
70                 ports {
71                     #address-cells = <1>;
72                     #size-cells = <0>;
73                     port@0 {
74                         reg = <0>;
75                         typec_con_ep: endpoint {
76                             remote-endpoint = <&usbotg_hs_ep>;
77                         };
78                     };
79                 };
80             };
81         };
82     };
83 ...