Re: [PATCH 1/2] dt-bindings: power: supply: Add Maxim DS28E16
From: Sebastian Reichel
Date: Sat Dec 05 2026 - 14:17:11 EST
Hi,
On Tue, Nov 24, 2026 at 06:43:20PM +0100, Armandas Kvietkus via B4 Relay wrote:
> From: Armandas Kvietkus <armandas.kvietkus@xxxxxxxxx>
>
> 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@xxxxxxxxx>
> ---
> .../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@xxxxxxxxx>
> +
> +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:
signature.asc
Description: PGP signature