Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp578988imj; Sat, 9 Feb 2019 03:55:03 -0800 (PST) X-Google-Smtp-Source: AHgI3IYECYaPdUdfDxQXQWigtVhJMUKIZwVDIUIvzqazmMZ9hK0TfdgKjmltx5FJcgHMU09GfrVi X-Received: by 2002:a63:2b82:: with SMTP id r124mr24813877pgr.300.1549713303057; Sat, 09 Feb 2019 03:55:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549713303; cv=none; d=google.com; s=arc-20160816; b=GwmcM0X+MAG4ABRE9QEJ252VCTfJ89nWOQ4lPJCb+SyIUWTAmdpIWft9il73DIV5UE DWT16bjDrq00IeW/sPccTpiADTV78vgRV/1W4filTDW6B59WkxDwi5nBqLPYVx/Ap/up m6p4Q1AyopgjhgXwJnlXuhKPvyKidQbivZy7qGvCWhCNzrspyFf0Z3Dxw7Vi+FbnxYs0 HT0yoEAYfKfMplkngljL8QEfPIiaXKkbLFSjkHCswHNHHBOrfXDzArW320l3+aLyROsh IB2Yyux2pmOgCdf0v5tDsm45oI/9lnnp2BHgC+lFfvPnLH9A1sn4NbOegjgTbDmZfSf7 oGnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=Y8h9C4sCzSf6rmCuFmuk+grXgvCpyTW3u+iMZnIRNOI=; b=kMQ0FNbv6hSHrXVAna1qPNCA6abLntbrjbEx06w3pEfPM0kp9CaB6XVLF2sMsyH5B5 Yz4VOv6s9BecW7iaJc0Ww9+944WcAwh0nYDIw1z8juFBeRgRjaCmMGktSAoET//0POyC M9pm6iI81ZgfMz/0iL3UHmxyqWg+aVac77FLptQSUZnFZJEWw8KN6JgR2Agj3t6BUd6h 5K3W2CaCbrPonsZti70uryPvGXzmtak0BCOjpI6BC1vg8SD0pycnmCQYPB3PsfaNTq9g qq+en9MW3GiEDVGAmdSwn2IvjAhR5RbJ007QugoM1xmMpvrvTEvRcW10CvfziiJ9xs/6 xSfg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 23si479004pgs.342.2019.02.09.03.54.46; Sat, 09 Feb 2019 03:55:03 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726940AbfBILux (ORCPT + 99 others); Sat, 9 Feb 2019 06:50:53 -0500 Received: from smtp4-g21.free.fr ([212.27.42.4]:27248 "EHLO smtp4-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726670AbfBILux (ORCPT ); Sat, 9 Feb 2019 06:50:53 -0500 Received: from [192.168.1.42] (unknown [77.207.133.132]) (Authenticated sender: marc.w.gonzalez) by smtp4-g21.free.fr (Postfix) with ESMTPSA id 1D73719F5A6; Sat, 9 Feb 2019 12:50:12 +0100 (CET) Subject: Re: [PATCH v3 5/5] Revert "scsi: ufs: disable vccq if it's not needed by UFS device" To: Alim Akhtar , Mark Brown , Liam Girdwood , Rob Herring Cc: Jeffrey Hugo , MSM , LKML , Bjorn Andersson , Andy Gross , David Brown , Evan Green , Douglas Anderson , Avri Altman , Pedro Sousa , Subhash Jadavani , Bart Van Assche , SCSI , Hannes Reinecke References: <70618c25-83f0-b9db-51a3-c1d74b605a45@free.fr> <5f2a8378-1f22-6a52-356d-56d3b393ab1d@samsung.com> <05d2d193-4181-12ce-b4fb-4e8dec5aef27@free.fr> <7610c262-1451-9bb2-48a6-4daf6f534f6c@free.fr> <42c86292-22e9-4c5e-d64d-bc6107af45bf@free.fr> <740e6332-b54f-ab62-915a-0aec6be450d3@samsung.com> <2a59c11a-037f-c8c3-235a-9b21183a0801@free.fr> <90f24b35-89b0-cea0-1ab3-13c2a419b138@samsung.com> <81b85f39-49b5-901b-ec79-19708509965e@codeaurora.org> <2c0e5f03-0bb8-e5db-b5de-790da439fcfe@samsung.com> <349da668-6bb5-fcf4-c3f2-f7f7e113ed67@codeaurora.org> From: Marc Gonzalez Message-ID: Date: Sat, 9 Feb 2019 12:49:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding DT & regulator maintainers. FTR, we are discussing the revert of patch 60f0187031c0 in the UFSHC driver. On 09/02/2019 09:42, Alim Akhtar wrote: > On 08/02/19 8:29 PM, Jeffrey Hugo wrote: > >> The evidence seems simple.? We have properly described in DT all the >> regulators that are consumed by the UFS host controller, and by >> extension, the UFS storage chip as well. >> >> By default, with no kernel changes, UFS does not work. >> >> Marc and I debugged the issue, and found that the VCCQ regulator was not >> being handled properly, and reverting the change we are discussing fixes >> the VCCQ regulator issue, and, as a result, UFS works. > > OK, fair, before we revert this patch, Marc can you try below patch, > or let me know if you have already tried this and share your > result/observation: > > --- a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi > +++ b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi > @@ -212,6 +212,7 @@ > vreg_l26a_1p2: l26 { > regulator-min-microvolt = <1200000>; > regulator-max-microvolt = <1200000>; > + regulator-always-on; This property will make _regulator_disable() be (mostly) a NOP for vreg_l26a_1p2. So the UFSHC driver will not be able to disable vccq, and UFS will work. I tested something similar by making regulator_disable() a NOP which returns immediately. That's actually how I found the issue in the UFSHC driver ;-) But this is not a proper solution. This makes it impossible to disable l26, even when there is no UFS driver, or when the UFSHC goes into sleep mode. >> Our analysis is that VCCQ is required and 60f0187031c05e >> prevents the proper configuration of VCCQ, thus a required >> resource (VCCQ) is not in the proper state. > > Not in proper state or vccq regulator is disabled? The improper state is being disabled, instead of enabled. Regards.