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: <20241218-yapping-driver-d67cf1662b57@spud>
Date: Wed, 18 Dec 2024 16:42:03 +0000
From: Conor Dooley <conor@...nel.org>
To: Frieder Schrempf <frieder@...s.de>
Cc: linux-arm-kernel@...ts.infradead.org, Marek Vasut <marex@...x.de>,
	Conor Dooley <conor+dt@...nel.org>, devicetree@...r.kernel.org,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Liam Girdwood <lgirdwood@...il.com>, linux-kernel@...r.kernel.org,
	Mark Brown <broonie@...nel.org>, Rob Herring <robh@...nel.org>,
	Robin Gong <yibin.gong@....com>,
	Frieder Schrempf <frieder.schrempf@...tron.de>,
	Conor Dooley <conor.dooley@...rochip.com>,
	Joy Zou <joy.zou@....com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Subject: Re: [PATCH v3 1/9] dt-bindings: regulator: pca9450: Add properties
 for handling LDO5

On Wed, Dec 18, 2024 at 04:27:24PM +0100, Frieder Schrempf wrote:
> From: Frieder Schrempf <frieder.schrempf@...tron.de>
> 
> This reverts commit 27866e3e8a7e93494f8374f48061aa73ee46ceb2 and
> implements a new future-proof way of handling the mismatch between
> the PMIC driver and the hardware for LDO5.
> 
> It turned out that this feature was implemented based on the wrong
> assumption that the SD_VSEL signal needs to be controlled as GPIO
> in any case.
> 
> In fact the straight-forward approach is to mux the signal as
> USDHC_VSELECT and let the USDHC controller do the job.
> 
> Most users never even used this property and the few who did have
> been or are getting migrated to the alternative approach.
> 
> In order to know the current status (which of the two control
> registers is used) for the LDO5 regulator, we need to route back the
> USDHC_VSELECT signal by setting the SION bit in the IOMUX.
> 
> By adding the according GPIO as sd-vsel-gpios to the LDO5 node, we
> allow the regulator driver to sample the current status of the
> SD_VSEL signal that is used to select the correct control register.
> 
> The SD_VSEL on the PMIC is always an input. It's driven by the SoC's
> VSELECT signal (controlled by the USDHC controller) and we use the
> SION bit in the IOMUX to internally loop back the signal in order to
> sample it using the GPIO.
> 
> As the SD_VSEL pin is directly routed to the LDO5 regulator in the
> PMIC, make the sd-vsel-gpios property part of the LDO5 node.
> 
> SoC                                  PMIC
> +-----------------------+           +-------------------+
> |                       |           |                   |
> |                       |           |                   |
> |  GPIO <----------+    |           |                   |
> |                  |    |    SD_VSEL|   +-------+       |
> |  USDHC_VSELECT ->+------------------->| LDO5  |       |
> |                       |           |   +-------+       |
> |                       |           |                   |
> +-----------------------+           +-------------------+
> 
> For boards which have the SD_VSEL tied to a fixed low level, we add
> 'nxp,sd-vsel-fixed-low'. The voltage of LDO5 is therefore only controlled
> by writing to the LDO5CTRL_L register.
> 
> If none of 'nxp,sd-vsel-fixed-low' or 'sd-vsel-gpios' is set, we keep
> the same behavior as before. The driver assumes that SD_VSEL is tied
> high and the LDO5CTRL_H register can be used, which is in fact not true
> for all known boards and works merely by chance.
> 
> Signed-off-by: Frieder Schrempf <frieder.schrempf@...tron.de>

Reviewed-by: Conor Dooley <conor.dooley@...rochip.com>

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ