summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml
blob: 8eee312c2e6f5a649aeb86d5ca29fc6ad0656e73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/arm/sunxi/allwinner,sun4i-a10-mbus.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Allwinner Memory Bus (MBUS) controller

maintainers:
  - Chen-Yu Tsai <wens@csie.org>
  - Maxime Ripard <mripard@kernel.org>

description: |
  The MBUS controller drives the MBUS that other devices in the SoC
  will use to perform DMA. It also has a register interface that
  allows to monitor and control the bandwidth and priorities for
  masters on that bus.

  Each device having to perform their DMA through the MBUS must have
  the interconnects and interconnect-names properties set to the MBUS
  controller and with "dma-mem" as the interconnect name.

properties:
  "#interconnect-cells":
    const: 1
    description:
      The content of the cell is the MBUS ID.

  compatible:
    enum:
      - allwinner,sun5i-a13-mbus
      - allwinner,sun8i-h3-mbus
      - allwinner,sun8i-r40-mbus
      - allwinner,sun50i-a64-mbus
      - allwinner,sun50i-h5-mbus

  reg:
    minItems: 1
    items:
      - description: MBUS interconnect/bandwidth limit/PMU registers
      - description: DRAM controller/PHY registers

  reg-names:
    minItems: 1
    items:
      - const: mbus
      - const: dram

  clocks:
    minItems: 1
    items:
      - description: MBUS interconnect module clock
      - description: DRAM controller/PHY module clock
      - description: Register bus clock, shared by MBUS and DRAM

  clock-names:
    minItems: 1
    items:
      - const: mbus
      - const: dram
      - const: bus

  interrupts:
    maxItems: 1
    description:
      MBUS PMU activity interrupt.

  dma-ranges:
    description:
      See section 2.3.9 of the DeviceTree Specification.

  '#address-cells': true

  '#size-cells': true

required:
  - "#interconnect-cells"
  - compatible
  - reg
  - clocks
  - dma-ranges

if:
  properties:
    compatible:
      contains:
        enum:
          - allwinner,sun8i-h3-mbus
          - allwinner,sun50i-a64-mbus
          - allwinner,sun50i-h5-mbus

then:
  properties:
    reg:
      minItems: 2

    reg-names:
      minItems: 2

    clocks:
      minItems: 3

    clock-names:
      minItems: 3

  required:
    - reg-names
    - clock-names

else:
  properties:
    reg:
      maxItems: 1

    reg-names:
      maxItems: 1

    clocks:
      maxItems: 1

    clock-names:
      maxItems: 1

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/sun50i-a64-ccu.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    dram-controller@1c01000 {
        compatible = "allwinner,sun5i-a13-mbus";
        reg = <0x01c01000 0x1000>;
        clocks = <&ccu CLK_MBUS>;
        #address-cells = <1>;
        #size-cells = <1>;
        dma-ranges = <0x00000000 0x40000000 0x20000000>;
        #interconnect-cells = <1>;
    };

  - |
    dram-controller@1c62000 {
        compatible = "allwinner,sun50i-a64-mbus";
        reg = <0x01c62000 0x1000>,
              <0x01c63000 0x1000>;
        reg-names = "mbus", "dram";
        clocks = <&ccu CLK_MBUS>,
                 <&ccu CLK_DRAM>,
                 <&ccu CLK_BUS_DRAM>;
        clock-names = "mbus", "dram", "bus";
        interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
        #address-cells = <1>;
        #size-cells = <1>;
        dma-ranges = <0x00000000 0x40000000 0xc0000000>;
        #interconnect-cells = <1>;
    };

...