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