summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/phy/qcom,qcs615-qmp-usb3dp-phy.yaml
blob: 98397006fa62a4834efe18bd5d4d0bef1bc0cdfe (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/phy/qcom,qcs615-qmp-usb3dp-phy.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm QMP USB3-DP PHY controller (DP, QCS615)

maintainers:
  - Xiangxu Yin <xiangxu.yin@oss.qualcomm.com>

description:
  The QMP PHY controller supports physical layer functionality for both USB3
  and DisplayPort over USB-C. While it enables mode switching between USB3 and
  DisplayPort, but does not support combo mode.

properties:
  compatible:
    enum:
      - qcom,qcs615-qmp-usb3-dp-phy
      - qcom,shikra-qmp-usb3-dp-phy

  reg:
    maxItems: 1

  clocks:
    maxItems: 4

  clock-names:
    items:
      - const: aux
      - const: ref
      - const: cfg_ahb
      - const: pipe

  resets:
    minItems: 2
    maxItems: 3

  reset-names:
    minItems: 2
    items:
      - const: phy_phy
      - const: dp_phy
      - const: phy

  vdda-phy-supply: true

  vdda-pll-supply: true

  "#clock-cells":
    const: 1
    description:
      See include/dt-bindings/phy/phy-qcom-qmp.h

  "#phy-cells":
    const: 1
    description:
      See include/dt-bindings/phy/phy-qcom-qmp.h

  qcom,tcsr-reg:
    $ref: /schemas/types.yaml#/definitions/phandle-array
    items:
      - items:
          - description: phandle to TCSR hardware block
          - description: offset of the VLS CLAMP register
          - description: offset of the PHY mode register
    description: Clamp and PHY mode register present in the TCSR

  orientation-switch:
    description:
      Flag the PHY as possible handler of USB Type-C orientation switching
    type: boolean

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    properties:
      port@0:
        $ref: /schemas/graph.yaml#/properties/port
        description: Output endpoint of the PHY

      port@1:
        $ref: /schemas/graph.yaml#/properties/port
        description: Incoming endpoint from the USB controller

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - resets
  - reset-names
  - vdda-phy-supply
  - vdda-pll-supply
  - "#clock-cells"
  - "#phy-cells"
  - qcom,tcsr-reg

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,shikra-qmp-usb3-dp-phy
    then:
      properties:
        resets:
          minItems: 3
        reset-names:
          minItems: 3

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,qcs615-qmp-usb3-dp-phy
    then:
      properties:
        resets:
          maxItems: 2
        reset-names:
          maxItems: 2

examples:
  - |
    #include <dt-bindings/clock/qcom,qcs615-gcc.h>
    #include <dt-bindings/clock/qcom,rpmh.h>

    phy@88e8000 {
      compatible = "qcom,qcs615-qmp-usb3-dp-phy";
      reg = <0x88e8000 0x2000>;

      clocks = <&gcc GCC_USB2_SEC_PHY_AUX_CLK>,
               <&gcc GCC_USB3_SEC_CLKREF_CLK>,
               <&gcc GCC_AHB2PHY_WEST_CLK>,
               <&gcc GCC_USB2_SEC_PHY_PIPE_CLK>;
      clock-names = "aux",
                    "ref",
                    "cfg_ahb",
                    "pipe";

      resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>,
               <&gcc GCC_USB3_DP_PHY_SEC_BCR>;
      reset-names = "phy_phy",
                    "dp_phy";

      vdda-phy-supply = <&vreg_l5a>;
      vdda-pll-supply = <&vreg_l12a>;

      #clock-cells = <1>;
      #phy-cells = <1>;

      qcom,tcsr-reg = <&tcsr 0xbff0 0xb24c>;
    };