1 From 8298866bfa7fe9c1e33055322c415f612c16a477 Mon Sep 17 00:00:00 2001
2 From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
3 Date: Tue, 28 May 2013 08:56:04 -0300
4 Subject: [PATCH 056/203] ARM: mvebu: Add MBus to Armada 370/XP device tree
6 The Armada 370/XP SoC family has a completely configurable address
7 space handled by the MBus controller.
9 This patch introduces the device tree layout of MBus, making the
10 'soc' node as mbus-compatible.
11 Since every peripheral/controller is a child of this 'soc' node,
12 this makes all of them sit behind the mbus, thus describing the
15 A translation entry has been added for the internal-regs mapping.
16 This can't be done in the common armada-370-xp.dtsi because A370
17 and AXP have different addressing width.
19 Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
20 Tested-by: Andrew Lunn <andrew@lunn.ch>
21 Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
23 arch/arm/boot/dts/armada-370-db.dts | 2 ++
24 arch/arm/boot/dts/armada-370-mirabox.dts | 2 ++
25 arch/arm/boot/dts/armada-370-rd.dts | 2 ++
26 arch/arm/boot/dts/armada-370-xp.dtsi | 15 ++++++++++-----
27 arch/arm/boot/dts/armada-370.dtsi | 4 ++--
28 arch/arm/boot/dts/armada-xp-db.dts | 4 +---
29 arch/arm/boot/dts/armada-xp-gp.dts | 4 +---
30 arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 4 +---
31 arch/arm/boot/dts/armada-xp.dtsi | 2 ++
32 9 files changed, 23 insertions(+), 16 deletions(-)
34 --- a/arch/arm/boot/dts/armada-370-db.dts
35 +++ b/arch/arm/boot/dts/armada-370-db.dts
40 + ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000>;
44 clock-frequency = <200000000>;
45 --- a/arch/arm/boot/dts/armada-370-mirabox.dts
46 +++ b/arch/arm/boot/dts/armada-370-mirabox.dts
51 + ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000>;
55 clock-frequency = <200000000>;
56 --- a/arch/arm/boot/dts/armada-370-rd.dts
57 +++ b/arch/arm/boot/dts/armada-370-rd.dts
62 + ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000>;
66 clock-frequency = <200000000>;
67 --- a/arch/arm/boot/dts/armada-370-xp.dtsi
68 +++ b/arch/arm/boot/dts/armada-370-xp.dtsi
71 /include/ "skeleton64.dtsi"
73 +#define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
76 model = "Marvell Armada 370 and XP SoC";
77 compatible = "marvell,armada-370-xp";
82 - #address-cells = <1>;
83 + #address-cells = <2>;
85 - compatible = "simple-bus";
86 + controller = <&mbusc>;
87 interrupt-parent = <&mpic>;
88 - ranges = <0 0 0xd0000000 0x0100000 /* internal registers */
89 - 0xe0000000 0 0xe0000000 0x8100000 /* PCIe */>;
92 compatible = "simple-bus";
96 + ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>;
98 + mbusc: mbus-controller@20000 {
99 + compatible = "marvell,mbus-controller";
100 + reg = <0x20000 0x100>, <0x20180 0x20>;
103 mpic: interrupt-controller@20000 {
104 compatible = "marvell,mpic";
105 --- a/arch/arm/boot/dts/armada-370.dtsi
106 +++ b/arch/arm/boot/dts/armada-370.dtsi
111 - ranges = <0 0xd0000000 0x0100000 /* internal registers */
112 - 0xe0000000 0xe0000000 0x8100000 /* PCIe */>;
113 + compatible = "marvell,armada370-mbus", "simple-bus";
116 system-controller@18200 {
117 compatible = "marvell,armada-370-xp-system-controller";
118 --- a/arch/arm/boot/dts/armada-xp-db.dts
119 +++ b/arch/arm/boot/dts/armada-xp-db.dts
124 - ranges = <0 0 0xd0000000 0x100000 /* Internal registers 1MiB */
125 - 0xe0000000 0 0xe0000000 0x8100000 /* PCIe */
126 - 0xf0000000 0 0xf0000000 0x1000000>; /* Device Bus, NOR 16MiB */
127 + ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000>;
131 --- a/arch/arm/boot/dts/armada-xp-gp.dts
132 +++ b/arch/arm/boot/dts/armada-xp-gp.dts
137 - ranges = <0 0 0xd0000000 0x100000 /* Internal registers 1MiB */
138 - 0xe0000000 0 0xe0000000 0x8100000 /* PCIe */
139 - 0xf0000000 0 0xf0000000 0x1000000 /* Device Bus, NOR 16MiB */>;
140 + ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000>;
144 --- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
145 +++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
150 - ranges = <0 0 0xd0000000 0x100000 /* Internal registers 1MiB */
151 - 0xe0000000 0 0xe0000000 0x8100000 /* PCIe */
152 - 0xf0000000 0 0xf0000000 0x8000000 /* Device Bus, NOR 128MiB */>;
153 + ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000>;
157 --- a/arch/arm/boot/dts/armada-xp.dtsi
158 +++ b/arch/arm/boot/dts/armada-xp.dtsi
160 compatible = "marvell,armadaxp", "marvell,armada-370-xp";
163 + compatible = "marvell,armadaxp-mbus", "simple-bus";
167 compatible = "marvell,aurora-system-cache";