From: Johan Hovold <johan@kernel.org>
To: Abel Vesa <abel.vesa@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Johan Hovold <johan+linaro@kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
linux-kernel@vger.kernel.org, Qiang Yu <quic_qianyu@quicinc.com>
Subject: Re: [PATCH] phy: qcom: qmp-pcie: Configure all tables on port B PHY
Date: Fri, 26 Jul 2024 16:38:52 +0200 [thread overview]
Message-ID: <ZqO0_HyMl77yIGK-@hovoldconsulting.com> (raw)
In-Reply-To: <20240726-phy-qcom-qmp-pcie-write-all-tbls-second-port-v1-1-751b9ee01184@linaro.org>
On Fri, Jul 26, 2024 at 11:09:14AM +0300, Abel Vesa wrote:
> From: Qiang Yu <quic_qianyu@quicinc.com>
>
> 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 <quic_qianyu@quicinc.com>
> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> ---
> drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> index 5b36cc7ac78b..fd59ebd32f5f 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> @@ -3660,18 +3660,30 @@ static void qmp_pcie_init_port_b(struct qmp_pcie *qmp, const struct qmp_phy_cfg_
> {
> const struct qmp_phy_cfg *cfg = qmp->cfg;
> const struct qmp_pcie_offsets *offs = cfg->offsets;
> - void __iomem *tx3, *rx3, *tx4, *rx4;
> + void __iomem *tx3, *rx3, *tx4, *rx4, *pcs, *pcs_misc, *ln_shrd, *serdes;
Please order these as serdes, tx/rx, pcs, pcs_misc, ln_shrd so that it
matches the order port_a is programmed (even if the hardware doesn't
care about this).
>
> tx3 = qmp->port_b + offs->tx;
> rx3 = qmp->port_b + offs->rx;
> tx4 = qmp->port_b + offs->tx2;
> rx4 = qmp->port_b + offs->rx2;
> + serdes = qmp->port_b + offs->serdes;
And use the same order here (move serdes above tx3).
> + pcs = qmp->port_b + offs->pcs;
> + pcs_misc = qmp->port_b + offs->pcs_misc;
> + ln_shrd = qmp->port_b + offs->ln_shrd;
> qmp_configure_lane(tx3, tbls->tx, tbls->tx_num, 1);
> qmp_configure_lane(rx3, tbls->rx, tbls->rx_num, 1);
>
> qmp_configure_lane(tx4, tbls->tx, tbls->tx_num, 2);
> qmp_configure_lane(rx4, tbls->rx, tbls->rx_num, 2);
> +
> + qmp_configure(serdes, tbls->serdes, tbls->serdes_num);
> + qmp_configure(serdes, cfg->serdes_4ln_tbl, cfg->serdes_4ln_num);
And here (e.g. move serdes above tx3).
> +
> + qmp_configure(pcs, tbls->pcs, tbls->pcs_num);
> + qmp_configure(pcs_misc, tbls->pcs_misc, tbls->pcs_misc_num);
> +
> + qmp_configure(ln_shrd, tbls->ln_shrd, tbls->ln_shrd_num);
> }
Johan
next prev parent reply other threads:[~2024-07-26 14:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-26 8:09 [PATCH] phy: qcom: qmp-pcie: Configure all tables on port B PHY Abel Vesa
2024-07-26 14:38 ` Johan Hovold [this message]
2024-07-26 14:42 ` Johan Hovold
2024-07-31 11:22 ` Vinod Koul
2024-07-31 11:37 ` Johan Hovold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZqO0_HyMl77yIGK-@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=abel.vesa@linaro.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=johan+linaro@kernel.org \
--cc=kishon@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=quic_qianyu@quicinc.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox