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 Device Tree Bindings
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,sun50i-h6-musb
24          - const: allwinner,sun8i-a33-musb
25      - items:
26          - const: allwinner,sun50i-h616-musb
27          - const: allwinner,sun8i-h3-musb
28
29  reg:
30    maxItems: 1
31
32  interrupts:
33    maxItems: 1
34
35  interrupt-names:
36    const: mc
37
38  clocks:
39    maxItems: 1
40
41  resets:
42    maxItems: 1
43
44  phys:
45    maxItems: 1
46
47  phy-names:
48    const: usb
49
50  extcon:
51    description: Extcon specifier for the OTG PHY
52
53  dr_mode:
54    enum:
55      - host
56      - otg
57      - peripheral
58
59  allwinner,sram:
60    description: Phandle to the device SRAM
61    $ref: /schemas/types.yaml#/definitions/phandle-array
62
63required:
64  - compatible
65  - reg
66  - interrupts
67  - interrupt-names
68  - clocks
69  - phys
70  - phy-names
71  - dr_mode
72  - extcon
73
74if:
75  properties:
76    compatible:
77      contains:
78        enum:
79          - allwinner,sun6i-a31-musb
80          - allwinner,sun8i-a33-musb
81          - allwinner,sun8i-h3-musb
82
83then:
84  required:
85    - resets
86
87additionalProperties: false
88
89examples:
90  - |
91    usb_otg: usb@1c13000 {
92      compatible = "allwinner,sun4i-a10-musb";
93      reg = <0x01c13000 0x0400>;
94      clocks = <&ahb_gates 0>;
95      interrupts = <38>;
96      interrupt-names = "mc";
97      phys = <&usbphy 0>;
98      phy-names = "usb";
99      extcon = <&usbphy 0>;
100      dr_mode = "peripheral";
101    };
102
103...
104