xref: /freebsd-src/sys/contrib/device-tree/Bindings/usb/usb-drd.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
15def4c47SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
25def4c47SEmmanuel Vadot%YAML 1.2
35def4c47SEmmanuel Vadot---
45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/usb/usb-drd.yaml#
55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65def4c47SEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: Generic USB OTG Controller
85def4c47SEmmanuel Vadot
95def4c47SEmmanuel Vadotmaintainers:
105def4c47SEmmanuel Vadot  - Greg Kroah-Hartman <gregkh@linuxfoundation.org>
115def4c47SEmmanuel Vadot
125def4c47SEmmanuel Vadotproperties:
135def4c47SEmmanuel Vadot  otg-rev:
145def4c47SEmmanuel Vadot    description:
155def4c47SEmmanuel Vadot      Tells usb driver the release number of the OTG and EH supplement with
165def4c47SEmmanuel Vadot      which the device and its descriptors are compliant, in binary-coded
175def4c47SEmmanuel Vadot      decimal (i.e. 2.0 is 0200H). This property is used if any real OTG
185def4c47SEmmanuel Vadot      features (HNP/SRP/ADP) is enabled. If ADP is required, otg-rev should be
195def4c47SEmmanuel Vadot      0x0200 or above.
205def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
215def4c47SEmmanuel Vadot    enum: [0x0100, 0x0120, 0x0130, 0x0200]
225def4c47SEmmanuel Vadot
235def4c47SEmmanuel Vadot  dr_mode:
245def4c47SEmmanuel Vadot    description:
255def4c47SEmmanuel Vadot      Tells Dual-Role USB controllers that we want to work on a particular
265def4c47SEmmanuel Vadot      mode. In case this attribute isn't passed via DT, USB DRD controllers
275def4c47SEmmanuel Vadot      should default to OTG.
285def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
295def4c47SEmmanuel Vadot    enum: [host, peripheral, otg]
30*8bab661aSEmmanuel Vadot    default: otg
315def4c47SEmmanuel Vadot
325def4c47SEmmanuel Vadot  hnp-disable:
335def4c47SEmmanuel Vadot    description:
345def4c47SEmmanuel Vadot      Tells OTG controllers we want to disable OTG HNP. Normally HNP is the
355def4c47SEmmanuel Vadot      basic function of real OTG except you want it to be a srp-capable only B
365def4c47SEmmanuel Vadot      device.
375def4c47SEmmanuel Vadot    type: boolean
385def4c47SEmmanuel Vadot
395def4c47SEmmanuel Vadot  srp-disable:
405def4c47SEmmanuel Vadot    description:
415def4c47SEmmanuel Vadot      Tells OTG controllers we want to disable OTG SRP. SRP is optional for OTG
425def4c47SEmmanuel Vadot      device.
435def4c47SEmmanuel Vadot    type: boolean
445def4c47SEmmanuel Vadot
455def4c47SEmmanuel Vadot  adp-disable:
465def4c47SEmmanuel Vadot    description:
475def4c47SEmmanuel Vadot      Tells OTG controllers we want to disable OTG ADP. ADP is optional for OTG
485def4c47SEmmanuel Vadot      device.
495def4c47SEmmanuel Vadot    type: boolean
505def4c47SEmmanuel Vadot
515def4c47SEmmanuel Vadot  usb-role-switch:
525def4c47SEmmanuel Vadot    description:
535def4c47SEmmanuel Vadot      Indicates that the device is capable of assigning the USB data role
545def4c47SEmmanuel Vadot      (USB host or USB device) for a given USB connector, such as Type-C,
555def4c47SEmmanuel Vadot      Type-B(micro). See connector/usb-connector.yaml.
565def4c47SEmmanuel Vadot
575def4c47SEmmanuel Vadot  role-switch-default-mode:
585def4c47SEmmanuel Vadot    description:
595def4c47SEmmanuel Vadot      Indicates if usb-role-switch is enabled, the device default operation
605def4c47SEmmanuel Vadot      mode of controller while usb role is USB_ROLE_NONE.
615def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
625def4c47SEmmanuel Vadot    enum: [host, peripheral]
635def4c47SEmmanuel Vadot    default: peripheral
645def4c47SEmmanuel Vadot
655def4c47SEmmanuel VadotadditionalProperties: true
665def4c47SEmmanuel Vadot
675def4c47SEmmanuel Vadotexamples:
685def4c47SEmmanuel Vadot  - |
695def4c47SEmmanuel Vadot    usb@4a030000 {
705def4c47SEmmanuel Vadot        compatible = "snps,dwc3";
715def4c47SEmmanuel Vadot        reg = <0x4a030000 0xcfff>;
725def4c47SEmmanuel Vadot        interrupts = <0 92 4>;
735def4c47SEmmanuel Vadot        usb-phy = <&usb2_phy>, <&usb3_phy>;
745def4c47SEmmanuel Vadot        maximum-speed = "super-speed";
755def4c47SEmmanuel Vadot        dr_mode = "otg";
765def4c47SEmmanuel Vadot        phy_type = "utmi_wide";
775def4c47SEmmanuel Vadot        otg-rev = <0x0200>;
785def4c47SEmmanuel Vadot        adp-disable;
795def4c47SEmmanuel Vadot    };
80