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,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 E9F1EC4727D for ; Tue, 22 Sep 2020 00:36:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9BA5423A79 for ; Tue, 22 Sep 2020 00:36:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bGE5yCUm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728925AbgIVAgK (ORCPT ); Mon, 21 Sep 2020 20:36:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726702AbgIVAgJ (ORCPT ); Mon, 21 Sep 2020 20:36:09 -0400 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE619C061755 for ; Mon, 21 Sep 2020 17:36:09 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id a3so19149081oib.4 for ; Mon, 21 Sep 2020 17:36:09 -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=MdhiXEIto0H3h/HEK2ddPPDKEIYnUcu6DwMP7VSJIzTIjJTlGDH8Jvron94pUUaPUB qjwbSVD4qEKuNbPF659xnldLZ/imty2SSZPn/a/oTQ2I/RzJueuA1Mm51P8t5PCkOtPY +ynsV62gz8m5Lslb/aMYQBsqURc5gD4mMBHQTwFfaLuWVY9QNNPa6PSZmVEcrWh2VsxL ajbDq4WW3/bsapBH5dALJ1DPefaiK1mpPNxL/+J3GLLXNRXSz4DanRO9F4CORd6PGzjr UWoVcYOBwXFeowrHkHN4ln0Vjbw+OzjmrOcyurfUqVA4GIz+44ZYMaMWH4FhqqstfSTj lrcQ== X-Gm-Message-State: AOAM5303mzBSbUbBmUtM0uRLKDCJ4aF8t5aJUE3FVJCmMV1zgTpNFgXt Z25uuJ7Jn/l6RxvaNZ+lpRpBLw== X-Google-Smtp-Source: ABdhPJzRh/kSLe9FlVRP8uOIfw614cbOwwASFz3QQg3rNYhkKb5K0FpVQgh+cY1XdsQU3gFoNRbJRQ== 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: devicetree@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