xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/usb/etek,et7303.yaml (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: "http://devicetree.org/schemas/usb/etek,et7303.yaml#"
5$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6
7title: Etek ET7303 Type-C Port controller DT bindings
8
9maintainers:
10  - Wang Jie <dave.wang@rock-chips.com>
11
12properties:
13  compatible:
14    const: etek,et7303
15
16  reg:
17    maxItems: 1
18
19  interrupts:
20    maxItems: 1
21
22  ports:
23    type: object
24    properties:
25      port@0:
26        type: object
27        description: TCPC connected to USB controller to support dual-role switch.
28
29    required:
30      - port@0
31
32  connector:
33    type: object
34    $ref: ../connector/usb-connector.yaml#
35    description:
36      Properties for usb c connector that attached to the tcpci chip.
37
38required:
39  - compatible
40  - reg
41  - interrupts
42  - connector
43
44additionalProperties: false
45
46examples:
47  - |
48    #include "dt-bindings/usb/pd.h"
49    i2c0 {
50      usbc0: et7303@4e {
51        compatible = "etek,et7303";
52        reg = <0x4e>;
53        interrupt-parent = <&gpio1>;
54        interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
55        pinctrl-names = "default";
56        pinctrl-0 = <&et7303_int>;
57        vbus-supply = <&vcc5v0_typec>;
58        status = "okay";
59
60        ports {
61          #address-cells = <1>;
62          #size-cells = <0>;
63
64          port@0 {
65            reg = <0>;
66            usbc0_role_sw: endpoint@0 {
67              remote-endpoint = <&dwc3_0_role_switch>;
68            };
69          };
70        };
71
72        usb_con: connector {
73          compatible = "usb-c-connector";
74          label = "USB-C";
75          data-role = "dual";
76          power-role = "dual";
77          try-power-role = "sink";
78          op-sink-microwatt = <1000000>;
79          sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
80          source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
81
82          ports {
83            #address-cells = <1>;
84            #size-cells = <0>;
85
86            port@0 {
87              reg = <0>;
88              usbc0_orien_sw: endpoint {
89                remote-endpoint = <&usbdp_phy0_orientation_switch>;
90              };
91            };
92          };
93        };
94      };
95    };
96...
97