xref: /linux/Documentation/devicetree/bindings/i2c/google,cros-ec-i2c-tunnel.yaml (revision 0d3b051adbb72ed81956447d0d1e54d5943ee6f5)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4
5$id: http://devicetree.org/schemas/i2c/google,cros-ec-i2c-tunnel.yaml#
6$schema: http://devicetree.org/meta-schemas/core.yaml#
7
8title: I2C bus that tunnels through the ChromeOS EC (cros-ec)
9
10maintainers:
11  - Doug Anderson <dianders@chromium.org>
12  - Benson Leung <bleung@chromium.org>
13  - Enric Balletbo i Serra <enric.balletbo@collabora.com>
14
15description: |
16  On some ChromeOS board designs we've got a connection to the EC
17  (embedded controller) but no direct connection to some devices on the
18  other side of the EC (like a battery and PMIC).  To get access to
19  those devices we need to tunnel our i2c commands through the EC.
20
21  The node for this device should be under a cros-ec node like
22  google,cros-ec-spi or google,cros-ec-i2c.
23
24allOf:
25  - $ref: i2c-controller.yaml#
26
27properties:
28  compatible:
29    const: google,cros-ec-i2c-tunnel
30
31  google,remote-bus:
32    description: The EC bus we'd like to talk to.
33    $ref: /schemas/types.yaml#/definitions/uint32
34
35required:
36  - compatible
37  - google,remote-bus
38
39unevaluatedProperties: false
40
41examples:
42  - |
43    spi0 {
44        #address-cells = <1>;
45        #size-cells = <0>;
46
47        cros-ec@0 {
48            compatible = "google,cros-ec-spi";
49            reg = <0>;
50            spi-max-frequency = <5000000>;
51
52            i2c-tunnel {
53                compatible = "google,cros-ec-i2c-tunnel";
54                #address-cells = <1>;
55                #size-cells = <0>;
56
57                google,remote-bus = <0>;
58
59                battery: sbs-battery@b {
60                    compatible = "sbs,sbs-battery";
61                    reg = <0xb>;
62                    sbs,poll-retry-count = <1>;
63                };
64            };
65        };
66    };
67