xref: /linux/Documentation/devicetree/bindings/embedded-controller/microsoft,surface-rt-ec.yaml (revision 390d73adf896bf4883c7d3bcd13c1b53d64351e3)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/embedded-controller/microsoft,surface-rt-ec.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Microsoft Surface RT fuel gauge and charger EC
8
9maintainers:
10  - Jonas Schwöbel <jonasschwoebel@yahoo.de>
11  - Svyatoslav Ryhel <clamor95@gmail.com>
12
13description:
14  An Embedded Controller used in Microsoft Surface RT for monitoring
15  battery properties and charger status.
16
17allOf:
18  - $ref: /schemas/power/supply/power-supply.yaml#
19
20properties:
21  compatible:
22    const: microsoft,surface-rt-ec
23
24  reg:
25    maxItems: 1
26
27  interrupts:
28    maxItems: 1
29
30  enable-gpios:
31    maxItems: 1
32
33  monitored-battery: true
34
35required:
36  - compatible
37  - reg
38  - interrupts
39  - enable-gpios
40
41additionalProperties: false
42
43examples:
44  - |
45    #include <dt-bindings/gpio/gpio.h>
46    #include <dt-bindings/interrupt-controller/irq.h>
47
48    i2c {
49        #address-cells = <1>;
50        #size-cells = <0>;
51
52        embedded-controller@a {
53            compatible = "microsoft,surface-rt-ec";
54            reg = <0x0a>;
55
56            interrupt-parent = <&gpio>;
57            interrupts = <74 IRQ_TYPE_EDGE_RISING>;
58
59            enable-gpios = <&gpio 88 GPIO_ACTIVE_HIGH>;
60            monitored-battery = <&battery>;
61        };
62    };
63...
64