xref: /linux/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-btemp.yaml (revision c37fe6aff89cb0d842993fe2f69e48bf3ebe0ab0)
1# SPDX-License-Identifier: GPL-2.0
2# Copyright (C) 2021 Sebastian Reichel
3%YAML 1.2
4---
5$id: "http://devicetree.org/schemas/power/supply/stericsson,ab8500-btemp.yaml#"
6$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7
8title: AB8500 Battery Temperature Monitor
9
10maintainers:
11  - Sebastian Reichel <sre@kernel.org>
12
13allOf:
14  - $ref: power-supply.yaml#
15
16properties:
17  compatible:
18    const: stericsson,ab8500-btemp
19
20  battery:
21    $ref: /schemas/types.yaml#/definitions/phandle
22    description: phandle to battery node
23
24  interrupts:
25    maxItems: 5
26
27  interrupt-names:
28    items:
29      - const: BAT_CTRL_INDB
30      - const: BTEMP_LOW
31      - const: BTEMP_HIGH
32      - const: BTEMP_LOW_MEDIUM
33      - const: BTEMP_MEDIUM_HIGH
34
35  io-channels:
36    maxItems: 2
37
38  io-channel-names:
39    items:
40      - const: btemp_ball
41      - const: bat_ctrl
42
43required:
44  - compatible
45  - battery
46  - interrupts
47  - interrupt-names
48  - io-channels
49  - io-channel-names
50
51additionalProperties: false
52
53examples:
54  - |
55    #include <dt-bindings/interrupt-controller/irq.h>
56    pmic {
57      battery-temperature {
58        compatible = "stericsson,ab8500-btemp";
59        battery = <&ab8500_battery>;
60        interrupts = <20 IRQ_TYPE_LEVEL_HIGH>,
61                     <80 IRQ_TYPE_LEVEL_HIGH>,
62                     <83 IRQ_TYPE_LEVEL_HIGH>,
63                     <81 IRQ_TYPE_LEVEL_HIGH>,
64                     <82 IRQ_TYPE_LEVEL_HIGH>;
65        interrupt-names = "BAT_CTRL_INDB",
66                          "BTEMP_LOW",
67                          "BTEMP_HIGH",
68                          "BTEMP_LOW_MEDIUM",
69                          "BTEMP_MEDIUM_HIGH";
70        io-channels = <&gpadc 0x02>, <&gpadc 0x01>;
71        io-channel-names = "btemp_ball", "bat_ctrl";
72      };
73    };
74