xref: /freebsd/sys/contrib/device-tree/Bindings/phy/qcom,qusb2-phy.yaml (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2c66ec88fSEmmanuel Vadot
3c66ec88fSEmmanuel Vadot%YAML 1.2
4c66ec88fSEmmanuel Vadot---
5fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/phy/qcom,qusb2-phy.yaml#
6fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7c66ec88fSEmmanuel Vadot
8c66ec88fSEmmanuel Vadottitle: Qualcomm QUSB2 phy controller
9c66ec88fSEmmanuel Vadot
10c66ec88fSEmmanuel Vadotmaintainers:
11d5b0e70fSEmmanuel Vadot  - Wesley Cheng <quic_wcheng@quicinc.com>
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadotdescription:
14c66ec88fSEmmanuel Vadot  QUSB2 controller supports LS/FS/HS usb connectivity on Qualcomm chipsets.
15c66ec88fSEmmanuel Vadot
16c66ec88fSEmmanuel Vadotproperties:
17c66ec88fSEmmanuel Vadot  compatible:
18c66ec88fSEmmanuel Vadot    oneOf:
19c66ec88fSEmmanuel Vadot      - items:
20c66ec88fSEmmanuel Vadot          - enum:
21*f126890aSEmmanuel Vadot              - qcom,ipq6018-qusb2-phy
22c66ec88fSEmmanuel Vadot              - qcom,ipq8074-qusb2-phy
23*f126890aSEmmanuel Vadot              - qcom,ipq9574-qusb2-phy
24c9ccf3a3SEmmanuel Vadot              - qcom,msm8953-qusb2-phy
25c66ec88fSEmmanuel Vadot              - qcom,msm8996-qusb2-phy
26c66ec88fSEmmanuel Vadot              - qcom,msm8998-qusb2-phy
278cc087a1SEmmanuel Vadot              - qcom,qcm2290-qusb2-phy
285def4c47SEmmanuel Vadot              - qcom,sdm660-qusb2-phy
295956d97fSEmmanuel Vadot              - qcom,sm4250-qusb2-phy
305956d97fSEmmanuel Vadot              - qcom,sm6115-qusb2-phy
31c66ec88fSEmmanuel Vadot      - items:
32c66ec88fSEmmanuel Vadot          - enum:
33c66ec88fSEmmanuel Vadot              - qcom,sc7180-qusb2-phy
347ef62cebSEmmanuel Vadot              - qcom,sdm670-qusb2-phy
35c66ec88fSEmmanuel Vadot              - qcom,sdm845-qusb2-phy
36e67e8565SEmmanuel Vadot              - qcom,sm6350-qusb2-phy
37c66ec88fSEmmanuel Vadot          - const: qcom,qusb2-v2-phy
38c66ec88fSEmmanuel Vadot  reg:
39c66ec88fSEmmanuel Vadot    maxItems: 1
40c66ec88fSEmmanuel Vadot
41c66ec88fSEmmanuel Vadot  "#phy-cells":
42c66ec88fSEmmanuel Vadot    const: 0
43c66ec88fSEmmanuel Vadot
44c66ec88fSEmmanuel Vadot  clocks:
45c66ec88fSEmmanuel Vadot    minItems: 2
46c66ec88fSEmmanuel Vadot    items:
47c66ec88fSEmmanuel Vadot      - description: phy config clock
48c66ec88fSEmmanuel Vadot      - description: 19.2 MHz ref clk
49c66ec88fSEmmanuel Vadot      - description: phy interface clock (Optional)
50c66ec88fSEmmanuel Vadot
51c66ec88fSEmmanuel Vadot  clock-names:
52c66ec88fSEmmanuel Vadot    minItems: 2
53c66ec88fSEmmanuel Vadot    items:
54c66ec88fSEmmanuel Vadot      - const: cfg_ahb
55c66ec88fSEmmanuel Vadot      - const: ref
56c66ec88fSEmmanuel Vadot      - const: iface
57c66ec88fSEmmanuel Vadot
588cc087a1SEmmanuel Vadot  vdd-supply:
598cc087a1SEmmanuel Vadot    description:
608cc087a1SEmmanuel Vadot      Phandle to 0.9V regulator supply to PHY digital circuit.
618cc087a1SEmmanuel Vadot
62c66ec88fSEmmanuel Vadot  vdda-pll-supply:
63c66ec88fSEmmanuel Vadot    description:
64c66ec88fSEmmanuel Vadot      Phandle to 1.8V regulator supply to PHY refclk pll block.
65c66ec88fSEmmanuel Vadot
66c66ec88fSEmmanuel Vadot  vdda-phy-dpdm-supply:
67c66ec88fSEmmanuel Vadot    description:
68c66ec88fSEmmanuel Vadot      Phandle to 3.1V regulator supply to Dp/Dm port signals.
69c66ec88fSEmmanuel Vadot
70c66ec88fSEmmanuel Vadot  resets:
71c66ec88fSEmmanuel Vadot    maxItems: 1
72c66ec88fSEmmanuel Vadot    description:
73c66ec88fSEmmanuel Vadot      Phandle to reset to phy block.
74c66ec88fSEmmanuel Vadot
75c66ec88fSEmmanuel Vadot  nvmem-cells:
76c66ec88fSEmmanuel Vadot    maxItems: 1
77c66ec88fSEmmanuel Vadot    description:
78c66ec88fSEmmanuel Vadot      Phandle to nvmem cell that contains 'HS Tx trim'
79c66ec88fSEmmanuel Vadot      tuning parameter value for qusb2 phy.
80c66ec88fSEmmanuel Vadot
81c66ec88fSEmmanuel Vadot  qcom,tcsr-syscon:
82c66ec88fSEmmanuel Vadot    description:
83c66ec88fSEmmanuel Vadot      Phandle to TCSR syscon register region.
84c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
85c66ec88fSEmmanuel Vadot
86c66ec88fSEmmanuel Vadot  qcom,imp-res-offset-value:
87c66ec88fSEmmanuel Vadot    description:
88c66ec88fSEmmanuel Vadot      It is a 6 bit value that specifies offset to be
89c66ec88fSEmmanuel Vadot      added to PHY refgen RESCODE via IMP_CTRL1 register. It is a PHY
90c66ec88fSEmmanuel Vadot      tuning parameter that may vary for different boards of same SOC.
91c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
92c66ec88fSEmmanuel Vadot    minimum: 0
93c66ec88fSEmmanuel Vadot    maximum: 63
94c66ec88fSEmmanuel Vadot    default: 0
95c66ec88fSEmmanuel Vadot
96c66ec88fSEmmanuel Vadot  qcom,bias-ctrl-value:
97c66ec88fSEmmanuel Vadot    description:
98c66ec88fSEmmanuel Vadot      It is a 6 bit value that specifies bias-ctrl-value. It is a PHY
99c66ec88fSEmmanuel Vadot      tuning parameter that may vary for different boards of same SOC.
100c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
101c66ec88fSEmmanuel Vadot    minimum: 0
102c66ec88fSEmmanuel Vadot    maximum: 63
103c66ec88fSEmmanuel Vadot    default: 32
104c66ec88fSEmmanuel Vadot
105c66ec88fSEmmanuel Vadot  qcom,charge-ctrl-value:
106c66ec88fSEmmanuel Vadot    description:
107c66ec88fSEmmanuel Vadot      It is a 2 bit value that specifies charge-ctrl-value. It is a PHY
108c66ec88fSEmmanuel Vadot      tuning parameter that may vary for different boards of same SOC.
109c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
110c66ec88fSEmmanuel Vadot    minimum: 0
111c66ec88fSEmmanuel Vadot    maximum: 3
112c66ec88fSEmmanuel Vadot    default: 0
113c66ec88fSEmmanuel Vadot
114c66ec88fSEmmanuel Vadot  qcom,hstx-trim-value:
115c66ec88fSEmmanuel Vadot    description:
116c66ec88fSEmmanuel Vadot      It is a 4 bit value that specifies tuning for HSTX
117c66ec88fSEmmanuel Vadot      output current.
118c66ec88fSEmmanuel Vadot      Possible range is - 15mA to 24mA (stepsize of 600 uA).
119c66ec88fSEmmanuel Vadot      See dt-bindings/phy/phy-qcom-qusb2.h for applicable values.
120c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
121c66ec88fSEmmanuel Vadot    minimum: 0
122c66ec88fSEmmanuel Vadot    maximum: 15
123c66ec88fSEmmanuel Vadot    default: 3
124c66ec88fSEmmanuel Vadot
125c66ec88fSEmmanuel Vadot  qcom,preemphasis-level:
126c66ec88fSEmmanuel Vadot    description:
127c66ec88fSEmmanuel Vadot      It is a 2 bit value that specifies pre-emphasis level.
128c66ec88fSEmmanuel Vadot      Possible range is 0 to 15% (stepsize of 5%).
129c66ec88fSEmmanuel Vadot      See dt-bindings/phy/phy-qcom-qusb2.h for applicable values.
130c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
131c66ec88fSEmmanuel Vadot    minimum: 0
132c66ec88fSEmmanuel Vadot    maximum: 3
133c66ec88fSEmmanuel Vadot    default: 2
134c66ec88fSEmmanuel Vadot
135c66ec88fSEmmanuel Vadot  qcom,preemphasis-width:
136c66ec88fSEmmanuel Vadot    description:
137c66ec88fSEmmanuel Vadot      It is a 1 bit value that specifies how long the HSTX
138c66ec88fSEmmanuel Vadot      pre-emphasis (specified using qcom,preemphasis-level) must be in
139c66ec88fSEmmanuel Vadot      effect. Duration could be half-bit of full-bit.
140c66ec88fSEmmanuel Vadot      See dt-bindings/phy/phy-qcom-qusb2.h for applicable values.
141c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
142c66ec88fSEmmanuel Vadot    minimum: 0
143c66ec88fSEmmanuel Vadot    maximum: 1
144c66ec88fSEmmanuel Vadot    default: 0
145c66ec88fSEmmanuel Vadot
146c66ec88fSEmmanuel Vadot  qcom,hsdisc-trim-value:
147c66ec88fSEmmanuel Vadot    description:
148c66ec88fSEmmanuel Vadot      It is a 2 bit value tuning parameter that control disconnect
149c66ec88fSEmmanuel Vadot      threshold and may vary for different boards of same SOC.
150c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
151c66ec88fSEmmanuel Vadot    minimum: 0
152c66ec88fSEmmanuel Vadot    maximum: 3
153c66ec88fSEmmanuel Vadot    default: 0
154c66ec88fSEmmanuel Vadot
155c66ec88fSEmmanuel Vadotrequired:
156c66ec88fSEmmanuel Vadot  - compatible
157c66ec88fSEmmanuel Vadot  - reg
158c66ec88fSEmmanuel Vadot  - "#phy-cells"
159c66ec88fSEmmanuel Vadot  - clocks
160c66ec88fSEmmanuel Vadot  - clock-names
1618cc087a1SEmmanuel Vadot  - vdd-supply
162c66ec88fSEmmanuel Vadot  - vdda-pll-supply
163c66ec88fSEmmanuel Vadot  - vdda-phy-dpdm-supply
164c66ec88fSEmmanuel Vadot  - resets
165c66ec88fSEmmanuel Vadot
166cb7aa33aSEmmanuel VadotallOf:
167cb7aa33aSEmmanuel Vadot  - if:
168cb7aa33aSEmmanuel Vadot      not:
169cb7aa33aSEmmanuel Vadot        properties:
170cb7aa33aSEmmanuel Vadot          compatible:
171cb7aa33aSEmmanuel Vadot            contains:
172cb7aa33aSEmmanuel Vadot              const: qcom,qusb2-v2-phy
173cb7aa33aSEmmanuel Vadot    then:
174cb7aa33aSEmmanuel Vadot      properties:
175cb7aa33aSEmmanuel Vadot        qcom,imp-res-offset-value: false
176cb7aa33aSEmmanuel Vadot        qcom,bias-ctrl-value: false
177cb7aa33aSEmmanuel Vadot        qcom,charge-ctrl-value: false
178cb7aa33aSEmmanuel Vadot        qcom,hstx-trim-value: false
179cb7aa33aSEmmanuel Vadot        qcom,preemphasis-level: false
180cb7aa33aSEmmanuel Vadot        qcom,preemphasis-width: false
181cb7aa33aSEmmanuel Vadot        qcom,hsdisc-trim-value: false
182cb7aa33aSEmmanuel Vadot
1836be33864SEmmanuel VadotadditionalProperties: false
184c66ec88fSEmmanuel Vadot
185c66ec88fSEmmanuel Vadotexamples:
186c66ec88fSEmmanuel Vadot  - |
187c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/qcom,gcc-msm8996.h>
188c66ec88fSEmmanuel Vadot    hsusb_phy: phy@7411000 {
189c66ec88fSEmmanuel Vadot        compatible = "qcom,msm8996-qusb2-phy";
190c66ec88fSEmmanuel Vadot        reg = <0x7411000 0x180>;
191c66ec88fSEmmanuel Vadot        #phy-cells = <0>;
192c66ec88fSEmmanuel Vadot
193c66ec88fSEmmanuel Vadot        clocks = <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
194c66ec88fSEmmanuel Vadot                 <&gcc GCC_RX1_USB2_CLKREF_CLK>;
195c66ec88fSEmmanuel Vadot        clock-names = "cfg_ahb", "ref";
196c66ec88fSEmmanuel Vadot
1978cc087a1SEmmanuel Vadot        vdd-supply = <&pm8994_l28>;
198c66ec88fSEmmanuel Vadot        vdda-pll-supply = <&pm8994_l12>;
199c66ec88fSEmmanuel Vadot        vdda-phy-dpdm-supply = <&pm8994_l24>;
200c66ec88fSEmmanuel Vadot
201c66ec88fSEmmanuel Vadot        resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>;
202c66ec88fSEmmanuel Vadot        nvmem-cells = <&qusb2p_hstx_trim>;
203c66ec88fSEmmanuel Vadot    };
204