1# Copyright (c) 2024 Jianxiong Gu <jianxiong.gu@outlook.com>
2# SPDX-License-Identifier: Apache-2.0
3
4description: |
5    The Richtek RT1715 is a Type-C Port Controller (TCPC) chip.
6
7    Example:
8
9    ports {
10        #address-cells = <1>;
11        #size-cells = <0>;
12        port0: usbc-port@0 {
13          compatible = "usb-c-connector";
14          reg = <0>;
15          tcpc = <&rt1715_tcpc0>;
16          vbus = <&vbus0>;
17          power-role = "sink";
18          sink-pdos = <PDO_FIXED(5000, 100, 0)>;
19        };
20    };
21
22    vbus0: vbus {
23      compatible = "zephyr,usb-c-vbus-adc";
24      status = "okay";
25      io-channels = <&adc 2>;
26      output-ohms = <10000>;
27      full-ohms = <(100000 + 10000)>;
28    };
29
30    i2c1 {
31      status = "okay";
32      clock-frequency = <I2C_BITRATE_FAST_PLUS>;
33      rt1715_tcpc0: rt1715@4e {
34        compatible = "richtek,rt1715";
35        reg = <0x4e>;
36        irq-gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
37        status = "okay";
38      };
39    };
40
41compatible: "richtek,rt1715"
42
43include: [base.yaml, pinctrl-device.yaml]
44
45properties:
46  reg:
47    required: true
48
49  irq-gpios:
50    type: phandle-array
51    required: true
52    description: |
53      Interrupt GPIO pin connected from the chip.
54
55  transmit-retries:
56    type: int
57    default: 2
58    description: |
59      Maximum number of packet retransmissions done by TCPC. Valid values are <0, 3>.
60      This value is used to fill the Retry Counter part of the TCPCI Transmit register.
61
62  vconn-ctrl-gpios:
63    type: phandle-array
64    description: |
65      GPIO pin for VCONN control. RT1715 does not have built-in VCONN power supply. If the
66      state of the VCONN power supply need to be toggled, this pin and a switchable power
67      supply are required.
68
69  vconn-disc-gpios:
70    type: phandle-array
71    description: |
72      GPIO pin for VCONN discharge control. RT1715 does not have VCONN discharge capability.
73      If VCONN discharge is not needed, this pin does not need to be defined in the device
74      tree. Otherwise, this pin and a discharge path are required.
75