1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/usb/allwinner,sun4i-a10-musb.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Allwinner A10 mUSB OTG Controller
8
9maintainers:
10  - Chen-Yu Tsai <wens@csie.org>
11  - Maxime Ripard <mripard@kernel.org>
12
13properties:
14  compatible:
15    oneOf:
16      - const: allwinner,sun4i-a10-musb
17      - const: allwinner,sun6i-a31-musb
18      - const: allwinner,sun8i-a33-musb
19      - const: allwinner,sun8i-h3-musb
20      - items:
21          - enum:
22              - allwinner,sun8i-a83t-musb
23              - allwinner,sun20i-d1-musb
24              - allwinner,sun50i-h6-musb
25          - const: allwinner,sun8i-a33-musb
26      - items:
27          - const: allwinner,sun50i-h616-musb
28          - const: allwinner,sun8i-h3-musb
29
30  reg:
31    maxItems: 1
32
33  interrupts:
34    maxItems: 1
35
36  interrupt-names:
37    const: mc
38
39  clocks:
40    maxItems: 1
41
42  resets:
43    maxItems: 1
44
45  phys:
46    maxItems: 1
47
48  phy-names:
49    const: usb
50
51  extcon:
52    description: Extcon specifier for the OTG PHY
53
54  dr_mode:
55    enum:
56      - host
57      - otg
58      - peripheral
59
60  allwinner,sram:
61    description: Phandle to the device SRAM
62    $ref: /schemas/types.yaml#/definitions/phandle-array
63
64required:
65  - compatible
66  - reg
67  - interrupts
68  - interrupt-names
69  - clocks
70  - phys
71  - phy-names
72  - dr_mode
73  - extcon
74
75if:
76  properties:
77    compatible:
78      contains:
79        enum:
80          - allwinner,sun6i-a31-musb
81          - allwinner,sun8i-a33-musb
82          - allwinner,sun8i-h3-musb
83
84then:
85  required:
86    - resets
87
88additionalProperties: false
89
90examples:
91  - |
92    usb_otg: usb@1c13000 {
93      compatible = "allwinner,sun4i-a10-musb";
94      reg = <0x01c13000 0x0400>;
95      clocks = <&ahb_gates 0>;
96      interrupts = <38>;
97      interrupt-names = "mc";
98      phys = <&usbphy 0>;
99      phy-names = "usb";
100      extcon = <&usbphy 0>;
101      dr_mode = "peripheral";
102    };
103
104...
105