aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-28 23:09:24 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-28 23:09:24 -0500
commit1a32c58bb945970e56f27a1cfb61625a3ac0b88e (patch)
treef49ac4bebcb62416494c0e5bade076c7f7f3bc56 /arch/arm
parent7307c00f335a4e986586b12334696098d2fc2bcd (diff)
parent564991205956d869db0e45dfabe23a31b596fa15 (diff)
Merge tag 'late-mvebu-rebased' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC mvebu platform changes from Olof Johansson: "This series contains changes for the Marvell EBU platforms (mvebu, orion, kirkwood, dove) that were not part of the first set of pull requests because of dependencies on the MMC tree, and being submitted a little late. Notable changes are: - More devices get moved out of board files into device tree descriptions. The remaining devices listed in there have patches that will get sent for 3.10, after which we can remove a lot of the board files entirely. We are doing the pinctrl and mmc drivers here, ethernet and PCI still remain. - SMP support for mvebu is improved with support for the local interrupt controller. - The Guruplug board file gets replaced with a DT description. Unfortunately, the dependency on the MMC tree turned out to be a much larger problem than expected, when the MMC maintainer rebased the patches in his tree that all of the patches in this branch are based on, which caused merge conflicts between the new and old versions of those patches. To work around the merge conflicts, this branch rebases all patches on top of the respective MMC patches that did get merged into 3.9. The patches are all identical to the versions that were part of linux-next, but have a new commit date." * tag 'late-mvebu-rebased' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (90 commits) arm: mvebu: enable the SD card slot on Armada 370 Reference Design board ARM: kirkwood: topkick: init mvsdio via DT ARM: kirkwood: nsa310: convert to pinctrl ARM: Kirkwood: topkick: Enable i2c bus. ARM: kirkwood: topkick: convert to pinctrl ARM: dove: convert serial DT nodes to clocks property arm: mvebu: Add SPI flash on Armada 370 DB board arm: mvebu: Add SPI flash on Armada XP-DB board arm: mvebu: Add SPI flash on Armada XP-GP board arm: mvebu: Add support for SPI controller in Armada 370/XP clocksource: update and move armada-370-xp-timer documentation to timer directory arm: mvebu: update DT to support local timers ARM: Dove: convert usb host controller to DT arm: mvebu: Enable USB controllers on Armada 370/XP boards arm: mvebu: Add support for USB host controllers in Armada 370/XP arm: mvebu: add button for OpenBlocks AX3-4 ARM: Kirkwood: Convert NS2 to gpio-poweroff. ARM: Kirkwood: Convert NSA310 I2C to device tree ARM: Kirkwood: Convert NSA310 to use gpio-poweroff driver ARM: Kirkwood: Convert NSA310 to DT based regulators. ...
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/boot/dts/Makefile3
-rw-r--r--arch/arm/boot/dts/armada-370-db.dts35
-rw-r--r--arch/arm/boot/dts/armada-370-mirabox.dts18
-rw-r--r--arch/arm/boot/dts/armada-370-rd.dts68
-rw-r--r--arch/arm/boot/dts/armada-370-xp.dtsi49
-rw-r--r--arch/arm/boot/dts/armada-370.dtsi21
-rw-r--r--arch/arm/boot/dts/armada-xp-db.dts31
-rw-r--r--arch/arm/boot/dts/armada-xp-gp.dts113
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78230.dtsi6
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78260.dtsi6
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78460.dtsi6
-rw-r--r--arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts18
-rw-r--r--arch/arm/boot/dts/armada-xp.dtsi19
-rw-r--r--arch/arm/boot/dts/dove-cubox.dts28
-rw-r--r--arch/arm/boot/dts/dove.dtsi24
-rw-r--r--arch/arm/boot/dts/kirkwood-6282.dtsi17
-rw-r--r--arch/arm/boot/dts/kirkwood-dreamplug.dts7
-rw-r--r--arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts94
-rw-r--r--arch/arm/boot/dts/kirkwood-mplcec4.dts11
-rw-r--r--arch/arm/boot/dts/kirkwood-ns2-common.dtsi6
-rw-r--r--arch/arm/boot/dts/kirkwood-nsa310.dts126
-rw-r--r--arch/arm/boot/dts/kirkwood-openblocks_a6.dts116
-rw-r--r--arch/arm/boot/dts/kirkwood-topkick.dts102
-rw-r--r--arch/arm/boot/dts/kirkwood.dtsi8
-rw-r--r--arch/arm/configs/dove_defconfig28
-rw-r--r--arch/arm/configs/mvebu_defconfig26
-rw-r--r--arch/arm/mach-dove/Kconfig7
-rw-r--r--arch/arm/mach-dove/Makefile4
-rw-r--r--arch/arm/mach-dove/board-dt.c92
-rw-r--r--arch/arm/mach-dove/common.c85
-rw-r--r--arch/arm/mach-kirkwood/Kconfig7
-rw-r--r--arch/arm/mach-kirkwood/Makefile1
-rw-r--r--arch/arm/mach-kirkwood/board-dreamplug.c6
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c16
-rw-r--r--arch/arm/mach-kirkwood/board-guruplug.c39
-rw-r--r--arch/arm/mach-kirkwood/board-mplcec4.c7
-rw-r--r--arch/arm/mach-kirkwood/board-ns2.c14
-rw-r--r--arch/arm/mach-kirkwood/board-nsa310.c70
-rw-r--r--arch/arm/mach-kirkwood/board-openblocks_a6.c44
-rw-r--r--arch/arm/mach-kirkwood/board-usi_topkick.c48
-rw-r--r--arch/arm/mach-kirkwood/common.h11
-rw-r--r--arch/arm/mach-mvebu/irq-armada-370-xp.c87
42 files changed, 1195 insertions, 329 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e007134cc2ca..9c6255884cbb 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -56,6 +56,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
56 kirkwood-dockstar.dtb \ 56 kirkwood-dockstar.dtb \
57 kirkwood-dreamplug.dtb \ 57 kirkwood-dreamplug.dtb \
58 kirkwood-goflexnet.dtb \ 58 kirkwood-goflexnet.dtb \
59 kirkwood-guruplug-server-plus.dtb \
59 kirkwood-ib62x0.dtb \ 60 kirkwood-ib62x0.dtb \
60 kirkwood-iconnect.dtb \ 61 kirkwood-iconnect.dtb \
61 kirkwood-iomega_ix2_200.dtb \ 62 kirkwood-iomega_ix2_200.dtb \
@@ -78,7 +79,9 @@ dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
78 msm8960-cdp.dtb 79 msm8960-cdp.dtb
79dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ 80dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
80 armada-370-mirabox.dtb \ 81 armada-370-mirabox.dtb \
82 armada-370-rd.dtb \
81 armada-xp-db.dtb \ 83 armada-xp-db.dtb \
84 armada-xp-gp.dtb \
82 armada-xp-openblocks-ax3-4.dtb 85 armada-xp-openblocks-ax3-4.dtb
83dtb-$(CONFIG_ARCH_MXC) += \ 86dtb-$(CONFIG_ARCH_MXC) += \
84 imx25-karo-tx25.dtb \ 87 imx25-karo-tx25.dtb \
diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts
index 9b82facb2561..e34b280ce6ec 100644
--- a/arch/arm/boot/dts/armada-370-db.dts
+++ b/arch/arm/boot/dts/armada-370-db.dts
@@ -59,5 +59,40 @@
59 phy = <&phy1>; 59 phy = <&phy1>;
60 phy-mode = "rgmii-id"; 60 phy-mode = "rgmii-id";
61 }; 61 };
62
63 mvsdio@d00d4000 {
64 pinctrl-0 = <&sdio_pins1>;
65 pinctrl-names = "default";
66 /*
67 * This device is disabled by default, because
68 * using the SD card connector requires
69 * changing the default CON40 connector
70 * "DB-88F6710_MPP_2xRGMII_DEVICE_Jumper" to a
71 * different connector
72 * "DB-88F6710_MPP_RGMII_SD_Jumper".
73 */
74 status = "disabled";
75 /* No CD or WP GPIOs */
76 };
77
78 usb@d0050000 {
79 status = "okay";
80 };
81
82 usb@d0051000 {
83 status = "okay";
84 };
85
86 spi0: spi@d0010600 {
87 status = "okay";
88
89 spi-flash@0 {
90 #address-cells = <1>;
91 #size-cells = <1>;
92 compatible = "mx25l25635e";
93 reg = <0>; /* Chip select 0 */
94 spi-max-frequency = <50000000>;
95 };
96 };
62 }; 97 };
63}; 98};
diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts
index 3b4071336599..dd0c57dd9f30 100644
--- a/arch/arm/boot/dts/armada-370-mirabox.dts
+++ b/arch/arm/boot/dts/armada-370-mirabox.dts
@@ -52,5 +52,23 @@
52 phy = <&phy1>; 52 phy = <&phy1>;
53 phy-mode = "rgmii-id"; 53 phy-mode = "rgmii-id";
54 }; 54 };
55
56 mvsdio@d00d4000 {
57 pinctrl-0 = <&sdio_pins2>;
58 pinctrl-names = "default";
59 status = "okay";
60 /*
61 * No CD or WP GPIOs: SDIO interface used for
62 * Wifi/Bluetooth chip
63 */
64 };
65
66 usb@d0050000 {
67 status = "okay";
68 };
69
70 usb@d0051000 {
71 status = "okay";
72 };
55 }; 73 };
56}; 74};
diff --git a/arch/arm/boot/dts/armada-370-rd.dts b/arch/arm/boot/dts/armada-370-rd.dts
new file mode 100644
index 000000000000..f8e4855bc9a5
--- /dev/null
+++ b/arch/arm/boot/dts/armada-370-rd.dts
@@ -0,0 +1,68 @@
1/*
2 * Device Tree file for Marvell Armada 370 Reference Design board
3 * (RD-88F6710-A1)
4 *
5 * Copied from arch/arm/boot/dts/armada-370-db.dts
6 *
7 * Copyright (C) 2013 Florian Fainelli <florian@openwrt.org>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14/dts-v1/;
15/include/ "armada-370.dtsi"
16
17/ {
18 model = "Marvell Armada 370 Reference Design";
19 compatible = "marvell,a370-rd", "marvell,armada370", "marvell,armada-370-xp";
20
21 chosen {
22 bootargs = "console=ttyS0,115200 earlyprintk";
23 };
24
25 memory {
26 device_type = "memory";
27 reg = <0x00000000 0x20000000>; /* 512 MB */
28 };
29
30 soc {
31 serial@d0012000 {
32 clock-frequency = <200000000>;
33 status = "okay";
34 };
35 sata@d00a0000 {
36 nr-ports = <2>;
37 status = "okay";
38 };
39
40 mdio {
41 phy0: ethernet-phy@0 {
42 reg = <0>;
43 };
44
45 phy1: ethernet-phy@1 {
46 reg = <1>;
47 };
48 };
49
50 ethernet@d0070000 {
51 status = "okay";
52 phy = <&phy0>;
53 phy-mode = "sgmii";
54 };
55 ethernet@d0074000 {
56 status = "okay";
57 phy = <&phy1>;
58 phy-mode = "rgmii-id";
59 };
60
61 mvsdio@d00d4000 {
62 pinctrl-0 = <&sdio_pins1>;
63 pinctrl-names = "default";
64 status = "okay";
65 /* No CD or WP GPIOs */
66 };
67 };
68};
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
index 5b2922599f0e..6f1acc75e155 100644
--- a/arch/arm/boot/dts/armada-370-xp.dtsi
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -68,8 +68,9 @@
68 68
69 timer@d0020300 { 69 timer@d0020300 {
70 compatible = "marvell,armada-370-xp-timer"; 70 compatible = "marvell,armada-370-xp-timer";
71 reg = <0xd0020300 0x30>; 71 reg = <0xd0020300 0x30>,
72 interrupts = <37>, <38>, <39>, <40>; 72 <0xd0021040 0x30>;
73 interrupts = <37>, <38>, <39>, <40>, <5>, <6>;
73 clocks = <&coreclk 2>; 74 clocks = <&coreclk 2>;
74 }; 75 };
75 76
@@ -137,6 +138,50 @@
137 reg = <0xd0010300 0x20>; 138 reg = <0xd0010300 0x20>;
138 interrupts = <50>; 139 interrupts = <50>;
139 }; 140 };
141
142 mvsdio@d00d4000 {
143 compatible = "marvell,orion-sdio";
144 reg = <0xd00d4000 0x200>;
145 interrupts = <54>;
146 clocks = <&gateclk 17>;
147 status = "disabled";
148 };
149
150 usb@d0050000 {
151 compatible = "marvell,orion-ehci";
152 reg = <0xd0050000 0x500>;
153 interrupts = <45>;
154 status = "disabled";
155 };
156
157 usb@d0051000 {
158 compatible = "marvell,orion-ehci";
159 reg = <0xd0051000 0x500>;
160 interrupts = <46>;
161 status = "disabled";
162 };
163
164 spi0: spi@d0010600 {
165 compatible = "marvell,orion-spi";
166 reg = <0xd0010600 0x28>;
167 #address-cells = <1>;
168 #size-cells = <0>;
169 cell-index = <0>;
170 interrupts = <30>;
171 clocks = <&coreclk 0>;
172 status = "disabled";
173 };
174
175 spi1: spi@d0010680 {
176 compatible = "marvell,orion-spi";
177 reg = <0xd0010680 0x28>;
178 #address-cells = <1>;
179 #size-cells = <0>;
180 cell-index = <1>;
181 interrupts = <92>;
182 clocks = <&coreclk 0>;
183 status = "disabled";
184 };
140 }; 185 };
141}; 186};
142 187
diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi
index 636cf7d4009e..8188d138020e 100644
--- a/arch/arm/boot/dts/armada-370.dtsi
+++ b/arch/arm/boot/dts/armada-370.dtsi
@@ -47,6 +47,18 @@
47 pinctrl { 47 pinctrl {
48 compatible = "marvell,mv88f6710-pinctrl"; 48 compatible = "marvell,mv88f6710-pinctrl";
49 reg = <0xd0018000 0x38>; 49 reg = <0xd0018000 0x38>;
50
51 sdio_pins1: sdio-pins1 {
52 marvell,pins = "mpp9", "mpp11", "mpp12",
53 "mpp13", "mpp14", "mpp15";
54 marvell,function = "sd0";
55 };
56
57 sdio_pins2: sdio-pins2 {
58 marvell,pins = "mpp47", "mpp48", "mpp49",
59 "mpp50", "mpp51", "mpp52";
60 marvell,function = "sd0";
61 };
50 }; 62 };
51 63
52 gpio0: gpio@d0018100 { 64 gpio0: gpio@d0018100 {
@@ -132,5 +144,14 @@
132 dmacap,memset; 144 dmacap,memset;
133 }; 145 };
134 }; 146 };
147
148 usb@d0050000 {
149 clocks = <&coreclk 0>;
150 };
151
152 usb@d0051000 {
153 clocks = <&coreclk 0>;
154 };
155
135 }; 156 };
136}; 157};
diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts
index 8e53b25b5508..e83505e4c236 100644
--- a/arch/arm/boot/dts/armada-xp-db.dts
+++ b/arch/arm/boot/dts/armada-xp-db.dts
@@ -90,5 +90,36 @@
90 phy = <&phy3>; 90 phy = <&phy3>;
91 phy-mode = "sgmii"; 91 phy-mode = "sgmii";
92 }; 92 };
93
94 mvsdio@d00d4000 {
95 pinctrl-0 = <&sdio_pins>;
96 pinctrl-names = "default";
97 status = "okay";
98 /* No CD or WP GPIOs */
99 };
100
101 usb@d0050000 {
102 status = "okay";
103 };
104
105 usb@d0051000 {
106 status = "okay";
107 };
108
109 usb@d0052000 {
110 status = "okay";
111 };
112
113 spi0: spi@d0010600 {
114 status = "okay";
115
116 spi-flash@0 {
117 #address-cells = <1>;
118 #size-cells = <1>;
119 compatible = "m25p64";
120 reg = <0>; /* Chip select 0 */
121 spi-max-frequency = <20000000>;
122 };
123 };
93 }; 124 };
94}; 125};
diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
new file mode 100644
index 000000000000..1c8afe2ffebc
--- /dev/null
+++ b/arch/arm/boot/dts/armada-xp-gp.dts
@@ -0,0 +1,113 @@
1/*
2 * Device Tree file for Marvell Armada XP development board
3 * (DB-MV784MP-GP)
4 *
5 * Copyright (C) 2013 Marvell
6 *
7 * Lior Amsalem <alior@marvell.com>
8 * Gregory CLEMENT <gregory.clement@free-electrons.com>
9 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10 *
11 * This file is licensed under the terms of the GNU General Public
12 * License version 2. This program is licensed "as is" without any
13 * warranty of any kind, whether express or implied.
14 */
15
16/dts-v1/;
17/include/ "armada-xp-mv78460.dtsi"
18
19/ {
20 model = "Marvell Armada XP Development Board DB-MV784MP-GP";
21 compatible = "marvell,axp-gp", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp";
22
23 chosen {
24 bootargs = "console=ttyS0,115200 earlyprintk";
25 };
26
27 memory {
28 device_type = "memory";
29
30 /*
31 * 4 GB of plug-in RAM modules by default but only 3GB
32 * are visible, the amount of memory available can be
33 * changed by the bootloader according the size of the
34 * module actually plugged
35 */
36 reg = <0x00000000 0xC0000000>;
37 };
38
39 soc {
40 serial@d0012000 {
41 clock-frequency = <250000000>;
42 status = "okay";
43 };
44 serial@d0012100 {
45 clock-frequency = <250000000>;
46 status = "okay";
47 };
48 serial@d0012200 {
49 clock-frequency = <250000000>;
50 status = "okay";
51 };
52 serial@d0012300 {
53 clock-frequency = <250000000>;
54 status = "okay";
55 };
56
57 sata@d00a0000 {
58 nr-ports = <2>;
59 status = "okay";
60 };
61
62 mdio {
63 phy0: ethernet-phy@0 {
64 reg = <16>;
65 };
66
67 phy1: ethernet-phy@1 {
68 reg = <17>;
69 };
70
71 phy2: ethernet-phy@2 {
72 reg = <18>;
73 };
74
75 phy3: ethernet-phy@3 {
76 reg = <19>;
77 };
78 };
79
80 ethernet@d0070000 {
81 status = "okay";
82 phy = <&phy0>;
83 phy-mode = "rgmii-id";
84 };
85 ethernet@d0074000 {
86 status = "okay";
87 phy = <&phy1>;
88 phy-mode = "rgmii-id";
89 };
90 ethernet@d0030000 {
91 status = "okay";
92 phy = <&phy2>;
93 phy-mode = "rgmii-id";
94 };
95 ethernet@d0034000 {
96 status = "okay";
97 phy = <&phy3>;
98 phy-mode = "rgmii-id";
99 };
100
101 spi0: spi@d0010600 {
102 status = "okay";
103
104 spi-flash@0 {
105 #address-cells = <1>;
106 #size-cells = <1>;
107 compatible = "n25q128a13";
108 reg = <0>; /* Chip select 0 */
109 spi-max-frequency = <108000000>;
110 };
111 };
112 };
113};
diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
index e041f42ed711..f56c40599f5b 100644
--- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
@@ -47,6 +47,12 @@
47 pinctrl { 47 pinctrl {
48 compatible = "marvell,mv78230-pinctrl"; 48 compatible = "marvell,mv78230-pinctrl";
49 reg = <0xd0018000 0x38>; 49 reg = <0xd0018000 0x38>;
50
51 sdio_pins: sdio-pins {
52 marvell,pins = "mpp30", "mpp31", "mpp32",
53 "mpp33", "mpp34", "mpp35";
54 marvell,function = "sd0";
55 };
50 }; 56 };
51 57
52 gpio0: gpio@d0018100 { 58 gpio0: gpio@d0018100 {
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
index 9e23bd8c9536..f8f2b787d2b0 100644
--- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
@@ -48,6 +48,12 @@
48 pinctrl { 48 pinctrl {
49 compatible = "marvell,mv78260-pinctrl"; 49 compatible = "marvell,mv78260-pinctrl";
50 reg = <0xd0018000 0x38>; 50 reg = <0xd0018000 0x38>;
51
52 sdio_pins: sdio-pins {
53 marvell,pins = "mpp30", "mpp31", "mpp32",
54 "mpp33", "mpp34", "mpp35";
55 marvell,function = "sd0";
56 };
51 }; 57 };
52 58
53 gpio0: gpio@d0018100 { 59 gpio0: gpio@d0018100 {
diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
index 965966110e38..936c25dc32b0 100644
--- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
@@ -63,6 +63,12 @@
63 pinctrl { 63 pinctrl {
64 compatible = "marvell,mv78460-pinctrl"; 64 compatible = "marvell,mv78460-pinctrl";
65 reg = <0xd0018000 0x38>; 65 reg = <0xd0018000 0x38>;
66
67 sdio_pins: sdio-pins {
68 marvell,pins = "mpp30", "mpp31", "mpp32",
69 "mpp33", "mpp34", "mpp35";
70 marvell,function = "sd0";
71 };
66 }; 72 };
67 73
68 gpio0: gpio@d0018100 { 74 gpio0: gpio@d0018100 {
diff --git a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
index b42652fd3d8c..3818a82176a2 100644
--- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
+++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
@@ -66,6 +66,18 @@
66 }; 66 };
67 }; 67 };
68 68
69 gpio_keys {
70 compatible = "gpio-keys";
71 #address-cells = <1>;
72 #size-cells = <0>;
73
74 button@1 {
75 label = "Init Button";
76 linux,code = <116>;
77 gpios = <&gpio1 28 0>;
78 };
79 };
80
69 mdio { 81 mdio {
70 phy0: ethernet-phy@0 { 82 phy0: ethernet-phy@0 {
71 reg = <0>; 83 reg = <0>;
@@ -121,5 +133,11 @@
121 nr-ports = <2>; 133 nr-ports = <2>;
122 status = "okay"; 134 status = "okay";
123 }; 135 };
136 usb@d0050000 {
137 status = "okay";
138 };
139 usb@d0051000 {
140 status = "okay";
141 };
124 }; 142 };
125}; 143};
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
index 2e37ef101c90..1443949c165e 100644
--- a/arch/arm/boot/dts/armada-xp.dtsi
+++ b/arch/arm/boot/dts/armada-xp.dtsi
@@ -30,7 +30,7 @@
30 }; 30 };
31 31
32 mpic: interrupt-controller@d0020000 { 32 mpic: interrupt-controller@d0020000 {
33 reg = <0xd0020a00 0x1d0>, 33 reg = <0xd0020a00 0x2d0>,
34 <0xd0021070 0x58>; 34 <0xd0021070 0x58>;
35 }; 35 };
36 36
@@ -134,5 +134,22 @@
134 dmacap,memset; 134 dmacap,memset;
135 }; 135 };
136 }; 136 };
137
138 usb@d0050000 {
139 clocks = <&gateclk 18>;
140 };
141
142 usb@d0051000 {
143 clocks = <&gateclk 19>;
144 };
145
146 usb@d0052000 {
147 compatible = "marvell,orion-ehci";
148 reg = <0xd0052000 0x500>;
149 interrupts = <47>;
150 clocks = <&gateclk 20>;
151 status = "disabled";
152 };
153
137 }; 154 };
138}; 155};
diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts
index cdee96fca6e2..7e3065abd751 100644
--- a/arch/arm/boot/dts/dove-cubox.dts
+++ b/arch/arm/boot/dts/dove-cubox.dts
@@ -17,12 +17,33 @@
17 17
18 leds { 18 leds {
19 compatible = "gpio-leds"; 19 compatible = "gpio-leds";
20 pinctrl-0 = <&pmx_gpio_18>;
21 pinctrl-names = "default";
22
20 power { 23 power {
21 label = "Power"; 24 label = "Power";
22 gpios = <&gpio0 18 1>; 25 gpios = <&gpio0 18 1>;
23 linux,default-trigger = "default-on"; 26 linux,default-trigger = "default-on";
24 }; 27 };
25 }; 28 };
29
30 regulators {
31 compatible = "simple-bus";
32 #address-cells = <1>;
33 #size-cells = <0>;
34
35 usb_power: regulator@1 {
36 compatible = "regulator-fixed";
37 reg = <1>;
38 regulator-name = "USB Power";
39 regulator-min-microvolt = <5000000>;
40 regulator-max-microvolt = <5000000>;
41 enable-active-high;
42 regulator-always-on;
43 regulator-boot-on;
44 gpio = <&gpio0 1 0>;
45 };
46 };
26}; 47};
27 48
28&uart0 { status = "okay"; }; 49&uart0 { status = "okay"; };
@@ -47,9 +68,14 @@
47}; 68};
48 69
49&pinctrl { 70&pinctrl {
50 pinctrl-0 = <&pmx_gpio_12 &pmx_gpio_18>; 71 pinctrl-0 = <&pmx_gpio_1 &pmx_gpio_12>;
51 pinctrl-names = "default"; 72 pinctrl-names = "default";
52 73
74 pmx_gpio_1: pmx-gpio-1 {
75 marvell,pins = "mpp1";
76 marvell,function = "gpio";
77 };
78
53 pmx_gpio_12: pmx-gpio-12 { 79 pmx_gpio_12: pmx-gpio-12 {
54 marvell,pins = "mpp12"; 80 marvell,pins = "mpp12";
55 marvell,function = "gpio"; 81 marvell,function = "gpio";
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index 740630f9cd65..67dbe20868a2 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -55,7 +55,7 @@
55 reg = <0x12000 0x100>; 55 reg = <0x12000 0x100>;
56 reg-shift = <2>; 56 reg-shift = <2>;
57 interrupts = <7>; 57 interrupts = <7>;
58 clock-frequency = <166666667>; 58 clocks = <&core_clk 0>;
59 status = "disabled"; 59 status = "disabled";
60 }; 60 };
61 61
@@ -64,7 +64,7 @@
64 reg = <0x12100 0x100>; 64 reg = <0x12100 0x100>;
65 reg-shift = <2>; 65 reg-shift = <2>;
66 interrupts = <8>; 66 interrupts = <8>;
67 clock-frequency = <166666667>; 67 clocks = <&core_clk 0>;
68 status = "disabled"; 68 status = "disabled";
69 }; 69 };
70 70
@@ -73,7 +73,7 @@
73 reg = <0x12000 0x100>; 73 reg = <0x12000 0x100>;
74 reg-shift = <2>; 74 reg-shift = <2>;
75 interrupts = <9>; 75 interrupts = <9>;
76 clock-frequency = <166666667>; 76 clocks = <&core_clk 0>;
77 status = "disabled"; 77 status = "disabled";
78 }; 78 };
79 79
@@ -82,7 +82,7 @@
82 reg = <0x12100 0x100>; 82 reg = <0x12100 0x100>;
83 reg-shift = <2>; 83 reg-shift = <2>;
84 interrupts = <10>; 84 interrupts = <10>;
85 clock-frequency = <166666667>; 85 clocks = <&core_clk 0>;
86 status = "disabled"; 86 status = "disabled";
87 }; 87 };
88 88
@@ -156,6 +156,22 @@
156 status = "disabled"; 156 status = "disabled";
157 }; 157 };
158 158
159 ehci0: usb-host@50000 {
160 compatible = "marvell,orion-ehci";
161 reg = <0x50000 0x1000>;
162 interrupts = <24>;
163 clocks = <&gate_clk 0>;
164 status = "okay";
165 };
166
167 ehci1: usb-host@51000 {
168 compatible = "marvell,orion-ehci";
169 reg = <0x51000 0x1000>;
170 interrupts = <25>;
171 clocks = <&gate_clk 1>;
172 status = "okay";
173 };
174
159 sdio0: sdio@92000 { 175 sdio0: sdio@92000 {
160 compatible = "marvell,dove-sdhci"; 176 compatible = "marvell,dove-sdhci";
161 reg = <0x92000 0x100>; 177 reg = <0x92000 0x100>;
diff --git a/arch/arm/boot/dts/kirkwood-6282.dtsi b/arch/arm/boot/dts/kirkwood-6282.dtsi
index 4ccea2130a6c..192cf76fbf93 100644
--- a/arch/arm/boot/dts/kirkwood-6282.dtsi
+++ b/arch/arm/boot/dts/kirkwood-6282.dtsi
@@ -5,6 +5,12 @@
5 compatible = "marvell,88f6282-pinctrl"; 5 compatible = "marvell,88f6282-pinctrl";
6 reg = <0x10000 0x20>; 6 reg = <0x10000 0x20>;
7 7
8 pmx_nand: pmx-nand {
9 marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
10 "mpp4", "mpp5", "mpp18", "mpp19";
11 marvell,function = "nand";
12 };
13
8 pmx_sata0: pmx-sata0 { 14 pmx_sata0: pmx-sata0 {
9 marvell,pins = "mpp5", "mpp21", "mpp23"; 15 marvell,pins = "mpp5", "mpp21", "mpp23";
10 marvell,function = "sata0"; 16 marvell,function = "sata0";
@@ -21,6 +27,12 @@
21 marvell,pins = "mpp8", "mpp9"; 27 marvell,pins = "mpp8", "mpp9";
22 marvell,function = "twsi0"; 28 marvell,function = "twsi0";
23 }; 29 };
30
31 pmx_twsi1: pmx-twsi1 {
32 marvell,pins = "mpp36", "mpp37";
33 marvell,function = "twsi1";
34 };
35
24 pmx_uart0: pmx-uart0 { 36 pmx_uart0: pmx-uart0 {
25 marvell,pins = "mpp10", "mpp11"; 37 marvell,pins = "mpp10", "mpp11";
26 marvell,function = "uart0"; 38 marvell,function = "uart0";
@@ -30,6 +42,11 @@
30 marvell,pins = "mpp13", "mpp14"; 42 marvell,pins = "mpp13", "mpp14";
31 marvell,function = "uart1"; 43 marvell,function = "uart1";
32 }; 44 };
45 pmx_sdio: pmx-sdio {
46 marvell,pins = "mpp12", "mpp13", "mpp14",
47 "mpp15", "mpp16", "mpp17";
48 marvell,function = "sdio";
49 };
33 }; 50 };
34 51
35 i2c@11100 { 52 i2c@11100 {
diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts
index f2d386c95b07..ef2d8c705709 100644
--- a/arch/arm/boot/dts/kirkwood-dreamplug.dts
+++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts
@@ -74,6 +74,13 @@
74 status = "okay"; 74 status = "okay";
75 nr-ports = <1>; 75 nr-ports = <1>;
76 }; 76 };
77
78 mvsdio@90000 {
79 pinctrl-0 = <&pmx_sdio>;
80 pinctrl-names = "default";
81 status = "okay";
82 /* No CD or WP GPIOs */
83 };
77 }; 84 };
78 85
79 gpio-leds { 86 gpio-leds {
diff --git a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
new file mode 100644
index 000000000000..9555a86297c2
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
@@ -0,0 +1,94 @@
1/dts-v1/;
2
3/include/ "kirkwood.dtsi"
4/include/ "kirkwood-6281.dtsi"
5
6/ {
7 model = "Globalscale Technologies Guruplug Server Plus";
8 compatible = "globalscale,guruplug-server-plus", "globalscale,guruplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
9
10 memory {
11 device_type = "memory";
12 reg = <0x00000000 0x20000000>;
13 };
14
15 chosen {
16 bootargs = "console=ttyS0,115200n8 earlyprintk";
17 };
18
19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 {
21
22 pinctrl-0 = < &pmx_led_health_r &pmx_led_health_g
23 &pmx_led_wmode_r &pmx_led_wmode_g >;
24 pinctrl-names = "default";
25
26 pmx_led_health_r: pmx-led-health-r {
27 marvell,pins = "mpp46";
28 marvell,function = "gpio";
29 };
30 pmx_led_health_g: pmx-led-health-g {
31 marvell,pins = "mpp47";
32 marvell,function = "gpio";
33 };
34 pmx_led_wmode_r: pmx-led-wmode-r {
35 marvell,pins = "mpp48";
36 marvell,function = "gpio";
37 };
38 pmx_led_wmode_g: pmx-led-wmode-g {
39 marvell,pins = "mpp49";
40 marvell,function = "gpio";
41 };
42 };
43 serial@12000 {
44 clock-frequency = <200000000>;
45 status = "ok";
46 };
47
48 nand@3000000 {
49 status = "okay";
50
51 partition@0 {
52 label = "u-boot";
53 reg = <0x00000000 0x00100000>;
54 read-only;
55 };
56
57 partition@100000 {
58 label = "uImage";
59 reg = <0x00100000 0x00400000>;
60 };
61
62 partition@500000 {
63 label = "data";
64 reg = <0x00500000 0x1fb00000>;
65 };
66 };
67
68 sata@80000 {
69 status = "okay";
70 nr-ports = <1>;
71 };
72 };
73
74 gpio-leds {
75 compatible = "gpio-leds";
76
77 health-r {
78 label = "guruplug:red:health";
79 gpios = <&gpio1 14 1>;
80 };
81 health-g {
82 label = "guruplug:green:health";
83 gpios = <&gpio1 15 1>;
84 };
85 wmode-r {
86 label = "guruplug:red:wmode";
87 gpios = <&gpio1 16 1>;
88 };
89 wmode-g {
90 label = "guruplug:green:wmode";
91 gpios = <&gpio1 17 1>;
92 };
93 };
94};
diff --git a/arch/arm/boot/dts/kirkwood-mplcec4.dts b/arch/arm/boot/dts/kirkwood-mplcec4.dts
index 262c65403760..662dfd81b1ce 100644
--- a/arch/arm/boot/dts/kirkwood-mplcec4.dts
+++ b/arch/arm/boot/dts/kirkwood-mplcec4.dts
@@ -20,12 +20,11 @@
20 pinctrl: pinctrl@10000 { 20 pinctrl: pinctrl@10000 {
21 21
22 pinctrl-0 = < &pmx_nand &pmx_uart0 22 pinctrl-0 = < &pmx_nand &pmx_uart0
23 &pmx_led_health &pmx_sdio 23 &pmx_led_health
24 &pmx_sata0 &pmx_sata1 24 &pmx_sata0 &pmx_sata1
25 &pmx_led_user1o 25 &pmx_led_user1o
26 &pmx_led_user1g &pmx_led_user0o 26 &pmx_led_user1g &pmx_led_user0o
27 &pmx_led_user0g &pmx_led_misc 27 &pmx_led_user0g &pmx_led_misc
28 &pmx_sdio_cd
29 >; 28 >;
30 pinctrl-names = "default"; 29 pinctrl-names = "default";
31 30
@@ -133,6 +132,14 @@
133 status = "okay"; 132 status = "okay";
134 133
135 }; 134 };
135
136 mvsdio@90000 {
137 pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>;
138 pinctrl-names = "default";
139 status = "okay";
140 cd-gpios = <&gpio1 15 0>;
141 /* No WP GPIO */
142 };
136 }; 143 };
137 144
138 gpio-leds { 145 gpio-leds {
diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
index 77d21abfcdf7..e8e7ecef1650 100644
--- a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
+++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
@@ -76,4 +76,10 @@
76 gpios = <&gpio0 12 0>; 76 gpios = <&gpio0 12 0>;
77 }; 77 };
78 }; 78 };
79
80 gpio_poweroff {
81 compatible = "gpio-poweroff";
82 gpios = <&gpio0 31 0>;
83 };
84
79}; 85};
diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts
index 5509f9659546..3a178cf708d7 100644
--- a/arch/arm/boot/dts/kirkwood-nsa310.dts
+++ b/arch/arm/boot/dts/kirkwood-nsa310.dts
@@ -16,6 +16,105 @@
16 }; 16 };
17 17
18 ocp@f1000000 { 18 ocp@f1000000 {
19 pinctrl: pinctrl@10000 {
20 pinctrl-0 = < &pmx_led_esata_green
21 &pmx_led_esata_red
22 &pmx_led_usb_green
23 &pmx_led_usb_red
24 &pmx_usb_power_off
25 &pmx_led_sys_green
26 &pmx_led_sys_red
27 &pmx_btn_reset
28 &pmx_btn_copy
29 &pmx_led_copy_green
30 &pmx_led_copy_red
31 &pmx_led_hdd_green
32 &pmx_led_hdd_red
33 &pmx_unknown
34 &pmx_btn_power
35 &pmx_pwr_off >;
36 pinctrl-names = "default";
37
38 pmx_led_esata_green: pmx-led-esata-green {
39 marvell,pins = "mpp12";
40 marvell,function = "gpio";
41 };
42
43 pmx_led_esata_red: pmx-led-esata-red {
44 marvell,pins = "mpp13";
45 marvell,function = "gpio";
46 };
47
48 pmx_led_usb_green: pmx-led-usb-green {
49 marvell,pins = "mpp15";
50 marvell,function = "gpio";
51 };
52
53 pmx_led_usb_red: pmx-led-usb-red {
54 marvell,pins = "mpp16";
55 marvell,function = "gpio";
56 };
57
58 pmx_usb_power_off: pmx-usb-power-off {
59 marvell,pins = "mpp21";
60 marvell,function = "gpio";
61 };
62
63 pmx_led_sys_green: pmx-led-sys-green {
64 marvell,pins = "mpp28";
65 marvell,function = "gpio";
66 };
67
68 pmx_led_sys_red: pmx-led-sys-red {
69 marvell,pins = "mpp29";
70 marvell,function = "gpio";
71 };
72
73 pmx_btn_reset: pmx-btn-reset {
74 marvell,pins = "mpp36";
75 marvell,function = "gpio";
76 };
77
78 pmx_btn_copy: pmx-btn-copy {
79 marvell,pins = "mpp37";
80 marvell,function = "gpio";
81 };
82
83 pmx_led_copy_green: pmx-led-copy-green {
84 marvell,pins = "mpp39";
85 marvell,function = "gpio";
86 };
87
88 pmx_led_copy_red: pmx-led-copy-red {
89 marvell,pins = "mpp40";
90 marvell,function = "gpio";
91 };
92
93 pmx_led_hdd_green: pmx-led-hdd-green {
94 marvell,pins = "mpp41";
95 marvell,function = "gpio";
96 };
97
98 pmx_led_hdd_red: pmx-led-hdd-red {
99 marvell,pins = "mpp42";
100 marvell,function = "gpio";
101 };
102
103 pmx_unknown: pmx-unknown {
104 marvell,pins = "mpp44";
105 marvell,function = "gpio";
106 };
107
108 pmx_btn_power: pmx-btn-power {
109 marvell,pins = "mpp46";
110 marvell,function = "gpio";
111 };
112
113 pmx_pwr_off: pmx-pwr-off {
114 marvell,pins = "mpp48";
115 marvell,function = "gpio";
116 };
117 };
19 118
20 serial@12000 { 119 serial@12000 {
21 clock-frequency = <200000000>; 120 clock-frequency = <200000000>;
@@ -29,6 +128,11 @@
29 128
30 i2c@11000 { 129 i2c@11000 {
31 status = "okay"; 130 status = "okay";
131
132 adt7476: adt7476a@2e {
133 compatible = "adt7476";
134 reg = <0x2e>;
135 };
32 }; 136 };
33 137
34 nand@3000000 { 138 nand@3000000 {
@@ -141,4 +245,26 @@
141 gpios = <&gpio1 8 0>; 245 gpios = <&gpio1 8 0>;
142 }; 246 };
143 }; 247 };
248
249 gpio_poweroff {
250 compatible = "gpio-poweroff";
251 gpios = <&gpio1 16 0>;
252 };
253
254 regulators {
255 compatible = "simple-bus";
256 #address-cells = <1>;
257 #size-cells = <0>;
258
259 usb0_power_off: regulator@1 {
260 compatible = "regulator-fixed";
261 reg = <1>;
262 regulator-name = "USB Power Off";
263 regulator-min-microvolt = <5000000>;
264 regulator-max-microvolt = <5000000>;
265 regulator-always-on;
266 regulator-boot-on;
267 gpio = <&gpio0 21 0>;
268 };
269 };
144}; 270};
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
index 49d3d74d4d38..ede7fe0d7a87 100644
--- a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
+++ b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
@@ -75,6 +75,122 @@
75 reg = <0x30>; 75 reg = <0x30>;
76 }; 76 };
77 }; 77 };
78
79 pinctrl: pinctrl@10000 {
80 pinctrl-0 = < &pmx_nand &pmx_uart0
81 &pmx_uart1 &pmx_twsi1
82 &pmx_dip_sw0 &pmx_dip_sw1
83 &pmx_dip_sw2 &pmx_dip_sw3
84 &pmx_gpio_0 &pmx_gpio_1
85 &pmx_gpio_2 &pmx_gpio_3
86 &pmx_gpio_4 &pmx_gpio_5
87 &pmx_gpio_6 &pmx_gpio_7
88 &pmx_led_red &pmx_led_green
89 &pmx_led_yellow >;
90 pinctrl-names = "default";
91
92 pmx_uart0: pmx-uart0 {
93 marvell,pins = "mpp10", "mpp11", "mpp15",
94 "mpp16";
95 marvell,function = "uart0";
96 };
97
98 pmx_uart1: pmx-uart1 {
99 marvell,pins = "mpp13", "mpp14", "mpp8",
100 "mpp9";
101 marvell,function = "uart1";
102 };
103
104 pmx_sysrst: pmx-sysrst {
105 marvell,pins = "mpp6";
106 marvell,function = "sysrst";
107 };
108
109 pmx_dip_sw0: pmx-dip-sw0 {
110 marvell,pins = "mpp20";
111 marvell,function = "gpio";
112 };
113
114 pmx_dip_sw1: pmx-dip-sw1 {
115 marvell,pins = "mpp21";
116 marvell,function = "gpio";
117 };
118
119 pmx_dip_sw2: pmx-dip-sw2 {
120 marvell,pins = "mpp22";
121 marvell,function = "gpio";
122 };
123
124 pmx_dip_sw3: pmx-dip-sw3 {
125 marvell,pins = "mpp23";
126 marvell,function = "gpio";
127 };
128
129 pmx_gpio_0: pmx-gpio-0 {
130 marvell,pins = "mpp24";
131 marvell,function = "gpio";
132 };
133
134 pmx_gpio_1: pmx-gpio-1 {
135 marvell,pins = "mpp25";
136 marvell,function = "gpio";
137 };
138
139 pmx_gpio_2: pmx-gpio-2 {
140 marvell,pins = "mpp26";
141 marvell,function = "gpio";
142 };
143
144 pmx_gpio_3: pmx-gpio-3 {
145 marvell,pins = "mpp27";
146 marvell,function = "gpio";
147 };
148
149 pmx_gpio_4: pmx-gpio-4 {
150 marvell,pins = "mpp28";
151 marvell,function = "gpio";
152 };
153
154 pmx_gpio_5: pmx-gpio-5 {
155 marvell,pins = "mpp29";
156 marvell,function = "gpio";
157 };
158
159 pmx_gpio_6: pmx-gpio-6 {
160 marvell,pins = "mpp30";
161 marvell,function = "gpio";
162 };
163
164 pmx_gpio_7: pmx-gpio-7 {
165 marvell,pins = "mpp31";
166 marvell,function = "gpio";
167 };
168
169 pmx_gpio_init: pmx-init {
170 marvell,pins = "mpp38";
171 marvell,function = "gpio";
172 };
173
174 pmx_usb_oc: pmx-usb-oc {
175 marvell,pins = "mpp39";
176 marvell,function = "gpio";
177 };
178
179 pmx_led_red: pmx-led-red {
180 marvell,pins = "mpp41";
181 marvell,function = "gpio";
182 };
183
184 pmx_led_green: pmx-led-green {
185 marvell,pins = "mpp42";
186 marvell,function = "gpio";
187 };
188
189 pmx_led_yellow: pmx-led-yellow {
190 marvell,pins = "mpp43";
191 marvell,function = "gpio";
192 };
193 };
78 }; 194 };
79 195
80 gpio-leds { 196 gpio-leds {
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts
index cd15452a52a6..842ff95d60df 100644
--- a/arch/arm/boot/dts/kirkwood-topkick.dts
+++ b/arch/arm/boot/dts/kirkwood-topkick.dts
@@ -1,6 +1,7 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "kirkwood.dtsi" 3/include/ "kirkwood.dtsi"
4/include/ "kirkwood-6282.dtsi"
4 5
5/ { 6/ {
6 model = "Univeral Scientific Industrial Co. Topkick-1281P2"; 7 model = "Univeral Scientific Industrial Co. Topkick-1281P2";
@@ -16,6 +17,96 @@
16 }; 17 };
17 18
18 ocp@f1000000 { 19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 {
21 /*
22 * GPIO LED layout
23 *
24 * /-SYS_LED(2)
25 * |
26 * | /-DISK_LED
27 * | |
28 * | | /-WLAN_LED(2)
29 * | | |
30 * [SW] [*] [*] [*]
31 */
32
33 /*
34 * Switch positions
35 *
36 * /-SW_LEFT(2)
37 * |
38 * | /-SW_IDLE
39 * | |
40 * | | /-SW_RIGHT
41 * | | |
42 * PS [L] [I] [R] LEDS
43 */
44 pinctrl-0 = < &pmx_led_disk_yellow
45 &pmx_sata0_pwr_enable
46 &pmx_led_sys_red
47 &pmx_led_sys_blue
48 &pmx_led_wifi_green
49 &pmx_sw_left
50 &pmx_sw_right
51 &pmx_sw_idle
52 &pmx_sw_left2
53 &pmx_led_wifi_yellow
54 &pmx_uart0
55 &pmx_nand
56 &pmx_twsi0 >;
57 pinctrl-names = "default";
58
59 pmx_led_disk_yellow: pmx-led-disk-yellow {
60 marvell,pins = "mpp21";
61 marvell,function = "gpio";
62 };
63
64 pmx_sata0_pwr_enable: pmx-sata0-pwr-enable {
65 marvell,pins = "mpp36";
66 marvell,function = "gpio";
67 };
68
69 pmx_led_sys_red: pmx-led-sys-red {
70 marvell,pins = "mpp37";
71 marvell,function = "gpio";
72 };
73
74 pmx_led_sys_blue: pmx-led-sys-blue {
75 marvell,pins = "mpp38";
76 marvell,function = "gpio";
77 };
78
79 pmx_led_wifi_green: pmx-led-wifi-green {
80 marvell,pins = "mpp39";
81 marvell,function = "gpio";
82 };
83
84 pmx_sw_left: pmx-sw-left {
85 marvell,pins = "mpp43";
86 marvell,function = "gpio";
87 };
88
89 pmx_sw_right: pmx-sw-right {
90 marvell,pins = "mpp44";
91 marvell,function = "gpio";
92 };
93
94 pmx_sw_idle: pmx-sw-idle {
95 marvell,pins = "mpp45";
96 marvell,function = "gpio";
97 };
98
99 pmx_sw_left2: pmx-sw-left2 {
100 marvell,pins = "mpp46";
101 marvell,function = "gpio";
102 };
103
104 pmx_led_wifi_yellow: pmx-led-wifi-yellow {
105 marvell,pins = "mpp48";
106 marvell,function = "gpio";
107 };
108 };
109
19 serial@12000 { 110 serial@12000 {
20 clock-frequency = <200000000>; 111 clock-frequency = <200000000>;
21 status = "ok"; 112 status = "ok";
@@ -54,6 +145,17 @@
54 status = "okay"; 145 status = "okay";
55 nr-ports = <1>; 146 nr-ports = <1>;
56 }; 147 };
148
149 i2c@11000 {
150 status = "ok";
151 };
152
153 mvsdio@90000 {
154 pinctrl-0 = <&pmx_sdio>;
155 pinctrl-names = "default";
156 status = "okay";
157 /* No CD or WP GPIOs */
158 };
57 }; 159 };
58 160
59 gpio-leds { 161 gpio-leds {
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
index d6ab442b7011..2c738d9dc82a 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -193,5 +193,13 @@
193 clocks = <&gate_clk 17>; 193 clocks = <&gate_clk 17>;
194 status = "okay"; 194 status = "okay";
195 }; 195 };
196
197 mvsdio@90000 {
198 compatible = "marvell,orion-sdio";
199 reg = <0x90000 0x200>;
200 interrupts = <28>;
201 clocks = <&gate_clk 4>;
202 status = "disabled";
203 };
196 }; 204 };
197}; 205};
diff --git a/arch/arm/configs/dove_defconfig b/arch/arm/configs/dove_defconfig
index 0b7ee92c5713..3fe8dae8d32d 100644
--- a/arch/arm/configs/dove_defconfig
+++ b/arch/arm/configs/dove_defconfig
@@ -1,26 +1,24 @@
1CONFIG_EXPERIMENTAL=y 1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y 2CONFIG_SYSVIPC=y
3CONFIG_NO_HZ=y
4CONFIG_HIGH_RES_TIMERS=y
3CONFIG_LOG_BUF_SHIFT=14 5CONFIG_LOG_BUF_SHIFT=14
4CONFIG_EXPERT=y 6CONFIG_EXPERT=y
5CONFIG_SLAB=y 7CONFIG_SLAB=y
6CONFIG_MODULES=y 8CONFIG_MODULES=y
7CONFIG_MODULE_UNLOAD=y 9CONFIG_MODULE_UNLOAD=y
8# CONFIG_BLK_DEV_BSG is not set 10# CONFIG_BLK_DEV_BSG is not set
11CONFIG_PARTITION_ADVANCED=y
9CONFIG_ARCH_DOVE=y 12CONFIG_ARCH_DOVE=y
10CONFIG_MACH_DOVE_DB=y 13CONFIG_MACH_DOVE_DB=y
11CONFIG_MACH_CM_A510=y 14CONFIG_MACH_CM_A510=y
12CONFIG_MACH_DOVE_DT=y 15CONFIG_MACH_DOVE_DT=y
13CONFIG_NO_HZ=y
14CONFIG_HIGH_RES_TIMERS=y
15CONFIG_AEABI=y 16CONFIG_AEABI=y
17CONFIG_HIGHMEM=y
16CONFIG_ZBOOT_ROM_TEXT=0x0 18CONFIG_ZBOOT_ROM_TEXT=0x0
17CONFIG_ZBOOT_ROM_BSS=0x0 19CONFIG_ZBOOT_ROM_BSS=0x0
18CONFIG_HIGHMEM=y
19CONFIG_USE_OF=y
20CONFIG_ATAGS=y
21CONFIG_ARM_APPENDED_DTB=y 20CONFIG_ARM_APPENDED_DTB=y
22CONFIG_ARM_ATAG_DTB_COMPAT=y 21CONFIG_ARM_ATAG_DTB_COMPAT=y
23CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
24CONFIG_VFP=y 22CONFIG_VFP=y
25CONFIG_NET=y 23CONFIG_NET=y
26CONFIG_PACKET=y 24CONFIG_PACKET=y
@@ -32,8 +30,9 @@ CONFIG_IP_PNP_DHCP=y
32CONFIG_IP_PNP_BOOTP=y 30CONFIG_IP_PNP_BOOTP=y
33# CONFIG_IPV6 is not set 31# CONFIG_IPV6 is not set
34CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 32CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
33CONFIG_DEVTMPFS=y
34CONFIG_DEVTMPFS_MOUNT=y
35CONFIG_MTD=y 35CONFIG_MTD=y
36CONFIG_MTD_PARTITIONS=y
37CONFIG_MTD_CMDLINE_PARTS=y 36CONFIG_MTD_CMDLINE_PARTS=y
38CONFIG_MTD_CHAR=y 37CONFIG_MTD_CHAR=y
39CONFIG_MTD_BLOCK=y 38CONFIG_MTD_BLOCK=y
@@ -57,7 +56,6 @@ CONFIG_ATA=y
57CONFIG_SATA_MV=y 56CONFIG_SATA_MV=y
58CONFIG_NETDEVICES=y 57CONFIG_NETDEVICES=y
59CONFIG_MV643XX_ETH=y 58CONFIG_MV643XX_ETH=y
60# CONFIG_NETDEV_10000 is not set
61CONFIG_INPUT_POLLDEV=y 59CONFIG_INPUT_POLLDEV=y
62# CONFIG_INPUT_MOUSEDEV is not set 60# CONFIG_INPUT_MOUSEDEV is not set
63CONFIG_INPUT_EVDEV=y 61CONFIG_INPUT_EVDEV=y
@@ -68,10 +66,7 @@ CONFIG_LEGACY_PTY_COUNT=16
68# CONFIG_DEVKMEM is not set 66# CONFIG_DEVKMEM is not set
69CONFIG_SERIAL_8250=y 67CONFIG_SERIAL_8250=y
70CONFIG_SERIAL_8250_CONSOLE=y 68CONFIG_SERIAL_8250_CONSOLE=y
71# CONFIG_SERIAL_8250_PCI is not set
72CONFIG_SERIAL_8250_RUNTIME_UARTS=2 69CONFIG_SERIAL_8250_RUNTIME_UARTS=2
73CONFIG_SERIAL_CORE=y
74CONFIG_SERIAL_CORE_CONSOLE=y
75CONFIG_SERIAL_OF_PLATFORM=y 70CONFIG_SERIAL_OF_PLATFORM=y
76# CONFIG_HW_RANDOM is not set 71# CONFIG_HW_RANDOM is not set
77CONFIG_I2C=y 72CONFIG_I2C=y
@@ -81,13 +76,11 @@ CONFIG_SPI=y
81CONFIG_SPI_ORION=y 76CONFIG_SPI_ORION=y
82# CONFIG_HWMON is not set 77# CONFIG_HWMON is not set
83CONFIG_USB=y 78CONFIG_USB=y
84CONFIG_USB_DEVICEFS=y
85CONFIG_USB_EHCI_HCD=y 79CONFIG_USB_EHCI_HCD=y
86CONFIG_USB_EHCI_ROOT_HUB_TT=y 80CONFIG_USB_EHCI_ROOT_HUB_TT=y
87CONFIG_USB_STORAGE=y 81CONFIG_USB_STORAGE=y
88CONFIG_MMC=y 82CONFIG_MMC=y
89CONFIG_MMC_SDHCI=y 83CONFIG_MMC_SDHCI=y
90CONFIG_MMC_SDHCI_IO_ACCESSORS=y
91CONFIG_MMC_SDHCI_PLTFM=y 84CONFIG_MMC_SDHCI_PLTFM=y
92CONFIG_MMC_SDHCI_DOVE=y 85CONFIG_MMC_SDHCI_DOVE=y
93CONFIG_NEW_LEDS=y 86CONFIG_NEW_LEDS=y
@@ -104,6 +97,7 @@ CONFIG_MV_XOR=y
104CONFIG_EXT2_FS=y 97CONFIG_EXT2_FS=y
105CONFIG_EXT3_FS=y 98CONFIG_EXT3_FS=y
106# CONFIG_EXT3_FS_XATTR is not set 99# CONFIG_EXT3_FS_XATTR is not set
100CONFIG_EXT4_FS=y
107CONFIG_ISO9660_FS=y 101CONFIG_ISO9660_FS=y
108CONFIG_JOLIET=y 102CONFIG_JOLIET=y
109CONFIG_UDF_FS=m 103CONFIG_UDF_FS=m
@@ -112,24 +106,20 @@ CONFIG_VFAT_FS=y
112CONFIG_TMPFS=y 106CONFIG_TMPFS=y
113CONFIG_JFFS2_FS=y 107CONFIG_JFFS2_FS=y
114CONFIG_NFS_FS=y 108CONFIG_NFS_FS=y
115CONFIG_NFS_V3=y
116CONFIG_ROOT_NFS=y 109CONFIG_ROOT_NFS=y
117CONFIG_PARTITION_ADVANCED=y
118CONFIG_NLS_CODEPAGE_437=y 110CONFIG_NLS_CODEPAGE_437=y
119CONFIG_NLS_CODEPAGE_850=y 111CONFIG_NLS_CODEPAGE_850=y
120CONFIG_NLS_ISO8859_1=y 112CONFIG_NLS_ISO8859_1=y
121CONFIG_NLS_ISO8859_2=y 113CONFIG_NLS_ISO8859_2=y
122CONFIG_NLS_UTF8=y 114CONFIG_NLS_UTF8=y
115CONFIG_PRINTK_TIME=y
123CONFIG_MAGIC_SYSRQ=y 116CONFIG_MAGIC_SYSRQ=y
124CONFIG_DEBUG_FS=y 117CONFIG_DEBUG_FS=y
125CONFIG_DEBUG_KERNEL=y
126# CONFIG_SCHED_DEBUG is not set 118# CONFIG_SCHED_DEBUG is not set
127CONFIG_TIMER_STATS=y 119CONFIG_TIMER_STATS=y
128# CONFIG_DEBUG_BUGVERBOSE is not set 120# CONFIG_DEBUG_BUGVERBOSE is not set
129CONFIG_DEBUG_INFO=y 121CONFIG_DEBUG_INFO=y
130CONFIG_SYSCTL_SYSCALL_CHECK=y
131CONFIG_DEBUG_USER=y 122CONFIG_DEBUG_USER=y
132CONFIG_DEBUG_ERRORS=y
133CONFIG_CRYPTO_NULL=y 123CONFIG_CRYPTO_NULL=y
134CONFIG_CRYPTO_ECB=m 124CONFIG_CRYPTO_ECB=m
135CONFIG_CRYPTO_PCBC=m 125CONFIG_CRYPTO_PCBC=m
@@ -138,7 +128,6 @@ CONFIG_CRYPTO_MD4=y
138CONFIG_CRYPTO_SHA1=y 128CONFIG_CRYPTO_SHA1=y
139CONFIG_CRYPTO_SHA256=y 129CONFIG_CRYPTO_SHA256=y
140CONFIG_CRYPTO_SHA512=y 130CONFIG_CRYPTO_SHA512=y
141CONFIG_CRYPTO_AES=y
142CONFIG_CRYPTO_BLOWFISH=y 131CONFIG_CRYPTO_BLOWFISH=y
143CONFIG_CRYPTO_TEA=y 132CONFIG_CRYPTO_TEA=y
144CONFIG_CRYPTO_TWOFISH=y 133CONFIG_CRYPTO_TWOFISH=y
@@ -147,5 +136,4 @@ CONFIG_CRYPTO_LZO=y
147# CONFIG_CRYPTO_ANSI_CPRNG is not set 136# CONFIG_CRYPTO_ANSI_CPRNG is not set
148CONFIG_CRYPTO_DEV_MV_CESA=y 137CONFIG_CRYPTO_DEV_MV_CESA=y
149CONFIG_CRC_CCITT=y 138CONFIG_CRC_CCITT=y
150CONFIG_CRC16=y
151CONFIG_LIBCRC32C=y 139CONFIG_LIBCRC32C=y
diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig
index cbd91bce1ca9..2ec8119cff73 100644
--- a/arch/arm/configs/mvebu_defconfig
+++ b/arch/arm/configs/mvebu_defconfig
@@ -14,16 +14,20 @@ CONFIG_MACH_ARMADA_XP=y
14# CONFIG_CACHE_L2X0 is not set 14# CONFIG_CACHE_L2X0 is not set
15# CONFIG_SWP_EMULATE is not set 15# CONFIG_SWP_EMULATE is not set
16CONFIG_SMP=y 16CONFIG_SMP=y
17# CONFIG_LOCAL_TIMERS is not set
18CONFIG_AEABI=y 17CONFIG_AEABI=y
19CONFIG_HIGHMEM=y 18CONFIG_HIGHMEM=y
20# CONFIG_COMPACTION is not set 19# CONFIG_COMPACTION is not set
21CONFIG_ZBOOT_ROM_TEXT=0x0 20CONFIG_ZBOOT_ROM_TEXT=0x0
22CONFIG_ZBOOT_ROM_BSS=0x0 21CONFIG_ZBOOT_ROM_BSS=0x0
23CONFIG_ARM_APPENDED_DTB=y 22CONFIG_ARM_APPENDED_DTB=y
23CONFIG_ARM_ATAG_DTB_COMPAT=y
24CONFIG_VFP=y 24CONFIG_VFP=y
25CONFIG_NET=y 25CONFIG_NET=y
26CONFIG_INET=y 26CONFIG_INET=y
27CONFIG_BT=y
28CONFIG_BT_MRVL=y
29CONFIG_BT_MRVL_SDIO=y
30CONFIG_CFG80211=y
27CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 31CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
28CONFIG_BLK_DEV_SD=y 32CONFIG_BLK_DEV_SD=y
29CONFIG_ATA=y 33CONFIG_ATA=y
@@ -31,16 +35,34 @@ CONFIG_SATA_MV=y
31CONFIG_NETDEVICES=y 35CONFIG_NETDEVICES=y
32CONFIG_MVNETA=y 36CONFIG_MVNETA=y
33CONFIG_MARVELL_PHY=y 37CONFIG_MARVELL_PHY=y
38CONFIG_MWIFIEX=y
39CONFIG_MWIFIEX_SDIO=y
34CONFIG_SERIAL_8250=y 40CONFIG_SERIAL_8250=y
35CONFIG_SERIAL_8250_CONSOLE=y 41CONFIG_SERIAL_8250_CONSOLE=y
36CONFIG_I2C=y 42CONFIG_I2C=y
43CONFIG_SPI=y
44CONFIG_SPI_ORION=y
37CONFIG_I2C_MV64XXX=y 45CONFIG_I2C_MV64XXX=y
46CONFIG_MTD=y
47CONFIG_MTD_CHAR=y
48CONFIG_MTD_M25P80=y
38CONFIG_SERIAL_8250_DW=y 49CONFIG_SERIAL_8250_DW=y
39CONFIG_GPIOLIB=y 50CONFIG_GPIOLIB=y
40CONFIG_GPIO_SYSFS=y 51CONFIG_GPIO_SYSFS=y
41# CONFIG_USB_SUPPORT is not set 52CONFIG_USB_SUPPORT=y
53CONFIG_USB=y
54CONFIG_USB_EHCI_HCD=y
55CONFIG_USB_EHCI_ROOT_HUB_TT=y
56CONFIG_MMC=y
57CONFIG_MMC_MVSDIO=y
58CONFIG_NEW_LEDS=y
59CONFIG_LEDS_CLASS=m
60CONFIG_LEDS_TRIGGERS=y
61CONFIG_LEDS_TRIGGER_TIMER=y
62CONFIG_LEDS_TRIGGER_HEARTBEAT=y
42CONFIG_RTC_CLASS=y 63CONFIG_RTC_CLASS=y
43CONFIG_RTC_DRV_S35390A=y 64CONFIG_RTC_DRV_S35390A=y
65CONFIG_RTC_DRV_MV=y
44CONFIG_DMADEVICES=y 66CONFIG_DMADEVICES=y
45CONFIG_MV_XOR=y 67CONFIG_MV_XOR=y
46# CONFIG_IOMMU_SUPPORT is not set 68# CONFIG_IOMMU_SUPPORT is not set
diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig
index 603c5fd99e8a..36469d813951 100644
--- a/arch/arm/mach-dove/Kconfig
+++ b/arch/arm/mach-dove/Kconfig
@@ -2,8 +2,12 @@ if ARCH_DOVE
2 2
3menu "Marvell Dove Implementations" 3menu "Marvell Dove Implementations"
4 4
5config DOVE_LEGACY
6 bool
7
5config MACH_DOVE_DB 8config MACH_DOVE_DB
6 bool "Marvell DB-MV88AP510 Development Board" 9 bool "Marvell DB-MV88AP510 Development Board"
10 select DOVE_LEGACY
7 select I2C_BOARDINFO 11 select I2C_BOARDINFO
8 help 12 help
9 Say 'Y' here if you want your kernel to support the 13 Say 'Y' here if you want your kernel to support the
@@ -11,6 +15,7 @@ config MACH_DOVE_DB
11 15
12config MACH_CM_A510 16config MACH_CM_A510
13 bool "CompuLab CM-A510 Board" 17 bool "CompuLab CM-A510 Board"
18 select DOVE_LEGACY
14 help 19 help
15 Say 'Y' here if you want your kernel to support the 20 Say 'Y' here if you want your kernel to support the
16 CompuLab CM-A510 Board. 21 CompuLab CM-A510 Board.
@@ -19,6 +24,8 @@ config MACH_DOVE_DT
19 bool "Marvell Dove Flattened Device Tree" 24 bool "Marvell Dove Flattened Device Tree"
20 select MVEBU_CLK_CORE 25 select MVEBU_CLK_CORE
21 select MVEBU_CLK_GATING 26 select MVEBU_CLK_GATING
27 select REGULATOR
28 select REGULATOR_FIXED_VOLTAGE
22 select USE_OF 29 select USE_OF
23 help 30 help
24 Say 'Y' here if you want your kernel to support the 31 Say 'Y' here if you want your kernel to support the
diff --git a/arch/arm/mach-dove/Makefile b/arch/arm/mach-dove/Makefile
index 5e683baf96cf..3f0a858fb597 100644
--- a/arch/arm/mach-dove/Makefile
+++ b/arch/arm/mach-dove/Makefile
@@ -1,4 +1,6 @@
1obj-y += common.o addr-map.o irq.o mpp.o 1obj-y += common.o addr-map.o irq.o
2obj-$(CONFIG_DOVE_LEGACY) += mpp.o
2obj-$(CONFIG_PCI) += pcie.o 3obj-$(CONFIG_PCI) += pcie.o
3obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o 4obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o
5obj-$(CONFIG_MACH_DOVE_DT) += board-dt.o
4obj-$(CONFIG_MACH_CM_A510) += cm-a510.o 6obj-$(CONFIG_MACH_CM_A510) += cm-a510.o
diff --git a/arch/arm/mach-dove/board-dt.c b/arch/arm/mach-dove/board-dt.c
new file mode 100644
index 000000000000..fbde1dd67113
--- /dev/null
+++ b/arch/arm/mach-dove/board-dt.c
@@ -0,0 +1,92 @@
1/*
2 * arch/arm/mach-dove/board-dt.c
3 *
4 * Marvell Dove 88AP510 System On Chip FDT Board
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <linux/init.h>
12#include <linux/clk-provider.h>
13#include <linux/clk/mvebu.h>
14#include <linux/of.h>
15#include <linux/of_platform.h>
16#include <linux/platform_data/usb-ehci-orion.h>
17#include <asm/hardware/cache-tauros2.h>
18#include <asm/mach/arch.h>
19#include <mach/pm.h>
20#include <plat/common.h>
21#include <plat/irq.h>
22#include "common.h"
23
24/*
25 * There are still devices that doesn't even know about DT,
26 * get clock gates here and add a clock lookup.
27 */
28static void __init dove_legacy_clk_init(void)
29{
30 struct device_node *np = of_find_compatible_node(NULL, NULL,
31 "marvell,dove-gating-clock");
32 struct of_phandle_args clkspec;
33
34 clkspec.np = np;
35 clkspec.args_count = 1;
36
37 clkspec.args[0] = CLOCK_GATING_BIT_GBE;
38 orion_clkdev_add(NULL, "mv643xx_eth_port.0",
39 of_clk_get_from_provider(&clkspec));
40
41 clkspec.args[0] = CLOCK_GATING_BIT_PCIE0;
42 orion_clkdev_add("0", "pcie",
43 of_clk_get_from_provider(&clkspec));
44
45 clkspec.args[0] = CLOCK_GATING_BIT_PCIE1;
46 orion_clkdev_add("1", "pcie",
47 of_clk_get_from_provider(&clkspec));
48}
49
50static void __init dove_of_clk_init(void)
51{
52 mvebu_clocks_init();
53 dove_legacy_clk_init();
54}
55
56static struct mv643xx_eth_platform_data dove_dt_ge00_data = {
57 .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT,
58};
59
60static void __init dove_dt_init(void)
61{
62 pr_info("Dove 88AP510 SoC\n");
63
64#ifdef CONFIG_CACHE_TAUROS2
65 tauros2_init(0);
66#endif
67 dove_setup_cpu_mbus();
68
69 /* Setup root of clk tree */
70 dove_of_clk_init();
71
72 /* Internal devices not ported to DT yet */
73 dove_ge00_init(&dove_dt_ge00_data);
74 dove_pcie_init(1, 1);
75
76 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
77}
78
79static const char * const dove_dt_board_compat[] = {
80 "marvell,dove",
81 NULL
82};
83
84DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)")
85 .map_io = dove_map_io,
86 .init_early = dove_init_early,
87 .init_irq = orion_dt_init_irq,
88 .init_time = dove_timer_init,
89 .init_machine = dove_dt_init,
90 .restart = dove_restart,
91 .dt_compat = dove_dt_board_compat,
92MACHINE_END
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
index ea84c535a110..c6b3b2bb50e7 100644
--- a/arch/arm/mach-dove/common.c
+++ b/arch/arm/mach-dove/common.c
@@ -360,88 +360,3 @@ void dove_restart(char mode, const char *cmd)
360 while (1) 360 while (1)
361 ; 361 ;
362} 362}
363
364#if defined(CONFIG_MACH_DOVE_DT)
365/*
366 * There are still devices that doesn't even know about DT,
367 * get clock gates here and add a clock lookup.
368 */
369static void __init dove_legacy_clk_init(void)
370{
371 struct device_node *np = of_find_compatible_node(NULL, NULL,
372 "marvell,dove-gating-clock");
373 struct of_phandle_args clkspec;
374
375 clkspec.np = np;
376 clkspec.args_count = 1;
377
378 clkspec.args[0] = CLOCK_GATING_BIT_USB0;
379 orion_clkdev_add(NULL, "orion-ehci.0",
380 of_clk_get_from_provider(&clkspec));
381
382 clkspec.args[0] = CLOCK_GATING_BIT_USB1;
383 orion_clkdev_add(NULL, "orion-ehci.1",
384 of_clk_get_from_provider(&clkspec));
385
386 clkspec.args[0] = CLOCK_GATING_BIT_GBE;
387 orion_clkdev_add(NULL, "mv643xx_eth_port.0",
388 of_clk_get_from_provider(&clkspec));
389
390 clkspec.args[0] = CLOCK_GATING_BIT_PCIE0;
391 orion_clkdev_add("0", "pcie",
392 of_clk_get_from_provider(&clkspec));
393
394 clkspec.args[0] = CLOCK_GATING_BIT_PCIE1;
395 orion_clkdev_add("1", "pcie",
396 of_clk_get_from_provider(&clkspec));
397}
398
399static void __init dove_of_clk_init(void)
400{
401 mvebu_clocks_init();
402 dove_legacy_clk_init();
403}
404
405static struct mv643xx_eth_platform_data dove_dt_ge00_data = {
406 .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT,
407};
408
409static void __init dove_dt_init(void)
410{
411 pr_info("Dove 88AP510 SoC, TCLK = %d MHz.\n",
412 (dove_tclk + 499999) / 1000000);
413
414#ifdef CONFIG_CACHE_TAUROS2
415 tauros2_init(0);
416#endif
417 dove_setup_cpu_mbus();
418
419 /* Setup root of clk tree */
420 dove_of_clk_init();
421
422 /* Internal devices not ported to DT yet */
423 dove_rtc_init();
424
425 dove_ge00_init(&dove_dt_ge00_data);
426 dove_ehci0_init();
427 dove_ehci1_init();
428 dove_pcie_init(1, 1);
429
430 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
431}
432
433static const char * const dove_dt_board_compat[] = {
434 "marvell,dove",
435 NULL
436};
437
438DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)")
439 .map_io = dove_map_io,
440 .init_early = dove_init_early,
441 .init_irq = orion_dt_init_irq,
442 .init_time = dove_timer_init,
443 .init_machine = dove_dt_init,
444 .restart = dove_restart,
445 .dt_compat = dove_dt_board_compat,
446MACHINE_END
447#endif
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index f91cdff5a3e4..7b6a64bc5f40 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -58,6 +58,13 @@ config ARCH_KIRKWOOD_DT
58 Say 'Y' here if you want your kernel to support the 58 Say 'Y' here if you want your kernel to support the
59 Marvell Kirkwood using flattened device tree. 59 Marvell Kirkwood using flattened device tree.
60 60
61config MACH_GURUPLUG_DT
62 bool "Marvell GuruPlug Reference Board (Flattened Device Tree)"
63 select ARCH_KIRKWOOD_DT
64 help
65 Say 'Y' here if you want your kernel to support the
66 Marvell GuruPlug Reference Board (Flattened Device Tree).
67
61config MACH_DREAMPLUG_DT 68config MACH_DREAMPLUG_DT
62 bool "Marvell DreamPlug (Flattened Device Tree)" 69 bool "Marvell DreamPlug (Flattened Device Tree)"
63 select ARCH_KIRKWOOD_DT 70 select ARCH_KIRKWOOD_DT
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index d6653095a1eb..4cc4bee4d0cf 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -21,6 +21,7 @@ obj-$(CONFIG_MACH_T5325) += t5325-setup.o
21 21
22obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o 22obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
23obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o 23obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o
24obj-$(CONFIG_MACH_GURUPLUG_DT) += board-guruplug.o
24obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o 25obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o
25obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o 26obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o
26obj-$(CONFIG_MACH_IB62X0_DT) += board-ib62x0.o 27obj-$(CONFIG_MACH_IB62X0_DT) += board-ib62x0.o
diff --git a/arch/arm/mach-kirkwood/board-dreamplug.c b/arch/arm/mach-kirkwood/board-dreamplug.c
index 08248e24ffcd..0903242c00dc 100644
--- a/arch/arm/mach-kirkwood/board-dreamplug.c
+++ b/arch/arm/mach-kirkwood/board-dreamplug.c
@@ -15,7 +15,6 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/mv643xx_eth.h> 16#include <linux/mv643xx_eth.h>
17#include <linux/gpio.h> 17#include <linux/gpio.h>
18#include <linux/platform_data/mmc-mvsdio.h>
19#include "common.h" 18#include "common.h"
20 19
21static struct mv643xx_eth_platform_data dreamplug_ge00_data = { 20static struct mv643xx_eth_platform_data dreamplug_ge00_data = {
@@ -26,10 +25,6 @@ static struct mv643xx_eth_platform_data dreamplug_ge01_data = {
26 .phy_addr = MV643XX_ETH_PHY_ADDR(1), 25 .phy_addr = MV643XX_ETH_PHY_ADDR(1),
27}; 26};
28 27
29static struct mvsdio_platform_data dreamplug_mvsdio_data = {
30 /* unfortunately the CD signal has not been connected */
31};
32
33void __init dreamplug_init(void) 28void __init dreamplug_init(void)
34{ 29{
35 /* 30 /*
@@ -37,5 +32,4 @@ void __init dreamplug_init(void)
37 */ 32 */
38 kirkwood_ge00_init(&dreamplug_ge00_data); 33 kirkwood_ge00_init(&dreamplug_ge00_data);
39 kirkwood_ge01_init(&dreamplug_ge01_data); 34 kirkwood_ge01_init(&dreamplug_ge01_data);
40 kirkwood_sdio_init(&dreamplug_mvsdio_data);
41} 35}
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 95cc04d14b65..2e73e9d53f70 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -55,10 +55,6 @@ static void __init kirkwood_legacy_clk_init(void)
55 orion_clkdev_add("0", "pcie", 55 orion_clkdev_add("0", "pcie",
56 of_clk_get_from_provider(&clkspec)); 56 of_clk_get_from_provider(&clkspec));
57 57
58 clkspec.args[0] = CGC_BIT_USB0;
59 orion_clkdev_add(NULL, "orion-ehci.0",
60 of_clk_get_from_provider(&clkspec));
61
62 clkspec.args[0] = CGC_BIT_PEX1; 58 clkspec.args[0] = CGC_BIT_PEX1;
63 orion_clkdev_add("1", "pcie", 59 orion_clkdev_add("1", "pcie",
64 of_clk_get_from_provider(&clkspec)); 60 of_clk_get_from_provider(&clkspec));
@@ -66,11 +62,6 @@ static void __init kirkwood_legacy_clk_init(void)
66 clkspec.args[0] = CGC_BIT_GE1; 62 clkspec.args[0] = CGC_BIT_GE1;
67 orion_clkdev_add(NULL, "mv643xx_eth_port.1", 63 orion_clkdev_add(NULL, "mv643xx_eth_port.1",
68 of_clk_get_from_provider(&clkspec)); 64 of_clk_get_from_provider(&clkspec));
69
70 clkspec.args[0] = CGC_BIT_SDIO;
71 orion_clkdev_add(NULL, "mvsdio",
72 of_clk_get_from_provider(&clkspec));
73
74} 65}
75 66
76static void __init kirkwood_of_clk_init(void) 67static void __init kirkwood_of_clk_init(void)
@@ -107,6 +98,9 @@ static void __init kirkwood_dt_init(void)
107 if (of_machine_is_compatible("globalscale,dreamplug")) 98 if (of_machine_is_compatible("globalscale,dreamplug"))
108 dreamplug_init(); 99 dreamplug_init();
109 100
101 if (of_machine_is_compatible("globalscale,guruplug"))
102 guruplug_dt_init();
103
110 if (of_machine_is_compatible("dlink,dns-kirkwood")) 104 if (of_machine_is_compatible("dlink,dns-kirkwood"))
111 dnskw_init(); 105 dnskw_init();
112 106
@@ -150,14 +144,12 @@ static void __init kirkwood_dt_init(void)
150 if (of_machine_is_compatible("usi,topkick")) 144 if (of_machine_is_compatible("usi,topkick"))
151 usi_topkick_init(); 145 usi_topkick_init();
152 146
153 if (of_machine_is_compatible("zyxel,nsa310"))
154 nsa310_init();
155
156 of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL); 147 of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL);
157} 148}
158 149
159static const char * const kirkwood_dt_board_compat[] = { 150static const char * const kirkwood_dt_board_compat[] = {
160 "globalscale,dreamplug", 151 "globalscale,dreamplug",
152 "globalscale,guruplug",
161 "dlink,dns-320", 153 "dlink,dns-320",
162 "dlink,dns-325", 154 "dlink,dns-325",
163 "iom,iconnect", 155 "iom,iconnect",
diff --git a/arch/arm/mach-kirkwood/board-guruplug.c b/arch/arm/mach-kirkwood/board-guruplug.c
new file mode 100644
index 000000000000..0a0df4554d8b
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-guruplug.c
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-kirkwood/board-guruplug.c
3 *
4 * Marvell Guruplug Reference Board Init for drivers not converted to
5 * flattened device tree yet.
6 *
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without any
9 * warranty of any kind, whether express or implied.
10 */
11
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/mv643xx_eth.h>
15#include <linux/gpio.h>
16#include <linux/platform_data/mmc-mvsdio.h>
17#include "common.h"
18
19static struct mv643xx_eth_platform_data guruplug_ge00_data = {
20 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
21};
22
23static struct mv643xx_eth_platform_data guruplug_ge01_data = {
24 .phy_addr = MV643XX_ETH_PHY_ADDR(1),
25};
26
27static struct mvsdio_platform_data guruplug_mvsdio_data = {
28 /* unfortunately the CD signal has not been connected */
29};
30
31void __init guruplug_dt_init(void)
32{
33 /*
34 * Basic setup. Needs to be called early.
35 */
36 kirkwood_ge00_init(&guruplug_ge00_data);
37 kirkwood_ge01_init(&guruplug_ge01_data);
38 kirkwood_sdio_init(&guruplug_mvsdio_data);
39}
diff --git a/arch/arm/mach-kirkwood/board-mplcec4.c b/arch/arm/mach-kirkwood/board-mplcec4.c
index 3264925b8318..7d6dc669e17f 100644
--- a/arch/arm/mach-kirkwood/board-mplcec4.c
+++ b/arch/arm/mach-kirkwood/board-mplcec4.c
@@ -12,7 +12,6 @@
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/mv643xx_eth.h> 14#include <linux/mv643xx_eth.h>
15#include <linux/platform_data/mmc-mvsdio.h>
16#include "common.h" 15#include "common.h"
17 16
18static struct mv643xx_eth_platform_data mplcec4_ge00_data = { 17static struct mv643xx_eth_platform_data mplcec4_ge00_data = {
@@ -23,11 +22,6 @@ static struct mv643xx_eth_platform_data mplcec4_ge01_data = {
23 .phy_addr = MV643XX_ETH_PHY_ADDR(2), 22 .phy_addr = MV643XX_ETH_PHY_ADDR(2),
24}; 23};
25 24
26static struct mvsdio_platform_data mplcec4_mvsdio_data = {
27 .gpio_card_detect = 47, /* MPP47 used as SD card detect */
28};
29
30
31void __init mplcec4_init(void) 25void __init mplcec4_init(void)
32{ 26{
33 /* 27 /*
@@ -35,7 +29,6 @@ void __init mplcec4_init(void)
35 */ 29 */
36 kirkwood_ge00_init(&mplcec4_ge00_data); 30 kirkwood_ge00_init(&mplcec4_ge00_data);
37 kirkwood_ge01_init(&mplcec4_ge01_data); 31 kirkwood_ge01_init(&mplcec4_ge01_data);
38 kirkwood_sdio_init(&mplcec4_mvsdio_data);
39 kirkwood_pcie_init(KW_PCIE0); 32 kirkwood_pcie_init(KW_PCIE0);
40} 33}
41 34
diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c
index f4632a809f68..f2ea3b7ad726 100644
--- a/arch/arm/mach-kirkwood/board-ns2.c
+++ b/arch/arm/mach-kirkwood/board-ns2.c
@@ -15,7 +15,6 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/mv643xx_eth.h> 17#include <linux/mv643xx_eth.h>
18#include <linux/gpio.h>
19#include <linux/of.h> 18#include <linux/of.h>
20#include "common.h" 19#include "common.h"
21 20
@@ -23,13 +22,6 @@ static struct mv643xx_eth_platform_data ns2_ge00_data = {
23 .phy_addr = MV643XX_ETH_PHY_ADDR(8), 22 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
24}; 23};
25 24
26#define NS2_GPIO_POWER_OFF 31
27
28static void ns2_power_off(void)
29{
30 gpio_set_value(NS2_GPIO_POWER_OFF, 1);
31}
32
33void __init ns2_init(void) 25void __init ns2_init(void)
34{ 26{
35 /* 27 /*
@@ -39,10 +31,4 @@ void __init ns2_init(void)
39 of_machine_is_compatible("lacie,netspace_mini_v2")) 31 of_machine_is_compatible("lacie,netspace_mini_v2"))
40 ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); 32 ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
41 kirkwood_ge00_init(&ns2_ge00_data); 33 kirkwood_ge00_init(&ns2_ge00_data);
42
43 if (gpio_request(NS2_GPIO_POWER_OFF, "power-off") == 0 &&
44 gpio_direction_output(NS2_GPIO_POWER_OFF, 0) == 0)
45 pm_power_off = ns2_power_off;
46 else
47 pr_err("ns2: failed to configure power-off GPIO\n");
48} 34}
diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c
index 970174ad4a70..55ade93b93bf 100644
--- a/arch/arm/mach-kirkwood/board-nsa310.c
+++ b/arch/arm/mach-kirkwood/board-nsa310.c
@@ -10,79 +10,9 @@
10 10
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/gpio.h>
14#include <linux/i2c.h>
15#include <mach/kirkwood.h> 13#include <mach/kirkwood.h>
16#include <linux/of.h> 14#include <linux/of.h>
17#include "common.h" 15#include "common.h"
18#include "mpp.h"
19
20#define NSA310_GPIO_USB_POWER_OFF 21
21#define NSA310_GPIO_POWER_OFF 48
22
23static unsigned int nsa310_mpp_config[] __initdata = {
24 MPP12_GPIO, /* led esata green */
25 MPP13_GPIO, /* led esata red */
26 MPP15_GPIO, /* led usb green */
27 MPP16_GPIO, /* led usb red */
28 MPP21_GPIO, /* control usb power off */
29 MPP28_GPIO, /* led sys green */
30 MPP29_GPIO, /* led sys red */
31 MPP36_GPIO, /* key reset */
32 MPP37_GPIO, /* key copy */
33 MPP39_GPIO, /* led copy green */
34 MPP40_GPIO, /* led copy red */
35 MPP41_GPIO, /* led hdd green */
36 MPP42_GPIO, /* led hdd red */
37 MPP44_GPIO, /* ?? */
38 MPP46_GPIO, /* key power */
39 MPP48_GPIO, /* control power off */
40 0
41};
42
43static struct i2c_board_info __initdata nsa310_i2c_info[] = {
44 { I2C_BOARD_INFO("adt7476", 0x2e) },
45};
46
47static void nsa310_power_off(void)
48{
49 gpio_set_value(NSA310_GPIO_POWER_OFF, 1);
50}
51
52static int __init nsa310_gpio_request(unsigned int gpio, unsigned long flags,
53 const char *label)
54{
55 int err;
56
57 err = gpio_request_one(gpio, flags, label);
58 if (err)
59 pr_err("NSA-310: can't setup GPIO%u (%s), err=%d\n",
60 gpio, label, err);
61
62 return err;
63}
64
65static void __init nsa310_gpio_init(void)
66{
67 int err;
68
69 err = nsa310_gpio_request(NSA310_GPIO_POWER_OFF, GPIOF_OUT_INIT_LOW,
70 "Power Off");
71 if (!err)
72 pm_power_off = nsa310_power_off;
73
74 nsa310_gpio_request(NSA310_GPIO_USB_POWER_OFF, GPIOF_OUT_INIT_LOW,
75 "USB Power Off");
76}
77
78void __init nsa310_init(void)
79{
80 kirkwood_mpp_conf(nsa310_mpp_config);
81
82 nsa310_gpio_init();
83
84 i2c_register_board_info(0, ARRAY_AND_SIZE(nsa310_i2c_info));
85}
86 16
87static int __init nsa310_pci_init(void) 17static int __init nsa310_pci_init(void)
88{ 18{
diff --git a/arch/arm/mach-kirkwood/board-openblocks_a6.c b/arch/arm/mach-kirkwood/board-openblocks_a6.c
index 815fc6451d52..b11d8fdeca93 100644
--- a/arch/arm/mach-kirkwood/board-openblocks_a6.c
+++ b/arch/arm/mach-kirkwood/board-openblocks_a6.c
@@ -11,60 +11,16 @@
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/mv643xx_eth.h> 13#include <linux/mv643xx_eth.h>
14#include <linux/clk.h>
15#include <linux/clk-private.h>
16#include "common.h" 14#include "common.h"
17#include "mpp.h"
18 15
19static struct mv643xx_eth_platform_data openblocks_ge00_data = { 16static struct mv643xx_eth_platform_data openblocks_ge00_data = {
20 .phy_addr = MV643XX_ETH_PHY_ADDR(0), 17 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
21}; 18};
22 19
23static unsigned int openblocks_a6_mpp_config[] __initdata = {
24 MPP0_NF_IO2,
25 MPP1_NF_IO3,
26 MPP2_NF_IO4,
27 MPP3_NF_IO5,
28 MPP4_NF_IO6,
29 MPP5_NF_IO7,
30 MPP6_SYSRST_OUTn,
31 MPP8_UART1_RTS,
32 MPP9_UART1_CTS,
33 MPP10_UART0_TXD,
34 MPP11_UART0_RXD,
35 MPP13_UART1_TXD,
36 MPP14_UART1_RXD,
37 MPP15_UART0_RTS,
38 MPP16_UART0_CTS,
39 MPP18_NF_IO0,
40 MPP19_NF_IO1,
41 MPP20_GPIO, /* DIP SW0 */
42 MPP21_GPIO, /* DIP SW1 */
43 MPP22_GPIO, /* DIP SW2 */
44 MPP23_GPIO, /* DIP SW3 */
45 MPP24_GPIO, /* GPIO 0 */
46 MPP25_GPIO, /* GPIO 1 */
47 MPP26_GPIO, /* GPIO 2 */
48 MPP27_GPIO, /* GPIO 3 */
49 MPP28_GPIO, /* GPIO 4 */
50 MPP29_GPIO, /* GPIO 5 */
51 MPP30_GPIO, /* GPIO 6 */
52 MPP31_GPIO, /* GPIO 7 */
53 MPP36_TW1_SDA,
54 MPP37_TW1_SCK,
55 MPP38_GPIO, /* INIT */
56 MPP39_GPIO, /* USB OC */
57 MPP41_GPIO, /* LED: Red */
58 MPP42_GPIO, /* LED: Green */
59 MPP43_GPIO, /* LED: Yellow */
60 0,
61};
62
63void __init openblocks_a6_init(void) 20void __init openblocks_a6_init(void)
64{ 21{
65 /* 22 /*
66 * Basic setup. Needs to be called early. 23 * Basic setup. Needs to be called early.
67 */ 24 */
68 kirkwood_mpp_conf(openblocks_a6_mpp_config);
69 kirkwood_ge00_init(&openblocks_ge00_data); 25 kirkwood_ge00_init(&openblocks_ge00_data);
70} 26}
diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c
index 23d2dd1b1b1e..1cc04ec33f0b 100644
--- a/arch/arm/mach-kirkwood/board-usi_topkick.c
+++ b/arch/arm/mach-kirkwood/board-usi_topkick.c
@@ -14,64 +14,16 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/mv643xx_eth.h> 15#include <linux/mv643xx_eth.h>
16#include <linux/gpio.h> 16#include <linux/gpio.h>
17#include <linux/platform_data/mmc-mvsdio.h>
18#include "common.h" 17#include "common.h"
19#include "mpp.h"
20 18
21static struct mv643xx_eth_platform_data topkick_ge00_data = { 19static struct mv643xx_eth_platform_data topkick_ge00_data = {
22 .phy_addr = MV643XX_ETH_PHY_ADDR(0), 20 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
23}; 21};
24 22
25static struct mvsdio_platform_data topkick_mvsdio_data = {
26 /* unfortunately the CD signal has not been connected */
27};
28
29/*
30 * GPIO LED layout
31 *
32 * /-SYS_LED(2)
33 * |
34 * | /-DISK_LED
35 * | |
36 * | | /-WLAN_LED(2)
37 * | | |
38 * [SW] [*] [*] [*]
39 */
40
41/*
42 * Switch positions
43 *
44 * /-SW_LEFT
45 * |
46 * | /-SW_IDLE
47 * | |
48 * | | /-SW_RIGHT
49 * | | |
50 * PS [L] [I] [R] LEDS
51 */
52
53static unsigned int topkick_mpp_config[] __initdata = {
54 MPP21_GPIO, /* DISK_LED (low active) - yellow */
55 MPP36_GPIO, /* SATA0 power enable (high active) */
56 MPP37_GPIO, /* SYS_LED2 (low active) - red */
57 MPP38_GPIO, /* SYS_LED (low active) - blue */
58 MPP39_GPIO, /* WLAN_LED (low active) - green */
59 MPP43_GPIO, /* SW_LEFT (low active) */
60 MPP44_GPIO, /* SW_RIGHT (low active) */
61 MPP45_GPIO, /* SW_IDLE (low active) */
62 MPP46_GPIO, /* SW_LEFT (low active) */
63 MPP48_GPIO, /* WLAN_LED2 (low active) - yellow */
64 0
65};
66
67void __init usi_topkick_init(void) 23void __init usi_topkick_init(void)
68{ 24{
69 /* 25 /*
70 * Basic setup. Needs to be called early. 26 * Basic setup. Needs to be called early.
71 */ 27 */
72 kirkwood_mpp_conf(topkick_mpp_config);
73
74
75 kirkwood_ge00_init(&topkick_ge00_data); 28 kirkwood_ge00_init(&topkick_ge00_data);
76 kirkwood_sdio_init(&topkick_mvsdio_data);
77} 29}
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index e956d0277dd1..5ed70565c843 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -60,6 +60,11 @@ void dreamplug_init(void);
60#else 60#else
61static inline void dreamplug_init(void) {}; 61static inline void dreamplug_init(void) {};
62#endif 62#endif
63#ifdef CONFIG_MACH_GURUPLUG_DT
64void guruplug_dt_init(void);
65#else
66static inline void guruplug_dt_init(void) {};
67#endif
63#ifdef CONFIG_MACH_TS219_DT 68#ifdef CONFIG_MACH_TS219_DT
64void qnap_dt_ts219_init(void); 69void qnap_dt_ts219_init(void);
65#else 70#else
@@ -130,12 +135,6 @@ void ns2_init(void);
130static inline void ns2_init(void) {}; 135static inline void ns2_init(void) {};
131#endif 136#endif
132 137
133#ifdef CONFIG_MACH_NSA310_DT
134void nsa310_init(void);
135#else
136static inline void nsa310_init(void) {};
137#endif
138
139#ifdef CONFIG_MACH_OPENBLOCKS_A6_DT 138#ifdef CONFIG_MACH_OPENBLOCKS_A6_DT
140void openblocks_a6_init(void); 139void openblocks_a6_init(void);
141#else 140#else
diff --git a/arch/arm/mach-mvebu/irq-armada-370-xp.c b/arch/arm/mach-mvebu/irq-armada-370-xp.c
index 8e3fb082c3c6..274ff58271de 100644
--- a/arch/arm/mach-mvebu/irq-armada-370-xp.c
+++ b/arch/arm/mach-mvebu/irq-armada-370-xp.c
@@ -34,6 +34,7 @@
34#define ARMADA_370_XP_INT_CONTROL (0x00) 34#define ARMADA_370_XP_INT_CONTROL (0x00)
35#define ARMADA_370_XP_INT_SET_ENABLE_OFFS (0x30) 35#define ARMADA_370_XP_INT_SET_ENABLE_OFFS (0x30)
36#define ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS (0x34) 36#define ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS (0x34)
37#define ARMADA_370_XP_INT_SOURCE_CTL(irq) (0x100 + irq*4)
37 38
38#define ARMADA_370_XP_CPU_INTACK_OFFS (0x44) 39#define ARMADA_370_XP_CPU_INTACK_OFFS (0x44)
39 40
@@ -41,28 +42,90 @@
41#define ARMADA_370_XP_IN_DRBEL_MSK_OFFS (0xc) 42#define ARMADA_370_XP_IN_DRBEL_MSK_OFFS (0xc)
42#define ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS (0x8) 43#define ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS (0x8)
43 44
45#define ARMADA_370_XP_MAX_PER_CPU_IRQS (28)
46
44#define ACTIVE_DOORBELLS (8) 47#define ACTIVE_DOORBELLS (8)
45 48
49static DEFINE_RAW_SPINLOCK(irq_controller_lock);
50
46static void __iomem *per_cpu_int_base; 51static void __iomem *per_cpu_int_base;
47static void __iomem *main_int_base; 52static void __iomem *main_int_base;
48static struct irq_domain *armada_370_xp_mpic_domain; 53static struct irq_domain *armada_370_xp_mpic_domain;
49 54
55/*
56 * In SMP mode:
57 * For shared global interrupts, mask/unmask global enable bit
58 * For CPU interrtups, mask/unmask the calling CPU's bit
59 */
50static void armada_370_xp_irq_mask(struct irq_data *d) 60static void armada_370_xp_irq_mask(struct irq_data *d)
51{ 61{
62#ifdef CONFIG_SMP
63 irq_hw_number_t hwirq = irqd_to_hwirq(d);
64
65 if (hwirq > ARMADA_370_XP_MAX_PER_CPU_IRQS)
66 writel(hwirq, main_int_base +
67 ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS);
68 else
69 writel(hwirq, per_cpu_int_base +
70 ARMADA_370_XP_INT_SET_MASK_OFFS);
71#else
52 writel(irqd_to_hwirq(d), 72 writel(irqd_to_hwirq(d),
53 per_cpu_int_base + ARMADA_370_XP_INT_SET_MASK_OFFS); 73 per_cpu_int_base + ARMADA_370_XP_INT_SET_MASK_OFFS);
74#endif
54} 75}
55 76
56static void armada_370_xp_irq_unmask(struct irq_data *d) 77static void armada_370_xp_irq_unmask(struct irq_data *d)
57{ 78{
79#ifdef CONFIG_SMP
80 irq_hw_number_t hwirq = irqd_to_hwirq(d);
81
82 if (hwirq > ARMADA_370_XP_MAX_PER_CPU_IRQS)
83 writel(hwirq, main_int_base +
84 ARMADA_370_XP_INT_SET_ENABLE_OFFS);
85 else
86 writel(hwirq, per_cpu_int_base +
87 ARMADA_370_XP_INT_CLEAR_MASK_OFFS);
88#else
58 writel(irqd_to_hwirq(d), 89 writel(irqd_to_hwirq(d),
59 per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS); 90 per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS);
91#endif
60} 92}
61 93
62#ifdef CONFIG_SMP 94#ifdef CONFIG_SMP
63static int armada_xp_set_affinity(struct irq_data *d, 95static int armada_xp_set_affinity(struct irq_data *d,
64 const struct cpumask *mask_val, bool force) 96 const struct cpumask *mask_val, bool force)
65{ 97{
98 unsigned long reg;
99 unsigned long new_mask = 0;
100 unsigned long online_mask = 0;
101 unsigned long count = 0;
102 irq_hw_number_t hwirq = irqd_to_hwirq(d);
103 int cpu;
104
105 for_each_cpu(cpu, mask_val) {
106 new_mask |= 1 << cpu_logical_map(cpu);
107 count++;
108 }
109
110 /*
111 * Forbid mutlicore interrupt affinity
112 * This is required since the MPIC HW doesn't limit
113 * several CPUs from acknowledging the same interrupt.
114 */
115 if (count > 1)
116 return -EINVAL;
117
118 for_each_cpu(cpu, cpu_online_mask)
119 online_mask |= 1 << cpu_logical_map(cpu);
120
121 raw_spin_lock(&irq_controller_lock);
122
123 reg = readl(main_int_base + ARMADA_370_XP_INT_SOURCE_CTL(hwirq));
124 reg = (reg & (~online_mask)) | new_mask;
125 writel(reg, main_int_base + ARMADA_370_XP_INT_SOURCE_CTL(hwirq));
126
127 raw_spin_unlock(&irq_controller_lock);
128
66 return 0; 129 return 0;
67} 130}
68#endif 131#endif
@@ -82,10 +145,17 @@ static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
82{ 145{
83 armada_370_xp_irq_mask(irq_get_irq_data(virq)); 146 armada_370_xp_irq_mask(irq_get_irq_data(virq));
84 writel(hw, main_int_base + ARMADA_370_XP_INT_SET_ENABLE_OFFS); 147 writel(hw, main_int_base + ARMADA_370_XP_INT_SET_ENABLE_OFFS);
85
86 irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip,
87 handle_level_irq);
88 irq_set_status_flags(virq, IRQ_LEVEL); 148 irq_set_status_flags(virq, IRQ_LEVEL);
149
150 if (hw < ARMADA_370_XP_MAX_PER_CPU_IRQS) {
151 irq_set_percpu_devid(virq);
152 irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip,
153 handle_percpu_devid_irq);
154
155 } else {
156 irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip,
157 handle_level_irq);
158 }
89 set_irq_flags(virq, IRQF_VALID | IRQF_PROBE); 159 set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
90 160
91 return 0; 161 return 0;
@@ -155,6 +225,15 @@ static int __init armada_370_xp_mpic_of_init(struct device_node *node,
155 225
156#ifdef CONFIG_SMP 226#ifdef CONFIG_SMP
157 armada_xp_mpic_smp_cpu_init(); 227 armada_xp_mpic_smp_cpu_init();
228
229 /*
230 * Set the default affinity from all CPUs to the boot cpu.
231 * This is required since the MPIC doesn't limit several CPUs
232 * from acknowledging the same interrupt.
233 */
234 cpumask_clear(irq_default_affinity);
235 cpumask_set_cpu(smp_processor_id(), irq_default_affinity);
236
158#endif 237#endif
159 238
160 return 0; 239 return 0;
@@ -173,7 +252,7 @@ asmlinkage void __exception_irq_entry armada_370_xp_handle_irq(struct pt_regs
173 if (irqnr > 1022) 252 if (irqnr > 1022)
174 break; 253 break;
175 254
176 if (irqnr >= 8) { 255 if (irqnr > 0) {
177 irqnr = irq_find_mapping(armada_370_xp_mpic_domain, 256 irqnr = irq_find_mapping(armada_370_xp_mpic_domain,
178 irqnr); 257 irqnr);
179 handle_IRQ(irqnr, regs); 258 handle_IRQ(irqnr, regs);