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
322609a127SMaxime Ripard      - allwinner,sun8i-h3-mbus
33d7b101a3SMaxime Ripard      - allwinner,sun8i-r40-mbus
34f0df2e05SJernej Skrabec      - allwinner,sun50i-a64-mbus
352609a127SMaxime Ripard
362609a127SMaxime Ripard  reg:
37*245578baSSamuel Holland    minItems: 1
38*245578baSSamuel Holland    items:
39*245578baSSamuel Holland      - description: MBUS interconnect/bandwidth limit/PMU registers
40*245578baSSamuel Holland      - description: DRAM controller/PHY registers
41*245578baSSamuel Holland
42*245578baSSamuel Holland  reg-names:
43*245578baSSamuel Holland    minItems: 1
44*245578baSSamuel Holland    items:
45*245578baSSamuel Holland      - const: mbus
46*245578baSSamuel Holland      - const: dram
472609a127SMaxime Ripard
482609a127SMaxime Ripard  clocks:
49*245578baSSamuel Holland    minItems: 1
50*245578baSSamuel Holland    items:
51*245578baSSamuel Holland      - description: MBUS interconnect module clock
52*245578baSSamuel Holland      - description: DRAM controller/PHY module clock
53*245578baSSamuel Holland      - description: Register bus clock, shared by MBUS and DRAM
54*245578baSSamuel Holland
55*245578baSSamuel Holland  clock-names:
56*245578baSSamuel Holland    minItems: 1
57*245578baSSamuel Holland    items:
58*245578baSSamuel Holland      - const: mbus
59*245578baSSamuel Holland      - const: dram
60*245578baSSamuel Holland      - const: bus
61*245578baSSamuel Holland
62*245578baSSamuel Holland  interrupts:
632609a127SMaxime Ripard    maxItems: 1
64*245578baSSamuel Holland    description:
65*245578baSSamuel Holland      MBUS PMU activity interrupt.
662609a127SMaxime Ripard
672609a127SMaxime Ripard  dma-ranges:
682609a127SMaxime Ripard    description:
692609a127SMaxime Ripard      See section 2.3.9 of the DeviceTree Specification.
702609a127SMaxime Ripard
71f88d59fcSRob Herring  '#address-cells': true
72f88d59fcSRob Herring
73f88d59fcSRob Herring  '#size-cells': true
74f88d59fcSRob Herring
752609a127SMaxime Ripardrequired:
762609a127SMaxime Ripard  - "#interconnect-cells"
772609a127SMaxime Ripard  - compatible
782609a127SMaxime Ripard  - reg
792609a127SMaxime Ripard  - clocks
802609a127SMaxime Ripard  - dma-ranges
812609a127SMaxime Ripard
82*245578baSSamuel Hollandif:
83*245578baSSamuel Holland  properties:
84*245578baSSamuel Holland    compatible:
85*245578baSSamuel Holland      contains:
86*245578baSSamuel Holland        enum:
87*245578baSSamuel Holland          - allwinner,sun8i-h3-mbus
88*245578baSSamuel Holland          - allwinner,sun50i-a64-mbus
89*245578baSSamuel Holland
90*245578baSSamuel Hollandthen:
91*245578baSSamuel Holland  properties:
92*245578baSSamuel Holland    reg:
93*245578baSSamuel Holland      minItems: 2
94*245578baSSamuel Holland
95*245578baSSamuel Holland    reg-names:
96*245578baSSamuel Holland      minItems: 2
97*245578baSSamuel Holland
98*245578baSSamuel Holland    clocks:
99*245578baSSamuel Holland      minItems: 3
100*245578baSSamuel Holland
101*245578baSSamuel Holland    clock-names:
102*245578baSSamuel Holland      minItems: 3
103*245578baSSamuel Holland
104*245578baSSamuel Holland  required:
105*245578baSSamuel Holland    - reg-names
106*245578baSSamuel Holland    - clock-names
107*245578baSSamuel Holland
108*245578baSSamuel Hollandelse:
109*245578baSSamuel Holland  properties:
110*245578baSSamuel Holland    reg:
111*245578baSSamuel Holland      maxItems: 1
112*245578baSSamuel Holland
113*245578baSSamuel Holland    reg-names:
114*245578baSSamuel Holland      maxItems: 1
115*245578baSSamuel Holland
116*245578baSSamuel Holland    clocks:
117*245578baSSamuel Holland      maxItems: 1
118*245578baSSamuel Holland
119*245578baSSamuel Holland    clock-names:
120*245578baSSamuel Holland      maxItems: 1
121*245578baSSamuel Holland
1222609a127SMaxime RipardadditionalProperties: false
1232609a127SMaxime Ripard
1242609a127SMaxime Ripardexamples:
1252609a127SMaxime Ripard  - |
126*245578baSSamuel Holland    #include <dt-bindings/clock/sun50i-a64-ccu.h>
127*245578baSSamuel Holland    #include <dt-bindings/interrupt-controller/arm-gic.h>
1282609a127SMaxime Ripard
129*245578baSSamuel Holland    dram-controller@1c01000 {
1302609a127SMaxime Ripard        compatible = "allwinner,sun5i-a13-mbus";
1312609a127SMaxime Ripard        reg = <0x01c01000 0x1000>;
1322609a127SMaxime Ripard        clocks = <&ccu CLK_MBUS>;
133f88d59fcSRob Herring        #address-cells = <1>;
134f88d59fcSRob Herring        #size-cells = <1>;
1352609a127SMaxime Ripard        dma-ranges = <0x00000000 0x40000000 0x20000000>;
1362609a127SMaxime Ripard        #interconnect-cells = <1>;
1372609a127SMaxime Ripard    };
1382609a127SMaxime Ripard
139*245578baSSamuel Holland  - |
140*245578baSSamuel Holland    dram-controller@1c62000 {
141*245578baSSamuel Holland        compatible = "allwinner,sun50i-a64-mbus";
142*245578baSSamuel Holland        reg = <0x01c62000 0x1000>,
143*245578baSSamuel Holland              <0x01c63000 0x1000>;
144*245578baSSamuel Holland        reg-names = "mbus", "dram";
145*245578baSSamuel Holland        clocks = <&ccu CLK_MBUS>,
146*245578baSSamuel Holland                 <&ccu CLK_DRAM>,
147*245578baSSamuel Holland                 <&ccu CLK_BUS_DRAM>;
148*245578baSSamuel Holland        clock-names = "mbus", "dram", "bus";
149*245578baSSamuel Holland        interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
150*245578baSSamuel Holland        #address-cells = <1>;
151*245578baSSamuel Holland        #size-cells = <1>;
152*245578baSSamuel Holland        dma-ranges = <0x00000000 0x40000000 0xc0000000>;
153*245578baSSamuel Holland        #interconnect-cells = <1>;
154*245578baSSamuel Holland    };
155*245578baSSamuel Holland
1562609a127SMaxime Ripard...
157