xref: /freebsd/sys/contrib/device-tree/Bindings/power/supply/bq24190.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
12eb4d8dcSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
22eb4d8dcSEmmanuel Vadot# Copyright (C) 2021 Sebastian Reichel
32eb4d8dcSEmmanuel Vadot%YAML 1.2
42eb4d8dcSEmmanuel Vadot---
5b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/power/supply/bq24190.yaml#
6b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
72eb4d8dcSEmmanuel Vadot
88bab661aSEmmanuel Vadottitle: TI BQ2419x Li-Ion Battery Charger
92eb4d8dcSEmmanuel Vadot
102eb4d8dcSEmmanuel Vadotmaintainers:
112eb4d8dcSEmmanuel Vadot  - Sebastian Reichel <sre@kernel.org>
122eb4d8dcSEmmanuel Vadot
132eb4d8dcSEmmanuel VadotallOf:
142eb4d8dcSEmmanuel Vadot  - $ref: power-supply.yaml#
152eb4d8dcSEmmanuel Vadot
162eb4d8dcSEmmanuel Vadotproperties:
172eb4d8dcSEmmanuel Vadot  compatible:
182eb4d8dcSEmmanuel Vadot    enum:
192eb4d8dcSEmmanuel Vadot      - ti,bq24190
202eb4d8dcSEmmanuel Vadot      - ti,bq24192
212eb4d8dcSEmmanuel Vadot      - ti,bq24192i
222eb4d8dcSEmmanuel Vadot      - ti,bq24196
23*8d13bc63SEmmanuel Vadot      - ti,bq24296
242eb4d8dcSEmmanuel Vadot
252eb4d8dcSEmmanuel Vadot  reg:
262eb4d8dcSEmmanuel Vadot    maxItems: 1
272eb4d8dcSEmmanuel Vadot
282eb4d8dcSEmmanuel Vadot  interrupts:
292eb4d8dcSEmmanuel Vadot    maxItems: 1
302eb4d8dcSEmmanuel Vadot
312eb4d8dcSEmmanuel Vadot  usb-otg-vbus:
32b97ee269SEmmanuel Vadot    $ref: /schemas/regulator/regulator.yaml#
332eb4d8dcSEmmanuel Vadot    description: |
342eb4d8dcSEmmanuel Vadot      Regulator that is used to control the VBUS voltage direction for
352eb4d8dcSEmmanuel Vadot      either USB host mode or for charging on the OTG port
362eb4d8dcSEmmanuel Vadot
372eb4d8dcSEmmanuel Vadot  ti,system-minimum-microvolt:
382eb4d8dcSEmmanuel Vadot    description: |
392eb4d8dcSEmmanuel Vadot      when power is connected and the battery is below minimum system voltage,
402eb4d8dcSEmmanuel Vadot      the system will be regulated above this setting.
412eb4d8dcSEmmanuel Vadot
422eb4d8dcSEmmanuel Vadot  omit-battery-class:
432eb4d8dcSEmmanuel Vadot    type: boolean
442eb4d8dcSEmmanuel Vadot    description: |
452eb4d8dcSEmmanuel Vadot      If this property is set, the operating system does not try to create a
462eb4d8dcSEmmanuel Vadot      battery device.
472eb4d8dcSEmmanuel Vadot
482eb4d8dcSEmmanuel Vadot  monitored-battery:
492eb4d8dcSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
502eb4d8dcSEmmanuel Vadot    description: |
512eb4d8dcSEmmanuel Vadot      phandle to a "simple-battery" compatible node.
522eb4d8dcSEmmanuel Vadot
532eb4d8dcSEmmanuel Vadot      This property must be a phandle to a node using the format described
542eb4d8dcSEmmanuel Vadot      in battery.yaml, with the following properties being required:
552eb4d8dcSEmmanuel Vadot      - precharge-current-microamp: maximum charge current during precharge phase
562eb4d8dcSEmmanuel Vadot                                    (typically 20% of battery capacity).
572eb4d8dcSEmmanuel Vadot      - charge-term-current-microamp: a charge cycle terminates when the battery voltage is
582eb4d8dcSEmmanuel Vadot                                      above recharge threshold, and the current is below this
592eb4d8dcSEmmanuel Vadot                                      setting (typically 10% of battery capacity).
602eb4d8dcSEmmanuel Vadot
612eb4d8dcSEmmanuel Vadotrequired:
622eb4d8dcSEmmanuel Vadot  - compatible
632eb4d8dcSEmmanuel Vadot  - reg
642eb4d8dcSEmmanuel Vadot  - interrupts
652eb4d8dcSEmmanuel Vadot
662eb4d8dcSEmmanuel VadotadditionalProperties: false
672eb4d8dcSEmmanuel Vadot
682eb4d8dcSEmmanuel Vadotexamples:
692eb4d8dcSEmmanuel Vadot  - |
702eb4d8dcSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
712eb4d8dcSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
722eb4d8dcSEmmanuel Vadot
732eb4d8dcSEmmanuel Vadot    bat: battery {
742eb4d8dcSEmmanuel Vadot      compatible = "simple-battery";
752eb4d8dcSEmmanuel Vadot      precharge-current-microamp = <256000>;
762eb4d8dcSEmmanuel Vadot      charge-term-current-microamp = <128000>;
772eb4d8dcSEmmanuel Vadot    };
782eb4d8dcSEmmanuel Vadot
79fac71e4eSEmmanuel Vadot    i2c {
802eb4d8dcSEmmanuel Vadot      #address-cells = <1>;
812eb4d8dcSEmmanuel Vadot      #size-cells = <0>;
822eb4d8dcSEmmanuel Vadot
832eb4d8dcSEmmanuel Vadot      charger@6a {
842eb4d8dcSEmmanuel Vadot        compatible = "ti,bq24190";
852eb4d8dcSEmmanuel Vadot        reg = <0x6a>;
862eb4d8dcSEmmanuel Vadot        interrupt-parent = <&gpiochip>;
872eb4d8dcSEmmanuel Vadot        interrupts = <10 IRQ_TYPE_EDGE_FALLING>;
882eb4d8dcSEmmanuel Vadot        monitored-battery = <&bat>;
892eb4d8dcSEmmanuel Vadot        ti,system-minimum-microvolt = <3200000>;
902eb4d8dcSEmmanuel Vadot
912eb4d8dcSEmmanuel Vadot        usb_otg_vbus: usb-otg-vbus { };
922eb4d8dcSEmmanuel Vadot      };
932eb4d8dcSEmmanuel Vadot    };
94