From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 120D8C4727C for ; Tue, 22 Sep 2020 00:27:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BE16923A7A for ; Tue, 22 Sep 2020 00:27:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="oyEJP4j7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729301AbgIVA1U (ORCPT ); Mon, 21 Sep 2020 20:27:20 -0400 Received: from m42-4.mailgun.net ([69.72.42.4]:47902 "EHLO m42-4.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729289AbgIVA1T (ORCPT ); Mon, 21 Sep 2020 20:27:19 -0400 X-Greylist: delayed 300 seconds by postgrey-1.27 at vger.kernel.org; Mon, 21 Sep 2020 20:27:18 EDT DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1600734438; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=PdqP4FGb5EZsFTapTz6LcIRbM1yWrsKCeQEzm73+nKU=; b=oyEJP4j7/VPK8OQ9xYqlnkbOVdUZ6M2ItF+9+00nQQkszKelY/6S7Pzm/QSTZqzacOOGTr7A T36ZHcDIr+XvQWLU1DZ69CENRp+pzqWFciumzowJfhuM5X5CdoLwkjQTE7KTD2yOOnyBudiH PXNcnGQQ92BCpmZiLMa3sACeTfo= X-Mailgun-Sending-Ip: 69.72.42.4 X-Mailgun-Sid: WyI1YmJiNiIsICJkZXZpY2V0cmVlQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n02.prod.us-west-2.postgun.com with SMTP id 5f6943b8ea858627d5fa9247 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 22 Sep 2020 00:22:16 GMT Sender: nguyenb=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 6EE8AC433FF; Tue, 22 Sep 2020 00:22:16 +0000 (UTC) Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: nguyenb) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7EF87C433C8; Tue, 22 Sep 2020 00:22:15 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 21 Sep 2020 17:22:15 -0700 From: nguyenb@codeaurora.org To: Rob Herring Cc: Can Guo , Asutosh Das , "Martin K. Petersen" , SCSI , linux-arm-msm , Bjorn Andersson , 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 In-Reply-To: References: <0a9d395dc38433501f9652a9236856d0ac840b77.1598939393.git.nguyenb@codeaurora.org> <20200914183505.GA357@bogus> Message-ID: X-Sender: nguyenb@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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. > >> 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