Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 
0005 $id: http://devicetree.org/schemas/i2c/google,cros-ec-i2c-tunnel.yaml#
0006 $schema: http://devicetree.org/meta-schemas/core.yaml#
0007 
0008 title: I2C bus that tunnels through the ChromeOS EC (cros-ec)
0009 
0010 maintainers:
0011   - Doug Anderson <dianders@chromium.org>
0012   - Benson Leung <bleung@chromium.org>
0013 
0014 description: |
0015   On some ChromeOS board designs we've got a connection to the EC
0016   (embedded controller) but no direct connection to some devices on the
0017   other side of the EC (like a battery and PMIC).  To get access to
0018   those devices we need to tunnel our i2c commands through the EC.
0019 
0020   The node for this device should be under a cros-ec node like
0021   google,cros-ec-spi or google,cros-ec-i2c.
0022 
0023 allOf:
0024   - $ref: i2c-controller.yaml#
0025 
0026 properties:
0027   compatible:
0028     const: google,cros-ec-i2c-tunnel
0029 
0030   google,remote-bus:
0031     description: The EC bus we'd like to talk to.
0032     $ref: /schemas/types.yaml#/definitions/uint32
0033 
0034 required:
0035   - compatible
0036   - google,remote-bus
0037 
0038 unevaluatedProperties: false
0039 
0040 examples:
0041   - |
0042     spi0 {
0043         #address-cells = <1>;
0044         #size-cells = <0>;
0045 
0046         cros-ec@0 {
0047             compatible = "google,cros-ec-spi";
0048             reg = <0>;
0049             spi-max-frequency = <5000000>;
0050 
0051             i2c-tunnel {
0052                 compatible = "google,cros-ec-i2c-tunnel";
0053                 #address-cells = <1>;
0054                 #size-cells = <0>;
0055 
0056                 google,remote-bus = <0>;
0057 
0058                 battery: sbs-battery@b {
0059                     compatible = "sbs,sbs-battery";
0060                     reg = <0xb>;
0061                     sbs,poll-retry-count = <1>;
0062                 };
0063             };
0064         };
0065     };