The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: armandas.kvietkus@proton.me
Cc: Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-pm@vger.kernel.org,  devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: power: supply: Add Maxim DS28E16
Date: Sat, 5 Dec 2026 20:16:54 +0100	[thread overview]
Message-ID: <axRfr9kXLao8ak_d@venus> (raw)
In-Reply-To: <20261124-ds28e16-v1-1-bed431df0578@proton.me>

[-- Attachment #1: Type: text/plain, Size: 2352 bytes --]

Hi,

On Tue, Nov 24, 2026 at 06:43:20PM +0100, Armandas Kvietkus via B4 Relay wrote:
> From: Armandas Kvietkus <armandas.kvietkus@proton.me>
> 
> The DS28E16 is a 1-Wire secure authenticator found in some battery
> packs. Its decrement counter page holds the cycle count of the pack.
> 
> Signed-off-by: Armandas Kvietkus <armandas.kvietkus@proton.me>
> ---
>  .../bindings/power/supply/maxim,ds28e16.yaml       | 39 ++++++++++++++++++++++
>  1 file changed, 39 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/maxim,ds28e16.yaml b/Documentation/devicetree/bindings/power/supply/maxim,ds28e16.yaml
> new file mode 100644
> index 000000000000..b381bdf68239
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/supply/maxim,ds28e16.yaml
> @@ -0,0 +1,39 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/supply/maxim,ds28e16.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Maxim DS28E16 battery pack authenticator
> +
> +maintainers:
> +  - Armandas Kvietkus <armandas.kvietkus@proton.me>
> +
> +description:
> +  The DS28E16 is a secure authenticator inside some battery packs, for
> +  example in Xiaomi SM8250 phones. It is connected to a GPIO that is used as
> +  a 1-Wire data line. Page 2 of its memory holds a one way decrement counter
> +  that stores the charge cycle count of the pack.

From the datasheet [0], this chip might just as well be used for
other things, which should be mentioned here.

[0] https://www.analog.com/media/en/technical-documentation/data-sheets/DS28E16.pdf

> +
> +properties:
> +  compatible:
> +    const: maxim,ds28e16
> +
> +  onewire-gpios:
> +    maxItems: 1
> +    description: GPIO used as the 1-Wire data line.

If you are missing features from the w1-gpio Linux driver, you
should extend it and then properly describe this as device on a w1
bus.

Greetings,

-- Sebastian

> +required:
> +  - compatible
> +  - onewire-gpios
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    battery-id {
> +        compatible = "maxim,ds28e16";
> +        onewire-gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>;
> +    };
> 
> -- 
> 2.56.0
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-12-05 19:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 17:43 [PATCH 0/2] Add Maxim DS28E16 battery cycle counter Armandas Kvietkus via B4 Relay
2026-11-24 17:43 ` [PATCH 1/2] dt-bindings: power: supply: Add Maxim DS28E16 Armandas Kvietkus via B4 Relay
2026-12-05 19:16   ` Sebastian Reichel [this message]
2026-11-24 17:43 ` [PATCH 2/2] power: supply: Add Maxim DS28E16 battery cycle counter driver Armandas Kvietkus via B4 Relay
2026-11-25 11:38   ` Uwe Kleine-König

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=axRfr9kXLao8ak_d@venus \
    --to=sebastian.reichel@collabora.com \
    --cc=armandas.kvietkus@proton.me \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=robh@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