The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Nitin Rawat <quic_nitirawa@quicinc.com>
To: Bjorn Andersson <andersson@kernel.org>, Mark Brown <broonie@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	<vkoul@kernel.org>, <kishon@kernel.org>, <mani@kernel.org>,
	<conor+dt@kernel.org>, <bvanassche@acm.org>,
	<neil.armstrong@linaro.org>, <dmitry.baryshkov@oss.qualcomm.com>,
	<konradybcio@kernel.org>, <krzk+dt@kernel.org>,
	<linux-arm-msm@vger.kernel.org>, <linux-phy@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>
Subject: Re: [PATCH V1 4/4] phy: qcom-qmp-ufs: read max-microamp values from device tree
Date: Tue, 12 Aug 2025 01:18:58 +0530	[thread overview]
Message-ID: <d072b19d-bc01-45c8-8cf3-bceb53ca9b2c@quicinc.com> (raw)
In-Reply-To: <kwp3q4r5rzahzro5f6l6ml24vbiutyxokrhjsbtzcb5kvanx5e@elagxv6w5dq7>



On 8/11/2025 9:20 PM, Bjorn Andersson wrote:
> On Thu, Aug 07, 2025 at 08:09:56PM +0100, Mark Brown wrote:
>> On Thu, Aug 07, 2025 at 07:43:15PM +0200, Konrad Dybcio wrote:
>>> On 8/7/25 7:26 PM, Mark Brown wrote:
>>
>>>> Note that that's specifying OPPs which is different...
>>
>>> The microamp properties are in the top-level, not under OPP if
>>> that's what you meant
>>
>> I mean the OPPs use case is an existing well known one for dumping stuff
>> into DT.
>>
>>>> That doesn't mean that it's a good idea to put that information in the
>>>> DT, nor if it is sensible to put in DT does it mean that it's a good
>>>> idea to define a generic property that applies to all regulator
>>>> consumers which is what I now think Konrad is proposing.
>>
>>> Yeah, that's what I had in mind
>>
>>> I was never able to get a reliable source for those numbers myselfe
>>> either.. At least some of them are prooooobably? chosen based on the
>>> used regulator type, to ensure it's always in HPM..
>>
>> That's what set_mode() is for.  Like I say it's becoming less and less
>> relevant though.
>>
> 
> set_mode() just applies the mode to the regulator_dev, so in cases where
> you have multiple consumers of a regulator_dev things would break.
> 
> Further, there are numerous cases where we have multiple consumers each
> needing a "low" mode, but their combined load requires a "high" mode.
> 
> set_load() and its aggregation of the inputs deals with both of these
> issues.
> 
> 
> Whether mode setting is becoming less relevant in our hardware, that I
> don't have the definitive answer to.
> 
>>> That said, our drivers cover a wide variety of hardware, built on a
>>> wide variety of process nodes, with different configurations, etc.,
>>> so it's either polluting the DT, or polluting the driver with
>>> per-compatible hardcoded data (and additional compatibles because
>>> fallbacks wouldn't work most of the time)
> 
> If this is our reason for putting it in DeviceTree, then we should write
> that in the commit message :)
> 
>>
>> That's really not a persuasive argument for adding a genric property
>> that applies to all regulator consumers...
>>
> 
> I agree, even if we determine that this belongs in DT, because it needs
> to be tweaked on a per-board basis, it's still only applicable to a
> fraction of our device nodes.

Hi Bjorn & Mark,

I had a follow-up discussion with the PHY designer to confirm whether 
this value could vary at the board level. Based on their response, it's 
a fixed value for the SoC and remains consistent across different 
boards. Therefore, I'm comfortable removing it from the device tree and 
using hardcoded, per-compatible data in the driver.

The only concern is that this approach may lead to driver bloat over 
time, as more SoCs are added and each requires its own hardcoded 
configuration.

Regards,
Nitin






> 
> Regards,
> Bjorn
> 
>> My instinct with this stuff is generally to avoid putting it in the DT,
>> we see far too many instances where someone's typed some numbers in
>> wrongly or discovers the ability to drive the hardware harder and needs
>> to tune the numbers - once something is ABI you're stuck just trusting
>> the numbers.  That said I'm not going to stop you putting something
>> specific to this driver in there, I just don't think this is a good idea
>> as a generic property.
> 


  parent reply	other threads:[~2025-08-11 19:49 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06 15:43 [PATCH V1 0/4] Add support to configure regulator load for UFS QMP PHY Nitin Rawat
2025-08-06 15:43 ` [PATCH V1 1/4] dt-bindings: phy: Add max-microamp properties for PHY and PLL supplies Nitin Rawat
2025-08-08  7:28   ` Krzysztof Kozlowski
2025-08-11 15:20   ` Bjorn Andersson
2025-08-06 15:43 ` [PATCH V1 2/4] arm64: dts: qcom: sm8750: add max-microamp for UFS " Nitin Rawat
2025-08-08  7:29   ` Krzysztof Kozlowski
2025-08-08  8:58     ` Konrad Dybcio
2025-08-08  9:39       ` Krzysztof Kozlowski
2025-08-08 15:19         ` Nitin Rawat
2025-08-09 11:07           ` Manivannan Sadhasivam
2025-08-11 19:55             ` Nitin Rawat
2025-08-12 10:52               ` Dmitry Baryshkov
2025-08-12 11:38                 ` 回复: " yizhijiao2025
2025-08-13 20:47                 ` Nitin Rawat
2025-08-11 15:25   ` Bjorn Andersson
2025-08-06 15:43 ` [PATCH V1 3/4] arm64: dts: qcom: sm8650: " Nitin Rawat
2025-08-06 15:43 ` [PATCH V1 4/4] phy: qcom-qmp-ufs: read max-microamp values from device tree Nitin Rawat
2025-08-06 15:58   ` Konrad Dybcio
2025-08-06 16:51     ` Mark Brown
2025-08-07 13:06       ` Konrad Dybcio
2025-08-07 13:44         ` Mark Brown
2025-08-07 15:42           ` Nitin Rawat
2025-08-07 17:26             ` Mark Brown
2025-08-07 17:35               ` Nitin Rawat
2025-08-07 17:43                 ` Mark Brown
2025-08-07 17:56                   ` Nitin Rawat
2025-08-07 18:45                     ` Mark Brown
2025-08-07 20:45                       ` Nitin Rawat
2025-08-08  7:25                         ` Krzysztof Kozlowski
2025-08-07 17:43               ` Konrad Dybcio
2025-08-07 18:09                 ` Nitin Rawat
2025-08-07 19:09                 ` Mark Brown
2025-08-11 15:50                   ` Bjorn Andersson
2025-08-11 16:14                     ` Mark Brown
2025-08-11 19:48                     ` Nitin Rawat [this message]
2025-08-13 21:01                       ` Nitin Rawat
2025-08-08 12:33   ` Manivannan Sadhasivam
2025-08-09  7:30   ` Dmitry Baryshkov
2025-08-11 19:49     ` Nitin Rawat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d072b19d-bc01-45c8-8cf3-bceb53ca9b2c@quicinc.com \
    --to=quic_nitirawa@quicinc.com \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=bvanassche@acm.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=kishon@kernel.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=mani@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox