xref: /openbmc/linux/Documentation/devicetree/bindings/power/supply/sbs,sbs-manager.yaml (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
1f5bf381aSSebastian Reichel# SPDX-License-Identifier: GPL-2.0
2f5bf381aSSebastian Reichel%YAML 1.2
3f5bf381aSSebastian Reichel---
4f5bf381aSSebastian Reichel$id: http://devicetree.org/schemas/power/supply/sbs,sbs-manager.yaml#
5f5bf381aSSebastian Reichel$schema: http://devicetree.org/meta-schemas/core.yaml#
6f5bf381aSSebastian Reichel
7*47aab533SBjorn Helgaastitle: SBS compliant manager
8f5bf381aSSebastian Reichel
9f5bf381aSSebastian Reichelmaintainers:
10f5bf381aSSebastian Reichel  - Sebastian Reichel <sre@kernel.org>
11f5bf381aSSebastian Reichel
12f5bf381aSSebastian ReichelallOf:
13f5bf381aSSebastian Reichel  - $ref: power-supply.yaml#
14f5bf381aSSebastian Reichel
15f5bf381aSSebastian Reichelproperties:
16f5bf381aSSebastian Reichel  compatible:
17f5bf381aSSebastian Reichel    oneOf:
18f5bf381aSSebastian Reichel      - items:
19f5bf381aSSebastian Reichel          - enum:
20f5bf381aSSebastian Reichel              - lltc,ltc1760
21f5bf381aSSebastian Reichel          - enum:
22f5bf381aSSebastian Reichel              - sbs,sbs-manager
23f5bf381aSSebastian Reichel      - items:
24f5bf381aSSebastian Reichel          - const: sbs,sbs-manager
25f5bf381aSSebastian Reichel
26f5bf381aSSebastian Reichel  reg:
27f5bf381aSSebastian Reichel    const: 0xa
28f5bf381aSSebastian Reichel
29f5bf381aSSebastian Reichel  "#address-cells":
30f5bf381aSSebastian Reichel    const: 1
31f5bf381aSSebastian Reichel
32f5bf381aSSebastian Reichel  "#size-cells":
33f5bf381aSSebastian Reichel    const: 0
34f5bf381aSSebastian Reichel
35f5bf381aSSebastian Reichel  gpio-controller: true
36f5bf381aSSebastian Reichel
37f5bf381aSSebastian Reichel  "#gpio-cells":
38f5bf381aSSebastian Reichel    const: 2
39f5bf381aSSebastian Reichel
40f5bf381aSSebastian Reichelrequired:
41f5bf381aSSebastian Reichel  - compatible
42f5bf381aSSebastian Reichel  - reg
43f5bf381aSSebastian Reichel
44f5bf381aSSebastian ReicheladditionalProperties: false
45f5bf381aSSebastian Reichel
46f5bf381aSSebastian ReichelpatternProperties:
47f5bf381aSSebastian Reichel  "^i2c@[1-4]$":
48f5bf381aSSebastian Reichel    type: object
49dca66935SRob Herring    $ref: /schemas/i2c/i2c-controller.yaml#
50f5bf381aSSebastian Reichel
51f5bf381aSSebastian Reichelexamples:
52f5bf381aSSebastian Reichel  - |
53f5bf381aSSebastian Reichel    #include <dt-bindings/interrupt-controller/irq.h>
54f5bf381aSSebastian Reichel    #include <dt-bindings/gpio/gpio.h>
55f5bf381aSSebastian Reichel
56f5bf381aSSebastian Reichel    i2c {
57f5bf381aSSebastian Reichel      #address-cells = <1>;
58f5bf381aSSebastian Reichel      #size-cells = <0>;
59f5bf381aSSebastian Reichel
60f5bf381aSSebastian Reichel      batman: battery-manager@a {
61f5bf381aSSebastian Reichel        compatible = "lltc,ltc1760", "sbs,sbs-manager";
62f5bf381aSSebastian Reichel        reg = <0x0a>;
63f5bf381aSSebastian Reichel        #address-cells = <1>;
64f5bf381aSSebastian Reichel        #size-cells = <0>;
65f5bf381aSSebastian Reichel
66f5bf381aSSebastian Reichel        gpio-controller;
67f5bf381aSSebastian Reichel        #gpio-cells = <2>;
68f5bf381aSSebastian Reichel
69f5bf381aSSebastian Reichel        i2c@1 {
70f5bf381aSSebastian Reichel          #address-cells = <1>;
71f5bf381aSSebastian Reichel          #size-cells = <0>;
72f5bf381aSSebastian Reichel          reg = <1>;
73f5bf381aSSebastian Reichel
74f5bf381aSSebastian Reichel          battery@b {
75f5bf381aSSebastian Reichel            compatible = "ti,bq20z65", "sbs,sbs-battery";
76f5bf381aSSebastian Reichel            reg = <0x0b>;
77f5bf381aSSebastian Reichel            sbs,battery-detect-gpios = <&batman 1 1>;
78f5bf381aSSebastian Reichel          };
79f5bf381aSSebastian Reichel        };
80f5bf381aSSebastian Reichel
81f5bf381aSSebastian Reichel        i2c@2 {
82f5bf381aSSebastian Reichel          #address-cells = <1>;
83f5bf381aSSebastian Reichel          #size-cells = <0>;
84f5bf381aSSebastian Reichel          reg = <2>;
85f5bf381aSSebastian Reichel
86f5bf381aSSebastian Reichel          battery@b {
87f5bf381aSSebastian Reichel            compatible = "ti,bq20z65", "sbs,sbs-battery";
88f5bf381aSSebastian Reichel            reg = <0x0b>;
89f5bf381aSSebastian Reichel            sbs,battery-detect-gpios = <&batman 2 1>;
90f5bf381aSSebastian Reichel          };
91f5bf381aSSebastian Reichel        };
92f5bf381aSSebastian Reichel
93f5bf381aSSebastian Reichel        i2c@3 {
94f5bf381aSSebastian Reichel          #address-cells = <1>;
95f5bf381aSSebastian Reichel          #size-cells = <0>;
96f5bf381aSSebastian Reichel          reg = <3>;
97f5bf381aSSebastian Reichel
98f5bf381aSSebastian Reichel          battery@b {
99f5bf381aSSebastian Reichel            compatible = "ti,bq20z65", "sbs,sbs-battery";
100f5bf381aSSebastian Reichel            reg = <0x0b>;
101f5bf381aSSebastian Reichel            sbs,battery-detect-gpios = <&batman 3 1>;
102f5bf381aSSebastian Reichel          };
103f5bf381aSSebastian Reichel        };
104f5bf381aSSebastian Reichel      };
105f5bf381aSSebastian Reichel    };
106