public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <niklas.cassel@linaro.org>
To: Paolo Pisati <p.pisati@gmail.com>
Cc: Vivek Gautam <vivek.gautam@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: msm8996: qcom-qmp: apq8096-db820c fails to boot, reset back to fastboot and locks up
Date: Wed, 12 Jun 2019 18:20:48 +0200	[thread overview]
Message-ID: <20190612162048.GA30551@centauri> (raw)
In-Reply-To: <20190612140911.GA16863@harukaze>

On Wed, Jun 12, 2019 at 04:09:11PM +0200, Paolo Pisati wrote:
> On Wed, Jun 12, 2019 at 03:17:35PM +0200, Niklas Cassel wrote:
> > > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c
> > > index cd91b4179b10..22352e3b0ec5 100644
> > > --- a/drivers/phy/qualcomm/phy-qcom-qmp.c
> > > +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
> > > @@ -1490,7 +1490,7 @@ static int qcom_qmp_phy_enable(struct phy *phy)
> > >  
> > >         ret = qcom_qmp_phy_com_init(qphy);
> > >         if (ret)
> > > -               return ret;
> > > +               goto err_lane_rst;
> > >  
> > >         if (cfg->has_lane_rst) {
> > >                 ret = reset_control_deassert(qphy->lane_rst);
> 
> Hi Niklas,
> unfortunately, it didn't help - i added a printk, to highlight when it failed:
> 
> --- a/drivers/phy/qualcomm/phy-qcom-qmp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
> @@ -1489,8 +1489,10 @@ static int qcom_qmp_phy_enable(struct phy *phy)
>         }
>  
>         ret = qcom_qmp_phy_com_init(qphy);
> -       if (ret)
> -               return ret;
> +       if (ret) {
> +               dev_err(qmp->dev, "qphy initialization failed\n");
> +               goto err_lane_rst;
> +       }
>  
>         if (cfg->has_lane_rst) {
>                 ret = reset_control_deassert(qphy->lane_rst);
> 
> After several reboots i was able to trigger the phy init failure again:
> 
> ...
> [    2.223999] qcom-qmp-phy 34000.phy: Registered Qcom-QMP phy
> [    2.224956] qcom-qmp-phy 7410000.phy: Registered Qcom-QMP phy
> [    2.228798] ufs_qcom_phy_qmp_14nm 627000.phy: invalid resource
> [    2.237271] qcom-qmp-phy 34000.phy: phy common block init timed-out
> [    2.240315] qcom-qmp-phy 34000.phy: qphy initialization failed
> ...

I still think that the above patch is correct,
even though it didn't fix your problem.

If you try to disable the two other PCIe controllers:

diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi b/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
index 943f69912074..95900fe99f89 100644
--- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
@@ -455,12 +455,12 @@
                        };
 
                        pcie@608000 {
-                               status = "okay";
+                               status = "disabled";
                                perst-gpio = <&msmgpio 130 GPIO_ACTIVE_LOW>;
                        };
 
                        pcie@610000 {
-                               status = "okay";
+                               status = "disabled";
                                perst-gpio = <&msmgpio 114 GPIO_ACTIVE_LOW>;
                        };
                };


Can you still reproduce the reboot?


Kind regards,
Niklas

> 
> these are the last lines printed, before rebooting in fastboot and
> locking up there (as before[*]).
> 
> So, as far as i understand there are two distinct problems:
> 
> 1) sometimes, qcom-qmp-phy fails to initialize
> 
> 2) and when that happens, the failure is fatal and it led to a reboot & lockup
> in fastboot
> 
> 1: https://pastebin.ubuntu.com/p/rtjVrD3yzk/
> -- 
> bye,
> p.

  reply	other threads:[~2019-06-12 16:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-10 13:44 msm8996: qcom-qmp: apq8096-db820c fails to boot, reset back to fastboot and locks up Paolo Pisati
2019-06-11 17:12 ` Niklas Cassel
2019-06-12 13:17   ` Niklas Cassel
2019-06-12 14:09     ` Paolo Pisati
2019-06-12 16:20       ` Niklas Cassel [this message]
2019-06-13  8:57         ` Paolo Pisati
2019-06-13  9:19 ` Marc Gonzalez

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=20190612162048.GA30551@centauri \
    --to=niklas.cassel@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.pisati@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox