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