Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5760255ybl; Tue, 10 Dec 2019 11:03:15 -0800 (PST) X-Google-Smtp-Source: APXvYqxiwp0U+hXTk0MJt/bSqfol0MHAnp7b+ekOwecL9OVV5Fj9OTp7fwwDGB/q9k+toSIWV98G X-Received: by 2002:aca:4a08:: with SMTP id x8mr320611oia.39.1576004594996; Tue, 10 Dec 2019 11:03:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576004594; cv=none; d=google.com; s=arc-20160816; b=pRfxVMg7hR2vt1v4gtOYgWsNTlXccOYnoOKfxkhvJ74DWqH+iLAtTP7uwag8w3AbS7 YLtZSxZB3FY5wZN+eSXj1bQAwqMfAZX/6hMtqECEiQdLJpZ3fv54v2/kltgLOD9JFl0j UZ5wDpOfRL+Fo8aEQgwPaATNOMcHgZew/cjwVliZ4F+by+NfJWZuGCcRCIGJDB2Q3snQ 5PikgELEoZpDHwZ305MTvSfmIvtyyUYsCaHdpiVeWNHh4a9HfnDyDRWxhVP0aBsmBzw0 1XfdSUEyPlX86JUCuh4tOAXeP44RFbsKruCq0uUzhy4Nrh9KKs82lWYyQlJ9DzPpsREz 4a/Q== 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=OQfRjsctq07bGONJSMNK5xeyNODUsGkcRHUxYCc8g7g=; b=FNleMbh0lc7yVf9htAnWZ7FrKCI1a9hm4k/mzzUBZbLD7pvD0ZA9gVHZX8SiCShj89 JKqKaLl9yWubCmJSiPXb8LBcvSe30WmquHqBYjmzEy0K0j9RpdpUizyqnNknzH33Pmb+ 6GdndSQq3dIIY8bRKZ8e4E+wkRRjbyAoXQlYErcpveAnkPqibduvB+3tLMDGStDlynlz yVq2ptyD5xxwxr6i+eL19bVaEra+fHp+TI9cZYmrOVIL5KbsKpjc3aC8IirbBGUbjilZ UbFDVDiz7Z6ch8MV6YgiZXWbBcj+EW5n1/IHQj71iCL2arKJxv/9FGo+7a+cenBaGn60 9JyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SILCAyeq; 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 n23si2432082otf.265.2019.12.10.11.03.01; Tue, 10 Dec 2019 11:03:14 -0800 (PST) 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=SILCAyeq; 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 S1727643AbfLJTCQ (ORCPT + 99 others); Tue, 10 Dec 2019 14:02:16 -0500 Received: from mail-pj1-f68.google.com ([209.85.216.68]:33371 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727374AbfLJTCQ (ORCPT ); Tue, 10 Dec 2019 14:02:16 -0500 Received: by mail-pj1-f68.google.com with SMTP id r67so7767237pjb.0 for ; Tue, 10 Dec 2019 11:02:16 -0800 (PST) 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=OQfRjsctq07bGONJSMNK5xeyNODUsGkcRHUxYCc8g7g=; b=SILCAyeqYZkfiGWeLnU1e9E7rnZFBNzmUHTtrq34RIAFHV4jn8eOcNrZ159HiZEY38 kmjLvMsFvXSnvloHvWchwJk3qkmVWGGCVhj2Ncy0NFnLrGlvvnb44UuBliZW1BvzGBR+ p9jwz1CkvGO3WNZqJBtkq8ej6k6noCI9p0h6CvDSUCnjymNVLLBVRRgPlGoWCKWXXEiT HhuQgONTPCJMBV7yZQZ47dHIp4EzevNQF4q6xmZojk7HRhsWApsVz8TTKYtAKwftvWbv EBWqgpIZ9vD+2pmdWmqe2SUQM6K3mhpAggMC/2bIcXxtnxLnzAuvIdjiIKMRy1WtOv/B Ry5A== 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=OQfRjsctq07bGONJSMNK5xeyNODUsGkcRHUxYCc8g7g=; b=unmxtmUpWKbvwpHZikZh314zHZTzglCE21Kd9rX2tNRtrNAPDVrDV4iSJKF25plv4w kzGxboVmeUMiOXqvfxTCgHFRinApe13Pgxvle6y0Q31VwSsDbuG1RmKRMkpSiBfLhuVe 43MnfAz9399VcdUhZM1GDx1LDEtGk0+9DhAO8V1GfsrvxyVddhVW+KTomCWYymL/ACm4 CiTbh/qm2YYuVeICriPnx4pQUq9b1Uanmd0XVGOcX4sgOOG+uAgc8flDDetBTpRghejL /bC/PCE2tmHwkX9Y73H7U7inbm+PfDUZbJaKdkuKvs+FUrs9SNANCBvrx1WfR/wcgIFG wNyg== X-Gm-Message-State: APjAAAXYK7E6fihefjg4y6l5AoOsWFIeJ+MhZYldVZVDd4h3H6PjVkab Fyc/5sB1f+PuG5e5o3KmkZZDLw== X-Received: by 2002:a17:90a:8a0c:: with SMTP id w12mr7084397pjn.61.1576004535850; Tue, 10 Dec 2019 11:02:15 -0800 (PST) Received: from yoga ([2607:fb90:8497:e902:4ce0:3dff:fe1c:88ba]) by smtp.gmail.com with ESMTPSA id j18sm4132196pfn.112.2019.12.10.11.02.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2019 11:02:14 -0800 (PST) Date: Tue, 10 Dec 2019 11:02:11 -0800 From: Bjorn Andersson To: Evan Green Cc: Kishon Vijay Abraham I , Can Guo , Douglas Anderson , linux-kernel@vger.kernel.org, Andy Gross , linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] phy: ufs-qcom: Invert PCS ready logic for SDM845 UFS Message-ID: <20191210190211.GE314059@yoga> References: <20191209135934.1.Iaaf3ad8a27b00f2f2bc333486a1ecc9985bb5170@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191209135934.1.Iaaf3ad8a27b00f2f2bc333486a1ecc9985bb5170@changeid> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 09 Dec 14:00 PST 2019, Evan Green wrote: > The SDM845 UFS phy seems to want to do a low transition to become > ready, rather than a high transition. Without this, I am unable to > enumerate UFS on SDM845 when booted from USB. > > Fixes: 14ced7e3a1a ('phy: qcom-qmp: Correct ready status, again') > > Signed-off-by: Evan Green As concluded offline, the current logic is correct, but for some reason we need a longer timeout on this particular device. Regards, Bjorn > --- > > Bjorn, > At this point I'm super confused on what the correct behavior > should be. Lack of documentation doesn't help. I'm worried that this > change breaks UFS on some other platforms, so I'm hoping you or some > PHY folks might have some advice on what the right thing to do is. > > --- > drivers/phy/qualcomm/phy-qcom-qmp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c > index 091e20303a14d..c4f4294360b6e 100644 > --- a/drivers/phy/qualcomm/phy-qcom-qmp.c > +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c > @@ -1657,7 +1657,7 @@ static int qcom_qmp_phy_enable(struct phy *phy) > if (cfg->type == PHY_TYPE_UFS) { > status = pcs + cfg->regs[QPHY_PCS_READY_STATUS]; > mask = PCS_READY; > - ready = PCS_READY; > + ready = 0; > } else { > status = pcs + cfg->regs[QPHY_PCS_STATUS]; > mask = PHYSTATUS; > -- > 2.21.0 >