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]
Message-ID: <20221215214149.whcjdphxxvvedrih@affront>
Date:   Thu, 15 Dec 2022 15:41:49 -0600
From:   Nishanth Menon <nm@...com>
To:     Mark Brown <broonie@...nel.org>
CC:     jerome Neanne <jneanne@...libre.com>,
        Wadim Egorov <W.Egorov@...tec.de>,
        "lgirdwood@...il.com" <lgirdwood@...il.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "kristo@...nel.org" <kristo@...nel.org>,
        "dmitry.torokhov@...il.com" <dmitry.torokhov@...il.com>,
        "krzysztof.kozlowski+dt@...aro.org" 
        <krzysztof.kozlowski+dt@...aro.org>,
        "catalin.marinas@....com" <catalin.marinas@....com>,
        "will@...nel.org" <will@...nel.org>,
        "lee@...nel.org" <lee@...nel.org>,
        "tony@...mide.com" <tony@...mide.com>,
        "vigneshr@...com" <vigneshr@...com>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "geert+renesas@...der.be" <geert+renesas@...der.be>,
        "dmitry.baryshkov@...aro.org" <dmitry.baryshkov@...aro.org>,
        "marcel.ziswiler@...adex.com" <marcel.ziswiler@...adex.com>,
        "vkoul@...nel.org" <vkoul@...nel.org>,
        "biju.das.jz@...renesas.com" <biju.das.jz@...renesas.com>,
        "arnd@...db.de" <arnd@...db.de>,
        "jeff@...undy.com" <jeff@...undy.com>, "afd@...com" <afd@...com>,
        "khilman@...libre.com" <khilman@...libre.com>,
        "narmstrong@...libre.com" <narmstrong@...libre.com>,
        "msp@...libre.com" <msp@...libre.com>,
        "j-keerthy@...com" <j-keerthy@...com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
        "linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>
Subject: Re: [PATCH v7 1/6] DONOTMERGE: arm64: dts: ti: Add TI TPS65219 PMIC
 support for AM642 SK board.

On 18:22-20221215, Mark Brown wrote:
> On Thu, Dec 15, 2022 at 11:54:11AM -0600, Nishanth Menon wrote:
> > On 16:09-20221215, Mark Brown wrote:
> 
> > > That proposal looks really non-idiomatic and quite unusual, if there's a
> > > fixed voltage supply to the LDO I'd expect to see it modeled as a fixed
> > > voltage regulator.  I'm not sure what the use of bypass here is trying
> > > to accomplish TBH.
> 
> > The problem is this - the default NVM in the PMIC is setup such that
> > VSET value =3.3v and bypass bit set (makes sense since the vin=3.3v).
> 
> This implies no voltage drop over the LDO?  Sounds a bit suspect.

Not the choice I'd probably have made ;)

> 
> > Now the constraint is bypass bit cannot be changed without the LDO
> > being switched off.
> 
> > regulator-allow-bypass property allows us to control bypass bit, but we
> > should'nt toggle it when LDO is active. Not providing the property
> > implies the bit wont be toggled by regulator core either.
> 
> > What we need is a scheme that will disable the bypass bit with the
> > intent of operating the LDO with just the vset field. I did'nt find it
> > possible atm.. unless I am mistaken..
> 
> Can the consumer just disable the supply as part of startup?  Though
> that's starting to feel rather board specific.  There's not really a

Yeah - this happens to be SDcard supply (at least in my case).. I'd
rather not change the mmc host or core layer to handle a case where
LDO happened to be in bypass. it is a regulator driver's problem, IMHO
how to provide the stated voltage OR fail to transition the voltage.

In this driver's case, it happily accepts and set the VSET voltage - for
example to 1.8V, but then, since the bypass bit is set, well, voltage
sticks around at 3.3v.

> good place to put a board specific setup process like that in the kernel
> at the minute, you'd ideally want the firmware to leave the device at
> least disabled if not actually out of bypass on startup so we don't have
> to deal with this.  Ugh...

Yeah - that would be the other option - I could plug this bypass clear
in the u-boot or someplace early so that the LDO behaves

Also the reason why I did'nt send the mentioned patch (or the like
upstream and the patch was done just a couple of days back) were the following
questions:
a) Why would'nt we handle the case where bypass bit
   is set AND voltage change implies bypass bit needs to be disabled? (i
   would expect it to fail but if i did provide regulator-allow-bypass,
   then if bypass is set AND requested-voltage != vin-supply, then i'd
   have expected framework to probably disable bypass and switch voltage
   to new voltage - which this driver, based on it's constraint will say
   "nope, cant do" - but that would be better than silently telling me
   all good, setting vset and leaving the bypass bit on.)
b) If I wanted the LDO to poweroff the bypass bit at start (define the
   startup hardware condition), I dont seem to have a description for
   that either.



-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ