From: Vinod Koul <vkoul@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, mani@kernel.org
Cc: Johan Hovold <johan+linaro@kernel.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
Kishon Vijay Abraham I <kishon@ti.com>,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 16/20] phy: qcom-qmp-pcie: drop start-ctrl abstraction
Date: Fri, 28 Oct 2022 17:53:31 +0530 [thread overview]
Message-ID: <Y1vJw2Co5tVhUrc+@matsya> (raw)
In-Reply-To: <81632b90-bc8a-7f3b-d2c9-153b4cea16ed@linaro.org>
On 13-10-22, 00:20, Dmitry Baryshkov wrote:
> On 12/10/2022 11:49, Johan Hovold wrote:
> > All PCIe PHYs need to start and stop the SerDes and PCS so drop the
> > start-ctrl abstraction which is no longer needed since the QMP driver
> > split.
> >
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> > ---
> > drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 18 +++---------------
> > 1 file changed, 3 insertions(+), 15 deletions(-)
>
> I think it should be possible to also drop the pwrdn_ctrl by replacing it
> with something like no_refclk_drv_dsbl. However I'd like to understand why
> this is not required for SDX55. Is this the peculiarity of that platform? Or
> is it a specifics of the EP mode?
> Many, Vinod, do you know the answer by chance?
Adding Mani, i am not sure maybe sdx55 specific...?
>
> Nevertheless, for this patch:
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>
> >
> > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> > index d3e7e673114f..5534a4ad0243 100644
> > --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> > +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> > @@ -1355,7 +1355,6 @@ struct qmp_phy_cfg {
> > /* array of registers with different offsets */
> > const unsigned int *regs;
> > - unsigned int start_ctrl;
> > unsigned int pwrdn_ctrl;
> > /* bit offset of PHYSTATUS in QPHY_PCS_STATUS register */
> > unsigned int phy_status;
> > @@ -1491,7 +1490,6 @@ static const struct qmp_phy_cfg ipq8074_pciephy_cfg = {
> > .num_vregs = 0,
> > .regs = pciephy_regs_layout,
> > - .start_ctrl = SERDES_START | PCS_START,
> > .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL,
> > .phy_status = PHYSTATUS,
> > };
> > @@ -1517,7 +1515,6 @@ static const struct qmp_phy_cfg ipq8074_pciephy_gen3_cfg = {
> > .num_vregs = 0,
> > .regs = ipq_pciephy_gen3_regs_layout,
> > - .start_ctrl = SERDES_START | PCS_START,
> > .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL,
> > .phy_status = PHYSTATUS,
> > @@ -1547,7 +1544,6 @@ static const struct qmp_phy_cfg ipq6018_pciephy_cfg = {
> > .num_vregs = 0,
> > .regs = ipq_pciephy_gen3_regs_layout,
> > - .start_ctrl = SERDES_START | PCS_START,
> > .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL,
> > .phy_status = PHYSTATUS,
> > };
> > @@ -1575,7 +1571,6 @@ static const struct qmp_phy_cfg sdm845_qmp_pciephy_cfg = {
> > .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> > .regs = sdm845_qmp_pciephy_regs_layout,
> > - .start_ctrl = PCS_START | SERDES_START,
> > .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL,
> > .phy_status = PHYSTATUS,
> > };
> > @@ -1601,7 +1596,6 @@ static const struct qmp_phy_cfg sdm845_qhp_pciephy_cfg = {
> > .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> > .regs = sdm845_qhp_pciephy_regs_layout,
> > - .start_ctrl = PCS_START | SERDES_START,
> > .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL,
> > .phy_status = PHYSTATUS,
> > };
> > @@ -1639,7 +1633,6 @@ static const struct qmp_phy_cfg sm8250_qmp_gen3x1_pciephy_cfg = {
> > .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> > .regs = sm8250_pcie_regs_layout,
> > - .start_ctrl = PCS_START | SERDES_START,
> > .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL,
> > .phy_status = PHYSTATUS,
> > };
> > @@ -1677,7 +1670,6 @@ static const struct qmp_phy_cfg sm8250_qmp_gen3x2_pciephy_cfg = {
> > .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> > .regs = sm8250_pcie_regs_layout,
> > - .start_ctrl = PCS_START | SERDES_START,
> > .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL,
> > .phy_status = PHYSTATUS,
> > };
> > @@ -1703,7 +1695,6 @@ static const struct qmp_phy_cfg msm8998_pciephy_cfg = {
> > .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> > .regs = pciephy_regs_layout,
> > - .start_ctrl = SERDES_START | PCS_START,
> > .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL,
> > .phy_status = PHYSTATUS,
> > @@ -1733,7 +1724,6 @@ static const struct qmp_phy_cfg sc8180x_pciephy_cfg = {
> > .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> > .regs = sm8250_pcie_regs_layout,
> > - .start_ctrl = PCS_START | SERDES_START,
> > .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL,
> > .phy_status = PHYSTATUS,
> > };
> > @@ -1761,7 +1751,6 @@ static const struct qmp_phy_cfg sdx55_qmp_pciephy_cfg = {
> > .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> > .regs = sm8250_pcie_regs_layout,
> > - .start_ctrl = PCS_START | SERDES_START,
> > .pwrdn_ctrl = SW_PWRDN,
> > .phy_status = PHYSTATUS_4_20,
> > };
> > @@ -1789,7 +1778,6 @@ static const struct qmp_phy_cfg sm8450_qmp_gen3x1_pciephy_cfg = {
> > .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> > .regs = sm8250_pcie_regs_layout,
> > - .start_ctrl = SERDES_START | PCS_START,
> > .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL,
> > .phy_status = PHYSTATUS,
> > };
> > @@ -1832,7 +1820,6 @@ static const struct qmp_phy_cfg sm8450_qmp_gen4x2_pciephy_cfg = {
> > .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> > .regs = sm8250_pcie_regs_layout,
> > - .start_ctrl = SERDES_START | PCS_START,
> > .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL,
> > .phy_status = PHYSTATUS_4_20,
> > };
> > @@ -1997,7 +1984,7 @@ static int qmp_pcie_power_on(struct phy *phy)
> > qphy_clrbits(pcs, cfg->regs[QPHY_SW_RESET], SW_RESET);
> > /* start SerDes and Phy-Coding-Sublayer */
> > - qphy_setbits(pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl);
> > + qphy_setbits(pcs, cfg->regs[QPHY_START_CTRL], SERDES_START | PCS_START);
> > if (!cfg->skip_start_delay)
> > usleep_range(1000, 1200);
> > @@ -2030,7 +2017,8 @@ static int qmp_pcie_power_off(struct phy *phy)
> > qphy_setbits(qphy->pcs, cfg->regs[QPHY_SW_RESET], SW_RESET);
> > /* stop SerDes and Phy-Coding-Sublayer */
> > - qphy_clrbits(qphy->pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl);
> > + qphy_clrbits(qphy->pcs, cfg->regs[QPHY_START_CTRL],
> > + SERDES_START | PCS_START);
> > /* Put PHY into POWER DOWN state: active low */
> > qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL],
>
> --
> With best wishes
> Dmitry
--
~Vinod
next prev parent reply other threads:[~2022-10-28 12:23 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 8:48 [PATCH 00/20] phy: qcom-qmp: further prep fixes and cleanups (set 3) Johan Hovold
2022-10-12 8:49 ` [PATCH 01/20] phy: qcom-qmp-pcie: fix sc8180x initialisation Johan Hovold
2022-10-12 8:49 ` [PATCH 02/20] phy: qcom-qmp-pcie: fix ipq8074-gen3 initialisation Johan Hovold
2022-10-12 20:44 ` Dmitry Baryshkov
2022-10-12 8:49 ` [PATCH 03/20] phy: qcom-qmp-pcie: fix ipq6018 initialisation Johan Hovold
2022-10-12 20:44 ` Dmitry Baryshkov
2022-10-12 8:49 ` [PATCH 04/20] phy: qcom-qmp-pcie: clean up status polling Johan Hovold
2022-10-12 20:45 ` Dmitry Baryshkov
2022-10-12 8:49 ` [PATCH 05/20] phy: qcom-qmp-pcie: increase status polling period Johan Hovold
2022-10-12 8:49 ` [PATCH 06/20] phy: qcom-qmp-pcie-msm8996: clean up ready and status polling Johan Hovold
2022-10-12 20:47 ` Dmitry Baryshkov
2022-10-12 8:49 ` [PATCH 07/20] phy: qcom-qmp-pcie-msm8996: increase status polling period Johan Hovold
2022-10-12 8:49 ` [PATCH 08/20] phy: qcom-qmp-combo: clean up status polling Johan Hovold
2022-10-12 21:14 ` Dmitry Baryshkov
2022-10-17 6:55 ` Johan Hovold
2022-10-12 8:49 ` [PATCH 09/20] phy: qcom-qmp-combo: increase status polling period Johan Hovold
2022-10-12 8:49 ` [PATCH 10/20] phy: qcom-qmp-ufs: drop unused phy-status config Johan Hovold
2022-10-12 21:14 ` Dmitry Baryshkov
2022-10-12 8:49 ` [PATCH 11/20] phy: qcom-qmp-ufs: clean up ready polling Johan Hovold
2022-10-12 21:14 ` Dmitry Baryshkov
2022-10-12 8:49 ` [PATCH 12/20] phy: qcom-qmp-ufs: increase ready polling period Johan Hovold
2022-10-12 8:49 ` [PATCH 13/20] phy: qcom-qmp-usb: clean up status polling Johan Hovold
2022-10-12 21:15 ` Dmitry Baryshkov
2022-10-12 8:49 ` [PATCH 14/20] phy: qcom-qmp-usb: increase status polling period Johan Hovold
2022-10-12 8:49 ` [PATCH 15/20] phy: qcom-qmp-combo: drop start and pwrdn-ctrl abstraction Johan Hovold
2022-10-12 21:16 ` Dmitry Baryshkov
2022-10-12 8:49 ` [PATCH 16/20] phy: qcom-qmp-pcie: drop start-ctrl abstraction Johan Hovold
2022-10-12 21:20 ` Dmitry Baryshkov
2022-10-28 12:23 ` Vinod Koul [this message]
2022-10-12 8:49 ` [PATCH 17/20] phy: qcom-qmp-pcie: add config sanity checks Johan Hovold
2022-10-12 21:20 ` Dmitry Baryshkov
2022-10-12 8:50 ` [PATCH 18/20] phy: qcom-qmp-pcie-msm8996: drop start and pwrdn-ctrl abstraction Johan Hovold
2022-10-12 21:20 ` Dmitry Baryshkov
2022-10-12 8:50 ` [PATCH 19/20] phy: qcom-qmp-ufs: " Johan Hovold
2022-10-12 21:20 ` Dmitry Baryshkov
2022-10-12 8:50 ` [PATCH 20/20] phy: qcom-qmp-usb: " Johan Hovold
2022-10-12 21:21 ` Dmitry Baryshkov
2022-10-12 20:44 ` [PATCH 01/20] phy: qcom-qmp-pcie: fix sc8180x initialisation Dmitry Baryshkov
2022-10-12 12:36 ` [PATCH 00/20] phy: qcom-qmp: further prep fixes and cleanups (set 3) Johan Hovold
2022-10-28 12:25 ` Vinod Koul
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=Y1vJw2Co5tVhUrc+@matsya \
--to=vkoul@kernel.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=johan+linaro@kernel.org \
--cc=kishon@ti.com \
--cc=konrad.dybcio@somainline.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=mani@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;
as well as URLs for NNTP newsgroup(s).