1# SPDX-License-Identifier: GPL-2.0-only
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/usb/renesas,usbhs.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Renesas USBHS (HS-USB) controller
8
9maintainers:
10  - Yoshihiro Shimoda <[email protected]>
11
12properties:
13  compatible:
14    oneOf:
15      - items:
16          - const: renesas,usbhs-r7s72100 # RZ/A1
17          - const: renesas,rza1-usbhs
18
19      - items:
20          - enum:
21              - renesas,usbhs-r7s9210   # RZ/A2
22          - const: renesas,rza2-usbhs
23
24      - items:
25          - enum:
26              - renesas,usbhs-r9a07g043 # RZ/G2UL and RZ/Five
27              - renesas,usbhs-r9a07g044 # RZ/G2{L,LC}
28              - renesas,usbhs-r9a07g054 # RZ/V2L
29              - renesas,usbhs-r9a08g045 # RZ/G3S
30          - const: renesas,rzg2l-usbhs
31
32      - items:
33          - enum:
34              - renesas,usbhs-r8a7742  # RZ/G1H
35              - renesas,usbhs-r8a7743  # RZ/G1M
36              - renesas,usbhs-r8a7744  # RZ/G1N
37              - renesas,usbhs-r8a7745  # RZ/G1E
38              - renesas,usbhs-r8a77470 # RZ/G1C
39              - renesas,usbhs-r8a7790  # R-Car H2
40              - renesas,usbhs-r8a7791  # R-Car M2-W
41              - renesas,usbhs-r8a7792  # R-Car V2H
42              - renesas,usbhs-r8a7793  # R-Car M2-N
43              - renesas,usbhs-r8a7794  # R-Car E2
44          - const: renesas,rcar-gen2-usbhs
45
46      - items:
47          - enum:
48              - renesas,usbhs-r8a774a1 # RZ/G2M
49              - renesas,usbhs-r8a774b1 # RZ/G2N
50              - renesas,usbhs-r8a774c0 # RZ/G2E
51              - renesas,usbhs-r8a774e1 # RZ/G2H
52              - renesas,usbhs-r8a7795  # R-Car H3
53              - renesas,usbhs-r8a7796  # R-Car M3-W
54              - renesas,usbhs-r8a77961 # R-Car M3-W+
55              - renesas,usbhs-r8a77965 # R-Car M3-N
56              - renesas,usbhs-r8a77990 # R-Car E3
57              - renesas,usbhs-r8a77995 # R-Car D3
58          - const: renesas,rcar-gen3-usbhs
59
60  reg:
61    maxItems: 1
62
63  clocks:
64    minItems: 1
65    items:
66      - description: USB 2.0 host
67      - description: USB 2.0 peripheral
68      - description: USB 2.0 clock selector
69
70  interrupts:
71    minItems: 1
72    maxItems: 4
73
74  renesas,buswait:
75    $ref: /schemas/types.yaml#/definitions/uint32
76    description: |
77      Integer to use BUSWAIT register.
78
79  renesas,enable-gpio:
80    deprecated: true
81    maxItems: 1
82
83  renesas,enable-gpios:
84    maxItems: 1
85    description: |
86      gpio specifier to check GPIO determining if USB function should be
87      enabled.
88
89  phys:
90    maxItems: 1
91
92  phy-names:
93    items:
94      - const: usb
95
96  dmas:
97    minItems: 2
98    maxItems: 4
99
100  dma-names:
101    minItems: 2
102    items:
103      - const: ch0
104      - const: ch1
105      - const: ch2
106      - const: ch3
107
108  dr_mode: true
109
110  power-domains:
111    maxItems: 1
112
113  resets:
114    minItems: 1
115    items:
116      - description: USB 2.0 host
117      - description: USB 2.0 peripheral
118
119required:
120  - compatible
121  - reg
122  - clocks
123  - interrupts
124
125allOf:
126  - if:
127      properties:
128        compatible:
129          contains:
130            enum:
131              - renesas,usbhs-r9a07g043
132              - renesas,usbhs-r9a07g044
133              - renesas,usbhs-r9a07g054
134              - renesas,usbhs-r9a08g045
135    then:
136      properties:
137        interrupts:
138          items:
139            - description: U2P_IXL_INT
140            - description: U2P_INT_DMA[0]
141            - description: U2P_INT_DMA[1]
142            - description: U2P_INT_DMAERR
143      required:
144        - resets
145    else:
146      properties:
147        interrupts:
148          maxItems: 1
149
150additionalProperties: false
151
152examples:
153  - |
154    #include <dt-bindings/clock/r8a7790-cpg-mssr.h>
155    #include <dt-bindings/interrupt-controller/arm-gic.h>
156    #include <dt-bindings/power/r8a7790-sysc.h>
157
158    usbhs: usb@e6590000 {
159        compatible = "renesas,usbhs-r8a7790", "renesas,rcar-gen2-usbhs";
160        reg = <0xe6590000 0x100>;
161        interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
162        clocks = <&cpg CPG_MOD 704>;
163    };
164