xref: /freebsd-src/sys/contrib/device-tree/Bindings/power/supply/qcom,pm8916-bms-vm.yaml (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
1*84943d6fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*84943d6fSEmmanuel Vadot%YAML 1.2
3*84943d6fSEmmanuel Vadot---
4*84943d6fSEmmanuel Vadot$id: http://devicetree.org/schemas/power/supply/qcom,pm8916-bms-vm.yaml#
5*84943d6fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*84943d6fSEmmanuel Vadot
7*84943d6fSEmmanuel Vadottitle: Qualcomm Voltage Mode BMS
8*84943d6fSEmmanuel Vadot
9*84943d6fSEmmanuel Vadotmaintainers:
10*84943d6fSEmmanuel Vadot  - Nikita Travkin <nikita@trvn.ru>
11*84943d6fSEmmanuel Vadot
12*84943d6fSEmmanuel Vadotdescription:
13*84943d6fSEmmanuel Vadot  Voltage Mode BMS is a hardware block found in some Qualcomm PMICs
14*84943d6fSEmmanuel Vadot  such as pm8916. This block performs battery voltage monitoring.
15*84943d6fSEmmanuel Vadot
16*84943d6fSEmmanuel VadotallOf:
17*84943d6fSEmmanuel Vadot  - $ref: power-supply.yaml#
18*84943d6fSEmmanuel Vadot
19*84943d6fSEmmanuel Vadotproperties:
20*84943d6fSEmmanuel Vadot  compatible:
21*84943d6fSEmmanuel Vadot    const: qcom,pm8916-bms-vm
22*84943d6fSEmmanuel Vadot
23*84943d6fSEmmanuel Vadot  reg:
24*84943d6fSEmmanuel Vadot    maxItems: 1
25*84943d6fSEmmanuel Vadot
26*84943d6fSEmmanuel Vadot  interrupts:
27*84943d6fSEmmanuel Vadot    items:
28*84943d6fSEmmanuel Vadot      - description: BMS FSM left S3 mode
29*84943d6fSEmmanuel Vadot      - description: BMS FSM entered S2 mode
30*84943d6fSEmmanuel Vadot      - description: OCV measured in S3 mode
31*84943d6fSEmmanuel Vadot      - description: OCV below threshold
32*84943d6fSEmmanuel Vadot      - description: FIFO update done
33*84943d6fSEmmanuel Vadot      - description: BMS FSM switched state
34*84943d6fSEmmanuel Vadot
35*84943d6fSEmmanuel Vadot  interrupt-names:
36*84943d6fSEmmanuel Vadot    items:
37*84943d6fSEmmanuel Vadot      - const: cv_leave
38*84943d6fSEmmanuel Vadot      - const: cv_enter
39*84943d6fSEmmanuel Vadot      - const: ocv_good
40*84943d6fSEmmanuel Vadot      - const: ocv_thr
41*84943d6fSEmmanuel Vadot      - const: fifo
42*84943d6fSEmmanuel Vadot      - const: state_chg
43*84943d6fSEmmanuel Vadot
44*84943d6fSEmmanuel Vadot  monitored-battery: true
45*84943d6fSEmmanuel Vadot
46*84943d6fSEmmanuel Vadot  power-supplies: true
47*84943d6fSEmmanuel Vadot
48*84943d6fSEmmanuel Vadotrequired:
49*84943d6fSEmmanuel Vadot  - compatible
50*84943d6fSEmmanuel Vadot  - reg
51*84943d6fSEmmanuel Vadot  - interrupts
52*84943d6fSEmmanuel Vadot  - interrupt-names
53*84943d6fSEmmanuel Vadot  - monitored-battery
54*84943d6fSEmmanuel Vadot
55*84943d6fSEmmanuel VadotadditionalProperties: false
56*84943d6fSEmmanuel Vadot
57*84943d6fSEmmanuel Vadotexamples:
58*84943d6fSEmmanuel Vadot  - |
59*84943d6fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
60*84943d6fSEmmanuel Vadot    pmic {
61*84943d6fSEmmanuel Vadot      #address-cells = <1>;
62*84943d6fSEmmanuel Vadot      #size-cells = <0>;
63*84943d6fSEmmanuel Vadot
64*84943d6fSEmmanuel Vadot      battery@4000 {
65*84943d6fSEmmanuel Vadot        compatible = "qcom,pm8916-bms-vm";
66*84943d6fSEmmanuel Vadot        reg = <0x4000>;
67*84943d6fSEmmanuel Vadot        interrupts = <0x0 0x40 0 IRQ_TYPE_EDGE_RISING>,
68*84943d6fSEmmanuel Vadot                     <0x0 0x40 1 IRQ_TYPE_EDGE_RISING>,
69*84943d6fSEmmanuel Vadot                     <0x0 0x40 2 IRQ_TYPE_EDGE_RISING>,
70*84943d6fSEmmanuel Vadot                     <0x0 0x40 3 IRQ_TYPE_EDGE_RISING>,
71*84943d6fSEmmanuel Vadot                     <0x0 0x40 4 IRQ_TYPE_EDGE_RISING>,
72*84943d6fSEmmanuel Vadot                     <0x0 0x40 5 IRQ_TYPE_EDGE_RISING>;
73*84943d6fSEmmanuel Vadot        interrupt-names = "cv_leave",
74*84943d6fSEmmanuel Vadot                          "cv_enter",
75*84943d6fSEmmanuel Vadot                          "ocv_good",
76*84943d6fSEmmanuel Vadot                          "ocv_thr",
77*84943d6fSEmmanuel Vadot                          "fifo",
78*84943d6fSEmmanuel Vadot                          "state_chg";
79*84943d6fSEmmanuel Vadot
80*84943d6fSEmmanuel Vadot        monitored-battery = <&battery>;
81*84943d6fSEmmanuel Vadot        power-supplies = <&pm8916_charger>;
82*84943d6fSEmmanuel Vadot      };
83*84943d6fSEmmanuel Vadot    };
84