0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/usb/usb-drd.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Generic USB OTG Controller Device Tree Bindings
0008
0009 maintainers:
0010 - Greg Kroah-Hartman <gregkh@linuxfoundation.org>
0011
0012 properties:
0013 otg-rev:
0014 description:
0015 Tells usb driver the release number of the OTG and EH supplement with
0016 which the device and its descriptors are compliant, in binary-coded
0017 decimal (i.e. 2.0 is 0200H). This property is used if any real OTG
0018 features (HNP/SRP/ADP) is enabled. If ADP is required, otg-rev should be
0019 0x0200 or above.
0020 $ref: /schemas/types.yaml#/definitions/uint32
0021 enum: [0x0100, 0x0120, 0x0130, 0x0200]
0022
0023 dr_mode:
0024 description:
0025 Tells Dual-Role USB controllers that we want to work on a particular
0026 mode. In case this attribute isn't passed via DT, USB DRD controllers
0027 should default to OTG.
0028 $ref: /schemas/types.yaml#/definitions/string
0029 enum: [host, peripheral, otg]
0030
0031 hnp-disable:
0032 description:
0033 Tells OTG controllers we want to disable OTG HNP. Normally HNP is the
0034 basic function of real OTG except you want it to be a srp-capable only B
0035 device.
0036 type: boolean
0037
0038 srp-disable:
0039 description:
0040 Tells OTG controllers we want to disable OTG SRP. SRP is optional for OTG
0041 device.
0042 type: boolean
0043
0044 adp-disable:
0045 description:
0046 Tells OTG controllers we want to disable OTG ADP. ADP is optional for OTG
0047 device.
0048 type: boolean
0049
0050 usb-role-switch:
0051 description:
0052 Indicates that the device is capable of assigning the USB data role
0053 (USB host or USB device) for a given USB connector, such as Type-C,
0054 Type-B(micro). See connector/usb-connector.yaml.
0055
0056 role-switch-default-mode:
0057 description:
0058 Indicates if usb-role-switch is enabled, the device default operation
0059 mode of controller while usb role is USB_ROLE_NONE.
0060 $ref: /schemas/types.yaml#/definitions/string
0061 enum: [host, peripheral]
0062 default: peripheral
0063
0064 additionalProperties: true
0065
0066 examples:
0067 - |
0068 usb@4a030000 {
0069 compatible = "snps,dwc3";
0070 reg = <0x4a030000 0xcfff>;
0071 interrupts = <0 92 4>;
0072 usb-phy = <&usb2_phy>, <&usb3_phy>;
0073 maximum-speed = "super-speed";
0074 dr_mode = "otg";
0075 phy_type = "utmi_wide";
0076 otg-rev = <0x0200>;
0077 adp-disable;
0078 };