aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/gpio/leds-ns2.txt26
-rw-r--r--arch/arm/boot/dts/Makefile12
-rw-r--r--arch/arm/boot/dts/kirkwood-is2.dts30
-rw-r--r--arch/arm/boot/dts/kirkwood-lsxl.dtsi11
-rw-r--r--arch/arm/boot/dts/kirkwood-mplcec4.dts119
-rw-r--r--arch/arm/boot/dts/kirkwood-ns2-common.dtsi63
-rw-r--r--arch/arm/boot/dts/kirkwood-ns2.dts30
-rw-r--r--arch/arm/boot/dts/kirkwood-ns2lite.dts30
-rw-r--r--arch/arm/boot/dts/kirkwood-ns2max.dts49
-rw-r--r--arch/arm/boot/dts/kirkwood-ns2mini.dts49
-rw-r--r--arch/arm/boot/dts/kirkwood-nsa310.dts144
-rw-r--r--arch/arm/boot/dts/kirkwood-openblocks_a6.dts39
-rw-r--r--arch/arm/boot/dts/kirkwood-topkick.dts85
-rw-r--r--arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts55
-rw-r--r--arch/arm/boot/dts/orion5x.dtsi98
-rw-r--r--arch/arm/configs/dove_defconfig24
-rw-r--r--arch/arm/configs/kirkwood_defconfig9
-rw-r--r--arch/arm/configs/orion5x_defconfig36
-rw-r--r--arch/arm/mach-kirkwood/Kconfig65
-rw-r--r--arch/arm/mach-kirkwood/Makefile9
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c30
-rw-r--r--arch/arm/mach-kirkwood/board-lsxl.c51
-rw-r--r--arch/arm/mach-kirkwood/board-mplcec4.c80
-rw-r--r--arch/arm/mach-kirkwood/board-ns2.c87
-rw-r--r--arch/arm/mach-kirkwood/board-nsa310.c105
-rw-r--r--arch/arm/mach-kirkwood/board-openblocks_a6.c71
-rw-r--r--arch/arm/mach-kirkwood/board-usi_topkick.c82
-rw-r--r--arch/arm/mach-kirkwood/common.c1
-rw-r--r--arch/arm/mach-kirkwood/common.h34
-rw-r--r--arch/arm/mach-orion5x/Kconfig14
-rw-r--r--arch/arm/mach-orion5x/Makefile4
-rw-r--r--arch/arm/mach-orion5x/board-dt.c79
-rw-r--r--arch/arm/mach-orion5x/common.c4
-rw-r--r--arch/arm/mach-orion5x/common.h9
-rw-r--r--arch/arm/mach-orion5x/edmini_v2-setup.c88
-rw-r--r--drivers/leds/Kconfig4
-rw-r--r--drivers/leds/leds-ns2.c78
37 files changed, 1630 insertions, 174 deletions
diff --git a/Documentation/devicetree/bindings/gpio/leds-ns2.txt b/Documentation/devicetree/bindings/gpio/leds-ns2.txt
new file mode 100644
index 000000000000..aef3aca34d2d
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/leds-ns2.txt
@@ -0,0 +1,26 @@
1Binding for dual-GPIO LED found on Network Space v2 (and parents).
2
3Required properties:
4- compatible: "lacie,ns2-leds".
5
6Each LED is represented as a sub-node of the ns2-leds device.
7
8Required sub-node properties:
9- cmd-gpio: Command LED GPIO. See OF device-tree GPIO specification.
10- slow-gpio: Slow LED GPIO. See OF device-tree GPIO specification.
11
12Optional sub-node properties:
13- label: Name for this LED. If omitted, the label is taken from the node name.
14- linux,default-trigger: Trigger assigned to the LED.
15
16Example:
17
18ns2-leds {
19 compatible = "lacie,ns2-leds";
20
21 blue-sata {
22 label = "ns2:blue:sata";
23 slow-gpio = <&gpio0 29 0>;
24 cmd-gpio = <&gpio0 30 0>;
25 };
26};
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index a9d8a10d1ac6..84e554e5eaad 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -36,11 +36,20 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
36 kirkwood-ib62x0.dtb \ 36 kirkwood-ib62x0.dtb \
37 kirkwood-iconnect.dtb \ 37 kirkwood-iconnect.dtb \
38 kirkwood-iomega_ix2_200.dtb \ 38 kirkwood-iomega_ix2_200.dtb \
39 kirkwood-is2.dtb \
39 kirkwood-km_kirkwood.dtb \ 40 kirkwood-km_kirkwood.dtb \
40 kirkwood-lschlv2.dtb \ 41 kirkwood-lschlv2.dtb \
41 kirkwood-lsxhl.dtb \ 42 kirkwood-lsxhl.dtb \
43 kirkwood-mplcec4.dtb \
44 kirkwood-ns2.dtb \
45 kirkwood-ns2lite.dtb \
46 kirkwood-ns2max.dtb \
47 kirkwood-ns2mini.dtb \
48 kirkwood-nsa310.dtb \
49 kirkwood-topkick.dtb \
42 kirkwood-ts219-6281.dtb \ 50 kirkwood-ts219-6281.dtb \
43 kirkwood-ts219-6282.dtb 51 kirkwood-ts219-6282.dtb \
52 kirkwood-openblocks_a6.dtb
44dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ 53dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
45 msm8960-cdp.dtb 54 msm8960-cdp.dtb
46dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ 55dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
@@ -73,6 +82,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
73 omap5-evm.dtb \ 82 omap5-evm.dtb \
74 am335x-evm.dtb \ 83 am335x-evm.dtb \
75 am335x-bone.dtb 84 am335x-bone.dtb
85dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb
76dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb 86dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
77dtb-$(CONFIG_ARCH_U8500) += snowball.dtb 87dtb-$(CONFIG_ARCH_U8500) += snowball.dtb
78dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ 88dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
diff --git a/arch/arm/boot/dts/kirkwood-is2.dts b/arch/arm/boot/dts/kirkwood-is2.dts
new file mode 100644
index 000000000000..0bdce0ad7277
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-is2.dts
@@ -0,0 +1,30 @@
1/dts-v1/;
2
3/include/ "kirkwood-ns2-common.dtsi"
4
5/ {
6 model = "LaCie Internet Space v2";
7 compatible = "lacie,inetspace_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";
8
9 memory {
10 device_type = "memory";
11 reg = <0x00000000 0x8000000>;
12 };
13
14 ocp@f1000000 {
15 sata@80000 {
16 status = "okay";
17 nr-ports = <1>;
18 };
19 };
20
21 ns2-leds {
22 compatible = "lacie,ns2-leds";
23
24 blue-sata {
25 label = "ns2:blue:sata";
26 slow-gpio = <&gpio0 29 0>;
27 cmd-gpio = <&gpio0 30 0>;
28 };
29 };
30};
diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
index 8fea375c734d..798e60eeedf3 100644
--- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi
+++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
@@ -94,4 +94,15 @@
94 gpios = <&gpio1 16 1>; 94 gpios = <&gpio1 16 1>;
95 }; 95 };
96 }; 96 };
97
98 gpio_fan {
99 compatible = "gpio-fan";
100 gpios = <&gpio0 19 1
101 &gpio0 18 1>;
102 gpio-fan,speed-map = <0 3
103 1500 2
104 3250 1
105 5000 0>;
106 alarm-gpios = <&gpio1 8 0>;
107 };
97}; 108};
diff --git a/arch/arm/boot/dts/kirkwood-mplcec4.dts b/arch/arm/boot/dts/kirkwood-mplcec4.dts
new file mode 100644
index 000000000000..ac3c080bed21
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-mplcec4.dts
@@ -0,0 +1,119 @@
1/dts-v1/;
2
3/include/ "kirkwood.dtsi"
4
5/ {
6 model = "MPL CEC4";
7 compatible = "mpl,cec4-10", "mpl,cec4", "marvell,kirkwood-88f6281", "marvell,kirkwood";
8
9 memory {
10 device_type = "memory";
11 reg = <0x00000000 0x20000000>;
12 };
13
14 chosen {
15 bootargs = "console=ttyS0,115200n8 earlyprintk";
16 };
17
18 ocp@f1000000 {
19 i2c@11000 {
20 status = "okay";
21
22 rtc@51 {
23 compatible = "nxp,pcf8563";
24 reg = <0x51>;
25 };
26
27 eeprom@57 {
28 compatible = "atmel,24c02";
29 reg = <0x57>;
30 };
31
32 };
33
34 serial@12000 {
35 clock-frequency = <200000000>;
36 status = "ok";
37 };
38
39 nand@3000000 {
40 status = "okay";
41
42 partition@0 {
43 label = "uboot";
44 reg = <0x0000000 0x100000>;
45 };
46
47 partition@100000 {
48 label = "env";
49 reg = <0x100000 0x80000>;
50 };
51
52 partition@180000 {
53 label = "fdt";
54 reg = <0x180000 0x80000>;
55 };
56
57 partition@200000 {
58 label = "kernel";
59 reg = <0x200000 0x400000>;
60 };
61
62 partition@600000 {
63 label = "rootfs";
64 reg = <0x600000 0x1fa00000>;
65 };
66 };
67
68 rtc@10300 {
69 status = "disabled";
70 };
71
72 sata@80000 {
73 nr-ports = <2>;
74 status = "okay";
75
76 };
77 };
78
79 gpio-leds {
80 compatible = "gpio-leds";
81
82 health {
83 label = "status:green:health";
84 gpios = <&gpio0 7 1>;
85 };
86
87 user1o {
88 label = "user1:orange";
89 gpios = <&gpio1 8 1>;
90 default-state = "on";
91 };
92
93 user1g {
94 label = "user1:green";
95 gpios = <&gpio1 9 1>;
96 default-state = "on";
97 };
98
99 user0o {
100 label = "user0:orange";
101 gpios = <&gpio1 12 1>;
102 default-state = "on";
103 };
104
105 user0g {
106 label = "user0:green";
107 gpios = <&gpio1 13 1>;
108 default-state = "on";
109 };
110
111 misc {
112 label = "status:orange:misc";
113 gpios = <&gpio1 14 1>;
114 default-state = "on";
115 };
116
117 };
118};
119
diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
new file mode 100644
index 000000000000..9bc6785ad228
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
@@ -0,0 +1,63 @@
1/include/ "kirkwood.dtsi"
2
3/ {
4 chosen {
5 bootargs = "console=ttyS0,115200n8";
6 };
7
8 ocp@f1000000 {
9 serial@12000 {
10 clock-frequency = <166666667>;
11 status = "okay";
12 };
13
14 spi@10600 {
15 status = "okay";
16
17 flash@0 {
18 #address-cells = <1>;
19 #size-cells = <1>;
20 compatible = "mx25l4005a";
21 reg = <0>;
22 spi-max-frequency = <20000000>;
23 mode = <0>;
24
25 partition@0 {
26 reg = <0x0 0x80000>;
27 label = "u-boot";
28 };
29 };
30 };
31
32 i2c@11000 {
33 status = "okay";
34
35 eeprom@50 {
36 compatible = "at,24c04";
37 pagesize = <16>;
38 reg = <0x50>;
39 };
40 };
41 };
42
43 gpio_keys {
44 compatible = "gpio-keys";
45 #address-cells = <1>;
46 #size-cells = <0>;
47
48 button@1 {
49 label = "Power push button";
50 linux,code = <116>;
51 gpios = <&gpio1 0 0>;
52 };
53 };
54
55 gpio-leds {
56 compatible = "gpio-leds";
57
58 red-fail {
59 label = "ns2:red:fail";
60 gpios = <&gpio0 12 0>;
61 };
62 };
63};
diff --git a/arch/arm/boot/dts/kirkwood-ns2.dts b/arch/arm/boot/dts/kirkwood-ns2.dts
new file mode 100644
index 000000000000..f2d36ecf36d8
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ns2.dts
@@ -0,0 +1,30 @@
1/dts-v1/;
2
3/include/ "kirkwood-ns2-common.dtsi"
4
5/ {
6 model = "LaCie Network Space v2";
7 compatible = "lacie,netspace_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";
8
9 memory {
10 device_type = "memory";
11 reg = <0x00000000 0x10000000>;
12 };
13
14 ocp@f1000000 {
15 sata@80000 {
16 status = "okay";
17 nr-ports = <1>;
18 };
19 };
20
21 ns2-leds {
22 compatible = "lacie,ns2-leds";
23
24 blue-sata {
25 label = "ns2:blue:sata";
26 slow-gpio = <&gpio0 29 0>;
27 cmd-gpio = <&gpio0 30 0>;
28 };
29 };
30};
diff --git a/arch/arm/boot/dts/kirkwood-ns2lite.dts b/arch/arm/boot/dts/kirkwood-ns2lite.dts
new file mode 100644
index 000000000000..b02eb4ea1bb4
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ns2lite.dts
@@ -0,0 +1,30 @@
1/dts-v1/;
2
3/include/ "kirkwood-ns2-common.dtsi"
4
5/ {
6 model = "LaCie Network Space Lite v2";
7 compatible = "lacie,netspace_lite_v2", "marvell,kirkwood-88f6192", "marvell,kirkwood";
8
9 memory {
10 device_type = "memory";
11 reg = <0x00000000 0x8000000>;
12 };
13
14 ocp@f1000000 {
15 sata@80000 {
16 status = "okay";
17 nr-ports = <1>;
18 };
19 };
20
21 gpio-leds {
22 compatible = "gpio-leds";
23
24 blue-sata {
25 label = "ns2:blue:sata";
26 gpios = <&gpio0 30 1>;
27 linux,default-trigger = "default-on";
28 };
29 };
30};
diff --git a/arch/arm/boot/dts/kirkwood-ns2max.dts b/arch/arm/boot/dts/kirkwood-ns2max.dts
new file mode 100644
index 000000000000..bcec4d6cada7
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ns2max.dts
@@ -0,0 +1,49 @@
1/dts-v1/;
2
3/include/ "kirkwood-ns2-common.dtsi"
4
5/ {
6 model = "LaCie Network Space Max v2";
7 compatible = "lacie,netspace_max_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";
8
9 memory {
10 device_type = "memory";
11 reg = <0x00000000 0x10000000>;
12 };
13
14 ocp@f1000000 {
15 sata@80000 {
16 status = "okay";
17 nr-ports = <2>;
18 };
19 };
20
21 gpio_fan {
22 compatible = "gpio-fan";
23 gpios = <&gpio0 22 1
24 &gpio0 7 1
25 &gpio1 1 1
26 &gpio0 23 1>;
27 gpio-fan,speed-map =
28 < 0 0
29 1500 15
30 1700 14
31 1800 13
32 2100 12
33 3100 11
34 3300 10
35 4300 9
36 5500 8>;
37 alarm-gpios = <&gpio0 25 1>;
38 };
39
40 ns2-leds {
41 compatible = "lacie,ns2-leds";
42
43 blue-sata {
44 label = "ns2:blue:sata";
45 slow-gpio = <&gpio0 29 0>;
46 cmd-gpio = <&gpio0 30 0>;
47 };
48 };
49};
diff --git a/arch/arm/boot/dts/kirkwood-ns2mini.dts b/arch/arm/boot/dts/kirkwood-ns2mini.dts
new file mode 100644
index 000000000000..b79f5eb25589
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ns2mini.dts
@@ -0,0 +1,49 @@
1/dts-v1/;
2
3/include/ "kirkwood-ns2-common.dtsi"
4
5/ {
6 model = "LaCie Network Space Mini v2";
7 compatible = "lacie,netspace_mini_v2", "marvell,kirkwood-88f6192", "marvell,kirkwood";
8
9 memory {
10 device_type = "memory";
11 reg = <0x00000000 0x8000000>;
12 };
13
14 ocp@f1000000 {
15 sata@80000 {
16 status = "okay";
17 nr-ports = <1>;
18 };
19 };
20
21 gpio_fan {
22 compatible = "gpio-fan";
23 gpios = <&gpio0 22 1
24 &gpio0 7 1
25 &gpio1 1 1
26 &gpio0 23 1>;
27 gpio-fan,speed-map =
28 < 0 0
29 3000 15
30 3180 14
31 4140 13
32 4570 12
33 6760 11
34 7140 10
35 7980 9
36 9200 8>;
37 alarm-gpios = <&gpio0 25 1>;
38 };
39
40 ns2-leds {
41 compatible = "lacie,ns2-leds";
42
43 blue-sata {
44 label = "ns2:blue:sata";
45 slow-gpio = <&gpio0 29 0>;
46 cmd-gpio = <&gpio0 30 0>;
47 };
48 };
49};
diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts
new file mode 100644
index 000000000000..5509f9659546
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-nsa310.dts
@@ -0,0 +1,144 @@
1/dts-v1/;
2
3/include/ "kirkwood.dtsi"
4
5/ {
6 model = "ZyXEL NSA310";
7 compatible = "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood";
8
9 memory {
10 device_type = "memory";
11 reg = <0x00000000 0x10000000>;
12 };
13
14 chosen {
15 bootargs = "console=ttyS0,115200";
16 };
17
18 ocp@f1000000 {
19
20 serial@12000 {
21 clock-frequency = <200000000>;
22 status = "ok";
23 };
24
25 sata@80000 {
26 status = "okay";
27 nr-ports = <2>;
28 };
29
30 i2c@11000 {
31 status = "okay";
32 };
33
34 nand@3000000 {
35 status = "okay";
36 chip-delay = <35>;
37
38 partition@0 {
39 label = "uboot";
40 reg = <0x0000000 0x0100000>;
41 read-only;
42 };
43 partition@100000 {
44 label = "uboot_env";
45 reg = <0x0100000 0x0080000>;
46 };
47 partition@180000 {
48 label = "key_store";
49 reg = <0x0180000 0x0080000>;
50 };
51 partition@200000 {
52 label = "info";
53 reg = <0x0200000 0x0080000>;
54 };
55 partition@280000 {
56 label = "etc";
57 reg = <0x0280000 0x0a00000>;
58 };
59 partition@c80000 {
60 label = "kernel_1";
61 reg = <0x0c80000 0x0a00000>;
62 };
63 partition@1680000 {
64 label = "rootfs1";
65 reg = <0x1680000 0x2fc0000>;
66 };
67 partition@4640000 {
68 label = "kernel_2";
69 reg = <0x4640000 0x0a00000>;
70 };
71 partition@5040000 {
72 label = "rootfs2";
73 reg = <0x5040000 0x2fc0000>;
74 };
75 };
76 };
77
78 gpio_keys {
79 compatible = "gpio-keys";
80 #address-cells = <1>;
81 #size-cells = <0>;
82
83 button@1 {
84 label = "Power Button";
85 linux,code = <116>;
86 gpios = <&gpio1 14 0>;
87 };
88 button@2 {
89 label = "Copy Button";
90 linux,code = <133>;
91 gpios = <&gpio1 5 1>;
92 };
93 button@3 {
94 label = "Reset Button";
95 linux,code = <0x198>;
96 gpios = <&gpio1 4 1>;
97 };
98 };
99
100 gpio-leds {
101 compatible = "gpio-leds";
102
103 green-sys {
104 label = "nsa310:green:sys";
105 gpios = <&gpio0 28 0>;
106 };
107 red-sys {
108 label = "nsa310:red:sys";
109 gpios = <&gpio0 29 0>;
110 };
111 green-hdd {
112 label = "nsa310:green:hdd";
113 gpios = <&gpio1 9 0>;
114 };
115 red-hdd {
116 label = "nsa310:red:hdd";
117 gpios = <&gpio1 10 0>;
118 };
119 green-esata {
120 label = "nsa310:green:esata";
121 gpios = <&gpio0 12 0>;
122 };
123 red-esata {
124 label = "nsa310:red:esata";
125 gpios = <&gpio0 13 0>;
126 };
127 green-usb {
128 label = "nsa310:green:usb";
129 gpios = <&gpio0 15 0>;
130 };
131 red-usb {
132 label = "nsa310:red:usb";
133 gpios = <&gpio0 16 0>;
134 };
135 green-copy {
136 label = "nsa310:green:copy";
137 gpios = <&gpio1 7 0>;
138 };
139 red-copy {
140 label = "nsa310:red:copy";
141 gpios = <&gpio1 8 0>;
142 };
143 };
144};
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
new file mode 100644
index 000000000000..9a2606c8b78f
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
@@ -0,0 +1,39 @@
1/dts-v1/;
2
3/include/ "kirkwood.dtsi"
4
5/ {
6 model = "Plat'Home OpenBlocksA6";
7 compatible = "plathome,openblocks-a6", "marvell,kirkwood-88f6283", "marvell,kirkwood";
8
9 memory {
10 device_type = "memory";
11 reg = <0x00000000 0x20000000>;
12 };
13
14 chosen {
15 bootargs = "console=ttyS0,115200n8 earlyprintk";
16 };
17
18 ocp@f1000000 {
19 serial@12000 {
20 clock-frequency = <200000000>;
21 status = "ok";
22 };
23
24 serial@12100 {
25 clock-frequency = <200000000>;
26 status = "ok";
27 };
28
29 nand@3000000 {
30 chip-delay = <25>;
31 status = "okay";
32 };
33
34 sata@80000 {
35 nr-ports = <1>;
36 status = "okay";
37 };
38 };
39};
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts
new file mode 100644
index 000000000000..c0de5a7f660d
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-topkick.dts
@@ -0,0 +1,85 @@
1/dts-v1/;
2
3/include/ "kirkwood.dtsi"
4
5/ {
6 model = "Univeral Scientific Industrial Co. Topkick-1281P2";
7 compatible = "usi,topkick-1281P2", "usi,topkick", "marvell,kirkwood-88f6282", "marvell,kirkwood";
8
9 memory {
10 device_type = "memory";
11 reg = <0x00000000 0x10000000>;
12 };
13
14 chosen {
15 bootargs = "console=ttyS0,115200n8 earlyprintk";
16 };
17
18 ocp@f1000000 {
19 serial@12000 {
20 clock-frequency = <200000000>;
21 status = "ok";
22 };
23
24 nand@3000000 {
25 status = "okay";
26
27 partition@0 {
28 label = "u-boot";
29 reg = <0x0000000 0x180000>;
30 };
31
32 partition@180000 {
33 label = "u-boot env";
34 reg = <0x0180000 0x20000>;
35 };
36
37 partition@200000 {
38 label = "uImage";
39 reg = <0x0200000 0x600000>;
40 };
41
42 partition@800000 {
43 label = "uInitrd";
44 reg = <0x0800000 0x1000000>;
45 };
46
47 partition@1800000 {
48 label = "rootfs";
49 reg = <0x1800000 0xe800000>;
50 };
51 };
52
53 sata@80000 {
54 status = "okay";
55 nr-ports = <1>;
56 };
57 };
58
59 gpio-leds {
60 compatible = "gpio-leds";
61
62 disk {
63 label = "topkick:yellow:disk";
64 gpios = <&gpio0 21 1>;
65 linux,default-trigger = "ide-disk";
66 };
67 system2 {
68 label = "topkick:red:system";
69 gpios = <&gpio1 5 1>;
70 };
71 system {
72 label = "topkick:blue:system";
73 gpios = <&gpio1 6 1>;
74 default-state = "on";
75 };
76 wifi {
77 label = "topkick:green:wifi";
78 gpios = <&gpio1 7 1>;
79 };
80 wifi2 {
81 label = "topkick:yellow:wifi";
82 gpios = <&gpio1 16 1>;
83 };
84 };
85};
diff --git a/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts b/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts
new file mode 100644
index 000000000000..5a3a58b7e18f
--- /dev/null
+++ b/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts
@@ -0,0 +1,55 @@
1/*
2 * Copyright (C) 2012 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9/dts-v1/;
10/include/ "orion5x.dtsi"
11
12/ {
13 model = "LaCie Ethernet Disk mini V2";
14 compatible = "lacie,ethernet-disk-mini-v2", "marvell-orion5x-88f5182", "marvell,orion5x";
15
16 memory {
17 reg = <0x00000000 0x4000000>; /* 64 MB */
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200n8 earlyprintk";
22 };
23
24 ocp@f1000000 {
25 serial@12000 {
26 clock-frequency = <166666667>;
27 status = "okay";
28 };
29
30 sata@80000 {
31 status = "okay";
32 nr-ports = <2>;
33 };
34 };
35
36 gpio_keys {
37 compatible = "gpio-keys";
38 #address-cells = <1>;
39 #size-cells = <0>;
40 button@1 {
41 label = "Power-on Switch";
42 linux,code = <116>; /* KEY_POWER */
43 gpios = <&gpio0 18 0>;
44 };
45 };
46
47 gpio_leds {
48 compatible = "gpio-leds";
49
50 led@1 {
51 label = "power:blue";
52 gpios = <&gpio0 16 1>;
53 };
54 };
55};
diff --git a/arch/arm/boot/dts/orion5x.dtsi b/arch/arm/boot/dts/orion5x.dtsi
new file mode 100644
index 000000000000..8aad00f81ed9
--- /dev/null
+++ b/arch/arm/boot/dts/orion5x.dtsi
@@ -0,0 +1,98 @@
1/*
2 * Copyright (C) 2012 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9/include/ "skeleton.dtsi"
10
11/ {
12 model = "Marvell Orion5x SoC";
13 compatible = "marvell,orion5x";
14 interrupt-parent = <&intc>;
15
16 intc: interrupt-controller {
17 compatible = "marvell,orion-intc", "marvell,intc";
18 interrupt-controller;
19 #interrupt-cells = <1>;
20 reg = <0xf1020204 0x04>;
21 };
22
23 ocp@f1000000 {
24 compatible = "simple-bus";
25 ranges = <0x00000000 0xf1000000 0x4000000
26 0xf2200000 0xf2200000 0x0000800>;
27 #address-cells = <1>;
28 #size-cells = <1>;
29
30 gpio0: gpio@10100 {
31 compatible = "marvell,orion-gpio";
32 #gpio-cells = <2>;
33 gpio-controller;
34 reg = <0x10100 0x40>;
35 ngpio = <32>;
36 interrupts = <6>, <7>, <8>, <9>;
37 };
38
39 serial@12000 {
40 compatible = "ns16550a";
41 reg = <0x12000 0x100>;
42 reg-shift = <2>;
43 interrupts = <3>;
44 /* set clock-frequency in board dts */
45 status = "disabled";
46 };
47
48 serial@12100 {
49 compatible = "ns16550a";
50 reg = <0x12100 0x100>;
51 reg-shift = <2>;
52 interrupts = <4>;
53 /* set clock-frequency in board dts */
54 status = "disabled";
55 };
56
57 spi@10600 {
58 compatible = "marvell,orion-spi";
59 #address-cells = <1>;
60 #size-cells = <0>;
61 cell-index = <0>;
62 reg = <0x10600 0x28>;
63 status = "disabled";
64 };
65
66 wdt@20300 {
67 compatible = "marvell,orion-wdt";
68 reg = <0x20300 0x28>;
69 status = "okay";
70 };
71
72 sata@80000 {
73 compatible = "marvell,orion-sata";
74 reg = <0x80000 0x5000>;
75 interrupts = <29>;
76 status = "disabled";
77 };
78
79 i2c@11000 {
80 compatible = "marvell,mv64xxx-i2c";
81 reg = <0x11000 0x20>;
82 #address-cells = <1>;
83 #size-cells = <0>;
84 interrupts = <5>;
85 clock-frequency = <100000>;
86 status = "disabled";
87 };
88
89 crypto@90000 {
90 compatible = "marvell,orion-crypto";
91 reg = <0x90000 0x10000>,
92 <0xf2200000 0x800>;
93 reg-names = "regs", "sram";
94 interrupts = <22>;
95 status = "okay";
96 };
97 };
98};
diff --git a/arch/arm/configs/dove_defconfig b/arch/arm/configs/dove_defconfig
index 40db34cf2771..0b7ee92c5713 100644
--- a/arch/arm/configs/dove_defconfig
+++ b/arch/arm/configs/dove_defconfig
@@ -8,11 +8,19 @@ CONFIG_MODULE_UNLOAD=y
8# CONFIG_BLK_DEV_BSG is not set 8# CONFIG_BLK_DEV_BSG is not set
9CONFIG_ARCH_DOVE=y 9CONFIG_ARCH_DOVE=y
10CONFIG_MACH_DOVE_DB=y 10CONFIG_MACH_DOVE_DB=y
11CONFIG_MACH_CM_A510=y
12CONFIG_MACH_DOVE_DT=y
11CONFIG_NO_HZ=y 13CONFIG_NO_HZ=y
12CONFIG_HIGH_RES_TIMERS=y 14CONFIG_HIGH_RES_TIMERS=y
13CONFIG_AEABI=y 15CONFIG_AEABI=y
14CONFIG_ZBOOT_ROM_TEXT=0x0 16CONFIG_ZBOOT_ROM_TEXT=0x0
15CONFIG_ZBOOT_ROM_BSS=0x0 17CONFIG_ZBOOT_ROM_BSS=0x0
18CONFIG_HIGHMEM=y
19CONFIG_USE_OF=y
20CONFIG_ATAGS=y
21CONFIG_ARM_APPENDED_DTB=y
22CONFIG_ARM_ATAG_DTB_COMPAT=y
23CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
16CONFIG_VFP=y 24CONFIG_VFP=y
17CONFIG_NET=y 25CONFIG_NET=y
18CONFIG_PACKET=y 26CONFIG_PACKET=y
@@ -62,6 +70,9 @@ CONFIG_SERIAL_8250=y
62CONFIG_SERIAL_8250_CONSOLE=y 70CONFIG_SERIAL_8250_CONSOLE=y
63# CONFIG_SERIAL_8250_PCI is not set 71# CONFIG_SERIAL_8250_PCI is not set
64CONFIG_SERIAL_8250_RUNTIME_UARTS=2 72CONFIG_SERIAL_8250_RUNTIME_UARTS=2
73CONFIG_SERIAL_CORE=y
74CONFIG_SERIAL_CORE_CONSOLE=y
75CONFIG_SERIAL_OF_PLATFORM=y
65# CONFIG_HW_RANDOM is not set 76# CONFIG_HW_RANDOM is not set
66CONFIG_I2C=y 77CONFIG_I2C=y
67CONFIG_I2C_CHARDEV=y 78CONFIG_I2C_CHARDEV=y
@@ -74,6 +85,18 @@ CONFIG_USB_DEVICEFS=y
74CONFIG_USB_EHCI_HCD=y 85CONFIG_USB_EHCI_HCD=y
75CONFIG_USB_EHCI_ROOT_HUB_TT=y 86CONFIG_USB_EHCI_ROOT_HUB_TT=y
76CONFIG_USB_STORAGE=y 87CONFIG_USB_STORAGE=y
88CONFIG_MMC=y
89CONFIG_MMC_SDHCI=y
90CONFIG_MMC_SDHCI_IO_ACCESSORS=y
91CONFIG_MMC_SDHCI_PLTFM=y
92CONFIG_MMC_SDHCI_DOVE=y
93CONFIG_NEW_LEDS=y
94CONFIG_LEDS_CLASS=y
95CONFIG_LEDS_GPIO=y
96CONFIG_LEDS_TRIGGERS=y
97CONFIG_LEDS_TRIGGER_TIMER=y
98CONFIG_LEDS_TRIGGER_HEARTBEAT=y
99CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
77CONFIG_RTC_CLASS=y 100CONFIG_RTC_CLASS=y
78CONFIG_RTC_DRV_MV=y 101CONFIG_RTC_DRV_MV=y
79CONFIG_DMADEVICES=y 102CONFIG_DMADEVICES=y
@@ -122,6 +145,7 @@ CONFIG_CRYPTO_TWOFISH=y
122CONFIG_CRYPTO_DEFLATE=y 145CONFIG_CRYPTO_DEFLATE=y
123CONFIG_CRYPTO_LZO=y 146CONFIG_CRYPTO_LZO=y
124# CONFIG_CRYPTO_ANSI_CPRNG is not set 147# CONFIG_CRYPTO_ANSI_CPRNG is not set
148CONFIG_CRYPTO_DEV_MV_CESA=y
125CONFIG_CRC_CCITT=y 149CONFIG_CRC_CCITT=y
126CONFIG_CRC16=y 150CONFIG_CRC16=y
127CONFIG_LIBCRC32C=y 151CONFIG_LIBCRC32C=y
diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig
index 74eee0c78f28..93f3794ba5cb 100644
--- a/arch/arm/configs/kirkwood_defconfig
+++ b/arch/arm/configs/kirkwood_defconfig
@@ -27,6 +27,14 @@ CONFIG_MACH_GOFLEXNET_DT=y
27CONFIG_MACH_LSXL_DT=y 27CONFIG_MACH_LSXL_DT=y
28CONFIG_MACH_IOMEGA_IX2_200_DT=y 28CONFIG_MACH_IOMEGA_IX2_200_DT=y
29CONFIG_MACH_KM_KIRKWOOD_DT=y 29CONFIG_MACH_KM_KIRKWOOD_DT=y
30CONFIG_MACH_INETSPACE_V2_DT=y
31CONFIG_MACH_MPLCEC4_DT=y
32CONFIG_MACH_NETSPACE_V2_DT=y
33CONFIG_MACH_NETSPACE_MAX_V2_DT=y
34CONFIG_MACH_NETSPACE_LITE_V2_DT=y
35CONFIG_MACH_NETSPACE_MINI_V2_DT=y
36CONFIG_MACH_OPENBLOCKS_A6_DT=y
37CONFIG_MACH_TOPKICK_DT=y
30CONFIG_MACH_TS219=y 38CONFIG_MACH_TS219=y
31CONFIG_MACH_TS41X=y 39CONFIG_MACH_TS41X=y
32CONFIG_MACH_DOCKSTAR=y 40CONFIG_MACH_DOCKSTAR=y
@@ -40,6 +48,7 @@ CONFIG_MACH_D2NET_V2=y
40CONFIG_MACH_NET2BIG_V2=y 48CONFIG_MACH_NET2BIG_V2=y
41CONFIG_MACH_NET5BIG_V2=y 49CONFIG_MACH_NET5BIG_V2=y
42CONFIG_MACH_T5325=y 50CONFIG_MACH_T5325=y
51CONFIG_MACH_NSA310_DT=y
43# CONFIG_CPU_FEROCEON_OLD_ID is not set 52# CONFIG_CPU_FEROCEON_OLD_ID is not set
44CONFIG_PREEMPT=y 53CONFIG_PREEMPT=y
45CONFIG_AEABI=y 54CONFIG_AEABI=y
diff --git a/arch/arm/configs/orion5x_defconfig b/arch/arm/configs/orion5x_defconfig
index cd5e6ba9a54d..952430d9e2d9 100644
--- a/arch/arm/configs/orion5x_defconfig
+++ b/arch/arm/configs/orion5x_defconfig
@@ -1,7 +1,8 @@
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_SYSFS_DEPRECATED_V2=y
5CONFIG_EXPERT=y 6CONFIG_EXPERT=y
6# CONFIG_SLUB_DEBUG is not set 7# CONFIG_SLUB_DEBUG is not set
7CONFIG_PROFILING=y 8CONFIG_PROFILING=y
@@ -10,6 +11,8 @@ CONFIG_KPROBES=y
10CONFIG_MODULES=y 11CONFIG_MODULES=y
11CONFIG_MODULE_UNLOAD=y 12CONFIG_MODULE_UNLOAD=y
12# CONFIG_BLK_DEV_BSG is not set 13# CONFIG_BLK_DEV_BSG is not set
14CONFIG_PARTITION_ADVANCED=y
15CONFIG_BSD_DISKLABEL=y
13CONFIG_ARCH_ORION5X=y 16CONFIG_ARCH_ORION5X=y
14CONFIG_MACH_DB88F5281=y 17CONFIG_MACH_DB88F5281=y
15CONFIG_MACH_RD88F5182=y 18CONFIG_MACH_RD88F5182=y
@@ -24,7 +27,7 @@ CONFIG_MACH_TS409=y
24CONFIG_MACH_WRT350N_V2=y 27CONFIG_MACH_WRT350N_V2=y
25CONFIG_MACH_TS78XX=y 28CONFIG_MACH_TS78XX=y
26CONFIG_MACH_MV2120=y 29CONFIG_MACH_MV2120=y
27CONFIG_MACH_EDMINI_V2=y 30CONFIG_MACH_EDMINI_V2_DT=y
28CONFIG_MACH_D2NET=y 31CONFIG_MACH_D2NET=y
29CONFIG_MACH_BIGDISK=y 32CONFIG_MACH_BIGDISK=y
30CONFIG_MACH_NET2BIG=y 33CONFIG_MACH_NET2BIG=y
@@ -33,17 +36,13 @@ CONFIG_MACH_WNR854T=y
33CONFIG_MACH_RD88F5181L_GE=y 36CONFIG_MACH_RD88F5181L_GE=y
34CONFIG_MACH_RD88F5181L_FXO=y 37CONFIG_MACH_RD88F5181L_FXO=y
35CONFIG_MACH_RD88F6183AP_GE=y 38CONFIG_MACH_RD88F6183AP_GE=y
36CONFIG_NO_HZ=y
37CONFIG_HIGH_RES_TIMERS=y
38CONFIG_PREEMPT=y 39CONFIG_PREEMPT=y
39CONFIG_AEABI=y 40CONFIG_AEABI=y
40CONFIG_LEDS=y
41CONFIG_LEDS_CPU=y
42CONFIG_ZBOOT_ROM_TEXT=0x0 41CONFIG_ZBOOT_ROM_TEXT=0x0
43CONFIG_ZBOOT_ROM_BSS=0x0 42CONFIG_ZBOOT_ROM_BSS=0x0
43CONFIG_ARM_APPENDED_DTB=y
44CONFIG_FPE_NWFPE=y 44CONFIG_FPE_NWFPE=y
45CONFIG_VFP=y 45CONFIG_VFP=y
46# CONFIG_SUSPEND is not set
47CONFIG_NET=y 46CONFIG_NET=y
48CONFIG_PACKET=y 47CONFIG_PACKET=y
49CONFIG_UNIX=y 48CONFIG_UNIX=y
@@ -54,13 +53,10 @@ CONFIG_IP_PNP_DHCP=y
54CONFIG_IP_PNP_BOOTP=y 53CONFIG_IP_PNP_BOOTP=y
55# CONFIG_IPV6 is not set 54# CONFIG_IPV6 is not set
56CONFIG_NET_DSA=y 55CONFIG_NET_DSA=y
57CONFIG_NET_DSA_MV88E6131=y
58CONFIG_NET_DSA_MV88E6123_61_65=y
59CONFIG_NET_PKTGEN=m 56CONFIG_NET_PKTGEN=m
60CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 57CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
61# CONFIG_FIRMWARE_IN_KERNEL is not set 58# CONFIG_FIRMWARE_IN_KERNEL is not set
62CONFIG_MTD=y 59CONFIG_MTD=y
63CONFIG_MTD_PARTITIONS=y
64CONFIG_MTD_CMDLINE_PARTS=y 60CONFIG_MTD_CMDLINE_PARTS=y
65CONFIG_MTD_CHAR=y 61CONFIG_MTD_CHAR=y
66CONFIG_MTD_BLOCK=y 62CONFIG_MTD_BLOCK=y
@@ -82,12 +78,11 @@ CONFIG_CHR_DEV_SG=m
82CONFIG_ATA=y 78CONFIG_ATA=y
83CONFIG_SATA_MV=y 79CONFIG_SATA_MV=y
84CONFIG_NETDEVICES=y 80CONFIG_NETDEVICES=y
85CONFIG_MARVELL_PHY=y
86CONFIG_NET_ETHERNET=y
87CONFIG_MII=y 81CONFIG_MII=y
88CONFIG_NET_PCI=y 82CONFIG_NET_DSA_MV88E6131=y
83CONFIG_NET_DSA_MV88E6123_61_65=y
89CONFIG_MV643XX_ETH=y 84CONFIG_MV643XX_ETH=y
90# CONFIG_NETDEV_10000 is not set 85CONFIG_MARVELL_PHY=y
91# CONFIG_INPUT_MOUSEDEV is not set 86# CONFIG_INPUT_MOUSEDEV is not set
92CONFIG_INPUT_EVDEV=y 87CONFIG_INPUT_EVDEV=y
93# CONFIG_KEYBOARD_ATKBD is not set 88# CONFIG_KEYBOARD_ATKBD is not set
@@ -95,11 +90,12 @@ CONFIG_KEYBOARD_GPIO=y
95# CONFIG_INPUT_MOUSE is not set 90# CONFIG_INPUT_MOUSE is not set
96# CONFIG_SERIO is not set 91# CONFIG_SERIO is not set
97# CONFIG_VT is not set 92# CONFIG_VT is not set
93CONFIG_LEGACY_PTY_COUNT=16
98CONFIG_SERIAL_8250=y 94CONFIG_SERIAL_8250=y
99CONFIG_SERIAL_8250_CONSOLE=y 95CONFIG_SERIAL_8250_CONSOLE=y
100# CONFIG_SERIAL_8250_PCI is not set 96# CONFIG_SERIAL_8250_PCI is not set
101CONFIG_SERIAL_8250_RUNTIME_UARTS=2 97CONFIG_SERIAL_8250_RUNTIME_UARTS=2
102CONFIG_LEGACY_PTY_COUNT=16 98CONFIG_SERIAL_OF_PLATFORM=y
103CONFIG_HW_RANDOM_TIMERIOMEM=m 99CONFIG_HW_RANDOM_TIMERIOMEM=m
104CONFIG_I2C=y 100CONFIG_I2C=y
105# CONFIG_I2C_COMPAT is not set 101# CONFIG_I2C_COMPAT is not set
@@ -109,10 +105,8 @@ CONFIG_GPIO_SYSFS=y
109CONFIG_SENSORS_LM75=y 105CONFIG_SENSORS_LM75=y
110# CONFIG_VGA_ARB is not set 106# CONFIG_VGA_ARB is not set
111CONFIG_USB=y 107CONFIG_USB=y
112CONFIG_USB_DEVICEFS=y
113CONFIG_USB_EHCI_HCD=y 108CONFIG_USB_EHCI_HCD=y
114CONFIG_USB_EHCI_ROOT_HUB_TT=y 109CONFIG_USB_EHCI_ROOT_HUB_TT=y
115CONFIG_USB_EHCI_TT_NEWSCHED=y
116CONFIG_USB_PRINTER=y 110CONFIG_USB_PRINTER=y
117CONFIG_USB_STORAGE=y 111CONFIG_USB_STORAGE=y
118CONFIG_USB_STORAGE_DATAFAB=y 112CONFIG_USB_STORAGE_DATAFAB=y
@@ -140,7 +134,6 @@ CONFIG_EXT2_FS=y
140CONFIG_EXT3_FS=y 134CONFIG_EXT3_FS=y
141# CONFIG_EXT3_FS_XATTR is not set 135# CONFIG_EXT3_FS_XATTR is not set
142CONFIG_EXT4_FS=m 136CONFIG_EXT4_FS=m
143CONFIG_INOTIFY=y
144CONFIG_ISO9660_FS=m 137CONFIG_ISO9660_FS=m
145CONFIG_JOLIET=y 138CONFIG_JOLIET=y
146CONFIG_UDF_FS=m 139CONFIG_UDF_FS=m
@@ -150,25 +143,18 @@ CONFIG_TMPFS=y
150CONFIG_JFFS2_FS=y 143CONFIG_JFFS2_FS=y
151CONFIG_CRAMFS=y 144CONFIG_CRAMFS=y
152CONFIG_NFS_FS=y 145CONFIG_NFS_FS=y
153CONFIG_NFS_V3=y
154CONFIG_ROOT_NFS=y 146CONFIG_ROOT_NFS=y
155CONFIG_PARTITION_ADVANCED=y
156CONFIG_BSD_DISKLABEL=y
157CONFIG_NLS_CODEPAGE_437=y 147CONFIG_NLS_CODEPAGE_437=y
158CONFIG_NLS_CODEPAGE_850=y 148CONFIG_NLS_CODEPAGE_850=y
159CONFIG_NLS_ISO8859_1=y 149CONFIG_NLS_ISO8859_1=y
160CONFIG_NLS_ISO8859_2=y 150CONFIG_NLS_ISO8859_2=y
161CONFIG_MAGIC_SYSRQ=y 151CONFIG_MAGIC_SYSRQ=y
162CONFIG_DEBUG_FS=y 152CONFIG_DEBUG_FS=y
163CONFIG_DEBUG_KERNEL=y
164# CONFIG_DEBUG_BUGVERBOSE is not set 153# CONFIG_DEBUG_BUGVERBOSE is not set
165CONFIG_DEBUG_INFO=y 154CONFIG_DEBUG_INFO=y
166# CONFIG_RCU_CPU_STALL_DETECTOR is not set
167CONFIG_LATENCYTOP=y 155CONFIG_LATENCYTOP=y
168CONFIG_SYSCTL_SYSCALL_CHECK=y
169# CONFIG_FTRACE is not set 156# CONFIG_FTRACE is not set
170CONFIG_DEBUG_USER=y 157CONFIG_DEBUG_USER=y
171CONFIG_DEBUG_ERRORS=y
172CONFIG_DEBUG_LL=y 158CONFIG_DEBUG_LL=y
173CONFIG_CRYPTO_CBC=m 159CONFIG_CRYPTO_CBC=m
174CONFIG_CRYPTO_ECB=m 160CONFIG_CRYPTO_ECB=m
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 50bca5032b7e..d018ad4bcc3c 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -130,6 +130,63 @@ config MACH_KM_KIRKWOOD_DT
130 Say 'Y' here if you want your kernel to support the 130 Say 'Y' here if you want your kernel to support the
131 Keymile Kirkwood Reference Desgin, using Flattened Device Tree. 131 Keymile Kirkwood Reference Desgin, using Flattened Device Tree.
132 132
133config MACH_INETSPACE_V2_DT
134 bool "LaCie Internet Space v2 NAS (Flattened Device Tree)"
135 select ARCH_KIRKWOOD_DT
136 help
137 Say 'Y' here if you want your kernel to support the LaCie
138 Internet Space v2 NAS, using Flattened Device Tree.
139
140config MACH_MPLCEC4_DT
141 bool "MPL CEC4 (Flattened Device Tree)"
142 select ARCH_KIRKWOOD_DT
143 help
144 Say 'Y' here if you want your kernel to support the
145 MPL CEC4 (Flattened Device Tree).
146
147config MACH_NETSPACE_V2_DT
148 bool "LaCie Network Space v2 NAS (Flattened Device Tree)"
149 select ARCH_KIRKWOOD_DT
150 help
151 Say 'Y' here if you want your kernel to support the LaCie
152 Network Space v2 NAS, using Flattened Device Tree.
153
154config MACH_NETSPACE_MAX_V2_DT
155 bool "LaCie Network Space Max v2 NAS (Flattened Device Tree)"
156 select ARCH_KIRKWOOD_DT
157 help
158 Say 'Y' here if you want your kernel to support the LaCie
159 Network Space Max v2 NAS, using Flattened Device Tree.
160
161config MACH_NETSPACE_LITE_V2_DT
162 bool "LaCie Network Space Lite v2 NAS (Flattened Device Tree)"
163 select ARCH_KIRKWOOD_DT
164 help
165 Say 'Y' here if you want your kernel to support the LaCie
166 Network Space Lite v2 NAS, using Flattened Device Tree.
167
168config MACH_NETSPACE_MINI_V2_DT
169 bool "LaCie Network Space Mini v2 NAS (Flattened Device Tree)"
170 select ARCH_KIRKWOOD_DT
171 help
172 Say 'Y' here if you want your kernel to support the LaCie
173 Network Space Mini v2 NAS (aka SafeBox), using Flattened
174 Device Tree.
175
176config MACH_OPENBLOCKS_A6_DT
177 bool "Plat'Home OpenBlocks A6 (Flattened Device Tree)"
178 select ARCH_KIRKWOOD_DT
179 help
180 Say 'Y' here if you want your kernel to support the
181 Plat'Home OpenBlocks A6 (Flattened Device Tree).
182
183config MACH_TOPKICK_DT
184 bool "USI Topkick (Flattened Device Tree)"
185 select ARCH_KIRKWOOD_DT
186 help
187 Say 'Y' here if you want your kernel to support the
188 USI Topkick, using Flattened Device Tree
189
133config MACH_TS219 190config MACH_TS219
134 bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" 191 bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
135 help 192 help
@@ -216,6 +273,14 @@ config MACH_T5325
216 Say 'Y' here if you want your kernel to support the 273 Say 'Y' here if you want your kernel to support the
217 HP t5325 Thin Client. 274 HP t5325 Thin Client.
218 275
276config MACH_NSA310_DT
277 bool "ZyXEL NSA-310 (Flattened Device Tree)"
278 select ARCH_KIRKWOOD_DT
279 select ARM_ATAG_DTB_COMPAT
280 help
281 Say 'Y' here if you want your kernel to support the
282 ZyXEL NSA-310 board (Flattened Device Tree).
283
219endmenu 284endmenu
220 285
221endif 286endif
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index 294779f892d9..8d2e5a96247c 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -31,3 +31,12 @@ obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o
31obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o 31obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o
32obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o 32obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o
33obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o 33obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o
34obj-$(CONFIG_MACH_INETSPACE_V2_DT) += board-ns2.o
35obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.o
36obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o
37obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o
38obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o
39obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o
40obj-$(CONFIG_MACH_NSA310_DT) += board-nsa310.o
41obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT) += board-openblocks_a6.o
42obj-$(CONFIG_MACH_TOPKICK_DT) += board-usi_topkick.o
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index d94872fed8c0..70eb01d96085 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -30,6 +30,8 @@ struct of_dev_auxdata kirkwood_auxdata_lookup[] __initdata = {
30 OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL), 30 OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL),
31 OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0", 31 OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0",
32 NULL), 32 NULL),
33 OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011100, "mv64xxx_i2c.1",
34 NULL),
33 OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL), 35 OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL),
34 OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL), 36 OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL),
35 OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL), 37 OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL),
@@ -94,6 +96,25 @@ static void __init kirkwood_dt_init(void)
94 if (of_machine_is_compatible("keymile,km_kirkwood")) 96 if (of_machine_is_compatible("keymile,km_kirkwood"))
95 km_kirkwood_init(); 97 km_kirkwood_init();
96 98
99 if (of_machine_is_compatible("lacie,inetspace_v2") ||
100 of_machine_is_compatible("lacie,netspace_v2") ||
101 of_machine_is_compatible("lacie,netspace_max_v2") ||
102 of_machine_is_compatible("lacie,netspace_lite_v2") ||
103 of_machine_is_compatible("lacie,netspace_mini_v2"))
104 ns2_init();
105
106 if (of_machine_is_compatible("mpl,cec4"))
107 mplcec4_init();
108
109 if (of_machine_is_compatible("plathome,openblocks-a6"))
110 openblocks_a6_init();
111
112 if (of_machine_is_compatible("usi,topkick"))
113 usi_topkick_init();
114
115 if (of_machine_is_compatible("zyxel,nsa310"))
116 nsa310_init();
117
97 of_platform_populate(NULL, kirkwood_dt_match_table, 118 of_platform_populate(NULL, kirkwood_dt_match_table,
98 kirkwood_auxdata_lookup, NULL); 119 kirkwood_auxdata_lookup, NULL);
99} 120}
@@ -110,6 +131,15 @@ static const char *kirkwood_dt_board_compat[] = {
110 "buffalo,lsxl", 131 "buffalo,lsxl",
111 "iom,ix2-200", 132 "iom,ix2-200",
112 "keymile,km_kirkwood", 133 "keymile,km_kirkwood",
134 "lacie,inetspace_v2",
135 "lacie,netspace_max_v2",
136 "lacie,netspace_v2",
137 "lacie,netspace_lite_v2",
138 "lacie,netspace_mini_v2",
139 "mpl,cec4",
140 "plathome,openblocks-a6",
141 "usi,topkick",
142 "zyxel,nsa310",
113 NULL 143 NULL
114}; 144};
115 145
diff --git a/arch/arm/mach-kirkwood/board-lsxl.c b/arch/arm/mach-kirkwood/board-lsxl.c
index 83d8975592f8..a29b8bff103d 100644
--- a/arch/arm/mach-kirkwood/board-lsxl.c
+++ b/arch/arm/mach-kirkwood/board-lsxl.c
@@ -20,11 +20,6 @@
20#include <linux/spi/spi.h> 20#include <linux/spi/spi.h>
21#include <linux/mv643xx_eth.h> 21#include <linux/mv643xx_eth.h>
22#include <linux/gpio.h> 22#include <linux/gpio.h>
23#include <linux/gpio-fan.h>
24#include <linux/input.h>
25#include <asm/mach-types.h>
26#include <asm/mach/arch.h>
27#include <mach/kirkwood.h>
28#include "common.h" 23#include "common.h"
29#include "mpp.h" 24#include "mpp.h"
30 25
@@ -53,51 +48,6 @@ static unsigned int lsxl_mpp_config[] __initdata = {
53 0 48 0
54}; 49};
55 50
56#define LSXL_GPIO_FAN_HIGH 18
57#define LSXL_GPIO_FAN_LOW 19
58#define LSXL_GPIO_FAN_LOCK 40
59
60static struct gpio_fan_alarm lsxl_alarm = {
61 .gpio = LSXL_GPIO_FAN_LOCK,
62};
63
64static struct gpio_fan_speed lsxl_speeds[] = {
65 {
66 .rpm = 0,
67 .ctrl_val = 3,
68 }, {
69 .rpm = 1500,
70 .ctrl_val = 1,
71 }, {
72 .rpm = 3250,
73 .ctrl_val = 2,
74 }, {
75 .rpm = 5000,
76 .ctrl_val = 0,
77 }
78};
79
80static int lsxl_gpio_list[] = {
81 LSXL_GPIO_FAN_HIGH, LSXL_GPIO_FAN_LOW,
82};
83
84static struct gpio_fan_platform_data lsxl_fan_data = {
85 .num_ctrl = ARRAY_SIZE(lsxl_gpio_list),
86 .ctrl = lsxl_gpio_list,
87 .alarm = &lsxl_alarm,
88 .num_speed = ARRAY_SIZE(lsxl_speeds),
89 .speed = lsxl_speeds,
90};
91
92static struct platform_device lsxl_fan_device = {
93 .name = "gpio-fan",
94 .id = -1,
95 .num_resources = 0,
96 .dev = {
97 .platform_data = &lsxl_fan_data,
98 },
99};
100
101/* 51/*
102 * On the LS-XHL/LS-CHLv2, the shutdown process is following: 52 * On the LS-XHL/LS-CHLv2, the shutdown process is following:
103 * - Userland monitors key events until the power switch goes to off position 53 * - Userland monitors key events until the power switch goes to off position
@@ -128,7 +78,6 @@ void __init lsxl_init(void)
128 kirkwood_ehci_init(); 78 kirkwood_ehci_init();
129 kirkwood_ge00_init(&lsxl_ge00_data); 79 kirkwood_ge00_init(&lsxl_ge00_data);
130 kirkwood_ge01_init(&lsxl_ge01_data); 80 kirkwood_ge01_init(&lsxl_ge01_data);
131 platform_device_register(&lsxl_fan_device);
132 81
133 /* register power-off method */ 82 /* register power-off method */
134 pm_power_off = lsxl_power_off; 83 pm_power_off = lsxl_power_off;
diff --git a/arch/arm/mach-kirkwood/board-mplcec4.c b/arch/arm/mach-kirkwood/board-mplcec4.c
new file mode 100644
index 000000000000..e78a227468e6
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-mplcec4.c
@@ -0,0 +1,80 @@
1/*
2 * Copyright (C) 2012 MPL AG, Switzerland
3 * Stefan Peter <s.peter@mpl.ch>
4 *
5 * arch/arm/mach-kirkwood/board-mplcec4.c
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/platform_data/mmc-mvsdio.h>
16#include "common.h"
17#include "mpp.h"
18
19static struct mv643xx_eth_platform_data mplcec4_ge00_data = {
20 .phy_addr = MV643XX_ETH_PHY_ADDR(1),
21};
22
23static struct mv643xx_eth_platform_data mplcec4_ge01_data = {
24 .phy_addr = MV643XX_ETH_PHY_ADDR(2),
25};
26
27static unsigned int mplcec4_mpp_config[] __initdata = {
28 MPP0_NF_IO2,
29 MPP1_NF_IO3,
30 MPP2_NF_IO4,
31 MPP3_NF_IO5,
32 MPP4_NF_IO6,
33 MPP5_NF_IO7,
34 MPP6_SYSRST_OUTn,
35 MPP7_GPO, /* Status LED Green High Active */
36 MPP10_UART0_TXD,
37 MPP11_UART0_RXD,
38 MPP12_SD_CLK,
39 MPP13_SD_CMD, /* Alt UART1_TXD */
40 MPP14_SD_D0, /* Alt UART1_RXD */
41 MPP15_SD_D1,
42 MPP16_SD_D2,
43 MPP17_SD_D3,
44 MPP18_NF_IO0,
45 MPP19_NF_IO1,
46 MPP28_GPIO, /* Input SYS_POR_DET (active High) */
47 MPP29_GPIO, /* Input SYS_RTC_INT (active High) */
48 MPP34_SATA1_ACTn,
49 MPP35_SATA0_ACTn,
50 MPP40_GPIO, /* LED User1 orange */
51 MPP41_GPIO, /* LED User1 green */
52 MPP44_GPIO, /* LED User0 orange */
53 MPP45_GPIO, /* LED User0 green */
54 MPP46_GPIO, /* Status LED Yellow High Active */
55 MPP47_GPIO, /* SD_CD# (in/IRQ)*/
56 0
57};
58
59
60static struct mvsdio_platform_data mplcec4_mvsdio_data = {
61 .gpio_card_detect = 47, /* MPP47 used as SD card detect */
62};
63
64
65
66void __init mplcec4_init(void)
67{
68 /*
69 * Basic setup. Needs to be called early.
70 */
71 kirkwood_mpp_conf(mplcec4_mpp_config);
72 kirkwood_ehci_init();
73 kirkwood_ge00_init(&mplcec4_ge00_data);
74 kirkwood_ge01_init(&mplcec4_ge01_data);
75 kirkwood_sdio_init(&mplcec4_mvsdio_data);
76 kirkwood_pcie_init(KW_PCIE0);
77}
78
79
80
diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c
new file mode 100644
index 000000000000..78596c4f76d2
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-ns2.c
@@ -0,0 +1,87 @@
1/*
2 * Copyright 2012 (C), Simon Guinot <simon.guinot@sequanux.org>
3 *
4 * arch/arm/mach-kirkwood/board-ns2.c
5 *
6 * LaCie Network Space v2 board (and parents) initialization for drivers
7 * not converted to flattened device tree yet.
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#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/platform_device.h>
17#include <linux/mv643xx_eth.h>
18#include <linux/gpio.h>
19#include <linux/of.h>
20#include "common.h"
21#include "mpp.h"
22
23static struct mv643xx_eth_platform_data ns2_ge00_data = {
24 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
25};
26
27static unsigned int ns2_mpp_config[] __initdata = {
28 MPP0_SPI_SCn,
29 MPP1_SPI_MOSI,
30 MPP2_SPI_SCK,
31 MPP3_SPI_MISO,
32 MPP4_NF_IO6,
33 MPP5_NF_IO7,
34 MPP6_SYSRST_OUTn,
35 MPP7_GPO, /* Fan speed (bit 1) */
36 MPP8_TW0_SDA,
37 MPP9_TW0_SCK,
38 MPP10_UART0_TXD,
39 MPP11_UART0_RXD,
40 MPP12_GPO, /* Red led */
41 MPP14_GPIO, /* USB fuse */
42 MPP16_GPIO, /* SATA 0 power */
43 MPP17_GPIO, /* SATA 1 power */
44 MPP18_NF_IO0,
45 MPP19_NF_IO1,
46 MPP20_SATA1_ACTn,
47 MPP21_SATA0_ACTn,
48 MPP22_GPIO, /* Fan speed (bit 0) */
49 MPP23_GPIO, /* Fan power */
50 MPP24_GPIO, /* USB mode select */
51 MPP25_GPIO, /* Fan rotation fail */
52 MPP26_GPIO, /* USB device vbus */
53 MPP28_GPIO, /* USB enable host vbus */
54 MPP29_GPIO, /* Blue led (slow register) */
55 MPP30_GPIO, /* Blue led (command register) */
56 MPP31_GPIO, /* Board power off */
57 MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */
58 MPP33_GPO, /* Fan speed (bit 2) */
59 0
60};
61
62#define NS2_GPIO_POWER_OFF 31
63
64static void ns2_power_off(void)
65{
66 gpio_set_value(NS2_GPIO_POWER_OFF, 1);
67}
68
69void __init ns2_init(void)
70{
71 /*
72 * Basic setup. Needs to be called early.
73 */
74 kirkwood_mpp_conf(ns2_mpp_config);
75
76 kirkwood_ehci_init();
77 if (of_machine_is_compatible("lacie,netspace_lite_v2") ||
78 of_machine_is_compatible("lacie,netspace_mini_v2"))
79 ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
80 kirkwood_ge00_init(&ns2_ge00_data);
81
82 if (gpio_request(NS2_GPIO_POWER_OFF, "power-off") == 0 &&
83 gpio_direction_output(NS2_GPIO_POWER_OFF, 0) == 0)
84 pm_power_off = ns2_power_off;
85 else
86 pr_err("ns2: failed to configure power-off GPIO\n");
87}
diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c
new file mode 100644
index 000000000000..027ce83f3fe5
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-nsa310.c
@@ -0,0 +1,105 @@
1/*
2 * arch/arm/mach-kirkwood/nsa-310-setup.c
3 *
4 * ZyXEL NSA-310 Setup
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/kernel.h>
12#include <linux/init.h>
13#include <linux/i2c.h>
14#include <linux/gpio.h>
15
16#include <asm/mach-types.h>
17#include <asm/mach/arch.h>
18#include <mach/kirkwood.h>
19#include "common.h"
20#include "mpp.h"
21
22#define NSA310_GPIO_USB_POWER_OFF 21
23#define NSA310_GPIO_POWER_OFF 48
24
25static unsigned int nsa310_mpp_config[] __initdata = {
26 MPP12_GPIO, /* led esata green */
27 MPP13_GPIO, /* led esata red */
28 MPP15_GPIO, /* led usb green */
29 MPP16_GPIO, /* led usb red */
30 MPP21_GPIO, /* control usb power off */
31 MPP28_GPIO, /* led sys green */
32 MPP29_GPIO, /* led sys red */
33 MPP36_GPIO, /* key reset */
34 MPP37_GPIO, /* key copy */
35 MPP39_GPIO, /* led copy green */
36 MPP40_GPIO, /* led copy red */
37 MPP41_GPIO, /* led hdd green */
38 MPP42_GPIO, /* led hdd red */
39 MPP44_GPIO, /* ?? */
40 MPP46_GPIO, /* key power */
41 MPP48_GPIO, /* control power off */
42 0
43};
44
45static struct i2c_board_info __initdata nsa310_i2c_info[] = {
46 { I2C_BOARD_INFO("adt7476", 0x2e) },
47};
48
49static void nsa310_power_off(void)
50{
51 gpio_set_value(NSA310_GPIO_POWER_OFF, 1);
52}
53
54static int __init nsa310_gpio_request(unsigned int gpio, unsigned long flags,
55 const char *label)
56{
57 int err;
58
59 err = gpio_request_one(gpio, flags, label);
60 if (err)
61 pr_err("NSA-310: can't setup GPIO%u (%s), err=%d\n",
62 gpio, label, err);
63
64 return err;
65}
66
67static void __init nsa310_gpio_init(void)
68{
69 int err;
70
71 err = nsa310_gpio_request(NSA310_GPIO_POWER_OFF, GPIOF_OUT_INIT_LOW,
72 "Power Off");
73 if (!err)
74 pm_power_off = nsa310_power_off;
75
76 nsa310_gpio_request(NSA310_GPIO_USB_POWER_OFF, GPIOF_OUT_INIT_LOW,
77 "USB Power Off");
78}
79
80void __init nsa310_init(void)
81{
82 u32 dev, rev;
83
84 kirkwood_mpp_conf(nsa310_mpp_config);
85
86 nsa310_gpio_init();
87
88 /* this can be removed once the mainline kirkwood.dtsi gets
89 * the ehci configuration by default */
90 kirkwood_ehci_init();
91
92 kirkwood_pcie_id(&dev, &rev);
93
94 i2c_register_board_info(0, ARRAY_AND_SIZE(nsa310_i2c_info));
95}
96
97static int __init nsa310_pci_init(void)
98{
99 if (of_machine_is_compatible("zyxel,nsa310"))
100 kirkwood_pcie_init(KW_PCIE0);
101
102 return 0;
103}
104
105subsys_initcall(nsa310_pci_init);
diff --git a/arch/arm/mach-kirkwood/board-openblocks_a6.c b/arch/arm/mach-kirkwood/board-openblocks_a6.c
new file mode 100644
index 000000000000..e807e8cfdd44
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-openblocks_a6.c
@@ -0,0 +1,71 @@
1/*
2 * Copyright 2012 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
3 *
4 * arch/arm/mach-kirkwood/board-openblocks_a6.c
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/kernel.h>
12#include <linux/init.h>
13#include <linux/mv643xx_eth.h>
14#include <linux/clk.h>
15#include <linux/clk-private.h>
16#include "common.h"
17#include "mpp.h"
18
19static struct mv643xx_eth_platform_data openblocks_ge00_data = {
20 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
21};
22
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: Yellow */
59 MPP43_GPIO, /* LED: Green */
60 0,
61};
62
63void __init openblocks_a6_init(void)
64{
65 /*
66 * Basic setup. Needs to be called early.
67 */
68 kirkwood_mpp_conf(openblocks_a6_mpp_config);
69 kirkwood_ehci_init();
70 kirkwood_ge00_init(&openblocks_ge00_data);
71}
diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c
new file mode 100644
index 000000000000..e2ec9d891fe3
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-usi_topkick.c
@@ -0,0 +1,82 @@
1/*
2 * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net>
3 *
4 * arch/arm/mach-kirkwood/board-usi_topkick.c
5 *
6 * USI Topkick Init for drivers not converted to flattened device tree yet.
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/mv643xx_eth.h>
16#include <linux/gpio.h>
17#include <linux/platform_data/mmc-mvsdio.h>
18#include "common.h"
19#include "mpp.h"
20
21static struct mv643xx_eth_platform_data topkick_ge00_data = {
22 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
23};
24
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
67#define TOPKICK_SATA0_PWR_ENABLE 36
68
69void __init usi_topkick_init(void)
70{
71 /*
72 * Basic setup. Needs to be called early.
73 */
74 kirkwood_mpp_conf(topkick_mpp_config);
75
76 /* SATA0 power enable */
77 gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1);
78
79 kirkwood_ehci_init();
80 kirkwood_ge00_init(&topkick_ge00_data);
81 kirkwood_sdio_init(&topkick_mvsdio_data);
82}
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 2c6c218fb79e..906c22eca4e9 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -266,6 +266,7 @@ void __init kirkwood_clk_init(void)
266 orion_clkdev_add("1", "pcie", pex1); 266 orion_clkdev_add("1", "pcie", pex1);
267 orion_clkdev_add(NULL, "kirkwood-i2s", audio); 267 orion_clkdev_add(NULL, "kirkwood-i2s", audio);
268 orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".0", runit); 268 orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".0", runit);
269 orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".1", runit);
269 270
270 /* Marvell says runit is used by SPI, UART, NAND, TWSI, ..., 271 /* Marvell says runit is used by SPI, UART, NAND, TWSI, ...,
271 * so should never be gated. 272 * so should never be gated.
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index bcffd7ca1ca2..3e079d1d99d0 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -112,6 +112,40 @@ void km_kirkwood_init(void);
112static inline void km_kirkwood_init(void) {}; 112static inline void km_kirkwood_init(void) {};
113#endif 113#endif
114 114
115#ifdef CONFIG_MACH_MPLCEC4_DT
116void mplcec4_init(void);
117#else
118static inline void mplcec4_init(void) {};
119#endif
120
121#if defined(CONFIG_MACH_INETSPACE_V2_DT) || \
122 defined(CONFIG_MACH_NETSPACE_V2_DT) || \
123 defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \
124 defined(CONFIG_MACH_NETSPACE_LITE_V2_DT) || \
125 defined(CONFIG_MACH_NETSPACE_MINI_V2_DT)
126void ns2_init(void);
127#else
128static inline void ns2_init(void) {};
129#endif
130
131#ifdef CONFIG_MACH_NSA310_DT
132void nsa310_init(void);
133#else
134static inline void nsa310_init(void) {};
135#endif
136
137#ifdef CONFIG_MACH_OPENBLOCKS_A6_DT
138void openblocks_a6_init(void);
139#else
140static inline void openblocks_a6_init(void) {};
141#endif
142
143#ifdef CONFIG_MACH_TOPKICK_DT
144void usi_topkick_init(void);
145#else
146static inline void usi_topkick_init(void) {};
147#endif
148
115/* early init functions not converted to fdt yet */ 149/* early init functions not converted to fdt yet */
116char *kirkwood_id(void); 150char *kirkwood_id(void);
117void kirkwood_l2_init(void); 151void kirkwood_l2_init(void);
diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig
index 0673f0c10432..2cb2f06c20f5 100644
--- a/arch/arm/mach-orion5x/Kconfig
+++ b/arch/arm/mach-orion5x/Kconfig
@@ -2,6 +2,13 @@ if ARCH_ORION5X
2 2
3menu "Orion Implementations" 3menu "Orion Implementations"
4 4
5config ARCH_ORION5X_DT
6 bool "Marvell Orion5x Flattened Device Tree"
7 select USE_OF
8 help
9 Say 'Y' here if you want your kernel to support the
10 Marvell Orion5x using flattened device tree.
11
5config MACH_DB88F5281 12config MACH_DB88F5281
6 bool "Marvell Orion-2 Development Board" 13 bool "Marvell Orion-2 Development Board"
7 select I2C_BOARDINFO 14 select I2C_BOARDINFO
@@ -96,12 +103,13 @@ config MACH_MV2120
96 Say 'Y' here if you want your kernel to support the 103 Say 'Y' here if you want your kernel to support the
97 HP Media Vault mv2120 or mv5100. 104 HP Media Vault mv2120 or mv5100.
98 105
99config MACH_EDMINI_V2 106config MACH_EDMINI_V2_DT
100 bool "LaCie Ethernet Disk mini V2" 107 bool "LaCie Ethernet Disk mini V2 (Flattened Device Tree)"
101 select I2C_BOARDINFO 108 select I2C_BOARDINFO
109 select ARCH_ORION5X_DT
102 help 110 help
103 Say 'Y' here if you want your kernel to support the 111 Say 'Y' here if you want your kernel to support the
104 LaCie Ethernet Disk mini V2. 112 LaCie Ethernet Disk mini V2 (Flattened Device Tree).
105 113
106config MACH_D2NET 114config MACH_D2NET
107 bool "LaCie d2 Network" 115 bool "LaCie d2 Network"
diff --git a/arch/arm/mach-orion5x/Makefile b/arch/arm/mach-orion5x/Makefile
index 7f18cdacd487..9e809a7c05c0 100644
--- a/arch/arm/mach-orion5x/Makefile
+++ b/arch/arm/mach-orion5x/Makefile
@@ -12,7 +12,6 @@ obj-$(CONFIG_MACH_TS409) += ts409-setup.o tsx09-common.o
12obj-$(CONFIG_MACH_WRT350N_V2) += wrt350n-v2-setup.o 12obj-$(CONFIG_MACH_WRT350N_V2) += wrt350n-v2-setup.o
13obj-$(CONFIG_MACH_TS78XX) += ts78xx-setup.o 13obj-$(CONFIG_MACH_TS78XX) += ts78xx-setup.o
14obj-$(CONFIG_MACH_MV2120) += mv2120-setup.o 14obj-$(CONFIG_MACH_MV2120) += mv2120-setup.o
15obj-$(CONFIG_MACH_EDMINI_V2) += edmini_v2-setup.o
16obj-$(CONFIG_MACH_D2NET) += d2net-setup.o 15obj-$(CONFIG_MACH_D2NET) += d2net-setup.o
17obj-$(CONFIG_MACH_BIGDISK) += d2net-setup.o 16obj-$(CONFIG_MACH_BIGDISK) += d2net-setup.o
18obj-$(CONFIG_MACH_NET2BIG) += net2big-setup.o 17obj-$(CONFIG_MACH_NET2BIG) += net2big-setup.o
@@ -22,3 +21,6 @@ obj-$(CONFIG_MACH_RD88F5181L_GE) += rd88f5181l-ge-setup.o
22obj-$(CONFIG_MACH_RD88F5181L_FXO) += rd88f5181l-fxo-setup.o 21obj-$(CONFIG_MACH_RD88F5181L_FXO) += rd88f5181l-fxo-setup.o
23obj-$(CONFIG_MACH_RD88F6183AP_GE) += rd88f6183ap-ge-setup.o 22obj-$(CONFIG_MACH_RD88F6183AP_GE) += rd88f6183ap-ge-setup.o
24obj-$(CONFIG_MACH_LINKSTATION_LSCHL) += ls-chl-setup.o 23obj-$(CONFIG_MACH_LINKSTATION_LSCHL) += ls-chl-setup.o
24
25obj-$(CONFIG_ARCH_ORION5X_DT) += board-dt.o
26obj-$(CONFIG_MACH_EDMINI_V2_DT) += edmini_v2-setup.o
diff --git a/arch/arm/mach-orion5x/board-dt.c b/arch/arm/mach-orion5x/board-dt.c
new file mode 100644
index 000000000000..32e5c211a89b
--- /dev/null
+++ b/arch/arm/mach-orion5x/board-dt.c
@@ -0,0 +1,79 @@
1/*
2 * Copyright 2012 (C), Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 *
4 * arch/arm/mach-orion5x/board-dt.c
5 *
6 * Flattened Device Tree board initialization
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/of.h>
16#include <linux/of_platform.h>
17#include <asm/system_misc.h>
18#include <asm/mach/arch.h>
19#include <mach/orion5x.h>
20#include <plat/irq.h>
21#include "common.h"
22
23struct of_dev_auxdata orion5x_auxdata_lookup[] __initdata = {
24 OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL),
25 OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0",
26 NULL),
27 OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL),
28 OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL),
29 OF_DEV_AUXDATA("marvell,orion-crypto", 0xf1090000, "mv_crypto", NULL),
30 {},
31};
32
33static void __init orion5x_dt_init(void)
34{
35 char *dev_name;
36 u32 dev, rev;
37
38 orion5x_id(&dev, &rev, &dev_name);
39 printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk);
40
41 /*
42 * Setup Orion address map
43 */
44 orion5x_setup_cpu_mbus_bridge();
45
46 /* Setup root of clk tree */
47 clk_init();
48
49 /*
50 * Don't issue "Wait for Interrupt" instruction if we are
51 * running on D0 5281 silicon.
52 */
53 if (dev == MV88F5281_DEV_ID && rev == MV88F5281_REV_D0) {
54 printk(KERN_INFO "Orion: Applying 5281 D0 WFI workaround.\n");
55 disable_hlt();
56 }
57
58 if (of_machine_is_compatible("lacie,ethernet-disk-mini-v2"))
59 edmini_v2_init();
60
61 of_platform_populate(NULL, of_default_bus_match_table,
62 orion5x_auxdata_lookup, NULL);
63}
64
65static const char *orion5x_dt_compat[] = {
66 "marvell,orion5x",
67 NULL,
68};
69
70DT_MACHINE_START(ORION5X_DT, "Marvell Orion5x (Flattened Device Tree)")
71 /* Maintainer: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> */
72 .map_io = orion5x_map_io,
73 .init_early = orion5x_init_early,
74 .init_irq = orion_dt_init_irq,
75 .timer = &orion5x_timer,
76 .init_machine = orion5x_dt_init,
77 .restart = orion5x_restart,
78 .dt_compat = orion5x_dt_compat,
79MACHINE_END
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index b3eb3da01160..550f92320afb 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -65,7 +65,7 @@ void __init orion5x_map_io(void)
65 ****************************************************************************/ 65 ****************************************************************************/
66static struct clk *tclk; 66static struct clk *tclk;
67 67
68static void __init clk_init(void) 68void __init clk_init(void)
69{ 69{
70 tclk = clk_register_fixed_rate(NULL, "tclk", NULL, CLK_IS_ROOT, 70 tclk = clk_register_fixed_rate(NULL, "tclk", NULL, CLK_IS_ROOT,
71 orion5x_tclk); 71 orion5x_tclk);
@@ -236,7 +236,7 @@ struct sys_timer orion5x_timer = {
236/* 236/*
237 * Identify device ID and rev from PCIe configuration header space '0'. 237 * Identify device ID and rev from PCIe configuration header space '0'.
238 */ 238 */
239static void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name) 239void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name)
240{ 240{
241 orion5x_pcie_id(dev, rev); 241 orion5x_pcie_id(dev, rev);
242 242
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h
index 31bab92ce038..7db5cdd9c4b7 100644
--- a/arch/arm/mach-orion5x/common.h
+++ b/arch/arm/mach-orion5x/common.h
@@ -12,6 +12,8 @@ void orion5x_map_io(void);
12void orion5x_init_early(void); 12void orion5x_init_early(void);
13void orion5x_init_irq(void); 13void orion5x_init_irq(void);
14void orion5x_init(void); 14void orion5x_init(void);
15void orion5x_id(u32 *dev, u32 *rev, char **dev_name);
16void clk_init(void);
15extern int orion5x_tclk; 17extern int orion5x_tclk;
16extern struct sys_timer orion5x_timer; 18extern struct sys_timer orion5x_timer;
17 19
@@ -54,6 +56,13 @@ int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys);
54struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); 56struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys);
55int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); 57int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
56 58
59/* board init functions for boards not fully converted to fdt */
60#ifdef CONFIG_MACH_EDMINI_V2_DT
61void edmini_v2_init(void);
62#else
63static inline void edmini_v2_init(void) {};
64#endif
65
57struct meminfo; 66struct meminfo;
58struct tag; 67struct tag;
59extern void __init tag_fixup_mem32(struct tag *, char **, struct meminfo *); 68extern void __init tag_fixup_mem32(struct tag *, char **, struct meminfo *);
diff --git a/arch/arm/mach-orion5x/edmini_v2-setup.c b/arch/arm/mach-orion5x/edmini_v2-setup.c
index 355e962137c7..d675e727803d 100644
--- a/arch/arm/mach-orion5x/edmini_v2-setup.c
+++ b/arch/arm/mach-orion5x/edmini_v2-setup.c
@@ -115,69 +115,6 @@ static struct i2c_board_info __initdata edmini_v2_i2c_rtc = {
115}; 115};
116 116
117/***************************************************************************** 117/*****************************************************************************
118 * Sata
119 ****************************************************************************/
120
121static struct mv_sata_platform_data edmini_v2_sata_data = {
122 .n_ports = 2,
123};
124
125/*****************************************************************************
126 * GPIO LED (simple - doesn't use hardware blinking support)
127 ****************************************************************************/
128
129#define EDMINI_V2_GPIO_LED_POWER 16
130
131static struct gpio_led edmini_v2_leds[] = {
132 {
133 .name = "power:blue",
134 .gpio = EDMINI_V2_GPIO_LED_POWER,
135 .active_low = 1,
136 },
137};
138
139static struct gpio_led_platform_data edmini_v2_led_data = {
140 .num_leds = ARRAY_SIZE(edmini_v2_leds),
141 .leds = edmini_v2_leds,
142};
143
144static struct platform_device edmini_v2_gpio_leds = {
145 .name = "leds-gpio",
146 .id = -1,
147 .dev = {
148 .platform_data = &edmini_v2_led_data,
149 },
150};
151
152/****************************************************************************
153 * GPIO key
154 ****************************************************************************/
155
156#define EDMINI_V2_GPIO_KEY_POWER 18
157
158static struct gpio_keys_button edmini_v2_buttons[] = {
159 {
160 .code = KEY_POWER,
161 .gpio = EDMINI_V2_GPIO_KEY_POWER,
162 .desc = "Power Button",
163 .active_low = 0,
164 },
165};
166
167static struct gpio_keys_platform_data edmini_v2_button_data = {
168 .buttons = edmini_v2_buttons,
169 .nbuttons = ARRAY_SIZE(edmini_v2_buttons),
170};
171
172static struct platform_device edmini_v2_gpio_buttons = {
173 .name = "gpio-keys",
174 .id = -1,
175 .dev = {
176 .platform_data = &edmini_v2_button_data,
177 },
178};
179
180/*****************************************************************************
181 * General Setup 118 * General Setup
182 ****************************************************************************/ 119 ****************************************************************************/
183static unsigned int edminiv2_mpp_modes[] __initdata = { 120static unsigned int edminiv2_mpp_modes[] __initdata = {
@@ -207,13 +144,8 @@ static unsigned int edminiv2_mpp_modes[] __initdata = {
207 0, 144 0,
208}; 145};
209 146
210static void __init edmini_v2_init(void) 147void __init edmini_v2_init(void)
211{ 148{
212 /*
213 * Setup basic Orion functions. Need to be called early.
214 */
215 orion5x_init();
216
217 orion5x_mpp_conf(edminiv2_mpp_modes); 149 orion5x_mpp_conf(edminiv2_mpp_modes);
218 150
219 /* 151 /*
@@ -221,15 +153,10 @@ static void __init edmini_v2_init(void)
221 */ 153 */
222 orion5x_ehci0_init(); 154 orion5x_ehci0_init();
223 orion5x_eth_init(&edmini_v2_eth_data); 155 orion5x_eth_init(&edmini_v2_eth_data);
224 orion5x_i2c_init();
225 orion5x_sata_init(&edmini_v2_sata_data);
226 orion5x_uart0_init();
227 156
228 orion5x_setup_dev_boot_win(EDMINI_V2_NOR_BOOT_BASE, 157 orion5x_setup_dev_boot_win(EDMINI_V2_NOR_BOOT_BASE,
229 EDMINI_V2_NOR_BOOT_SIZE); 158 EDMINI_V2_NOR_BOOT_SIZE);
230 platform_device_register(&edmini_v2_nor_flash); 159 platform_device_register(&edmini_v2_nor_flash);
231 platform_device_register(&edmini_v2_gpio_leds);
232 platform_device_register(&edmini_v2_gpio_buttons);
233 160
234 pr_notice("edmini_v2: USB device port, flash write and power-off " 161 pr_notice("edmini_v2: USB device port, flash write and power-off "
235 "are not yet supported.\n"); 162 "are not yet supported.\n");
@@ -247,16 +174,3 @@ static void __init edmini_v2_init(void)
247 174
248 i2c_register_board_info(0, &edmini_v2_i2c_rtc, 1); 175 i2c_register_board_info(0, &edmini_v2_i2c_rtc, 1);
249} 176}
250
251/* Warning: LaCie use a wrong mach-type (0x20e=526) in their bootloader. */
252MACHINE_START(EDMINI_V2, "LaCie Ethernet Disk mini V2")
253 /* Maintainer: Christopher Moore <moore@free.fr> */
254 .atag_offset = 0x100,
255 .init_machine = edmini_v2_init,
256 .map_io = orion5x_map_io,
257 .init_early = orion5x_init_early,
258 .init_irq = orion5x_init_irq,
259 .timer = &orion5x_timer,
260 .fixup = tag_fixup_mem32,
261 .restart = orion5x_restart,
262MACHINE_END
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index f508defc0d96..b58bc8a14b9c 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -379,7 +379,9 @@ config LEDS_NS2
379 tristate "LED support for Network Space v2 GPIO LEDs" 379 tristate "LED support for Network Space v2 GPIO LEDs"
380 depends on LEDS_CLASS 380 depends on LEDS_CLASS
381 depends on MACH_NETSPACE_V2 || MACH_INETSPACE_V2 || \ 381 depends on MACH_NETSPACE_V2 || MACH_INETSPACE_V2 || \
382 MACH_NETSPACE_MAX_V2 || MACH_D2NET_V2 382 MACH_NETSPACE_MAX_V2 || MACH_D2NET_V2 || \
383 MACH_NETSPACE_V2_DT || MACH_INETSPACE_V2_DT || \
384 MACH_NETSPACE_MAX_V2_DT || MACH_NETSPACE_MINI_V2_DT
383 default y 385 default y
384 help 386 help
385 This option enable support for the dual-GPIO LED found on the 387 This option enable support for the dual-GPIO LED found on the
diff --git a/drivers/leds/leds-ns2.c b/drivers/leds/leds-ns2.c
index d176ec83f5d9..d64cc2227fd9 100644
--- a/drivers/leds/leds-ns2.c
+++ b/drivers/leds/leds-ns2.c
@@ -30,6 +30,7 @@
30#include <linux/leds.h> 30#include <linux/leds.h>
31#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/platform_data/leds-kirkwood-ns2.h> 32#include <linux/platform_data/leds-kirkwood-ns2.h>
33#include <linux/of_gpio.h>
33 34
34/* 35/*
35 * The Network Space v2 dual-GPIO LED is wired to a CPLD and can blink in 36 * The Network Space v2 dual-GPIO LED is wired to a CPLD and can blink in
@@ -263,6 +264,62 @@ static void delete_ns2_led(struct ns2_led_data *led_dat)
263 gpio_free(led_dat->slow); 264 gpio_free(led_dat->slow);
264} 265}
265 266
267#ifdef CONFIG_OF_GPIO
268/*
269 * Translate OpenFirmware node properties into platform_data.
270 */
271static int __devinit
272ns2_leds_get_of_pdata(struct device *dev, struct ns2_led_platform_data *pdata)
273{
274 struct device_node *np = dev->of_node;
275 struct device_node *child;
276 struct ns2_led *leds;
277 int num_leds = 0;
278 int i = 0;
279
280 num_leds = of_get_child_count(np);
281 if (!num_leds)
282 return -ENODEV;
283
284 leds = devm_kzalloc(dev, num_leds * sizeof(struct ns2_led),
285 GFP_KERNEL);
286 if (!leds)
287 return -ENOMEM;
288
289 for_each_child_of_node(np, child) {
290 const char *string;
291 int ret;
292
293 ret = of_get_named_gpio(child, "cmd-gpio", 0);
294 if (ret < 0)
295 return ret;
296 leds[i].cmd = ret;
297 ret = of_get_named_gpio(child, "slow-gpio", 0);
298 if (ret < 0)
299 return ret;
300 leds[i].slow = ret;
301 ret = of_property_read_string(child, "label", &string);
302 leds[i].name = (ret == 0) ? string : child->name;
303 ret = of_property_read_string(child, "linux,default-trigger",
304 &string);
305 if (ret == 0)
306 leds[i].default_trigger = string;
307
308 i++;
309 }
310
311 pdata->leds = leds;
312 pdata->num_leds = num_leds;
313
314 return 0;
315}
316
317static const struct of_device_id of_ns2_leds_match[] = {
318 { .compatible = "lacie,ns2-leds", },
319 {},
320};
321#endif /* CONFIG_OF_GPIO */
322
266static int __devinit ns2_led_probe(struct platform_device *pdev) 323static int __devinit ns2_led_probe(struct platform_device *pdev)
267{ 324{
268 struct ns2_led_platform_data *pdata = pdev->dev.platform_data; 325 struct ns2_led_platform_data *pdata = pdev->dev.platform_data;
@@ -270,11 +327,25 @@ static int __devinit ns2_led_probe(struct platform_device *pdev)
270 int i; 327 int i;
271 int ret; 328 int ret;
272 329
330#ifdef CONFIG_OF_GPIO
331 if (!pdata) {
332 pdata = devm_kzalloc(&pdev->dev,
333 sizeof(struct ns2_led_platform_data),
334 GFP_KERNEL);
335 if (!pdata)
336 return -ENOMEM;
337
338 ret = ns2_leds_get_of_pdata(&pdev->dev, pdata);
339 if (ret)
340 return ret;
341 }
342#else
273 if (!pdata) 343 if (!pdata)
274 return -EINVAL; 344 return -EINVAL;
345#endif /* CONFIG_OF_GPIO */
275 346
276 leds_data = devm_kzalloc(&pdev->dev, sizeof(struct ns2_led_data) * 347 leds_data = devm_kzalloc(&pdev->dev, sizeof(struct ns2_led_data) *
277 pdata->num_leds, GFP_KERNEL); 348 pdata->num_leds, GFP_KERNEL);
278 if (!leds_data) 349 if (!leds_data)
279 return -ENOMEM; 350 return -ENOMEM;
280 351
@@ -312,8 +383,9 @@ static struct platform_driver ns2_led_driver = {
312 .probe = ns2_led_probe, 383 .probe = ns2_led_probe,
313 .remove = __devexit_p(ns2_led_remove), 384 .remove = __devexit_p(ns2_led_remove),
314 .driver = { 385 .driver = {
315 .name = "leds-ns2", 386 .name = "leds-ns2",
316 .owner = THIS_MODULE, 387 .owner = THIS_MODULE,
388 .of_match_table = of_match_ptr(of_ns2_leds_match),
317 }, 389 },
318}; 390};
319 391