extcon-usbc-cros-ec.yaml 1.4 KB

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