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