12609a127SMaxime Ripard# SPDX-License-Identifier: GPL-2.0
22609a127SMaxime Ripard%YAML 1.2
32609a127SMaxime Ripard---
42609a127SMaxime Ripard$id: http://devicetree.org/schemas/arm/sunxi/allwinner,sun4i-a10-mbus.yaml#
52609a127SMaxime Ripard$schema: http://devicetree.org/meta-schemas/core.yaml#
62609a127SMaxime Ripard
72609a127SMaxime Ripardtitle: Allwinner Memory Bus (MBUS) controller
82609a127SMaxime Ripard
92609a127SMaxime Ripardmaintainers:
102609a127SMaxime Ripard  - Chen-Yu Tsai <wens@csie.org>
112609a127SMaxime Ripard  - Maxime Ripard <mripard@kernel.org>
122609a127SMaxime Ripard
132609a127SMaxime Riparddescription: |
142609a127SMaxime Ripard  The MBUS controller drives the MBUS that other devices in the SoC
152609a127SMaxime Ripard  will use to perform DMA. It also has a register interface that
162609a127SMaxime Ripard  allows to monitor and control the bandwidth and priorities for
172609a127SMaxime Ripard  masters on that bus.
182609a127SMaxime Ripard
192609a127SMaxime Ripard  Each device having to perform their DMA through the MBUS must have
202609a127SMaxime Ripard  the interconnects and interconnect-names properties set to the MBUS
212609a127SMaxime Ripard  controller and with "dma-mem" as the interconnect name.
222609a127SMaxime Ripard
232609a127SMaxime Ripardproperties:
242609a127SMaxime Ripard  "#interconnect-cells":
252609a127SMaxime Ripard    const: 1
262609a127SMaxime Ripard    description:
272609a127SMaxime Ripard      The content of the cell is the MBUS ID.
282609a127SMaxime Ripard
292609a127SMaxime Ripard  compatible:
302609a127SMaxime Ripard    enum:
312609a127SMaxime Ripard      - allwinner,sun5i-a13-mbus
32*e8f05165SSamuel Holland      - allwinner,sun8i-a33-mbus
33*e8f05165SSamuel Holland      - allwinner,sun8i-a50-mbus
34*e8f05165SSamuel Holland      - allwinner,sun8i-a83t-mbus
352609a127SMaxime Ripard      - allwinner,sun8i-h3-mbus
36d7b101a3SMaxime Ripard      - allwinner,sun8i-r40-mbus
37*e8f05165SSamuel Holland      - allwinner,sun8i-v3s-mbus
38*e8f05165SSamuel Holland      - allwinner,sun8i-v536-mbus
39*e8f05165SSamuel Holland      - allwinner,sun20i-d1-mbus
40f0df2e05SJernej Skrabec      - allwinner,sun50i-a64-mbus
41*e8f05165SSamuel Holland      - allwinner,sun50i-a100-mbus
429f193dedSSamuel Holland      - allwinner,sun50i-h5-mbus
43*e8f05165SSamuel Holland      - allwinner,sun50i-h6-mbus
44*e8f05165SSamuel Holland      - allwinner,sun50i-h616-mbus
45*e8f05165SSamuel Holland      - allwinner,sun50i-r329-mbus
462609a127SMaxime Ripard
472609a127SMaxime Ripard  reg:
48245578baSSamuel Holland    minItems: 1
49245578baSSamuel Holland    items:
50245578baSSamuel Holland      - description: MBUS interconnect/bandwidth limit/PMU registers
51245578baSSamuel Holland      - description: DRAM controller/PHY registers
52245578baSSamuel Holland
53245578baSSamuel Holland  reg-names:
54245578baSSamuel Holland    minItems: 1
55245578baSSamuel Holland    items:
56245578baSSamuel Holland      - const: mbus
57245578baSSamuel Holland      - const: dram
582609a127SMaxime Ripard
592609a127SMaxime Ripard  clocks:
60245578baSSamuel Holland    minItems: 1
61245578baSSamuel Holland    items:
62245578baSSamuel Holland      - description: MBUS interconnect module clock
63245578baSSamuel Holland      - description: DRAM controller/PHY module clock
64245578baSSamuel Holland      - description: Register bus clock, shared by MBUS and DRAM
65245578baSSamuel Holland
66245578baSSamuel Holland  clock-names:
67245578baSSamuel Holland    minItems: 1
68245578baSSamuel Holland    items:
69245578baSSamuel Holland      - const: mbus
70245578baSSamuel Holland      - const: dram
71245578baSSamuel Holland      - const: bus
72245578baSSamuel Holland
73245578baSSamuel Holland  interrupts:
742609a127SMaxime Ripard    maxItems: 1
75245578baSSamuel Holland    description:
76245578baSSamuel Holland      MBUS PMU activity interrupt.
772609a127SMaxime Ripard
782609a127SMaxime Ripard  dma-ranges:
792609a127SMaxime Ripard    description:
802609a127SMaxime Ripard      See section 2.3.9 of the DeviceTree Specification.
812609a127SMaxime Ripard
82f88d59fcSRob Herring  '#address-cells': true
83f88d59fcSRob Herring
84f88d59fcSRob Herring  '#size-cells': true
85f88d59fcSRob Herring
862609a127SMaxime Ripardrequired:
872609a127SMaxime Ripard  - "#interconnect-cells"
882609a127SMaxime Ripard  - compatible
892609a127SMaxime Ripard  - reg
902609a127SMaxime Ripard  - clocks
912609a127SMaxime Ripard  - dma-ranges
922609a127SMaxime Ripard
93245578baSSamuel Hollandif:
942ffe4760SSamuel Holland  not:
95245578baSSamuel Holland    properties:
96245578baSSamuel Holland      compatible:
97245578baSSamuel Holland        contains:
98245578baSSamuel Holland          enum:
992ffe4760SSamuel Holland            - allwinner,sun5i-a13-mbus
1002ffe4760SSamuel Holland            - allwinner,sun8i-r40-mbus
101245578baSSamuel Holland
102245578baSSamuel Hollandthen:
103245578baSSamuel Holland  properties:
104245578baSSamuel Holland    reg:
105245578baSSamuel Holland      minItems: 2
106245578baSSamuel Holland
107245578baSSamuel Holland    reg-names:
108245578baSSamuel Holland      minItems: 2
109245578baSSamuel Holland
110245578baSSamuel Holland    clocks:
111245578baSSamuel Holland      minItems: 3
112245578baSSamuel Holland
113245578baSSamuel Holland    clock-names:
114245578baSSamuel Holland      minItems: 3
115245578baSSamuel Holland
116245578baSSamuel Holland  required:
117245578baSSamuel Holland    - reg-names
118245578baSSamuel Holland    - clock-names
119245578baSSamuel Holland
120245578baSSamuel Hollandelse:
121245578baSSamuel Holland  properties:
122245578baSSamuel Holland    reg:
123245578baSSamuel Holland      maxItems: 1
124245578baSSamuel Holland
125245578baSSamuel Holland    reg-names:
126245578baSSamuel Holland      maxItems: 1
127245578baSSamuel Holland
128245578baSSamuel Holland    clocks:
129245578baSSamuel Holland      maxItems: 1
130245578baSSamuel Holland
131245578baSSamuel Holland    clock-names:
132245578baSSamuel Holland      maxItems: 1
133245578baSSamuel Holland
1342609a127SMaxime RipardadditionalProperties: false
1352609a127SMaxime Ripard
1362609a127SMaxime Ripardexamples:
1372609a127SMaxime Ripard  - |
138245578baSSamuel Holland    #include <dt-bindings/clock/sun50i-a64-ccu.h>
139245578baSSamuel Holland    #include <dt-bindings/interrupt-controller/arm-gic.h>
1402609a127SMaxime Ripard
141245578baSSamuel Holland    dram-controller@1c01000 {
1422609a127SMaxime Ripard        compatible = "allwinner,sun5i-a13-mbus";
1432609a127SMaxime Ripard        reg = <0x01c01000 0x1000>;
1442609a127SMaxime Ripard        clocks = <&ccu CLK_MBUS>;
145f88d59fcSRob Herring        #address-cells = <1>;
146f88d59fcSRob Herring        #size-cells = <1>;
1472609a127SMaxime Ripard        dma-ranges = <0x00000000 0x40000000 0x20000000>;
1482609a127SMaxime Ripard        #interconnect-cells = <1>;
1492609a127SMaxime Ripard    };
1502609a127SMaxime Ripard
151245578baSSamuel Holland  - |
152245578baSSamuel Holland    dram-controller@1c62000 {
153245578baSSamuel Holland        compatible = "allwinner,sun50i-a64-mbus";
154245578baSSamuel Holland        reg = <0x01c62000 0x1000>,
155245578baSSamuel Holland              <0x01c63000 0x1000>;
156245578baSSamuel Holland        reg-names = "mbus", "dram";
157245578baSSamuel Holland        clocks = <&ccu CLK_MBUS>,
158245578baSSamuel Holland                 <&ccu CLK_DRAM>,
159245578baSSamuel Holland                 <&ccu CLK_BUS_DRAM>;
160245578baSSamuel Holland        clock-names = "mbus", "dram", "bus";
161245578baSSamuel Holland        interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
162245578baSSamuel Holland        #address-cells = <1>;
163245578baSSamuel Holland        #size-cells = <1>;
164245578baSSamuel Holland        dma-ranges = <0x00000000 0x40000000 0xc0000000>;
165245578baSSamuel Holland        #interconnect-cells = <1>;
166245578baSSamuel Holland    };
167245578baSSamuel Holland
1682609a127SMaxime Ripard...
169