xref: /freebsd/sys/contrib/device-tree/Bindings/i2c/google,cros-ec-i2c-tunnel.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
16be33864SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
26be33864SEmmanuel Vadot%YAML 1.2
36be33864SEmmanuel Vadot---
46be33864SEmmanuel Vadot
56be33864SEmmanuel Vadot$id: http://devicetree.org/schemas/i2c/google,cros-ec-i2c-tunnel.yaml#
66be33864SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
76be33864SEmmanuel Vadot
86be33864SEmmanuel Vadottitle: I2C bus that tunnels through the ChromeOS EC (cros-ec)
96be33864SEmmanuel Vadot
106be33864SEmmanuel Vadotmaintainers:
116be33864SEmmanuel Vadot  - Doug Anderson <dianders@chromium.org>
126be33864SEmmanuel Vadot  - Benson Leung <bleung@chromium.org>
136be33864SEmmanuel Vadot
146be33864SEmmanuel Vadotdescription: |
156be33864SEmmanuel Vadot  On some ChromeOS board designs we've got a connection to the EC
166be33864SEmmanuel Vadot  (embedded controller) but no direct connection to some devices on the
176be33864SEmmanuel Vadot  other side of the EC (like a battery and PMIC).  To get access to
186be33864SEmmanuel Vadot  those devices we need to tunnel our i2c commands through the EC.
196be33864SEmmanuel Vadot
206be33864SEmmanuel Vadot  The node for this device should be under a cros-ec node like
216be33864SEmmanuel Vadot  google,cros-ec-spi or google,cros-ec-i2c.
226be33864SEmmanuel Vadot
236be33864SEmmanuel VadotallOf:
246be33864SEmmanuel Vadot  - $ref: i2c-controller.yaml#
256be33864SEmmanuel Vadot
266be33864SEmmanuel Vadotproperties:
276be33864SEmmanuel Vadot  compatible:
286be33864SEmmanuel Vadot    const: google,cros-ec-i2c-tunnel
296be33864SEmmanuel Vadot
306be33864SEmmanuel Vadot  google,remote-bus:
316be33864SEmmanuel Vadot    description: The EC bus we'd like to talk to.
326be33864SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
336be33864SEmmanuel Vadot
346be33864SEmmanuel Vadotrequired:
356be33864SEmmanuel Vadot  - compatible
366be33864SEmmanuel Vadot  - google,remote-bus
376be33864SEmmanuel Vadot
386be33864SEmmanuel VadotunevaluatedProperties: false
396be33864SEmmanuel Vadot
406be33864SEmmanuel Vadotexamples:
416be33864SEmmanuel Vadot  - |
42*fac71e4eSEmmanuel Vadot    spi {
436be33864SEmmanuel Vadot        #address-cells = <1>;
446be33864SEmmanuel Vadot        #size-cells = <0>;
456be33864SEmmanuel Vadot
466be33864SEmmanuel Vadot        cros-ec@0 {
476be33864SEmmanuel Vadot            compatible = "google,cros-ec-spi";
486be33864SEmmanuel Vadot            reg = <0>;
496be33864SEmmanuel Vadot            spi-max-frequency = <5000000>;
508bab661aSEmmanuel Vadot            interrupts = <99 0>;
516be33864SEmmanuel Vadot
526be33864SEmmanuel Vadot            i2c-tunnel {
536be33864SEmmanuel Vadot                compatible = "google,cros-ec-i2c-tunnel";
546be33864SEmmanuel Vadot                #address-cells = <1>;
556be33864SEmmanuel Vadot                #size-cells = <0>;
566be33864SEmmanuel Vadot
576be33864SEmmanuel Vadot                google,remote-bus = <0>;
586be33864SEmmanuel Vadot
596be33864SEmmanuel Vadot                battery: sbs-battery@b {
606be33864SEmmanuel Vadot                    compatible = "sbs,sbs-battery";
616be33864SEmmanuel Vadot                    reg = <0xb>;
626be33864SEmmanuel Vadot                    sbs,poll-retry-count = <1>;
636be33864SEmmanuel Vadot                };
646be33864SEmmanuel Vadot            };
656be33864SEmmanuel Vadot        };
666be33864SEmmanuel Vadot    };
67