1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/dma/allwinner,sun50i-a64-dma.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Allwinner A64 DMA Controller Device Tree Bindings
8
9maintainers:
10  - Chen-Yu Tsai <wens@csie.org>
11  - Maxime Ripard <maxime.ripard@bootlin.com>
12
13allOf:
14  - $ref: "dma-controller.yaml#"
15
16properties:
17  "#dma-cells":
18    const: 1
19    description: The cell is the request line number.
20
21  compatible:
22    enum:
23      - allwinner,sun50i-a64-dma
24      - allwinner,sun50i-h6-dma
25
26  reg:
27    maxItems: 1
28
29  interrupts:
30    maxItems: 1
31
32  clocks:
33    minItems: 1
34    maxItems: 2
35
36  clock-names:
37    items:
38      - const: bus
39      - const: mbus
40
41  resets:
42    maxItems: 1
43
44required:
45  - "#dma-cells"
46  - compatible
47  - reg
48  - interrupts
49  - clocks
50  - resets
51  - dma-channels
52
53if:
54  properties:
55    compatible:
56      const: allwinner,sun50i-h6-dma
57
58then:
59  properties:
60    clocks:
61      maxItems: 2
62
63  required:
64    - clock-names
65
66else:
67  properties:
68    clocks:
69      maxItems: 1
70
71# FIXME: We should set it, but it would report all the generic
72# properties as additional properties.
73# additionalProperties: false
74
75examples:
76  - |
77    dma: dma-controller@1c02000 {
78        compatible = "allwinner,sun50i-a64-dma";
79        reg = <0x01c02000 0x1000>;
80        interrupts = <0 50 4>;
81        clocks = <&ccu 30>;
82        dma-channels = <8>;
83        dma-requests = <27>;
84        resets = <&ccu 7>;
85        #dma-cells = <1>;
86    };
87
88...
89