Skip to content

Commit 00c5f32

Browse files
Qiang Yuvinodkoul
authored andcommitted
phy: qcom: qmp-pcie: Configure all tables on port B PHY
Currently, only the RX and TX tables are written to the second PHY (port B) when the 4-lanes mode is configured, but according to Qualcomm internal documentation, the pcs, pcs_misc, serdes and ln_shrd tables need to be written as well. Signed-off-by: Qiang Yu <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Abel Vesa <[email protected]> Link: https://lore.kernel.org/r/20240805-phy-qcom-qmp-pcie-write-all-tbls-second-port-v3-1-6967c6bf61d1@linaro.org Signed-off-by: Vinod Koul <[email protected]>
1 parent 7f7315d commit 00c5f32

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3699,18 +3699,30 @@ static void qmp_pcie_init_port_b(struct qmp_pcie *qmp, const struct qmp_phy_cfg_
36993699
{
37003700
const struct qmp_phy_cfg *cfg = qmp->cfg;
37013701
const struct qmp_pcie_offsets *offs = cfg->offsets;
3702-
void __iomem *tx3, *rx3, *tx4, *rx4;
3702+
void __iomem *serdes, *tx3, *rx3, *tx4, *rx4, *pcs, *pcs_misc, *ln_shrd;
37033703

3704+
serdes = qmp->port_b + offs->serdes;
37043705
tx3 = qmp->port_b + offs->tx;
37053706
rx3 = qmp->port_b + offs->rx;
37063707
tx4 = qmp->port_b + offs->tx2;
37073708
rx4 = qmp->port_b + offs->rx2;
3709+
pcs = qmp->port_b + offs->pcs;
3710+
pcs_misc = qmp->port_b + offs->pcs_misc;
3711+
ln_shrd = qmp->port_b + offs->ln_shrd;
3712+
3713+
qmp_configure(qmp->dev, serdes, tbls->serdes, tbls->serdes_num);
3714+
qmp_configure(qmp->dev, serdes, cfg->serdes_4ln_tbl, cfg->serdes_4ln_num);
37083715

37093716
qmp_configure_lane(qmp->dev, tx3, tbls->tx, tbls->tx_num, 1);
37103717
qmp_configure_lane(qmp->dev, rx3, tbls->rx, tbls->rx_num, 1);
37113718

37123719
qmp_configure_lane(qmp->dev, tx4, tbls->tx, tbls->tx_num, 2);
37133720
qmp_configure_lane(qmp->dev, rx4, tbls->rx, tbls->rx_num, 2);
3721+
3722+
qmp_configure(qmp->dev, pcs, tbls->pcs, tbls->pcs_num);
3723+
qmp_configure(qmp->dev, pcs_misc, tbls->pcs_misc, tbls->pcs_misc_num);
3724+
3725+
qmp_configure(qmp->dev, ln_shrd, tbls->ln_shrd, tbls->ln_shrd_num);
37143726
}
37153727

37163728
static void qmp_pcie_init_registers(struct qmp_pcie *qmp, const struct qmp_phy_cfg_tbls *tbls)

0 commit comments

Comments
 (0)