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