summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/usb/realtek,rtd-type-c.yaml
blob: 6142b0b5b5343e6920916d3d146b806498a94504 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright 2023 Realtek Semiconductor Corporation
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/realtek,rtd-type-c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Realtek DHC RTD SoCs USB Type-C Connector detection

maintainers:
  - Stanley Chang <stanley_chang@realtek.com>

description:
  Realtek digital home center (DHC) RTD series SoCs include a type c module.
  This module is able to detect the state of type c connector.

properties:
  compatible:
    enum:
      - realtek,rtd1295-type-c
      - realtek,rtd1312c-type-c
      - realtek,rtd1315e-type-c
      - realtek,rtd1319-type-c
      - realtek,rtd1319d-type-c
      - realtek,rtd1395-type-c
      - realtek,rtd1619-type-c
      - realtek,rtd1619b-type-c

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  nvmem-cell-names:
    items:
      - const: usb-cal

  nvmem-cells:
    maxItems: 1
    description:
      The phandle to nvmem cell that contains the trimming data.
      The type c parameter trimming data specified via efuse.
      If unspecified, default value is used.

  realtek,rd-ctrl-gpios:
    description: The gpio node to control external Rd on board.
    maxItems: 1

  connector:
    $ref: /schemas/connector/usb-connector.yaml#
    description: Properties for usb c connector.
    type: object

required:
  - compatible
  - reg
  - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>

    type-c@7220 {
        compatible = "realtek,rtd1619b-type-c";
        reg = <0x7220 0x20>;
        interrupts = <0 60 IRQ_TYPE_LEVEL_HIGH>;

        pinctrl-names = "default";
        pinctrl-0 = <&usb_cc1_pins>, <&usb_cc2_pins>;
        nvmem-cells = <&otp_usb_cal>;
        nvmem-cell-names = "usb-cal";

        connector {
            compatible = "usb-c-connector";
            label = "USB-C";
            data-role = "dual";
            power-role = "dual";
        };
    };