xref: /freebsd/sys/contrib/device-tree/Bindings/extcon/extcon-usbc-cros-ec.yaml (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*c66ec88fSEmmanuel Vadot%YAML 1.2
3*c66ec88fSEmmanuel Vadot---
4*c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/extcon/extcon-usbc-cros-ec.yaml#
5*c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel Vadottitle: ChromeOS EC USB Type-C cable and accessories detection
8*c66ec88fSEmmanuel Vadot
9*c66ec88fSEmmanuel Vadotmaintainers:
10*c66ec88fSEmmanuel Vadot  - Benson Leung <bleung@chromium.org>
11*c66ec88fSEmmanuel Vadot  - Enric Balletbo i Serra <enric.balletbo@collabora.com>
12*c66ec88fSEmmanuel Vadot
13*c66ec88fSEmmanuel Vadotdescription: |
14*c66ec88fSEmmanuel Vadot  On ChromeOS systems with USB Type C ports, the ChromeOS Embedded Controller is
15*c66ec88fSEmmanuel Vadot  able to detect the state of external accessories such as display adapters
16*c66ec88fSEmmanuel Vadot  or USB devices when said accessories are attached or detached.
17*c66ec88fSEmmanuel Vadot  The node for this device must be under a cros-ec node like google,cros-ec-spi
18*c66ec88fSEmmanuel Vadot  or google,cros-ec-i2c.
19*c66ec88fSEmmanuel Vadot
20*c66ec88fSEmmanuel Vadotproperties:
21*c66ec88fSEmmanuel Vadot  compatible:
22*c66ec88fSEmmanuel Vadot    const: google,extcon-usbc-cros-ec
23*c66ec88fSEmmanuel Vadot
24*c66ec88fSEmmanuel Vadot  google,usb-port-id:
25*c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
26*c66ec88fSEmmanuel Vadot    description: the port id
27*c66ec88fSEmmanuel Vadot    minimum: 0
28*c66ec88fSEmmanuel Vadot    maximum: 255
29*c66ec88fSEmmanuel Vadot
30*c66ec88fSEmmanuel Vadotrequired:
31*c66ec88fSEmmanuel Vadot  - compatible
32*c66ec88fSEmmanuel Vadot  - google,usb-port-id
33*c66ec88fSEmmanuel Vadot
34*c66ec88fSEmmanuel VadotadditionalProperties: false
35*c66ec88fSEmmanuel Vadot
36*c66ec88fSEmmanuel Vadotexamples:
37*c66ec88fSEmmanuel Vadot  - |
38*c66ec88fSEmmanuel Vadot    spi0 {
39*c66ec88fSEmmanuel Vadot        #address-cells = <1>;
40*c66ec88fSEmmanuel Vadot        #size-cells = <0>;
41*c66ec88fSEmmanuel Vadot        cros-ec@0 {
42*c66ec88fSEmmanuel Vadot            compatible = "google,cros-ec-spi";
43*c66ec88fSEmmanuel Vadot            reg = <0>;
44*c66ec88fSEmmanuel Vadot
45*c66ec88fSEmmanuel Vadot            usbc_extcon0: extcon0 {
46*c66ec88fSEmmanuel Vadot                compatible = "google,extcon-usbc-cros-ec";
47*c66ec88fSEmmanuel Vadot                google,usb-port-id = <0>;
48*c66ec88fSEmmanuel Vadot            };
49*c66ec88fSEmmanuel Vadot
50*c66ec88fSEmmanuel Vadot            usbc_extcon1: extcon1 {
51*c66ec88fSEmmanuel Vadot                compatible = "google,extcon-usbc-cros-ec";
52*c66ec88fSEmmanuel Vadot                google,usb-port-id = <1>;
53*c66ec88fSEmmanuel Vadot            };
54*c66ec88fSEmmanuel Vadot        };
55*c66ec88fSEmmanuel Vadot    };
56