Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: arm: sunxi: Expand MBUS binding

The MBUS provides more than address translation and bandwidth control.
It also provides a PMU to measure bandwidth usage by certain masters,
and it provides notification via IRQ when they are active or idle.

The MBUS is also tightly integrated with the DRAM controller to provide
a Memory Dynamic Frequency Scaling (MDFS) feature. In view of this, the
MBUS binding needs to represent the hardware resources needed for MDFS,
which include the clocks and MMIO range of the adjacent DRAM controller.

Add the additional resources for the H3 and A64 compatibles, and a new
example showing how they are used.

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20211118031841.42315-3-samuel@sholland.org

authored by

Samuel Holland and committed by
Maxime Ripard
245578ba 71b597ef

+86 -3
+86 -3
Documentation/devicetree/bindings/arm/sunxi/allwinner,sun4i-a10-mbus.yaml
··· 34 34 - allwinner,sun50i-a64-mbus 35 35 36 36 reg: 37 - maxItems: 1 37 + minItems: 1 38 + items: 39 + - description: MBUS interconnect/bandwidth limit/PMU registers 40 + - description: DRAM controller/PHY registers 41 + 42 + reg-names: 43 + minItems: 1 44 + items: 45 + - const: mbus 46 + - const: dram 38 47 39 48 clocks: 49 + minItems: 1 50 + items: 51 + - description: MBUS interconnect module clock 52 + - description: DRAM controller/PHY module clock 53 + - description: Register bus clock, shared by MBUS and DRAM 54 + 55 + clock-names: 56 + minItems: 1 57 + items: 58 + - const: mbus 59 + - const: dram 60 + - const: bus 61 + 62 + interrupts: 40 63 maxItems: 1 64 + description: 65 + MBUS PMU activity interrupt. 41 66 42 67 dma-ranges: 43 68 description: ··· 79 54 - clocks 80 55 - dma-ranges 81 56 57 + if: 58 + properties: 59 + compatible: 60 + contains: 61 + enum: 62 + - allwinner,sun8i-h3-mbus 63 + - allwinner,sun50i-a64-mbus 64 + 65 + then: 66 + properties: 67 + reg: 68 + minItems: 2 69 + 70 + reg-names: 71 + minItems: 2 72 + 73 + clocks: 74 + minItems: 3 75 + 76 + clock-names: 77 + minItems: 3 78 + 79 + required: 80 + - reg-names 81 + - clock-names 82 + 83 + else: 84 + properties: 85 + reg: 86 + maxItems: 1 87 + 88 + reg-names: 89 + maxItems: 1 90 + 91 + clocks: 92 + maxItems: 1 93 + 94 + clock-names: 95 + maxItems: 1 96 + 82 97 additionalProperties: false 83 98 84 99 examples: 85 100 - | 86 - #include <dt-bindings/clock/sun5i-ccu.h> 101 + #include <dt-bindings/clock/sun50i-a64-ccu.h> 102 + #include <dt-bindings/interrupt-controller/arm-gic.h> 87 103 88 - mbus: dram-controller@1c01000 { 104 + dram-controller@1c01000 { 89 105 compatible = "allwinner,sun5i-a13-mbus"; 90 106 reg = <0x01c01000 0x1000>; 91 107 clocks = <&ccu CLK_MBUS>; 92 108 #address-cells = <1>; 93 109 #size-cells = <1>; 94 110 dma-ranges = <0x00000000 0x40000000 0x20000000>; 111 + #interconnect-cells = <1>; 112 + }; 113 + 114 + - | 115 + dram-controller@1c62000 { 116 + compatible = "allwinner,sun50i-a64-mbus"; 117 + reg = <0x01c62000 0x1000>, 118 + <0x01c63000 0x1000>; 119 + reg-names = "mbus", "dram"; 120 + clocks = <&ccu CLK_MBUS>, 121 + <&ccu CLK_DRAM>, 122 + <&ccu CLK_BUS_DRAM>; 123 + clock-names = "mbus", "dram", "bus"; 124 + interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>; 125 + #address-cells = <1>; 126 + #size-cells = <1>; 127 + dma-ranges = <0x00000000 0x40000000 0xc0000000>; 95 128 #interconnect-cells = <1>; 96 129 }; 97 130