18bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
28bab661aSEmmanuel Vadot
38bab661aSEmmanuel Vadot%YAML 1.2
48bab661aSEmmanuel Vadot---
58bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml#
68bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
78bab661aSEmmanuel Vadot
88bab661aSEmmanuel Vadottitle: Qualcomm QMP USB3 DP PHY controller (SC7180)
98bab661aSEmmanuel Vadot
108bab661aSEmmanuel Vadotdescription:
118bab661aSEmmanuel Vadot  The QMP PHY controller supports physical layer functionality for a number of
128bab661aSEmmanuel Vadot  controllers on Qualcomm chipsets, such as, PCIe, UFS and USB.
138bab661aSEmmanuel Vadot
148bab661aSEmmanuel Vadot  Note that these bindings are for SoCs up to SC8180X. For newer SoCs, see
158bab661aSEmmanuel Vadot  qcom,sc8280xp-qmp-usb43dp-phy.yaml.
168bab661aSEmmanuel Vadot
178bab661aSEmmanuel Vadotmaintainers:
188bab661aSEmmanuel Vadot  - Wesley Cheng <quic_wcheng@quicinc.com>
198bab661aSEmmanuel Vadot
208bab661aSEmmanuel Vadotproperties:
218bab661aSEmmanuel Vadot  compatible:
22cb7aa33aSEmmanuel Vadot    oneOf:
23cb7aa33aSEmmanuel Vadot      - enum:
248bab661aSEmmanuel Vadot          - qcom,sc7180-qmp-usb3-dp-phy
258bab661aSEmmanuel Vadot          - qcom,sc8180x-qmp-usb3-dp-phy
268bab661aSEmmanuel Vadot          - qcom,sdm845-qmp-usb3-dp-phy
278bab661aSEmmanuel Vadot          - qcom,sm8250-qmp-usb3-dp-phy
28cb7aa33aSEmmanuel Vadot      - items:
29cb7aa33aSEmmanuel Vadot          - enum:
30cb7aa33aSEmmanuel Vadot              - qcom,sc7280-qmp-usb3-dp-phy
31cb7aa33aSEmmanuel Vadot          - const: qcom,sm8250-qmp-usb3-dp-phy
32cb7aa33aSEmmanuel Vadot
338bab661aSEmmanuel Vadot  reg:
348bab661aSEmmanuel Vadot    items:
358bab661aSEmmanuel Vadot      - description: Address and length of PHY's USB serdes block.
368bab661aSEmmanuel Vadot      - description: Address and length of the DP_COM control block.
378bab661aSEmmanuel Vadot      - description: Address and length of PHY's DP serdes block.
388bab661aSEmmanuel Vadot
398bab661aSEmmanuel Vadot  reg-names:
408bab661aSEmmanuel Vadot    items:
418bab661aSEmmanuel Vadot      - const: usb
428bab661aSEmmanuel Vadot      - const: dp_com
438bab661aSEmmanuel Vadot      - const: dp
448bab661aSEmmanuel Vadot
458bab661aSEmmanuel Vadot  "#address-cells":
468bab661aSEmmanuel Vadot    enum: [ 1, 2 ]
478bab661aSEmmanuel Vadot
488bab661aSEmmanuel Vadot  "#size-cells":
498bab661aSEmmanuel Vadot    enum: [ 1, 2 ]
508bab661aSEmmanuel Vadot
518bab661aSEmmanuel Vadot  ranges: true
528bab661aSEmmanuel Vadot
538bab661aSEmmanuel Vadot  clocks:
54cb7aa33aSEmmanuel Vadot    minItems: 3
55cb7aa33aSEmmanuel Vadot    maxItems: 4
568bab661aSEmmanuel Vadot
578bab661aSEmmanuel Vadot  clock-names:
58cb7aa33aSEmmanuel Vadot    minItems: 3
59cb7aa33aSEmmanuel Vadot    maxItems: 4
608bab661aSEmmanuel Vadot
618bab661aSEmmanuel Vadot  power-domains:
628bab661aSEmmanuel Vadot    maxItems: 1
638bab661aSEmmanuel Vadot
64*f126890aSEmmanuel Vadot  orientation-switch:
65*f126890aSEmmanuel Vadot    description: Flag the port as possible handler of orientation switching
66*f126890aSEmmanuel Vadot    type: boolean
67*f126890aSEmmanuel Vadot
688bab661aSEmmanuel Vadot  resets:
698bab661aSEmmanuel Vadot    items:
708bab661aSEmmanuel Vadot      - description: reset of phy block.
718bab661aSEmmanuel Vadot      - description: phy common block reset.
728bab661aSEmmanuel Vadot
738bab661aSEmmanuel Vadot  reset-names:
748bab661aSEmmanuel Vadot    items:
758bab661aSEmmanuel Vadot      - const: phy
768bab661aSEmmanuel Vadot      - const: common
778bab661aSEmmanuel Vadot
788bab661aSEmmanuel Vadot  vdda-phy-supply:
798bab661aSEmmanuel Vadot    description:
808bab661aSEmmanuel Vadot      Phandle to a regulator supply to PHY core block.
818bab661aSEmmanuel Vadot
828bab661aSEmmanuel Vadot  vdda-pll-supply:
838bab661aSEmmanuel Vadot    description:
848bab661aSEmmanuel Vadot      Phandle to 1.8V regulator supply to PHY refclk pll block.
858bab661aSEmmanuel Vadot
868bab661aSEmmanuel Vadot  vddp-ref-clk-supply:
878bab661aSEmmanuel Vadot    description:
888bab661aSEmmanuel Vadot      Phandle to a regulator supply to any specific refclk pll block.
898bab661aSEmmanuel Vadot
908bab661aSEmmanuel Vadot# Required nodes:
918bab661aSEmmanuel VadotpatternProperties:
928bab661aSEmmanuel Vadot  "^usb3-phy@[0-9a-f]+$":
938bab661aSEmmanuel Vadot    type: object
948bab661aSEmmanuel Vadot    additionalProperties: false
958bab661aSEmmanuel Vadot    description:
968bab661aSEmmanuel Vadot      The USB3 PHY.
978bab661aSEmmanuel Vadot
988bab661aSEmmanuel Vadot    properties:
998bab661aSEmmanuel Vadot      reg:
1008bab661aSEmmanuel Vadot        items:
1018bab661aSEmmanuel Vadot          - description: Address and length of TX.
1028bab661aSEmmanuel Vadot          - description: Address and length of RX.
1038bab661aSEmmanuel Vadot          - description: Address and length of PCS.
1048bab661aSEmmanuel Vadot          - description: Address and length of TX2.
1058bab661aSEmmanuel Vadot          - description: Address and length of RX2.
1068bab661aSEmmanuel Vadot          - description: Address and length of pcs_misc.
1078bab661aSEmmanuel Vadot
1088bab661aSEmmanuel Vadot      clocks:
1098bab661aSEmmanuel Vadot        items:
1108bab661aSEmmanuel Vadot          - description: pipe clock
1118bab661aSEmmanuel Vadot
1128bab661aSEmmanuel Vadot      clock-names:
1138bab661aSEmmanuel Vadot        deprecated: true
1148bab661aSEmmanuel Vadot        items:
1158bab661aSEmmanuel Vadot          - const: pipe0
1168bab661aSEmmanuel Vadot
1178bab661aSEmmanuel Vadot      clock-output-names:
1188bab661aSEmmanuel Vadot        items:
1198bab661aSEmmanuel Vadot          - const: usb3_phy_pipe_clk_src
1208bab661aSEmmanuel Vadot
1218bab661aSEmmanuel Vadot      '#clock-cells':
1228bab661aSEmmanuel Vadot        const: 0
1238bab661aSEmmanuel Vadot
1248bab661aSEmmanuel Vadot      '#phy-cells':
1258bab661aSEmmanuel Vadot        const: 0
1268bab661aSEmmanuel Vadot
1278bab661aSEmmanuel Vadot    required:
1288bab661aSEmmanuel Vadot      - reg
1298bab661aSEmmanuel Vadot      - clocks
1308bab661aSEmmanuel Vadot      - '#clock-cells'
1318bab661aSEmmanuel Vadot      - '#phy-cells'
1328bab661aSEmmanuel Vadot
1338bab661aSEmmanuel Vadot  "^dp-phy@[0-9a-f]+$":
1348bab661aSEmmanuel Vadot    type: object
1358bab661aSEmmanuel Vadot    additionalProperties: false
1368bab661aSEmmanuel Vadot    description:
1378bab661aSEmmanuel Vadot      The DP PHY.
1388bab661aSEmmanuel Vadot
1398bab661aSEmmanuel Vadot    properties:
1408bab661aSEmmanuel Vadot      reg:
1418bab661aSEmmanuel Vadot        items:
1428bab661aSEmmanuel Vadot          - description: Address and length of TX.
1438bab661aSEmmanuel Vadot          - description: Address and length of RX.
1448bab661aSEmmanuel Vadot          - description: Address and length of PCS.
1458bab661aSEmmanuel Vadot          - description: Address and length of TX2.
1468bab661aSEmmanuel Vadot          - description: Address and length of RX2.
1478bab661aSEmmanuel Vadot
1488bab661aSEmmanuel Vadot      '#clock-cells':
1498bab661aSEmmanuel Vadot        const: 1
1508bab661aSEmmanuel Vadot
1518bab661aSEmmanuel Vadot      '#phy-cells':
1528bab661aSEmmanuel Vadot        const: 0
1538bab661aSEmmanuel Vadot
1548bab661aSEmmanuel Vadot    required:
1558bab661aSEmmanuel Vadot      - reg
1568bab661aSEmmanuel Vadot      - '#clock-cells'
1578bab661aSEmmanuel Vadot      - '#phy-cells'
1588bab661aSEmmanuel Vadot
1598bab661aSEmmanuel Vadotrequired:
1608bab661aSEmmanuel Vadot  - compatible
1618bab661aSEmmanuel Vadot  - reg
1628bab661aSEmmanuel Vadot  - "#address-cells"
1638bab661aSEmmanuel Vadot  - "#size-cells"
1648bab661aSEmmanuel Vadot  - ranges
1658bab661aSEmmanuel Vadot  - clocks
1668bab661aSEmmanuel Vadot  - clock-names
1678bab661aSEmmanuel Vadot  - resets
1688bab661aSEmmanuel Vadot  - reset-names
1698bab661aSEmmanuel Vadot  - vdda-phy-supply
1708bab661aSEmmanuel Vadot  - vdda-pll-supply
1718bab661aSEmmanuel Vadot
172cb7aa33aSEmmanuel VadotallOf:
173cb7aa33aSEmmanuel Vadot  - if:
174cb7aa33aSEmmanuel Vadot      properties:
175cb7aa33aSEmmanuel Vadot        compatible:
176cb7aa33aSEmmanuel Vadot          enum:
177cb7aa33aSEmmanuel Vadot            - qcom,sc7180-qmp-usb3-dp-phy
178cb7aa33aSEmmanuel Vadot            - qcom,sdm845-qmp-usb3-dp-phy
179cb7aa33aSEmmanuel Vadot    then:
180cb7aa33aSEmmanuel Vadot      properties:
181cb7aa33aSEmmanuel Vadot        clocks:
182cb7aa33aSEmmanuel Vadot          items:
183cb7aa33aSEmmanuel Vadot            - description: Phy aux clock
184cb7aa33aSEmmanuel Vadot            - description: Phy config clock
185cb7aa33aSEmmanuel Vadot            - description: 19.2 MHz ref clk
186cb7aa33aSEmmanuel Vadot            - description: Phy common block aux clock
187cb7aa33aSEmmanuel Vadot        clock-names:
188cb7aa33aSEmmanuel Vadot          items:
189cb7aa33aSEmmanuel Vadot            - const: aux
190cb7aa33aSEmmanuel Vadot            - const: cfg_ahb
191cb7aa33aSEmmanuel Vadot            - const: ref
192cb7aa33aSEmmanuel Vadot            - const: com_aux
193cb7aa33aSEmmanuel Vadot
194cb7aa33aSEmmanuel Vadot  - if:
195cb7aa33aSEmmanuel Vadot      properties:
196cb7aa33aSEmmanuel Vadot        compatible:
197cb7aa33aSEmmanuel Vadot          enum:
198cb7aa33aSEmmanuel Vadot            - qcom,sc8180x-qmp-usb3-dp-phy
199cb7aa33aSEmmanuel Vadot    then:
200cb7aa33aSEmmanuel Vadot      properties:
201cb7aa33aSEmmanuel Vadot        clocks:
202cb7aa33aSEmmanuel Vadot          items:
203cb7aa33aSEmmanuel Vadot            - description: Phy aux clock
204cb7aa33aSEmmanuel Vadot            - description: 19.2 MHz ref clk
205cb7aa33aSEmmanuel Vadot            - description: Phy common block aux clock
206cb7aa33aSEmmanuel Vadot        clock-names:
207cb7aa33aSEmmanuel Vadot          items:
208cb7aa33aSEmmanuel Vadot            - const: aux
209cb7aa33aSEmmanuel Vadot            - const: ref
210cb7aa33aSEmmanuel Vadot            - const: com_aux
211cb7aa33aSEmmanuel Vadot
212cb7aa33aSEmmanuel Vadot  - if:
213cb7aa33aSEmmanuel Vadot      properties:
214cb7aa33aSEmmanuel Vadot        compatible:
215cb7aa33aSEmmanuel Vadot          enum:
216cb7aa33aSEmmanuel Vadot            - qcom,sm8250-qmp-usb3-dp-phy
217cb7aa33aSEmmanuel Vadot    then:
218cb7aa33aSEmmanuel Vadot      properties:
219cb7aa33aSEmmanuel Vadot        clocks:
220cb7aa33aSEmmanuel Vadot          items:
221cb7aa33aSEmmanuel Vadot            - description: Phy aux clock
222cb7aa33aSEmmanuel Vadot            - description: Board XO source
223cb7aa33aSEmmanuel Vadot            - description: Phy common block aux clock
224cb7aa33aSEmmanuel Vadot        clock-names:
225cb7aa33aSEmmanuel Vadot          items:
226cb7aa33aSEmmanuel Vadot            - const: aux
227cb7aa33aSEmmanuel Vadot            - const: ref_clk_src
228cb7aa33aSEmmanuel Vadot            - const: com_aux
229cb7aa33aSEmmanuel Vadot
2308bab661aSEmmanuel VadotadditionalProperties: false
2318bab661aSEmmanuel Vadot
2328bab661aSEmmanuel Vadotexamples:
2338bab661aSEmmanuel Vadot  - |
2348bab661aSEmmanuel Vadot    #include <dt-bindings/clock/qcom,gcc-sdm845.h>
2358bab661aSEmmanuel Vadot    usb_1_qmpphy: phy-wrapper@88e9000 {
2368bab661aSEmmanuel Vadot        compatible = "qcom,sdm845-qmp-usb3-dp-phy";
2378bab661aSEmmanuel Vadot        reg = <0x088e9000 0x18c>,
2388bab661aSEmmanuel Vadot              <0x088e8000 0x10>,
2398bab661aSEmmanuel Vadot              <0x088ea000 0x40>;
2408bab661aSEmmanuel Vadot        reg-names = "usb", "dp_com", "dp";
2418bab661aSEmmanuel Vadot        #address-cells = <1>;
2428bab661aSEmmanuel Vadot        #size-cells = <1>;
2438bab661aSEmmanuel Vadot        ranges = <0x0 0x088e9000 0x2000>;
2448bab661aSEmmanuel Vadot
2458bab661aSEmmanuel Vadot        clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>,
2468bab661aSEmmanuel Vadot                 <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
2478bab661aSEmmanuel Vadot                 <&gcc GCC_USB3_PRIM_CLKREF_CLK>,
2488bab661aSEmmanuel Vadot                 <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>;
2498bab661aSEmmanuel Vadot        clock-names = "aux", "cfg_ahb", "ref", "com_aux";
2508bab661aSEmmanuel Vadot
2518bab661aSEmmanuel Vadot        resets = <&gcc GCC_USB3_PHY_PRIM_BCR>,
2528bab661aSEmmanuel Vadot                 <&gcc GCC_USB3_DP_PHY_PRIM_BCR>;
2538bab661aSEmmanuel Vadot        reset-names = "phy", "common";
2548bab661aSEmmanuel Vadot
2558bab661aSEmmanuel Vadot        vdda-phy-supply = <&vdda_usb2_ss_1p2>;
2568bab661aSEmmanuel Vadot        vdda-pll-supply = <&vdda_usb2_ss_core>;
2578bab661aSEmmanuel Vadot
258*f126890aSEmmanuel Vadot        orientation-switch;
259*f126890aSEmmanuel Vadot
2608bab661aSEmmanuel Vadot        usb3-phy@200 {
2618bab661aSEmmanuel Vadot            reg = <0x200 0x128>,
2628bab661aSEmmanuel Vadot                  <0x400 0x200>,
2638bab661aSEmmanuel Vadot                  <0xc00 0x218>,
2648bab661aSEmmanuel Vadot                  <0x600 0x128>,
2658bab661aSEmmanuel Vadot                  <0x800 0x200>,
2668bab661aSEmmanuel Vadot                  <0xa00 0x100>;
2678bab661aSEmmanuel Vadot            #clock-cells = <0>;
2688bab661aSEmmanuel Vadot            #phy-cells = <0>;
2698bab661aSEmmanuel Vadot            clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
2708bab661aSEmmanuel Vadot            clock-output-names = "usb3_phy_pipe_clk_src";
2718bab661aSEmmanuel Vadot        };
2728bab661aSEmmanuel Vadot
2738bab661aSEmmanuel Vadot        dp-phy@88ea200 {
2748bab661aSEmmanuel Vadot            reg = <0xa200 0x200>,
2758bab661aSEmmanuel Vadot                  <0xa400 0x200>,
2768bab661aSEmmanuel Vadot                  <0xaa00 0x200>,
2778bab661aSEmmanuel Vadot                  <0xa600 0x200>,
2788bab661aSEmmanuel Vadot                  <0xa800 0x200>;
2798bab661aSEmmanuel Vadot            #clock-cells = <1>;
2808bab661aSEmmanuel Vadot            #phy-cells = <0>;
2818bab661aSEmmanuel Vadot        };
2828bab661aSEmmanuel Vadot    };
283