Merge tag 'char-misc-5.13-rc1-round2' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / power / supply / stericsson,ab8500-btemp.yaml
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
8 title: AB8500 Battery Temperature Monitor
9
10 maintainers:
11   - Sebastian Reichel <sre@kernel.org>
12
13 allOf:
14   - $ref: power-supply.yaml#
15
16 properties:
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
43 required:
44   - compatible
45   - battery
46   - interrupts
47   - interrupt-names
48   - io-channels
49   - io-channel-names
50
51 additionalProperties: false
52
53 examples:
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     };