Add QMP V3 USB3 PHY entries for SC7180 in phy driver and
device tree bindings.
changes in v2:
*Remove global phy reset in QMP phy.
*Convert QMP phy bindings to yaml.
Sandeep Maheswaram (3):
phy: qcom-qmp: Add QMP V3 USB3 PHY support for SC7180
arm64: dts: qcom: sc7180: Remove global phy reset in QMP phy
dt-bindings: phy: qcom,qmp: Convert QMP phy bindings to yaml
.../devicetree/bindings/phy/qcom,qmp-phy.yaml | 201 ++++++++++++++++++
.../devicetree/bindings/phy/qcom-qmp-phy.txt | 227 ---------------------
arch/arm64/boot/dts/qcom/sc7180.dtsi | 5 +-
drivers/phy/qualcomm/phy-qcom-qmp.c | 38 ++++
4 files changed, 241 insertions(+), 230 deletions(-)
create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
delete mode 100644 Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
Remove global phy reset and do only usb phy reset in QMP phy.
Signed-off-by: Sandeep Maheswaram <[email protected]>
---
arch/arm64/boot/dts/qcom/sc7180.dtsi | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index c00c3d4..448ab88 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -1072,9 +1072,8 @@
<&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>;
clock-names = "aux", "cfg_ahb", "ref", "com_aux";
- resets = <&gcc GCC_USB3_DP_PHY_PRIM_BCR>,
- <&gcc GCC_USB3_PHY_PRIM_BCR>;
- reset-names = "phy", "common";
+ resets = <&gcc GCC_USB3_PHY_PRIM_BCR>;
+ reset-names = "phy";
usb_1_ssphy: phy@88e9200 {
reg = <0 0x088e9200 0 0x128>,
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
Adding QMP v3 USB3 phy support for SC7180.
Signed-off-by: Sandeep Maheswaram <[email protected]>
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 38 +++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c
index 7db2a94..dc300a9 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
@@ -1139,6 +1139,10 @@ static const char * const msm8996_usb3phy_reset_l[] = {
"phy", "common",
};
+static const char * const sc7180_usb3phy_reset_l[] = {
+ "phy",
+};
+
/* list of regulators */
static const char * const qmp_phy_vreg_l[] = {
"vdda-phy", "vdda-pll",
@@ -1265,6 +1269,37 @@ static const struct qmp_phy_cfg qmp_v3_usb3phy_cfg = {
.is_dual_lane_phy = true,
};
+static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
+ .type = PHY_TYPE_USB3,
+ .nlanes = 1,
+
+ .serdes_tbl = qmp_v3_usb3_serdes_tbl,
+ .serdes_tbl_num = ARRAY_SIZE(qmp_v3_usb3_serdes_tbl),
+ .tx_tbl = qmp_v3_usb3_tx_tbl,
+ .tx_tbl_num = ARRAY_SIZE(qmp_v3_usb3_tx_tbl),
+ .rx_tbl = qmp_v3_usb3_rx_tbl,
+ .rx_tbl_num = ARRAY_SIZE(qmp_v3_usb3_rx_tbl),
+ .pcs_tbl = qmp_v3_usb3_pcs_tbl,
+ .pcs_tbl_num = ARRAY_SIZE(qmp_v3_usb3_pcs_tbl),
+ .clk_list = qmp_v3_phy_clk_l,
+ .num_clks = ARRAY_SIZE(qmp_v3_phy_clk_l),
+ .reset_list = sc7180_usb3phy_reset_l,
+ .num_resets = ARRAY_SIZE(sc7180_usb3phy_reset_l),
+ .vreg_list = qmp_phy_vreg_l,
+ .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .regs = qmp_v3_usb3phy_regs_layout,
+
+ .start_ctrl = SERDES_START | PCS_START,
+ .pwrdn_ctrl = SW_PWRDN,
+
+ .has_pwrdn_delay = true,
+ .pwrdn_delay_min = POWER_DOWN_DELAY_US_MIN,
+ .pwrdn_delay_max = POWER_DOWN_DELAY_US_MAX,
+
+ .has_phy_dp_com_ctrl = true,
+ .is_dual_lane_phy = true,
+};
+
static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
.type = PHY_TYPE_USB3,
.nlanes = 1,
@@ -2103,6 +2138,9 @@ static const struct of_device_id qcom_qmp_phy_of_match_table[] = {
.compatible = "qcom,ipq8074-qmp-pcie-phy",
.data = &ipq8074_pciephy_cfg,
}, {
+ .compatible = "qcom,sc7180-qmp-usb3-phy",
+ .data = &sc7180_usb3phy_cfg,
+ }, {
.compatible = "qcom,sdm845-qmp-usb3-phy",
.data = &qmp_v3_usb3phy_cfg,
}, {
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
Quoting Sandeep Maheswaram (2020-01-08 04:29:40)
> Remove global phy reset and do only usb phy reset in QMP phy.
Yes that's what this patch does, but you left out the important part:
Why?
>
> Signed-off-by: Sandeep Maheswaram <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/sc7180.dtsi | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> index c00c3d4..448ab88 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> @@ -1072,9 +1072,8 @@
> <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>;
> clock-names = "aux", "cfg_ahb", "ref", "com_aux";
>
> - resets = <&gcc GCC_USB3_DP_PHY_PRIM_BCR>,
> - <&gcc GCC_USB3_PHY_PRIM_BCR>;
> - reset-names = "phy", "common";
> + resets = <&gcc GCC_USB3_PHY_PRIM_BCR>;
> + reset-names = "phy";
>
We shouldn't need to modify the DT node for this. The reset still goes
to this hardware block, so DT should reflect that. Instead, the driver
shouldn't drive this reset on this SoC.
> usb_1_ssphy: phy@88e9200 {
> reg = <0 0x088e9200 0 0x128>,
Hi Sandeep,
this series has outstanding comments, do you plan to respin it soon?
Thanks
Matthias
On Wed, Jan 08, 2020 at 05:59:38PM +0530, Sandeep Maheswaram wrote:
> Add QMP V3 USB3 PHY entries for SC7180 in phy driver and
> device tree bindings.
>
> changes in v2:
> *Remove global phy reset in QMP phy.
> *Convert QMP phy bindings to yaml.
>
> Sandeep Maheswaram (3):
> phy: qcom-qmp: Add QMP V3 USB3 PHY support for SC7180
> arm64: dts: qcom: sc7180: Remove global phy reset in QMP phy
> dt-bindings: phy: qcom,qmp: Convert QMP phy bindings to yaml
>
> .../devicetree/bindings/phy/qcom,qmp-phy.yaml | 201 ++++++++++++++++++
> .../devicetree/bindings/phy/qcom-qmp-phy.txt | 227 ---------------------
> arch/arm64/boot/dts/qcom/sc7180.dtsi | 5 +-
> drivers/phy/qualcomm/phy-qcom-qmp.c | 38 ++++
> 4 files changed, 241 insertions(+), 230 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
> delete mode 100644 Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
>
> --
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
>