Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3584824pxk; Mon, 21 Sep 2020 18:50:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxMgP74GtGdyvuIXM+5NZPTxc9boVi9B9de5h3czV28fBOUjDmtqcffZ3+pL4i7hB7Kzoo X-Received: by 2002:a17:907:72cc:: with SMTP id du12mr2334506ejc.150.1600739414202; Mon, 21 Sep 2020 18:50:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600739414; cv=none; d=google.com; s=arc-20160816; b=gaP+QcmQFOu08rY2ICnejz/phAsK36i+uI6mX8/t8h04Cq5qrjtechIcHTnCvTHSc1 Pcgx+kgtGk65RYnJJYZKe9JcGgV69B93T9DsXL8xvT3WqL1wY+If2H7gyuIBvxkUwUKk /s0AIiJijcpP0/rQmCQtd8Ik1rV0Z2FUi8+4PzzvG1yN+ATedQb87A0AnelCNzDfmPaZ OwX8aBxHkEeB4y3hhE0VSs3lKzxJCnNxg0io/0sQm/7FWUWfa4sw25PXnZVTthhtQDBq ULUfTneFqdukMCYgA+10CsZ3mkkTFqJMDFbWlcq7utpYRpWCYQgr+EHH5NZdLQCxt60A MIEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=c7d1ZHf6hruUfheuX8IrRgfyoHv969LCspu96Gk4jWw=; b=rblHX08z3EiWjJTCxDqN3CVPAabX7m4EW/m1RSN+f6Q2yvorejjZK28IFzLF+Jisel g/+qGHUhJJyqbCGsi8Ce+x8JTphxznwt7figZwNvDfbpM0cIg4FVbAXBlmxV7MEoZYnh 8ovntHWER5q75/dVCvlgmMkLy08DjCFBP2VurDWhVYN0j8Q8BbWBPPWbVzW+Hqi6Uq9s SyZ7s3JJAD945180qCyWkZzWoJVc/UrI8REHbq6tLzMYcK1YJv2pmYHYc0gNGw1OZbim c32nWY4Bj5m1QIa8u+m6tpJmIUc5oY0ITtLaxFab4Doyogc7Bg3EY+cAOfbq1wHArc6d sJKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bGE5yCUm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id p17si9473858ejo.270.2020.09.21.18.49.51; Mon, 21 Sep 2020 18:50:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bGE5yCUm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1729052AbgIVAgL (ORCPT + 99 others); Mon, 21 Sep 2020 20:36:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726702AbgIVAgK (ORCPT ); Mon, 21 Sep 2020 20:36:10 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93390C061755 for ; Mon, 21 Sep 2020 17:36:10 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id a3so19149080oib.4 for ; Mon, 21 Sep 2020 17:36:10 -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; bh=c7d1ZHf6hruUfheuX8IrRgfyoHv969LCspu96Gk4jWw=; b=bGE5yCUmr0pws3QG29/8q+aHDyYYYNNc0WDpPBYqLlP5eBQN1C81DRyriyDz/PUBWq 0PnLvXuaWQDvYbTUusp0Wxy4hbGxL6J4wKE4e2YlpBm+/Bffb4HO+iMM/kv3XKNio3fh ZJQWkRorKSfkk8+XHv99H3Cksd1nfRbmJB+Vwydug6Hupt5I5/uCbT7536vK+JmObKCu 6vsrYuSlIuw1O89pqRLnuO0P0uf8MPedPN7+9GbmEFyvWPnZJJ35ZIYzRkiYcfiUHOGU OkUyTmZpRkVRvasaxIL6Wa+/h8sWYuNOtCrADUKRu/tEPIzsSP1GSs1/0+v2TrcghqL1 e4XA== 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; bh=c7d1ZHf6hruUfheuX8IrRgfyoHv969LCspu96Gk4jWw=; b=mDJEhVj9exL5+usgpwC06h/M3HoqDoWbU3EWyGgxxIzLDZ2iWIdj3O/qnCY0EJgLc2 Ef6mjhIKSji4sjZ0/lLrKbDEJ5e5L3u9+Jfr4SBvq5abeLaMW1buUkGy36z3hI/WsalX 5EjzQOVBLu03BnHzbOqYF7RNiQQKnpcAw/gF5GxJ3NBWqJHuhYvYMEkRWnSkgc3kj/7w 3XzF2NFXOdlBbnV3HUqRfzE6roN+mW7kvV2R5BIlaKEm9ht1wwjfTbGNmB+JhOtYGcMq cSTyvrM6GYbcqLdcxKyalCmn+ojjzlJfWXVZO7TZwmchNfZnGA03ITf0zNBezD0Czfzi loPQ== X-Gm-Message-State: AOAM531fm7aQqGI96u5d+XR2Gnl5vy/KJAV7SkWWWslwz+gOlonbC7yY aRE8FCWK5987wdAFFLAzGRkIiw== X-Received: by 2002:a54:411a:: with SMTP id l26mr1109432oic.12.1600734968942; Mon, 21 Sep 2020 17:36:08 -0700 (PDT) Received: from yoga (99-135-181-32.lightspeed.austtx.sbcglobal.net. [99.135.181.32]) by smtp.gmail.com with ESMTPSA id 187sm7181376oie.42.2020.09.21.17.36.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2020 17:36:08 -0700 (PDT) Date: Mon, 21 Sep 2020 19:36:06 -0500 From: Bjorn Andersson To: nguyenb@codeaurora.org Cc: Rob Herring , Can Guo , Asutosh Das , "Martin K. Petersen" , SCSI , linux-arm-msm , Avri Altman , Vinod Koul , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list Subject: Re: [PATCH v1 1/2] scsi: dt-bindings: ufs: Add vcc-voltage-level for UFS Message-ID: <20200922003606.GA40811@yoga> References: <0a9d395dc38433501f9652a9236856d0ac840b77.1598939393.git.nguyenb@codeaurora.org> <20200914183505.GA357@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 21 Sep 19:22 CDT 2020, nguyenb@codeaurora.org wrote: > On 2020-09-18 12:01, Rob Herring wrote: > > On Tue, Sep 15, 2020 at 2:10 AM wrote: > > > > > > On 2020-09-14 11:35, Rob Herring wrote: > > > > On Mon, Aug 31, 2020 at 11:00:47PM -0700, Bao D. Nguyen wrote: > > > >> UFS's specifications supports a range of Vcc operating > > > >> voltage levels. Add documentation for the UFS's Vcc voltage > > > >> levels setting. > > > >> > > > >> Signed-off-by: Can Guo > > > >> Signed-off-by: Asutosh Das > > > >> Signed-off-by: Bao D. Nguyen > > > >> --- > > > >> Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt | 2 ++ > > > >> 1 file changed, 2 insertions(+) > > > >> > > > >> diff --git a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt > > > >> b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt > > > >> index 415ccdd..7257b32 100644 > > > >> --- a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt > > > >> +++ b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt > > > >> @@ -23,6 +23,8 @@ Optional properties: > > > >> with "phys" attribute, provides phandle to > > > >> UFS PHY node > > > >> - vdd-hba-supply : phandle to UFS host controller supply > > > >> regulator node > > > >> - vcc-supply : phandle to VCC supply regulator node > > > >> +- vcc-voltage-level : specifies voltage levels for VCC supply. > > > >> + Should be specified in pairs (min, max), > > > >> units uV. > > > > > > > > The expectation is the regulator pointed to by 'vcc-supply' has the > > > > voltage constraints. Those constraints are supposed to be the board > > > > constraints, not the regulator operating design constraints. If that > > > > doesn't work for your case, then it should be addressed in a common way > > > > for the regulator binding. > > > The UFS regulator has a min_uV and max_uV limits. Currently, the min > > > and > > > max are hardcoded > > > to UFS2.1 Spec allowed values of 2.7V and 3.6V respectively. > > > With this change, I am trying to fix a couple issues: > > > 1. The 2.7V min value only applies to UFS2.1 devices. with UFS3.0+ > > > devices, the VCC min should be 2.4V. > > > Hardcoding the min_uV to 2.7V does not work for UFS3.0+ devices. > > > > Don't you know the device version attached and can adjust the voltage > > based on that? Or you have to set the voltage first? > Yes it is one of the solutions. Once detect the UFS device is version 3.0+, > you can lower > the voltage to 2.5V from the hardcoded value used by the driver. However, to > change the > Vcc voltage, the host needs to follow a sequence to ensure safe operations > after Vcc change > (device has to be in sleep mode, Vcc needs to go down to 0 then up to 2.5V.) > Also same sequence is repeated for every host initialization which is > inconvenient. > It sounds like you're suggesting that we detect the UFS device using some voltage, then depending on version we might lower it to 2.5V. I'm afraid I don't see any of this either documented or implemented in these patches. What is this initial detection voltage and how to you configure it? Regards, Bjorn > > > > > 2. Allow users to select a different Vcc voltage within the allowed > > > range. > > > Using the min value, the UFS device is operating at marginal Vcc > > > voltage. > > > In addition the PMIC and the board designs may add some variables > > > especially at extreme > > > temperatures. We observe stability issues when using the min Vcc > > > voltage. > > > > Again, we have standard regulator properties for this already that you > > can tune per board. > Thank you for the suggestion. > > > > > Rob