Skip to content

Commit d4c08d8

Browse files
lumagvinodkoul
authored andcommitted
phy: qcom-qmp-usb: fix v3 offsets data
The MSM8996 platform has registers setup different to the rest of QMP v3 USB platforms. It has PCS region at 0x600 and no PCS_MISC region, while other platforms have PCS region at 0x800 and PCS_MISC at 0x600. This results in the malfunctioning USB host on some of the platforms. The commit f74c35b ("phy: qcom-qmp-usb: fix register offsets for ipq8074/ipq6018") fixed the issue for IPQ platforms, but missed the SDM845 which has the same register layout. To simplify future platform addition and to make the driver more future proof, rename qmp_usb_offsets_v3 to qmp_usb_offsets_v3_msm8996 (to mark its peculiarity), rename qmp_usb_offsets_ipq8074 to qmp_usb_offsets_v3 and use it for SDM845 platform. Fixes: 2be22aa ("phy: qcom-qmp-usb: populate offsets configuration") Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 734550d commit d4c08d8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/phy/qualcomm/phy-qcom-qmp-usb.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ static const char * const qmp_phy_vreg_l[] = {
15561556
"vdda-phy", "vdda-pll",
15571557
};
15581558

1559-
static const struct qmp_usb_offsets qmp_usb_offsets_ipq8074 = {
1559+
static const struct qmp_usb_offsets qmp_usb_offsets_v3 = {
15601560
.serdes = 0,
15611561
.pcs = 0x800,
15621562
.pcs_misc = 0x600,
@@ -1572,7 +1572,7 @@ static const struct qmp_usb_offsets qmp_usb_offsets_ipq9574 = {
15721572
.rx = 0x400,
15731573
};
15741574

1575-
static const struct qmp_usb_offsets qmp_usb_offsets_v3 = {
1575+
static const struct qmp_usb_offsets qmp_usb_offsets_v3_msm8996 = {
15761576
.serdes = 0,
15771577
.pcs = 0x600,
15781578
.tx = 0x200,
@@ -1624,7 +1624,7 @@ static const struct qmp_usb_offsets qmp_usb_offsets_v7 = {
16241624
static const struct qmp_phy_cfg ipq6018_usb3phy_cfg = {
16251625
.lanes = 1,
16261626

1627-
.offsets = &qmp_usb_offsets_ipq8074,
1627+
.offsets = &qmp_usb_offsets_v3,
16281628

16291629
.serdes_tbl = ipq9574_usb3_serdes_tbl,
16301630
.serdes_tbl_num = ARRAY_SIZE(ipq9574_usb3_serdes_tbl),
@@ -1642,7 +1642,7 @@ static const struct qmp_phy_cfg ipq6018_usb3phy_cfg = {
16421642
static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
16431643
.lanes = 1,
16441644

1645-
.offsets = &qmp_usb_offsets_ipq8074,
1645+
.offsets = &qmp_usb_offsets_v3,
16461646

16471647
.serdes_tbl = ipq8074_usb3_serdes_tbl,
16481648
.serdes_tbl_num = ARRAY_SIZE(ipq8074_usb3_serdes_tbl),
@@ -1678,7 +1678,7 @@ static const struct qmp_phy_cfg ipq9574_usb3phy_cfg = {
16781678
static const struct qmp_phy_cfg msm8996_usb3phy_cfg = {
16791679
.lanes = 1,
16801680

1681-
.offsets = &qmp_usb_offsets_v3,
1681+
.offsets = &qmp_usb_offsets_v3_msm8996,
16821682

16831683
.serdes_tbl = msm8996_usb3_serdes_tbl,
16841684
.serdes_tbl_num = ARRAY_SIZE(msm8996_usb3_serdes_tbl),

0 commit comments

Comments
 (0)