Skip to content

Commit 14d98d3

Browse files
lumagvinodkoul
authored andcommitted
phy: qcom-qmp-usb: fix regs layout arrays
Drop qcm2290_usb3phy_regs_layout, it is a duplicate of qmp_v3_usb3phy_regs_layout. Introduce qmp_v5_usb3phy_regs_layout to be used for sm8350 and sc8280xp. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20221110192248.873973-13-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 83cb72b commit 14d98d3

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,15 @@ static const unsigned int qmp_v4_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = {
125125
[QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = QPHY_V4_PCS_USB3_LFPS_RXTERM_IRQ_CLEAR,
126126
};
127127

128-
static const unsigned int qcm2290_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = {
129-
[QPHY_SW_RESET] = QPHY_V3_PCS_SW_RESET,
130-
[QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V3_PCS_POWER_DOWN_CONTROL,
131-
[QPHY_START_CTRL] = QPHY_V3_PCS_START_CONTROL,
132-
[QPHY_PCS_AUTONOMOUS_MODE_CTRL] = QPHY_V3_PCS_AUTONOMOUS_MODE_CTRL,
133-
[QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = QPHY_V3_PCS_LFPS_RXTERM_IRQ_CLEAR,
134-
[QPHY_PCS_STATUS] = QPHY_V3_PCS_PCS_STATUS,
128+
static const unsigned int qmp_v5_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = {
129+
[QPHY_SW_RESET] = QPHY_V5_PCS_SW_RESET,
130+
[QPHY_START_CTRL] = QPHY_V5_PCS_START_CONTROL,
131+
[QPHY_PCS_STATUS] = QPHY_V5_PCS_PCS_STATUS1,
132+
[QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V5_PCS_POWER_DOWN_CONTROL,
133+
134+
/* In PCS_USB */
135+
[QPHY_PCS_AUTONOMOUS_MODE_CTRL] = QPHY_V5_PCS_USB3_AUTONOMOUS_MODE_CTRL,
136+
[QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = QPHY_V5_PCS_USB3_LFPS_RXTERM_IRQ_CLEAR,
135137
};
136138

137139
static const struct qmp_phy_init_tbl ipq8074_usb3_serdes_tbl[] = {
@@ -1666,7 +1668,7 @@ static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = {
16661668
.num_resets = ARRAY_SIZE(qcm2290_usb3phy_reset_l),
16671669
.vreg_list = qmp_phy_vreg_l,
16681670
.num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
1669-
.regs = qmp_v4_usb3phy_regs_layout,
1671+
.regs = qmp_v5_usb3phy_regs_layout,
16701672
};
16711673

16721674
static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
@@ -1882,7 +1884,7 @@ static const struct qmp_phy_cfg sm8350_usb3phy_cfg = {
18821884
.num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l),
18831885
.vreg_list = qmp_phy_vreg_l,
18841886
.num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
1885-
.regs = qmp_v4_usb3phy_regs_layout,
1887+
.regs = qmp_v5_usb3phy_regs_layout,
18861888
.pcs_usb_offset = 0x300,
18871889

18881890
.has_pwrdn_delay = true,
@@ -1908,7 +1910,7 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
19081910
.num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l),
19091911
.vreg_list = qmp_phy_vreg_l,
19101912
.num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
1911-
.regs = qmp_v4_usb3phy_regs_layout,
1913+
.regs = qmp_v5_usb3phy_regs_layout,
19121914
.pcs_usb_offset = 0x1000,
19131915

19141916
.has_pwrdn_delay = true,
@@ -1931,7 +1933,7 @@ static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = {
19311933
.num_resets = ARRAY_SIZE(qcm2290_usb3phy_reset_l),
19321934
.vreg_list = qmp_phy_vreg_l,
19331935
.num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
1934-
.regs = qcm2290_usb3phy_regs_layout,
1936+
.regs = qmp_v3_usb3phy_regs_layout,
19351937
};
19361938

19371939
static void qmp_usb_configure_lane(void __iomem *base,

0 commit comments

Comments
 (0)