devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: Matti Vaittinen <matti.vaittinen@linux.dev>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Mark Brown <broonie@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-kernel@vger.kernel.org, Sebastian Reichel <sre@kernel.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	linux-clk@vger.kernel.org,
	Michael Turquette <mturquette@baylibre.com>,
	Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
	linux-leds@vger.kernel.org, Pavel Machek <pavel@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org,
	Andreas Kemnade <andreas@kemnade.info>,
	Conor Dooley <conor+dt@kernel.org>,
	devicetree@vger.kernel.org, linux-rtc@vger.kernel.org,
	Lee Jones <lee@kernel.org>, Stephen Boyd <sboyd@kernel.org>
Subject: Re: [PATCH v4 04/16] dt-bindings: power: supply: BD72720 managed battery
Date: Mon, 17 Nov 2025 17:48:08 +0200	[thread overview]
Message-ID: <52b99bf7-bfea-4cee-aa57-4c13e87eaa0d@gmail.com> (raw)
In-Reply-To: <20251117152341.GA1944698-robh@kernel.org>

On 17/11/2025 17:23, Rob Herring wrote:
> On Mon, Nov 17, 2025 at 10:12:01AM +0200, Matti Vaittinen wrote:
>> On 14/11/2025 18:39, Rob Herring wrote:
>>> On Fri, Nov 14, 2025 at 11:04:27AM +0200, Matti Vaittinen wrote:
>>>> On 13/11/2025 12:53, Rob Herring (Arm) wrote:
>>>>>
>>>>> On Thu, 13 Nov 2025 10:52:19 +0200, Matti Vaittinen wrote:
>>>>>> From: Matti Vaittinen <mazziesaccount@gmail.com>
>>
>> //snip
>>
>>>>

>> For VDR there are only:
>>
>> rohm,voltage-vdr-thresh-microvolt,
> 
> So "voltage voltage drop rate"? And '-microvolt' says this is voltage
> too. :)

Hm. Yes. This is a threshold voltage for applying the "zero-correction" 
algorithm, which uses these "VDR" (a.k.a voltage drop rate) tables. Eg, 
the algorithm should only used for the correction when battery voltage 
drops below this threshold. AFAICS, this is usually designed to be 
slightly higher than the voltage where the system stays still operable. 
I suppose this could also be "zero-correction-threshold", but this would 
introduce another "buzzword".

>> rohm,volt-drop-soc-bp,
>> rohm,volt-drop-temperatures-millicelsius
>>
>> and
>>
>> patternProperties:
>>    '^rohm,volt-drop-[0-9]-microvolt':
>>
>> So, from the binding point of view (.yaml), it's not _that_ lot. In the .dts
>> there will be quite some noise as the tables have several values.
>>
>>
>>> If that
>>> happens, either we are doing a poor job of generically describing
>>> battery parameters or chargers and batteries are tightly coupled and
>>> can't be described independently.
>>
>> I am under impression that chargers tend to be pretty flexible, and they can
>> be configured to work with many different batteries by altering the charging
>> profiles. Most of the battery properties (like and charging phases [like
>> pre, CC, CV], their limits, currents and voltages etc) are very generally
>> usable. So, large subset of charging functionality can be handled with
>> standard properties. I believe it is only the fuel-gauging where things get
>> more hairy.
>>
>> I did prepare a series which does the split and adds new compatible for the
>> 'rohm,vdr-battery'. (The power-supply class is not yet modified in the
>> series, but we would probably want to modify the battery-info getters to
>> also accept the 'rohm,vdr-battery' -compatible.)
> 
> I don't think that's the right direction. It's not a Rohm battery.
> 
>> I wonder if I should actually prepare also a series where these properties
>> are just placed in the existing static battery node without adding new
>> compatible. That way it would be easier to see which way is better.
> 
> That seems like the right thing to do here.
> 
> The main question for me is whether these should even be Rohm specific?
> That would probably require a 2nd user to answer for sure.
> 

This is a question Linus W asked as well :)
I believe this technique could be applied to other batteries. I, 
however, am not aware of any other than ROHM charger drivers which 
implement the algorithm. Furthermore, I was told that the mechanism to 
measure these "VDR-tables" for batteries is one of those things which 
should be "kept under your hat". I think ROHM has also patented some 
stuff related to that. Hence I prefixed these tables by "rohm,".

I have no strong objections to dropping the "rohm," though - but I doubt 
these tables will be heavily used by any other but ROHM chargers.

>> If I do that, should I only spin these bindings as RFC to avoid the
>> unnecessary noise?
> 
> Only if you think something is not complete and/or the patches should
> not be applied.

Oh, Ok. Then I will send only one of the approaches - probably the one 
where properties are added to the simple-battery.

Thanks for all the support!

Yours,
	-- Matti

---
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~

  reply	other threads:[~2025-11-17 15:48 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13  8:51 [PATCH v4 00/16] Support ROHM BD72720 PMIC Matti Vaittinen
2025-11-13  8:51 ` [PATCH v4 01/16] dt-bindings: regulator: ROHM BD72720 Matti Vaittinen
2025-11-13 10:53   ` Rob Herring (Arm)
2025-11-14 16:22   ` Rob Herring (Arm)
2025-11-13  8:51 ` [PATCH v4 02/16] dt-bindings: battery: Clarify trickle-charge Matti Vaittinen
2025-11-13  8:52 ` [PATCH v4 03/16] dt-bindings: battery: Add trickle-charge upper limit Matti Vaittinen
2025-11-13  8:52 ` [PATCH v4 04/16] dt-bindings: power: supply: BD72720 managed battery Matti Vaittinen
2025-11-13 10:53   ` Rob Herring (Arm)
2025-11-14  9:04     ` Matti Vaittinen
2025-11-14 16:39       ` Rob Herring
2025-11-14 17:40         ` Andreas Kemnade
2025-11-17  8:12         ` Matti Vaittinen
2025-11-17 15:23           ` Rob Herring
2025-11-17 15:48             ` Matti Vaittinen [this message]
2025-11-13  8:52 ` [PATCH v4 05/16] dt-bindings: mfd: ROHM BD72720 Matti Vaittinen
2025-11-15 11:31   ` Krzysztof Kozlowski
2025-11-18 23:06   ` Linus Walleij
2025-11-13  8:52 ` [PATCH v4 06/16] dt-bindings: leds: bd72720: Add BD72720 Matti Vaittinen
2025-11-13  8:53 ` [PATCH v4 07/16] mfd: rohm-bd71828: Use regmap_reg_range() Matti Vaittinen
2025-11-13  8:53 ` [PATCH v4 08/16] mfd: bd71828: Support ROHM BD72720 Matti Vaittinen
2025-11-13  8:54 ` [PATCH v4 09/16] regulator: bd71828: rename IC specific entities Matti Vaittinen
2025-11-13  8:54 ` [PATCH v4 10/16] regulator: bd71828: Support ROHM BD72720 Matti Vaittinen
2025-11-13  8:54 ` [PATCH v4 11/16] gpio: Support ROHM BD72720 gpios Matti Vaittinen
2025-11-13  8:55 ` [PATCH v4 12/16] clk: clk-bd718x7: Support BD72720 clk gate Matti Vaittinen
2025-11-14  3:53   ` Stephen Boyd
2025-11-13  8:55 ` [PATCH v4 13/16] rtc: bd70528: Support BD72720 rtc Matti Vaittinen
2025-11-13  8:55 ` [PATCH v4 14/16] power: supply: bd71828: Support wider register addresses Matti Vaittinen
2025-11-14 11:15   ` Andreas Kemnade
2025-11-14 13:22     ` Matti Vaittinen
2025-11-13  8:55 ` [PATCH v4 15/16] power: supply: bd71828-power: Support ROHM BD72720 Matti Vaittinen
2025-11-13  8:56 ` [PATCH v4 16/16] MAINTAINERS: Add ROHM BD72720 PMIC Matti Vaittinen

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=52b99bf7-bfea-4cee-aa57-4c13e87eaa0d@gmail.com \
    --to=mazziesaccount@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andreas@kemnade.info \
    --cc=brgl@bgdev.pl \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=matti.vaittinen@linux.dev \
    --cc=mturquette@baylibre.com \
    --cc=pavel@kernel.org \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=sre@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;
as well as URLs for NNTP newsgroup(s).