From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Marc Gonzalez <marc.w.gonzalez@free.fr>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
MSM <linux-arm-msm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Evan Green <evgreen@chromium.org>,
Vivek Gautam <vivek.gautam@codeaurora.org>,
Niklas Cassel <niklas.cassel@linaro.org>,
Stanimir Varbanov <svarbanov@mm-sol.com>
Subject: Re: [PATCH] phy: qcom-qmp: Correct READY_STATUS poll break condition
Date: Mon, 5 Aug 2019 17:43:42 -0700 [thread overview]
Message-ID: <20190806004342.GD6470@builder> (raw)
In-Reply-To: <5b252fe6-9435-2aad-d0db-f6170a07b5e9@free.fr>
On Fri 19 Jul 08:50 PDT 2019, Marc Gonzalez wrote:
> On 13/06/2019 11:10, Marc Gonzalez wrote:
>
> > Here are my observations for a 8998 board:
> >
> > 1) If I apply only the readl_poll_timeout() fix (not the mask_pcs_ready fixup)
> > qcom_pcie_probe() fails with a timeout in phy_init.
> > => this is in line with your regression analysis.
> >
> > 2) Your patch also fixes a long-standing bug in UFS init whereby sending
> > lots of information to the console during phy init would lead to an
> > incorrectly diagnosed time-out.
> >
> > Good stuff!
> >
> > Reviewed-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
> > Tested-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
>
> It looks like this patch fixed UFS, but broke PCIe and USB3 ^_^
>
> qcom-qmp-phy 1c06000.phy: Registered Qcom-QMP phy
> qcom-qmp-phy c010000.phy: Registered Qcom-QMP phy
> qcom-qmp-phy 1da7000.phy: Registered Qcom-QMP phy
>
> qcom-qmp-phy 1c06000.phy: BEFORE=000000a6 AFTER=000000a6
> qcom-qmp-phy 1c06000.phy: phy initialization timed-out
> phy phy-1c06000.phy.0: phy init failed --> -110
> qcom-pcie: probe of 1c00000.pci failed with error -110
>
> qcom-qmp-phy 1da7000.phy: BEFORE=00000040 AFTER=0000000d
>
> qcom-qmp-phy c010000.phy: BEFORE=69696969 AFTER=b7b7b7b7
> qcom-qmp-phy c010000.phy: phy initialization timed-out
> phy phy-c010000.phy.1: phy init failed --> -110
> dwc3 a800000.dwc3: failed to initialize core: -110
> dwc3: probe of a800000.dwc3 failed with error -110
>
>
> Downstream code for PCIe is:
>
> static bool pcie_phy_is_ready(struct msm_pcie_dev_t *dev)
> {
> if (dev->phy_ver >= 0x20) {
> if (readl_relaxed(dev->phy + PCIE_N_PCS_STATUS(dev->rc_idx, dev->common_phy)) & BIT(6))
> return false;
> else
> return true;
> }
>
> if (!(readl_relaxed(dev->phy + PCIE_COM_PCS_READY_STATUS) & 0x1))
> return false;
> else
> return true;
> }
>
> AFAICT:
> PCIe and USB3 QMP PHYs are ready when PHYSTATUS=BIT(6) goes to 0.
> But UFS is ready when PCS_READY=BIT(0) goes to 1.
>
>
> Can someone verify that USB3 is broken on 845 with 885bd765963b?
>
Both USB3 and PCIe still works for me on 845, but you are correct;
PHYSTATUS is ready low, while PCS_READY is ready high.
I posted a patch that attempts to clean up the differences, please give
it a spin (and review).
Regards,
Bjorn
prev parent reply other threads:[~2019-08-06 0:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-04 23:24 [PATCH] phy: qcom-qmp: Correct READY_STATUS poll break condition Bjorn Andersson
2019-06-04 23:35 ` Evan Green
2019-06-12 13:08 ` Niklas Cassel
2019-06-12 17:34 ` Bjorn Andersson
2019-06-12 16:24 ` Marc Gonzalez
2019-06-12 17:25 ` Bjorn Andersson
2019-06-13 9:10 ` Marc Gonzalez
2019-06-19 12:43 ` Marc Gonzalez
2019-07-19 15:50 ` Marc Gonzalez
2019-07-23 10:31 ` Marc Gonzalez
2019-08-02 19:54 ` Marc Gonzalez
2019-08-06 0:43 ` Bjorn Andersson [this message]
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=20190806004342.GD6470@builder \
--to=bjorn.andersson@linaro.org \
--cc=evgreen@chromium.org \
--cc=kishon@ti.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.w.gonzalez@free.fr \
--cc=niklas.cassel@linaro.org \
--cc=svarbanov@mm-sol.com \
--cc=vivek.gautam@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.