1 From 62a5df451ab911421da96655fcc4d1e269ff6e2f Mon Sep 17 00:00:00 2001
2 From: Mantas Pucka <mantas@8devices.com>
3 Date: Tue, 23 Jan 2024 18:09:20 +0200
4 Subject: [PATCH] phy: qcom-qmp-usb: fix serdes init sequence for IPQ6018
6 Commit 23fd679249df ("phy: qcom-qmp: add USB3 PHY support for IPQ6018")
7 noted that IPQ6018 init is identical to IPQ8074. Yet downstream uses
8 separate serdes init sequence for IPQ6018. Since already existing IPQ9574
9 serdes init sequence is identical, just reuse it and fix failing USB3 mode
12 Fixes: 23fd679249df ("phy: qcom-qmp: add USB3 PHY support for IPQ6018")
13 Signed-off-by: Mantas Pucka <mantas@8devices.com>
14 Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
15 Link: https://lore.kernel.org/r/1706026160-17520-3-git-send-email-mantas@8devices.com
16 Signed-off-by: Vinod Koul <vkoul@kernel.org>
18 drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 20 +++++++++++++++++++-
19 1 file changed, 19 insertions(+), 1 deletion(-)
21 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
22 +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
23 @@ -1314,6 +1314,26 @@ static const struct qmp_usb_offsets qmp_
27 +static const struct qmp_phy_cfg ipq6018_usb3phy_cfg = {
30 + .serdes_tbl = ipq9574_usb3_serdes_tbl,
31 + .serdes_tbl_num = ARRAY_SIZE(ipq9574_usb3_serdes_tbl),
32 + .tx_tbl = msm8996_usb3_tx_tbl,
33 + .tx_tbl_num = ARRAY_SIZE(msm8996_usb3_tx_tbl),
34 + .rx_tbl = ipq8074_usb3_rx_tbl,
35 + .rx_tbl_num = ARRAY_SIZE(ipq8074_usb3_rx_tbl),
36 + .pcs_tbl = ipq8074_usb3_pcs_tbl,
37 + .pcs_tbl_num = ARRAY_SIZE(ipq8074_usb3_pcs_tbl),
38 + .clk_list = msm8996_phy_clk_l,
39 + .num_clks = ARRAY_SIZE(msm8996_phy_clk_l),
40 + .reset_list = msm8996_usb3phy_reset_l,
41 + .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l),
42 + .vreg_list = qmp_phy_vreg_l,
43 + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
44 + .regs = qmp_v3_usb3phy_regs_layout,
47 static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
50 @@ -2238,7 +2258,7 @@ err_node_put:
51 static const struct of_device_id qmp_usb_of_match_table[] = {
53 .compatible = "qcom,ipq6018-qmp-usb3-phy",
54 - .data = &ipq8074_usb3phy_cfg,
55 + .data = &ipq6018_usb3phy_cfg,
57 .compatible = "qcom,ipq8074-qmp-usb3-phy",
58 .data = &ipq8074_usb3phy_cfg,