devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: nguyenb@codeaurora.org
Cc: Rob Herring <robh@kernel.org>, Can Guo <cang@codeaurora.org>,
	Asutosh Das <asutoshd@codeaurora.org>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	SCSI <linux-scsi@vger.kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Avri Altman <Avri.Altman@wdc.com>, Vinod Koul <vkoul@kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 1/2] scsi: dt-bindings: ufs: Add vcc-voltage-level for UFS
Date: Mon, 21 Sep 2020 19:36:06 -0500	[thread overview]
Message-ID: <20200922003606.GA40811@yoga> (raw)
In-Reply-To: <e489cee219d48e9f5e48dc30518f445b@codeaurora.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 <nguyenb@codeaurora.org> 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 <cang@codeaurora.org>
> > > >> Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
> > > >> Signed-off-by: Bao D. Nguyen <nguyenb@codeaurora.org>
> > > >> ---
> > > >>  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

  reply	other threads:[~2020-09-22  0:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1598939393.git.nguyenb@codeaurora.org>
2020-09-01  6:00 ` [PATCH v1 1/2] scsi: dt-bindings: ufs: Add vcc-voltage-level for UFS Bao D. Nguyen
2020-09-13  9:35   ` Avri Altman
2020-09-14 16:19     ` nguyenb
2020-09-14 18:35   ` Rob Herring
2020-09-15  8:10     ` nguyenb
2020-09-18 19:01       ` Rob Herring
2020-09-22  0:22         ` nguyenb
2020-09-22  0:36           ` Bjorn Andersson [this message]
2020-09-23 17:32             ` nguyenb
2020-09-15  4:41   ` Bjorn Andersson
2020-09-15  8:14     ` nguyenb
2020-09-15 13:43       ` Bjorn Andersson
2020-09-15 16:47         ` nguyenb
2020-09-15 18:36           ` Bjorn Andersson

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=20200922003606.GA40811@yoga \
    --to=bjorn.andersson@linaro.org \
    --cc=Avri.Altman@wdc.com \
    --cc=asutoshd@codeaurora.org \
    --cc=cang@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=nguyenb@codeaurora.org \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.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;
as well as URLs for NNTP newsgroup(s).