ChromeOS EC USB Type-C cable and accessories detection

Schema identifier ($id): "http://devicetree.org/schemas/extcon/extcon-usbc-cros-ec.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Benson Leung <bleung@chromium.org>"

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 and child nodes (properties) #

compatible — required here #

Exact value (const): "google,extcon-usbc-cros-ec"

google,usb-port-id — required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

the port id

Minimum value (minimum): 0

Maximum value (maximum): 255

Required in this object (required): "compatible", "google,usb-port-id"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (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>;
        };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page