Skip to content

Commit e1c4c54

Browse files
jhovoldvinodkoul
authored andcommitted
dt-bindings: phy: qcom,qmp-usb3-dp: fix sc8280xp binding
The current QMP USB3-DP PHY bindings are based on the original MSM8996 binding which provided multiple PHYs per IP block and these in turn were described by child nodes. The QMP USB3-DP PHY block provides a single multi-protocol PHY and even if some resources are only used by either the USB or DP part of the device there is no real benefit in describing these resources in child nodes. The original MSM8996 binding also ended up describing the individual register blocks as belonging to either the wrapper node or the PHY child nodes. This is an unnecessary level of detail which has lead to problems when later IP blocks using different register layouts have been forced to fit the original mould rather than updating the binding. The bindings are arguable also incomplete as they only the describe register blocks used by the current Linux drivers (e.g. does not include the PCS LANE registers). This is specifically true for later USB4-USB3-DP QMP PHYs where the TX registers are used by both the USB3 and DP parts of the PHY (and where the USB4 part of the PHY was not covered by the binding at all). Notably there are also no DP "RX" (sic) registers as described by the current bindings and the DP "PCS" region is really a set of DP_PHY registers. Add a new binding for the USB4-USB3-DP QMP PHYs found on SC8280XP which further bindings can be based on. Note that the binding uses a PHY index to access either the USB3 or DP part of the PHY and that this can later be used also for the USB4 part if needed. Similarly, the clock inputs and outputs can later be extended to support USB4. Also note that the current binding is simply removed instead of being deprecated as it was only recently merged and would not allow for supporting DP mode. Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 32efdb0 commit e1c4c54

File tree

3 files changed

+119
-12
lines changed

3 files changed

+119
-12
lines changed

Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ properties:
2323
- qcom,sc7180-qmp-usb3-dp-phy
2424
- qcom,sc7280-qmp-usb3-dp-phy
2525
- qcom,sc8180x-qmp-usb3-dp-phy
26-
- qcom,sc8280xp-qmp-usb43dp-phy
2726
- qcom,sdm845-qmp-usb3-dp-phy
2827
- qcom,sm8250-qmp-usb3-dp-phy
2928
reg:
@@ -169,17 +168,6 @@ required:
169168

170169
additionalProperties: false
171170

172-
allOf:
173-
- if:
174-
properties:
175-
compatible:
176-
contains:
177-
enum:
178-
- qcom,sc8280xp-qmp-usb43dp-phy
179-
then:
180-
required:
181-
- power-domains
182-
183171
examples:
184172
- |
185173
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm QMP USB4-USB3-DP PHY controller (SC8280XP)
8+
9+
maintainers:
10+
- Vinod Koul <[email protected]>
11+
12+
description:
13+
The QMP PHY controller supports physical layer functionality for a number of
14+
controllers on Qualcomm chipsets, such as, PCIe, UFS and USB.
15+
16+
properties:
17+
compatible:
18+
enum:
19+
- qcom,sc8280xp-qmp-usb43dp-phy
20+
21+
reg:
22+
maxItems: 1
23+
24+
clocks:
25+
maxItems: 4
26+
27+
clock-names:
28+
items:
29+
- const: aux
30+
- const: ref
31+
- const: com_aux
32+
- const: usb3_pipe
33+
34+
power-domains:
35+
maxItems: 1
36+
37+
resets:
38+
maxItems: 2
39+
40+
reset-names:
41+
items:
42+
- const: phy
43+
- const: common
44+
45+
vdda-phy-supply: true
46+
47+
vdda-pll-supply: true
48+
49+
"#clock-cells":
50+
const: 1
51+
description:
52+
See include/dt-bindings/dt-bindings/phy/phy-qcom-qmp.h
53+
54+
"#phy-cells":
55+
const: 1
56+
description:
57+
See include/dt-bindings/dt-bindings/phy/phy-qcom-qmp.h
58+
59+
required:
60+
- compatible
61+
- reg
62+
- clocks
63+
- clock-names
64+
- power-domains
65+
- resets
66+
- reset-names
67+
- vdda-phy-supply
68+
- vdda-pll-supply
69+
- "#clock-cells"
70+
- "#phy-cells"
71+
72+
additionalProperties: false
73+
74+
examples:
75+
- |
76+
#include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
77+
78+
phy@88eb000 {
79+
compatible = "qcom,sc8280xp-qmp-usb43dp-phy";
80+
reg = <0x088eb000 0x4000>;
81+
82+
clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>,
83+
<&gcc GCC_USB4_EUD_CLKREF_CLK>,
84+
<&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>,
85+
<&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
86+
clock-names = "aux", "ref", "com_aux", "usb3_pipe";
87+
88+
power-domains = <&gcc USB30_PRIM_GDSC>;
89+
90+
resets = <&gcc GCC_USB3_PHY_PRIM_BCR>,
91+
<&gcc GCC_USB4_DP_PHY_PRIM_BCR>;
92+
reset-names = "phy", "common";
93+
94+
vdda-phy-supply = <&vreg_l9d>;
95+
vdda-pll-supply = <&vreg_l4d>;
96+
97+
#clock-cells = <1>;
98+
#phy-cells = <1>;
99+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2+
/*
3+
* Qualcomm QMP PHY constants
4+
*
5+
* Copyright (C) 2022 Linaro Limited
6+
*/
7+
8+
#ifndef _DT_BINDINGS_PHY_QMP
9+
#define _DT_BINDINGS_PHY_QMP
10+
11+
/* QMP USB4-USB3-DP clocks */
12+
#define QMP_USB43DP_USB3_PIPE_CLK 0
13+
#define QMP_USB43DP_DP_LINK_CLK 1
14+
#define QMP_USB43DP_DP_VCO_DIV_CLK 2
15+
16+
/* QMP USB4-USB3-DP PHYs */
17+
#define QMP_USB43DP_USB3_PHY 0
18+
#define QMP_USB43DP_DP_PHY 1
19+
20+
#endif /* _DT_BINDINGS_PHY_QMP */

0 commit comments

Comments
 (0)