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] [day] [month] [year] [list]
Message-ID: <ZBQZJo4UgMxm82pA@hovoldconsulting.com>
Date:   Fri, 17 Mar 2023 08:39:18 +0100
From:   Johan Hovold <johan@...nel.org>
To:     Steev Klimaszewski <steev@...i.org>
Cc:     Bjorn Andersson <andersson@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Andy Gross <agross@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        Marcel Holtmann <marcel@...tmann.org>,
        Johan Hedberg <johan.hedberg@...il.com>,
        Luiz Augusto von Dentz <luiz.dentz@...il.com>,
        Sven Peter <sven@...npeter.dev>, netdev@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, linux-bluetooth@...r.kernel.org,
        Mark Pearson <markpearson@...ovo.com>
Subject: Re: [PATCH v6 4/4] arm64: dts: qcom: sc8280xp-x13s: Add bluetooth

On Thu, Mar 16, 2023 at 02:17:38PM -0500, Steev Klimaszewski wrote:
> On Thu, Mar 16, 2023 at 6:05 AM Johan Hovold <johan@...nel.org> wrote:
> > On Thu, Mar 16, 2023 at 11:26:12AM +0100, Johan Hovold wrote:
> > > On Wed, Mar 15, 2023 at 10:47:58PM -0500, Steev Klimaszewski wrote:

> > > > +           vreg_s1c: smps1 {
> > > > +                   regulator-name = "vreg_s1c";
> > > > +                   regulator-min-microvolt = <1880000>;
> > > > +                   regulator-max-microvolt = <1900000>;
> > > > +                   regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> > > > +                   regulator-allowed-modes = <RPMH_REGULATOR_MODE_AUTO>,
> > > > +                                             <RPMH_REGULATOR_MODE_RET>;
> > > > +                   regulator-allow-set-load;
> > >
> > > So this does not look quite right still as you're specifying an initial
> > > mode which is not listed as allowed.
> > >
> > > Also there are no other in-tree users of RPMH_REGULATOR_MODE_RET and
> > > AUTO is used to switch mode automatically which seems odd to use with
> > > allow-set-load.
> > >
> > > This regulator is in fact also used by the wifi part of the chip and as
> > > that driver does not set any loads so we may end up with a regulator in
> > > retention mode while wifi is in use.
> > >
> > > Perhaps Bjorn can enlighten us, but my guess is that this should just be
> > > "intial-mode = AUTO" (or even HPM, but I have no idea where this came
> > > from originally).
> >
> > This one probably also needs to be marked as always-on as we don't
> > currently describe the fact that the wifi part also uses s1c.

> I couldn't remember exactly why I chose HPM, and so I recreated what
> I'd done.  I looked to see what modes were available by git grepping
> the kernel sources and since they are in
> include/dt-bindings/regulator/qcom,rpmh-regulator.h with a comment
> explaining what each mode is, I picked HPM since it starts it at the
> full rated current.  As to why I chose the others... it was based on
> SMPS being mentioned in that comment block.  Since I wasn't sure what
> PFM is (and admittedly, did not look it up) I skipped it.
> 
> And you are right, we probably don't want to yank that regulator out
> from under the wifi...  will add that in v7, so I guess for v7 we want
> HPM, LPM, AUTO with AUTO being initial.  I guess I was trying to think
> that RET would allow as little power usage as possible when bluetooth
> isn't in use.

No, I think you need to stick with HPM and disallow setting the load
since doing so could impact other consumers that are not yet described.

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ