mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Andreas Kemnade <andreas@kemnade.info>,
	lee@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mfd: bd71828: Add some missing charger related registers
Date: Mon, 8 Dec 2025 10:20:48 +0200	[thread overview]
Message-ID: <143515f8-34f2-4f9f-a829-1388b222ce2d@gmail.com> (raw)
In-Reply-To: <20389a09-1c69-40fa-a937-289a104d57fa@gmail.com>

Hi again,

It was faster than one could guess :) I got the response from the HQ. In 
a nutshell:

"BD72720 ILIM_VBUS_STAT and IBUS_INLIM provide the same functionality as 
BD71828 ILIM_DCIN_STAT and ILIM_DCIN, but note that the offset and 
resolution differ."

OTP settings for the time-interval aren't available for BD71828 (and 
variants). Furthermore, they can't be read/set at runtime on BD72720 
which makes them more or less 'invisible' for the SW.

The 'ILIM_VBUS' bit in 'CHG_VBUS_STAT' register (for BD72720) 
corresponds to the 'DCIN_ILIM_MOD' bit in 'DCIN_STAT' for BD71828.

Finally:
"The Anti-Collapse function present in BD71828 is implemented in analog 
circuitry on BD72720, so ILIM_VBUS_STAT does not fluctuate due to 
Anti-Collapse. On BD71828, ILIM_DCIN_STAT changes during Anti-Collapse."

Yours,
	-- Matti


On 08/12/2025 09:47, Matti Vaittinen wrote:
> On 07/12/2025 10:50, Andreas Kemnade wrote:
>> As there are some registers missing which are required for future charger
>> extensions, add them.
>>
>> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> 
> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
> 
> Thanks for working with this driver! Much appreciated :)
> 
>> ---
>> I have something in preparation for the power supply driver, but I am
>> sending this now if this might go in earlier e.g. via  BD72720
>> immutable branch to avoid more immutable branches.
>> @Matti: Can you check the situation with the other chips supported
>> by that driver. Is that register there, too?
> 
> Sure.
> 
> Just purely based on the data-sheets:
> 
> - BD71815: I didn't find one.
> - BD71879: (As you know) - basically the same as BD71828, so they can
>    both use the BD71828_REG_ILIM_STAT and BD71828_REG_DCIN_SET.
> - BD72720:
>    1: I see 'CHG_ILIM_STAT' with ILIM_VBUS_STAT[6:0], which says:
>      "Actual value of VBUS current-limitation. The VBUS current limit
>      is increased or decreased automatically. The actual limit can be
>      read from ILIM_VBUS_STAT register."
>      This may, or may not be related to the stuff you are working
>      with. I think I have this register included in the
>      include/linux/mfd/rohm-bd72720.h. On top of that, the BD72720
>      has OTP options to configure (time) "Interval for VBUS Current
>      Limitation / Relaxation".
>    2: I see a read-only 'CHG_VBUS_STAT' with 'ILIM_VBUS' bit and:
>      "0 = Normal operation
>      1 = Automatic limit control"
>    3: I see enable/disable control for:
>      "VBUS input current limit in Battery Assist"
>    4: There is also: CHG_VBUS_SET with IBUS_INLIM[6:0], which says:
>      "VBUS current limit setting for Charge. VBUS current limit is
>      automatically changed to supply enough current to the Battery
>      Charger. Present current limit is available to read from
>      ILIM_VBUS_STAT register." This may be something similar to the
>      DCIN_SET.
> 
> I asked for some clarification from the HQ folks - but they may be quite 
> busy, and my request(s) may not be at the top of the priority list. So, 
> let's see...
> 
> Are you planning to expose the current limit values to user-space? Allow 
> setting the control to AUTO/fixed value? I suppose this is what enabled 
> you to do some low-power charging, right?
> 
> Yours,
>      -- Matti
> 
> 
> ---
> Matti Vaittinen
> Linux kernel developer at ROHM Semiconductors
> Oulu Finland
> 
> ~~ When things go utterly wrong vim users can always type :help! ~~


-- 
---
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-12-08  8:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-07  8:50 Andreas Kemnade
2025-12-08  7:47 ` Matti Vaittinen
2025-12-08  8:20   ` Matti Vaittinen [this message]
2025-12-09  9:21   ` Andreas Kemnade
2026-01-08 11:18 ` (subset) " Lee Jones

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=143515f8-34f2-4f9f-a829-1388b222ce2d@gmail.com \
    --to=mazziesaccount@gmail.com \
    --cc=andreas@kemnade.info \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®