usb-drd.yaml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/usb/usb-drd.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Generic USB OTG Controller
  7. maintainers:
  8. - Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  9. properties:
  10. otg-rev:
  11. description:
  12. Tells usb driver the release number of the OTG and EH supplement with
  13. which the device and its descriptors are compliant, in binary-coded
  14. decimal (i.e. 2.0 is 0200H). This property is used if any real OTG
  15. features (HNP/SRP/ADP) is enabled. If ADP is required, otg-rev should be
  16. 0x0200 or above.
  17. $ref: /schemas/types.yaml#/definitions/uint32
  18. enum: [0x0100, 0x0120, 0x0130, 0x0200]
  19. dr_mode:
  20. description:
  21. Tells Dual-Role USB controllers that we want to work on a particular
  22. mode. In case this attribute isn't passed via DT, USB DRD controllers
  23. should default to OTG.
  24. $ref: /schemas/types.yaml#/definitions/string
  25. enum: [host, peripheral, otg]
  26. default: otg
  27. hnp-disable:
  28. description:
  29. Tells OTG controllers we want to disable OTG HNP. Normally HNP is the
  30. basic function of real OTG except you want it to be a srp-capable only B
  31. device.
  32. type: boolean
  33. srp-disable:
  34. description:
  35. Tells OTG controllers we want to disable OTG SRP. SRP is optional for OTG
  36. device.
  37. type: boolean
  38. adp-disable:
  39. description:
  40. Tells OTG controllers we want to disable OTG ADP. ADP is optional for OTG
  41. device.
  42. type: boolean
  43. usb-role-switch:
  44. description:
  45. Indicates that the device is capable of assigning the USB data role
  46. (USB host or USB device) for a given USB connector, such as Type-C,
  47. Type-B(micro). See connector/usb-connector.yaml.
  48. role-switch-default-mode:
  49. description:
  50. Indicates if usb-role-switch is enabled, the device default operation
  51. mode of controller while usb role is USB_ROLE_NONE.
  52. $ref: /schemas/types.yaml#/definitions/string
  53. enum: [host, peripheral]
  54. default: peripheral
  55. additionalProperties: true
  56. examples:
  57. - |
  58. usb@4a030000 {
  59. compatible = "snps,dwc3";
  60. reg = <0x4a030000 0xcfff>;
  61. interrupts = <0 92 4>;
  62. usb-phy = <&usb2_phy>, <&usb3_phy>;
  63. maximum-speed = "super-speed";
  64. dr_mode = "otg";
  65. phy_type = "utmi_wide";
  66. otg-rev = <0x0200>;
  67. adp-disable;
  68. };