[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aed1de56-fafe-4ccc-b542-69400b574def@oss.qualcomm.com>
Date: Thu, 7 Aug 2025 15:06:01 +0200
From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
To: Mark Brown <broonie@...nel.org>
Cc: Nitin Rawat <quic_nitirawa@...cinc.com>, vkoul@...nel.org,
kishon@...nel.org, mani@...nel.org, conor+dt@...nel.org,
bvanassche@....org, andersson@...nel.org, neil.armstrong@...aro.org,
dmitry.baryshkov@....qualcomm.com, konradybcio@...nel.org,
krzk+dt@...nel.org, linux-arm-msm@...r.kernel.org,
linux-phy@...ts.infradead.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org
Subject: Re: [PATCH V1 4/4] phy: qcom-qmp-ufs: read max-microamp values from
device tree
On 8/6/25 6:51 PM, Mark Brown wrote:
> On Wed, Aug 06, 2025 at 05:58:30PM +0200, Konrad Dybcio wrote:
>> On 8/6/25 5:43 PM, Nitin Rawat wrote:
>
>>> Add support in QMP PHY driver to read optional vdda-phy-max-microamp
>>> and vdda-pll-max-microamp properties from the device tree.
>
>>> These properties define the expected maximum current (in microamps) for
>>> each supply. The driver uses this information to configure regulators
>>> more accurately and ensure they operate in the correct mode based on
>>> client load requirements.
>
>>> If the property is not present, the driver defaults load to
>>> `QMP_VREG_UNUSED`.
>
>> do you think having this in regulator core would make sense?
>
> I'm not clear why the driver is trying to do this at all, the driver is
> AFAICT making no other effort to manage the load at all. We already
> impose any constraints that are defined for a regulator while initially
> parsing them so it's not clear to me what this is supposed to
> accomplish, and it'll be broken if the supply is ever shared since it'll
> set the load from this individual consumer to the maximum that's
> permitted for the regulator as a whole.
Qualcomm regulators feature a low- and a high-power mode. As one may
imagine, low- is preferred, and high- needs to be engaged if we go
over a current threshold.
The specific regulator instances in question are often shared between
a couple PHYs (UFS, PCIe, USB..) and we need to convey to the
framework how much each consumer requires (and consumers can of course
go on/off at runtime). The current value varies between platforms, so
we want to read from DT.
The intended use is to set the load requirement and then only en/disable
the consumer, so that the current load is updated in core (like in the
kerneldoc of _regulator_handle_consumer_enable())
My question was about moving the custom parsing of
$supplyname-max-micromap introduced in this patch into the regulator
core, as this seems like a rather common problem.
Unless you meant to object to the "QMP_VREG_UNUSED" part specifically?
Konrad
Powered by blists - more mailing lists