[PATCH 4/5] dt-bindings: power: supply: rk817-charger: Add rockchip,gate-function-disable
Chris Morgan
macromorgan at hotmail.com
Tue Oct 27 08:53:10 PDT 2026
On Mon, Oct 26, 2026 at 08:23:40PM +0100, Heiko Stübner wrote:
> Hi Chris,
>
> Am Montag, 26. Oktober 2026, 18:48:33 Mitteleuropäische Normalzeit schrieb Chris Morgan:
> > From: Chris Morgan <macromorgan at hotmail.com>
> >
> > Add a boolean attribute for the rk817-charger to control whether or not
> > the system power is shutdown in battery off mode. The BSP kernel sets
> > this value unless a device-tree attribute is present, and this attribute
> > is to replicate that behavior.
>
> Devicetree is supposed to describe the hardware, so your description needs
> to describe the per-board property this represents.
>
> Just because it's in a vendor-BSP is generally not enough justification :-) .
>
> This is especially true as you wrote in the cover-letter that no known
> board actually needs this right now.
>
>
> Heiko
The datasheet describes this as "Whether the system voltage can be
shutdown in Bat_off mode" and the register itself is described as
SYS_CAN_SD. Maybe call it "rockchip,can-shutdown-bat-off"? Or given the
fact that I'm not aware of any boards that would need it today, should
I even bother with adding the devicetree override? The only reason I
am adding it is in case this "fix" introduces a regression it will
allow someone to set this flag, just like the BSP does.
Thank you.
>
> > Fixes: a592aa3a2a8c ("dt-bindings: mfd: Add Rockchip rk817 battery charger support")
> > Signed-off-by: Chris Morgan <macromorgan at hotmail.com>
> > Suggested-by: Zetarancio <zetarancio at users.noreply.github.com>
> > ---
> > Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml
> > index 2cb6d176a84c..4cf987fe763b 100644
> > --- a/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml
> > +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml
> > @@ -148,6 +148,12 @@ properties:
> > Value in microamps of the sleep filter current for the charger.
> > Value is used by the driver to derive the sleep sample current.
> >
> > + rockchip,gate-function-disable:
> > + type: boolean
> > + description:
> > + Boolean value to prevent PMIC from turning off system voltage when
> > + battery voltage is shut down.
> > +
> > required:
> > - monitored-battery
> > - rockchip,resistor-sense-micro-ohms
> > @@ -381,6 +387,7 @@ examples:
> >
> > rk817_charger: charger {
> > monitored-battery = <&battery>;
> > + rockchip,gate-function-disable;
> > rockchip,resistor-sense-micro-ohms = <10000>;
> > rockchip,sleep-enter-current-microamp = <300000>;
> > rockchip,sleep-filter-current-microamp = <100000>;
> >
>
>
>
>
More information about the Linux-rockchip
mailing list