linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: satya priya <skakit@codeaurora.org>
Cc: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Rajendra Nayak <rnayak@codeaurora.org>,
	"open list:DRM DRIVER FOR MSM ADRENO GPU" 
	<linux-arm-msm@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	kgunda@codeaurora.org
Subject: Re: [PATCH 3/7] regulator: qcom-rpmh: Correct the pmic5_hfsmps515 buck
Date: Fri, 26 Feb 2021 13:27:39 +0300	[thread overview]
Message-ID: <CAA8EJpqN-jb3b3yHTHwrQQj_h3M-yxAvX7Hz7bNSV3_NBCJEwQ@mail.gmail.com> (raw)
In-Reply-To: <51390b828a5d534e308460098f1b9af0@codeaurora.org>

On Fri, 26 Feb 2021 at 09:59, <skakit@codeaurora.org> wrote:
>
> 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 <skakit@codeaurora.org>
> >> ---
> >>   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.

As far as I understand for other regulators we put 'output voltage
limitations' from the docs into the regulator definition and further
constrain it by the platform device tree. Please correct me if I'm
wrong.
For pm8009 the data from the datasheet matches the regulators defined
in the source file. Unfortunately I don't have kodiak specs at hand.


-- 
With best wishes
Dmitry

  reply	other threads:[~2021-02-26 10:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24  8:33 [PATCH 0/7] Add PM7325/PM8350C/PMR735A regulator support satya priya
2021-02-24  8:33 ` [PATCH 1/7] dt-bindings: regulator: Convert regulator bindings to YAML format satya priya
2021-02-24 15:57   ` Mark Brown
2021-03-01 14:44   ` Rob Herring
2021-03-03 14:54     ` skakit
2021-03-01 19:18   ` Rob Herring
2021-03-03 14:53     ` skakit
2021-02-24  8:33 ` [PATCH 2/7] dt-bindings: regulator: Add compatibles for PM7325/PMR735A satya priya
2021-03-06 20:16   ` Rob Herring
2021-02-24  8:33 ` [PATCH 3/7] regulator: qcom-rpmh: Correct the pmic5_hfsmps515 buck satya priya
2021-02-25 11:09   ` Dmitry Baryshkov
2021-02-26  6:59     ` skakit
2021-02-26 10:27       ` Dmitry Baryshkov [this message]
2021-03-01 10:37         ` skakit
2021-03-02 14:21           ` Dmitry Baryshkov
2021-03-11  4:15             ` skakit
2021-03-11 18:32               ` Mark Brown
2021-02-24  8:33 ` [PATCH 4/7] regulator: qcom-rpmh: Add pmic5_ftsmps520 buck satya priya
2021-02-24  8:33 ` [PATCH 5/7] regulator: qcom-rpmh: Add PM7325/PMR735A regulator support satya priya
2021-02-24  8:33 ` [PATCH 6/7] regulator: qcom-rpmh: Use correct buck for S1C regulator satya priya
2021-02-24 16:31   ` Mark Brown
2021-02-26  4:05     ` skakit
2021-02-24  8:33 ` [PATCH 7/7] arm64: dts: qcom: sc7280: Add RPMh regulators for sc7280-idp satya priya
2021-02-24 19:17   ` Konrad Dybcio
2021-02-26  4:02     ` skakit
2021-02-24 16:58 ` (subset) [PATCH 0/7] Add PM7325/PM8350C/PMR735A regulator support Mark Brown

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=CAA8EJpqN-jb3b3yHTHwrQQj_h3M-yxAvX7Hz7bNSV3_NBCJEwQ@mail.gmail.com \
    --to=dmitry.baryshkov@linaro.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kgunda@codeaurora.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rnayak@codeaurora.org \
    --cc=robh+dt@kernel.org \
    --cc=skakit@codeaurora.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).