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