xref: /freebsd/sys/contrib/device-tree/Bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml (revision 01950c46b8155250f64374fb72fc11faa44bf099)
1*01950c46SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*01950c46SEmmanuel Vadot%YAML 1.2
3*01950c46SEmmanuel Vadot---
4*01950c46SEmmanuel Vadot$id: http://devicetree.org/schemas/phy/qcom,msm8998-qmp-usb3-phy.yaml#
5*01950c46SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*01950c46SEmmanuel Vadot
7*01950c46SEmmanuel Vadottitle: Qualcomm QMP PHY controller (USB, MSM8998)
8*01950c46SEmmanuel Vadot
9*01950c46SEmmanuel Vadotmaintainers:
10*01950c46SEmmanuel Vadot  - Vinod Koul <vkoul@kernel.org>
11*01950c46SEmmanuel Vadot
12*01950c46SEmmanuel Vadotdescription:
13*01950c46SEmmanuel Vadot  The QMP PHY controller supports physical layer functionality for USB-C on
14*01950c46SEmmanuel Vadot  several Qualcomm chipsets.
15*01950c46SEmmanuel Vadot
16*01950c46SEmmanuel Vadotproperties:
17*01950c46SEmmanuel Vadot  compatible:
18*01950c46SEmmanuel Vadot    enum:
19*01950c46SEmmanuel Vadot      - qcom,msm8998-qmp-usb3-phy
20*01950c46SEmmanuel Vadot      - qcom,qcm2290-qmp-usb3-phy
21*01950c46SEmmanuel Vadot      - qcom,sdm660-qmp-usb3-phy
22*01950c46SEmmanuel Vadot      - qcom,sm6115-qmp-usb3-phy
23*01950c46SEmmanuel Vadot
24*01950c46SEmmanuel Vadot  reg:
25*01950c46SEmmanuel Vadot    maxItems: 1
26*01950c46SEmmanuel Vadot
27*01950c46SEmmanuel Vadot  clocks:
28*01950c46SEmmanuel Vadot    maxItems: 4
29*01950c46SEmmanuel Vadot
30*01950c46SEmmanuel Vadot  clock-names:
31*01950c46SEmmanuel Vadot    maxItems: 4
32*01950c46SEmmanuel Vadot
33*01950c46SEmmanuel Vadot  resets:
34*01950c46SEmmanuel Vadot    maxItems: 2
35*01950c46SEmmanuel Vadot
36*01950c46SEmmanuel Vadot  reset-names:
37*01950c46SEmmanuel Vadot    items:
38*01950c46SEmmanuel Vadot      - const: phy
39*01950c46SEmmanuel Vadot      - const: phy_phy
40*01950c46SEmmanuel Vadot
41*01950c46SEmmanuel Vadot  vdda-phy-supply: true
42*01950c46SEmmanuel Vadot
43*01950c46SEmmanuel Vadot  vdda-pll-supply: true
44*01950c46SEmmanuel Vadot
45*01950c46SEmmanuel Vadot  "#clock-cells":
46*01950c46SEmmanuel Vadot    const: 0
47*01950c46SEmmanuel Vadot
48*01950c46SEmmanuel Vadot  clock-output-names:
49*01950c46SEmmanuel Vadot    maxItems: 1
50*01950c46SEmmanuel Vadot
51*01950c46SEmmanuel Vadot  "#phy-cells":
52*01950c46SEmmanuel Vadot    const: 0
53*01950c46SEmmanuel Vadot
54*01950c46SEmmanuel Vadot  orientation-switch:
55*01950c46SEmmanuel Vadot    description:
56*01950c46SEmmanuel Vadot      Flag the PHY as possible handler of USB Type-C orientation switching
57*01950c46SEmmanuel Vadot    type: boolean
58*01950c46SEmmanuel Vadot
59*01950c46SEmmanuel Vadot  qcom,tcsr-reg:
60*01950c46SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
61*01950c46SEmmanuel Vadot    items:
62*01950c46SEmmanuel Vadot      - items:
63*01950c46SEmmanuel Vadot          - description: phandle to TCSR hardware block
64*01950c46SEmmanuel Vadot          - description: offset of the VLS CLAMP register
65*01950c46SEmmanuel Vadot    description: Clamp register present in the TCSR
66*01950c46SEmmanuel Vadot
67*01950c46SEmmanuel Vadot  ports:
68*01950c46SEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
69*01950c46SEmmanuel Vadot    properties:
70*01950c46SEmmanuel Vadot      port@0:
71*01950c46SEmmanuel Vadot        $ref: /schemas/graph.yaml#/properties/port
72*01950c46SEmmanuel Vadot        description: Output endpoint of the PHY
73*01950c46SEmmanuel Vadot
74*01950c46SEmmanuel Vadot      port@1:
75*01950c46SEmmanuel Vadot        $ref: /schemas/graph.yaml#/properties/port
76*01950c46SEmmanuel Vadot        description: Incoming endpoint from the USB controller
77*01950c46SEmmanuel Vadot
78*01950c46SEmmanuel Vadotrequired:
79*01950c46SEmmanuel Vadot  - compatible
80*01950c46SEmmanuel Vadot  - reg
81*01950c46SEmmanuel Vadot  - clocks
82*01950c46SEmmanuel Vadot  - clock-names
83*01950c46SEmmanuel Vadot  - resets
84*01950c46SEmmanuel Vadot  - reset-names
85*01950c46SEmmanuel Vadot  - vdda-phy-supply
86*01950c46SEmmanuel Vadot  - vdda-pll-supply
87*01950c46SEmmanuel Vadot  - "#clock-cells"
88*01950c46SEmmanuel Vadot  - clock-output-names
89*01950c46SEmmanuel Vadot  - "#phy-cells"
90*01950c46SEmmanuel Vadot  - qcom,tcsr-reg
91*01950c46SEmmanuel Vadot
92*01950c46SEmmanuel VadotallOf:
93*01950c46SEmmanuel Vadot  - if:
94*01950c46SEmmanuel Vadot      properties:
95*01950c46SEmmanuel Vadot        compatible:
96*01950c46SEmmanuel Vadot          contains:
97*01950c46SEmmanuel Vadot            enum:
98*01950c46SEmmanuel Vadot              - qcom,msm8998-qmp-usb3-phy
99*01950c46SEmmanuel Vadot              - qcom,sdm660-qmp-usb3-phy
100*01950c46SEmmanuel Vadot    then:
101*01950c46SEmmanuel Vadot      properties:
102*01950c46SEmmanuel Vadot        clocks:
103*01950c46SEmmanuel Vadot          maxItems: 4
104*01950c46SEmmanuel Vadot        clock-names:
105*01950c46SEmmanuel Vadot          items:
106*01950c46SEmmanuel Vadot            - const: aux
107*01950c46SEmmanuel Vadot            - const: ref
108*01950c46SEmmanuel Vadot            - const: cfg_ahb
109*01950c46SEmmanuel Vadot            - const: pipe
110*01950c46SEmmanuel Vadot
111*01950c46SEmmanuel Vadot  - if:
112*01950c46SEmmanuel Vadot      properties:
113*01950c46SEmmanuel Vadot        compatible:
114*01950c46SEmmanuel Vadot          contains:
115*01950c46SEmmanuel Vadot            enum:
116*01950c46SEmmanuel Vadot              - qcom,qcm2290-qmp-usb3-phy
117*01950c46SEmmanuel Vadot              - qcom,sm6115-qmp-usb3-phy
118*01950c46SEmmanuel Vadot    then:
119*01950c46SEmmanuel Vadot      properties:
120*01950c46SEmmanuel Vadot        clocks:
121*01950c46SEmmanuel Vadot          maxItems: 4
122*01950c46SEmmanuel Vadot        clock-names:
123*01950c46SEmmanuel Vadot          items:
124*01950c46SEmmanuel Vadot            - const: cfg_ahb
125*01950c46SEmmanuel Vadot            - const: ref
126*01950c46SEmmanuel Vadot            - const: com_aux
127*01950c46SEmmanuel Vadot            - const: pipe
128*01950c46SEmmanuel Vadot
129*01950c46SEmmanuel VadotadditionalProperties: false
130*01950c46SEmmanuel Vadot
131*01950c46SEmmanuel Vadotexamples:
132*01950c46SEmmanuel Vadot  - |
133*01950c46SEmmanuel Vadot    #include <dt-bindings/clock/qcom,gcc-msm8998.h>
134*01950c46SEmmanuel Vadot    #include <dt-bindings/clock/qcom,rpmh.h>
135*01950c46SEmmanuel Vadot
136*01950c46SEmmanuel Vadot    phy@c010000 {
137*01950c46SEmmanuel Vadot      compatible = "qcom,msm8998-qmp-usb3-phy";
138*01950c46SEmmanuel Vadot      reg = <0x0c010000 0x1000>;
139*01950c46SEmmanuel Vadot
140*01950c46SEmmanuel Vadot      clocks = <&gcc GCC_USB3_PHY_AUX_CLK>,
141*01950c46SEmmanuel Vadot               <&gcc GCC_USB3_CLKREF_CLK>,
142*01950c46SEmmanuel Vadot               <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
143*01950c46SEmmanuel Vadot               <&gcc GCC_USB3_PHY_PIPE_CLK>;
144*01950c46SEmmanuel Vadot      clock-names = "aux",
145*01950c46SEmmanuel Vadot                    "ref",
146*01950c46SEmmanuel Vadot                    "cfg_ahb",
147*01950c46SEmmanuel Vadot                    "pipe";
148*01950c46SEmmanuel Vadot      clock-output-names = "usb3_phy_pipe_clk_src";
149*01950c46SEmmanuel Vadot      #clock-cells = <0>;
150*01950c46SEmmanuel Vadot      #phy-cells = <0>;
151*01950c46SEmmanuel Vadot
152*01950c46SEmmanuel Vadot      resets = <&gcc GCC_USB3_PHY_BCR>,
153*01950c46SEmmanuel Vadot               <&gcc GCC_USB3PHY_PHY_BCR>;
154*01950c46SEmmanuel Vadot      reset-names = "phy",
155*01950c46SEmmanuel Vadot                    "phy_phy";
156*01950c46SEmmanuel Vadot
157*01950c46SEmmanuel Vadot      vdda-phy-supply = <&vreg_l1a_0p875>;
158*01950c46SEmmanuel Vadot      vdda-pll-supply = <&vreg_l2a_1p2>;
159*01950c46SEmmanuel Vadot
160*01950c46SEmmanuel Vadot      orientation-switch;
161*01950c46SEmmanuel Vadot
162*01950c46SEmmanuel Vadot      qcom,tcsr-reg = <&tcsr_regs_1 0x6b244>;
163*01950c46SEmmanuel Vadot
164*01950c46SEmmanuel Vadot      ports {
165*01950c46SEmmanuel Vadot        #address-cells = <1>;
166*01950c46SEmmanuel Vadot        #size-cells = <0>;
167*01950c46SEmmanuel Vadot
168*01950c46SEmmanuel Vadot        port@0 {
169*01950c46SEmmanuel Vadot          reg = <0>;
170*01950c46SEmmanuel Vadot
171*01950c46SEmmanuel Vadot          endpoint {
172*01950c46SEmmanuel Vadot            remote-endpoint = <&pmic_typec_mux_in>;
173*01950c46SEmmanuel Vadot          };
174*01950c46SEmmanuel Vadot        };
175*01950c46SEmmanuel Vadot
176*01950c46SEmmanuel Vadot        port@1 {
177*01950c46SEmmanuel Vadot          reg = <1>;
178*01950c46SEmmanuel Vadot
179*01950c46SEmmanuel Vadot          endpoint {
180*01950c46SEmmanuel Vadot            remote-endpoint = <&usb_dwc3_ss>;
181*01950c46SEmmanuel Vadot          };
182*01950c46SEmmanuel Vadot        };
183*01950c46SEmmanuel Vadot      };
184*01950c46SEmmanuel Vadot    };
185