Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5943822ybi; Wed, 12 Jun 2019 11:07:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqybB4L0YC1rBnS6LJLnWME4F0h4c2ImAGGeVLiVhtZiZpfpGkOK1zxe7jrcRRxRIhPAn4bZ X-Received: by 2002:a17:90a:2486:: with SMTP id i6mr444724pje.125.1560362868885; Wed, 12 Jun 2019 11:07:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560362868; cv=none; d=google.com; s=arc-20160816; b=TykVEL0WkPT8PdZqMHMbhG2GSbSCq/W5AdjkUqkdEaB2kOK8QKmCMO9j9BUPy+RKz5 crT5VjOkoYEpEiDMiI9x3o2wV/bdBO8kVuwzksqxNxGMoH7Hk8KquksaAenLcyRXe3Qs bs+sMLyEl7pTTg7Tz1qINdXnpRAjynwg0hkD8ly28zo0kz61O+4hO9VW1EnyPc5UDXM4 YYDkzzHUc0jLwLVCVvgrta1Tx/w3bImh8mF0XWHmwbDMgNOG86RY+iKe2vl5SRYWHey8 gAPMEsXuQIdOVfEZLkXPjIVb3UlNimX1aGdoaM3pe95puo5GMVoZa59IX+2T7L/vkTDT Wyaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IGnqd9Lnz73Nlt6Cpd3RXZr+OtcI19F6L4MTrB8lLC0=; b=lVs+UKEU6vfjWpSDjRXolhaH3CGq9H2ZiXj5jIJ3HhythfHvt3wg6VBVph6uPs442z wHx1S47uU+Ccgj/8yWeAQUuWMwPbj4uNTnOVxtvSmctaoyXVfxROBrVmLOvGXPqgNFWB 7xc2Hg6vo8EvMAtdAVC86UCJ6DhL+liYnJmuoH1TR0G1XMCBjdl8Fh6v0IMilcsf0pb0 CzblyzNo/9R91vbH4cBqbu03YRSebWRM/smVrxYDJuKDgTjKqReETRIbPIGK4nqjyTG1 9KFKiDES6KSvg9Dt9ryLl1DcnIC81UTWlMyhXVEaqxt3e5+uHskG5V10f6iEfd26LNMV /WcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rOamw89o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si286846pls.374.2019.06.12.11.07.34; Wed, 12 Jun 2019 11:07:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rOamw89o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437629AbfFLQUy (ORCPT + 99 others); Wed, 12 Jun 2019 12:20:54 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:46893 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405705AbfFLQUx (ORCPT ); Wed, 12 Jun 2019 12:20:53 -0400 Received: by mail-lj1-f196.google.com with SMTP id v24so11280365ljg.13 for ; Wed, 12 Jun 2019 09:20:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=IGnqd9Lnz73Nlt6Cpd3RXZr+OtcI19F6L4MTrB8lLC0=; b=rOamw89o4BmOG4JNJsRrr9BwFaZsYUeeixxAWB3fLjpUS4o1qi7xp98nu7jQP/nWVI uK0WAHLscIq0hxWfnKOBQgdoIEKEFWtftt4M9pgvKM51Ge0C3clly+qCXa151h6JW2oi TmvXuHU2Kd6LsuZ6xTQkLGol/MT/K0MQuuSp/7vK2S74namjvp92dXKyc73/0nTgNOIX vKoy1bkZWZLcCUT35OpQV0hkoWR1dsCRdr0fTJepkOgjeKM4w9z89b+63AAPlpWH43Kq /1Hz2dm2h8N2OPoIIu+xqL39ZPrMeulAv2aq1JyLr1rGPQ3ZKWKq/pq/tjSW0xwAzCeI rlMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=IGnqd9Lnz73Nlt6Cpd3RXZr+OtcI19F6L4MTrB8lLC0=; b=AgxxzwpTNVYrF0ljwZ82upes5Glb25qMvsETPI4jdwe7Fz7hWkmMw9FFz5ibTyCFnr zMROn9MX4zTg+xr4+5I6xvlp7G908AZkYsO7EwfvyY1jBdRUp8hwX3HYRMBby3ISMTXT ttFcX6gDlbCT6ws88S8j899VyG+4Iz/rG6ibCCiWonytzx5ZO/CsGT24W1s2+i7NpStY yDPDb1oiqZWGYue7nCNIrGvprC9v+6CEvoDqAh4N26PsZg07aMB3NjpEDpXbQF4eCqsG ePEBAqnT9lFOYDvCrfuTaNFc6KcwBHn2bmHluxvYCMXHsdFH4EgdIkfTh68RzLCFuQls N2Gw== X-Gm-Message-State: APjAAAVUNTOHK1O01zGrEo/IR33LIZj/Tl1jkjRsfoLzUKulDtym9qfg 1OJFEGoJl8yKlXkPsBUvG02ucw== X-Received: by 2002:a2e:b009:: with SMTP id y9mr14742955ljk.152.1560356451323; Wed, 12 Jun 2019 09:20:51 -0700 (PDT) Received: from centauri (m83-185-80-163.cust.tele2.se. [83.185.80.163]) by smtp.gmail.com with ESMTPSA id 25sm48477ljo.38.2019.06.12.09.20.49 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 12 Jun 2019 09:20:50 -0700 (PDT) Date: Wed, 12 Jun 2019 18:20:48 +0200 From: Niklas Cassel To: Paolo Pisati Cc: Vivek Gautam , 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 Message-ID: <20190612162048.GA30551@centauri> References: <20190610134401.GA12964@harukaze> <20190611171225.GA21992@centauri.ideon.se> <20190612131735.GB11167@centauri> <20190612140911.GA16863@harukaze> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190612140911.GA16863@harukaze> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.