xref: /freebsd/sys/contrib/device-tree/Bindings/power/supply/bq24190.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
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
232eb4d8dcSEmmanuel Vadot
242eb4d8dcSEmmanuel Vadot  reg:
252eb4d8dcSEmmanuel Vadot    maxItems: 1
262eb4d8dcSEmmanuel Vadot
272eb4d8dcSEmmanuel Vadot  interrupts:
282eb4d8dcSEmmanuel Vadot    maxItems: 1
292eb4d8dcSEmmanuel Vadot
302eb4d8dcSEmmanuel Vadot  usb-otg-vbus:
31b97ee269SEmmanuel Vadot    $ref: /schemas/regulator/regulator.yaml#
322eb4d8dcSEmmanuel Vadot    description: |
332eb4d8dcSEmmanuel Vadot      Regulator that is used to control the VBUS voltage direction for
342eb4d8dcSEmmanuel Vadot      either USB host mode or for charging on the OTG port
352eb4d8dcSEmmanuel Vadot
362eb4d8dcSEmmanuel Vadot  ti,system-minimum-microvolt:
372eb4d8dcSEmmanuel Vadot    description: |
382eb4d8dcSEmmanuel Vadot      when power is connected and the battery is below minimum system voltage,
392eb4d8dcSEmmanuel Vadot      the system will be regulated above this setting.
402eb4d8dcSEmmanuel Vadot
412eb4d8dcSEmmanuel Vadot  omit-battery-class:
422eb4d8dcSEmmanuel Vadot    type: boolean
432eb4d8dcSEmmanuel Vadot    description: |
442eb4d8dcSEmmanuel Vadot      If this property is set, the operating system does not try to create a
452eb4d8dcSEmmanuel Vadot      battery device.
462eb4d8dcSEmmanuel Vadot
472eb4d8dcSEmmanuel Vadot  monitored-battery:
482eb4d8dcSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
492eb4d8dcSEmmanuel Vadot    description: |
502eb4d8dcSEmmanuel Vadot      phandle to a "simple-battery" compatible node.
512eb4d8dcSEmmanuel Vadot
522eb4d8dcSEmmanuel Vadot      This property must be a phandle to a node using the format described
532eb4d8dcSEmmanuel Vadot      in battery.yaml, with the following properties being required:
542eb4d8dcSEmmanuel Vadot      - precharge-current-microamp: maximum charge current during precharge phase
552eb4d8dcSEmmanuel Vadot                                    (typically 20% of battery capacity).
562eb4d8dcSEmmanuel Vadot      - charge-term-current-microamp: a charge cycle terminates when the battery voltage is
572eb4d8dcSEmmanuel Vadot                                      above recharge threshold, and the current is below this
582eb4d8dcSEmmanuel Vadot                                      setting (typically 10% of battery capacity).
592eb4d8dcSEmmanuel Vadot
602eb4d8dcSEmmanuel Vadotrequired:
612eb4d8dcSEmmanuel Vadot  - compatible
622eb4d8dcSEmmanuel Vadot  - reg
632eb4d8dcSEmmanuel Vadot  - interrupts
642eb4d8dcSEmmanuel Vadot
652eb4d8dcSEmmanuel VadotadditionalProperties: false
662eb4d8dcSEmmanuel Vadot
672eb4d8dcSEmmanuel Vadotexamples:
682eb4d8dcSEmmanuel Vadot  - |
692eb4d8dcSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
702eb4d8dcSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
712eb4d8dcSEmmanuel Vadot
722eb4d8dcSEmmanuel Vadot    bat: battery {
732eb4d8dcSEmmanuel Vadot      compatible = "simple-battery";
742eb4d8dcSEmmanuel Vadot      precharge-current-microamp = <256000>;
752eb4d8dcSEmmanuel Vadot      charge-term-current-microamp = <128000>;
762eb4d8dcSEmmanuel Vadot    };
772eb4d8dcSEmmanuel Vadot
78*fac71e4eSEmmanuel Vadot    i2c {
792eb4d8dcSEmmanuel Vadot      #address-cells = <1>;
802eb4d8dcSEmmanuel Vadot      #size-cells = <0>;
812eb4d8dcSEmmanuel Vadot
822eb4d8dcSEmmanuel Vadot      charger@6a {
832eb4d8dcSEmmanuel Vadot        compatible = "ti,bq24190";
842eb4d8dcSEmmanuel Vadot        reg = <0x6a>;
852eb4d8dcSEmmanuel Vadot        interrupt-parent = <&gpiochip>;
862eb4d8dcSEmmanuel Vadot        interrupts = <10 IRQ_TYPE_EDGE_FALLING>;
872eb4d8dcSEmmanuel Vadot        monitored-battery = <&bat>;
882eb4d8dcSEmmanuel Vadot        ti,system-minimum-microvolt = <3200000>;
892eb4d8dcSEmmanuel Vadot
902eb4d8dcSEmmanuel Vadot        usb_otg_vbus: usb-otg-vbus { };
912eb4d8dcSEmmanuel Vadot      };
922eb4d8dcSEmmanuel Vadot    };
93