Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp997502pxb; Thu, 25 Feb 2021 23:03:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJyr6eyqcNFqMnDC+k/dB5dJbP9UQuLn5eoTwf7FNWyZ2htwZLH7iCdR7HtbIL7ZYs1W/Ldi X-Received: by 2002:a05:6402:2707:: with SMTP id y7mr1671516edd.5.1614323038051; Thu, 25 Feb 2021 23:03:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614323038; cv=none; d=google.com; s=arc-20160816; b=nWZ0tZfoCjog9A/2kYD6bISQw5swLmfTcU6MED5VY87ANBCRdLCoB5ZShxItycpNk9 lnTXSxdloWoUIW3pE+y3A9m7v4UdS3QK2BUlyqi+wA8G8ichp/bcXXHTZbPWkun7IoIg 3EsSXtwuz1ZmDPOsgmyAlFrUyZ6ayO/roYqI0mRXGr/MUgiT1aywj5b1sx2wPJ/8aHEI Xb8IzpKlvkLTdz99w10fku8pVLN1ZQYEHRMTQVWbwGEwKhQd1dicmwuam/FirNjf2edM Cms3qh1ahwRj0Q//eZW13Rimt2W16xWN0xiNj0kf+x5XhNo4QnV0tG6YXvzVOJi7y3no cHEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=hAhoz3D6d2Kk6jyvUqWPj14y7zKa/ypo+MS/MSezQXk=; b=Uc9u6SS9yhWnKfe2E+CvbWQY6WeeqLPJEv8rDxl9Horumbt6E7GdBsbrJV5F7I19+2 4uhdLKkUsPJLYKGQDQzc6eFauTR+oNBSViR/BuGT0BhrguIJ3FFpHgAGCKhYeajpliGT FXlPzSToodzLPByOABviJn/cPJDJZp66cD0rivgGgMp3OiptD8t0sKdieX8UOTmz6A0E uK3N6zOtlr3WDp75SS4oi4tAaYE+UhiYeSuzARHDYOOZveKnZfX3CI7vL1G6NOd+eQgf zIXQty5CN+5O7HqhdeLUcoFJCfxvlbaW2I2/Zr3P1jaZSjDsP23jARqX91JRYoWWlSrV pKzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=M7DwtV8m; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qq18si5201756ejb.299.2021.02.25.23.03.35; Thu, 25 Feb 2021 23:03:58 -0800 (PST) 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=@mg.codeaurora.org header.s=smtp header.b=M7DwtV8m; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229800AbhBZHAi (ORCPT + 99 others); Fri, 26 Feb 2021 02:00:38 -0500 Received: from z11.mailgun.us ([104.130.96.11]:49366 "EHLO z11.mailgun.us" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbhBZHAh (ORCPT ); Fri, 26 Feb 2021 02:00:37 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1614322818; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=hAhoz3D6d2Kk6jyvUqWPj14y7zKa/ypo+MS/MSezQXk=; b=M7DwtV8muFnErDJot6AS9cgvFRTKJTFyqRpmFjtgZ5JDkxfHaUT/2x5CbXketHIsoQg8S4mz ZEFa1Qs9lWIXW1Svvl6Z/j7mxkIIeiPO7ty0Jk5kshjIa90Bjff/gEc6e+H/a0uPee7HAUkc nZ+I7zl0VAy1og0WRSIAZWbCUGs= X-Mailgun-Sending-Ip: 104.130.96.11 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-west-2.postgun.com with SMTP id 60389c5bba1dc157807a59fc (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 26 Feb 2021 06:59:39 GMT Sender: skakit=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 2BF95C43463; Fri, 26 Feb 2021 06:59:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 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: skakit) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4DB2EC433CA; Fri, 26 Feb 2021 06:59:38 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 26 Feb 2021 12:29:38 +0530 From: skakit@codeaurora.org To: Dmitry Baryshkov Cc: Andy Gross , Bjorn Andersson , Liam Girdwood , Mark Brown , Rob Herring , rnayak@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kgunda@codeaurora.org Subject: Re: [PATCH 3/7] regulator: qcom-rpmh: Correct the pmic5_hfsmps515 buck In-Reply-To: <50151f4b-298c-f0ee-a88f-7bdd945ad249@linaro.org> References: <1614155592-14060-1-git-send-email-skakit@codeaurora.org> <1614155592-14060-4-git-send-email-skakit@codeaurora.org> <50151f4b-298c-f0ee-a88f-7bdd945ad249@linaro.org> Message-ID: <51390b828a5d534e308460098f1b9af0@codeaurora.org> X-Sender: skakit@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2021-02-25 16:39, Dmitry Baryshkov wrote: > On 24/02/2021 11:33, satya priya wrote: >> Correct the REGULATOR_LINEAR_RANGE and n_voltges for >> pmic5_hfsmps515 buck. >> >> Signed-off-by: satya priya >> --- >> drivers/regulator/qcom-rpmh-regulator.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/regulator/qcom-rpmh-regulator.c >> b/drivers/regulator/qcom-rpmh-regulator.c >> index 79a554f..36542c3 100644 >> --- a/drivers/regulator/qcom-rpmh-regulator.c >> +++ b/drivers/regulator/qcom-rpmh-regulator.c >> @@ -726,8 +726,8 @@ static const struct rpmh_vreg_hw_data >> pmic5_ftsmps510 = { >> static const struct rpmh_vreg_hw_data pmic5_hfsmps515 = { >> .regulator_type = VRM, >> .ops = &rpmh_regulator_vrm_ops, >> - .voltage_range = REGULATOR_LINEAR_RANGE(2800000, 0, 4, 16000), >> - .n_voltages = 5, >> + .voltage_range = REGULATOR_LINEAR_RANGE(320000, 0, 235, 16000), >> + .n_voltages = 236, > > I've checked the docs for pm8009, the chip which also uses hfsmps515 > regulators. The pdf clearly states that the 'Output voltage operating > range' is from 2.8 V to 2.85 V. > > So we'd probably need to define different versions of HFS515 regulator > data (like I had to create for pm8009-1). > > The min-max voltages for S1C (PM8350c) regulator are 2190000-2210000uV for sc7280(kodiak), so we had to modify this buck to support this regulator. AFAIK, this struct defines the HW constraints of a regulator, but the platform specific min-max values can be controlled from DT files. So, can't we modify it like above instead of adding a new definition? the new min_uV value (32000) is anyway not exceeding the old value (2800000) right? please correct me if wrong. >> .pmic_mode_map = pmic_mode_map_pmic5_smps, >> .of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode, >> }; >> Thanks, Satya Priya