Documentation / devicetree / bindings / extcon / extcon-usbc-cros-ec.yaml


Based on kernel version 6.11. Page generated on 2024-09-24 08:21 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/extcon/extcon-usbc-cros-ec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ChromeOS EC USB Type-C cable and accessories detection

maintainers:
  - Benson Leung <bleung@chromium.org>

description: |
  On ChromeOS systems with USB Type C ports, the ChromeOS Embedded Controller is
  able to detect the state of external accessories such as display adapters
  or USB devices when said accessories are attached or detached.
  The node for this device must be under a cros-ec node like google,cros-ec-spi
  or google,cros-ec-i2c.

properties:
  compatible:
    const: google,extcon-usbc-cros-ec

  google,usb-port-id:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: the port id
    minimum: 0
    maximum: 255

required:
  - compatible
  - google,usb-port-id

additionalProperties: false

examples:
  - |
    spi {
        #address-cells = <1>;
        #size-cells = <0>;
        cros-ec@0 {
            compatible = "google,cros-ec-spi";
            reg = <0>;
            interrupts = <44 0>;
 
            usbc_extcon0: extcon0 {
                compatible = "google,extcon-usbc-cros-ec";
                google,usb-port-id = <0>;
            };
 
            usbc_extcon1: extcon1 {
                compatible = "google,extcon-usbc-cros-ec";
                google,usb-port-id = <1>;
            };
        };
    };