[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <143515f8-34f2-4f9f-a829-1388b222ce2d@gmail.com>
Date: Mon, 8 Dec 2025 10:20:48 +0200
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Andreas Kemnade <andreas@...nade.info>, lee@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mfd: bd71828: Add some missing charger related registers
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@...nade.info>
>
> Reviewed-by: Matti Vaittinen <mazziesaccount@...il.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! ~~
Powered by blists - more mailing lists