Skip to content

Commit

Permalink
ARM: mvebu: Add MBus to Armada 370/XP device tree
Browse files Browse the repository at this point in the history
The Armada 370/XP SoC family has a completely configurable address
space handled by the MBus controller.

This patch introduces the device tree layout of MBus, making the
'soc' node as mbus-compatible.
Since every peripheral/controller is a child of this 'soc' node,
this makes all of them sit behind the mbus, thus describing the
hardware accurately.

A translation entry has been added for the internal-regs mapping.
This can't be done in the common armada-370-xp.dtsi because A370
and AXP have different addressing width.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
  • Loading branch information
Ezequiel Garcia authored and Jason Cooper committed Aug 6, 2013
1 parent 3814988 commit 5e12a61
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 16 deletions.
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/armada-370-db.dts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
};

soc {
ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000>;

internal-regs {
serial@12000 {
clock-frequency = <200000000>;
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/armada-370-mirabox.dts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
};

soc {
ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000>;

internal-regs {
serial@12000 {
clock-frequency = <200000000>;
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/armada-370-rd.dts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
};

soc {
ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000>;

internal-regs {
serial@12000 {
clock-frequency = <200000000>;
Expand Down
15 changes: 10 additions & 5 deletions arch/arm/boot/dts/armada-370-xp.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

/include/ "skeleton64.dtsi"

#define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))

/ {
model = "Marvell Armada 370 and XP SoC";
compatible = "marvell,armada-370-xp";
Expand All @@ -38,18 +40,21 @@
};

soc {
#address-cells = <1>;
#address-cells = <2>;
#size-cells = <1>;
compatible = "simple-bus";
controller = <&mbusc>;
interrupt-parent = <&mpic>;
ranges = <0 0 0xd0000000 0x0100000 /* internal registers */
0xe0000000 0 0xe0000000 0x8100000 /* PCIe */>;

internal-regs {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges;
ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>;

mbusc: mbus-controller@20000 {
compatible = "marvell,mbus-controller";
reg = <0x20000 0x100>, <0x20180 0x20>;
};

mpic: interrupt-controller@20000 {
compatible = "marvell,mpic";
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/armada-370.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
};

soc {
ranges = <0 0xd0000000 0x0100000 /* internal registers */
0xe0000000 0xe0000000 0x8100000 /* PCIe */>;
compatible = "marvell,armada370-mbus", "simple-bus";

internal-regs {
system-controller@18200 {
compatible = "marvell,armada-370-xp-system-controller";
Expand Down
4 changes: 1 addition & 3 deletions arch/arm/boot/dts/armada-xp-db.dts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
};

soc {
ranges = <0 0 0xd0000000 0x100000 /* Internal registers 1MiB */
0xe0000000 0 0xe0000000 0x8100000 /* PCIe */
0xf0000000 0 0xf0000000 0x1000000>; /* Device Bus, NOR 16MiB */
ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000>;

internal-regs {
serial@12000 {
Expand Down
4 changes: 1 addition & 3 deletions arch/arm/boot/dts/armada-xp-gp.dts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@
};

soc {
ranges = <0 0 0xd0000000 0x100000 /* Internal registers 1MiB */
0xe0000000 0 0xe0000000 0x8100000 /* PCIe */
0xf0000000 0 0xf0000000 0x1000000 /* Device Bus, NOR 16MiB */>;
ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000>;

internal-regs {
serial@12000 {
Expand Down
4 changes: 1 addition & 3 deletions arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
};

soc {
ranges = <0 0 0xd0000000 0x100000 /* Internal registers 1MiB */
0xe0000000 0 0xe0000000 0x8100000 /* PCIe */
0xf0000000 0 0xf0000000 0x8000000 /* Device Bus, NOR 128MiB */>;
ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000>;

internal-regs {
serial@12000 {
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/armada-xp.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
};

soc {
compatible = "marvell,armadaxp-mbus", "simple-bus";

internal-regs {
L2: l2-cache {
compatible = "marvell,aurora-system-cache";
Expand Down

0 comments on commit 5e12a61

Please sign in to comment.