lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 26 Feb 2021 13:27:39 +0300
From:   Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To:     satya priya <skakit@...eaurora.org>
Cc:     Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Rajendra Nayak <rnayak@...eaurora.org>,
        "open list:DRM DRIVER FOR MSM ADRENO GPU" 
        <linux-arm-msm@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>, kgunda@...eaurora.org
Subject: Re: [PATCH 3/7] regulator: qcom-rpmh: Correct the pmic5_hfsmps515 buck

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ