aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/boot/dts/Makefile1
-rw-r--r--arch/arm/boot/dts/kirkwood-mplcec4.dts119
-rw-r--r--arch/arm/configs/kirkwood_defconfig1
-rw-r--r--arch/arm/mach-kirkwood/Kconfig7
-rw-r--r--arch/arm/mach-kirkwood/Makefile1
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c4
-rw-r--r--arch/arm/mach-kirkwood/board-mplcec4.c80
-rw-r--r--arch/arm/mach-kirkwood/common.h6
8 files changed, 219 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index c5eb41c4b767..eef6545f65ee 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -40,6 +40,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
40 kirkwood-km_kirkwood.dtb \ 40 kirkwood-km_kirkwood.dtb \
41 kirkwood-lschlv2.dtb \ 41 kirkwood-lschlv2.dtb \
42 kirkwood-lsxhl.dtb \ 42 kirkwood-lsxhl.dtb \
43 kirkwood-mplcec4.dtb \
43 kirkwood-ns2.dtb \ 44 kirkwood-ns2.dtb \
44 kirkwood-ns2lite.dtb \ 45 kirkwood-ns2lite.dtb \
45 kirkwood-ns2max.dtb \ 46 kirkwood-ns2max.dtb \
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/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig
index 006b7b95caca..2fd4d259d866 100644
--- a/arch/arm/configs/kirkwood_defconfig
+++ b/arch/arm/configs/kirkwood_defconfig
@@ -33,6 +33,7 @@ CONFIG_MACH_NETSPACE_MAX_V2_DT=y
33CONFIG_MACH_NETSPACE_LITE_V2_DT=y 33CONFIG_MACH_NETSPACE_LITE_V2_DT=y
34CONFIG_MACH_NETSPACE_MINI_V2_DT=y 34CONFIG_MACH_NETSPACE_MINI_V2_DT=y
35CONFIG_MACH_TOPKICK_DT=y 35CONFIG_MACH_TOPKICK_DT=y
36CONFIG_MACH_MPLCEC4_DT=y
36CONFIG_MACH_TS219=y 37CONFIG_MACH_TS219=y
37CONFIG_MACH_TS41X=y 38CONFIG_MACH_TS41X=y
38CONFIG_MACH_DOCKSTAR=y 39CONFIG_MACH_DOCKSTAR=y
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index a5b766e13304..141b105ce8d9 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -137,6 +137,13 @@ config MACH_INETSPACE_V2_DT
137 Say 'Y' here if you want your kernel to support the LaCie 137 Say 'Y' here if you want your kernel to support the LaCie
138 Internet Space v2 NAS, using Flattened Device Tree. 138 Internet Space v2 NAS, using Flattened Device Tree.
139 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
140config MACH_NETSPACE_V2_DT 147config MACH_NETSPACE_V2_DT
141 bool "LaCie Network Space v2 NAS (Flattened Device Tree)" 148 bool "LaCie Network Space v2 NAS (Flattened Device Tree)"
142 select ARCH_KIRKWOOD_DT 149 select ARCH_KIRKWOOD_DT
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index 8f7a34040af3..b5bc33467590 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -32,6 +32,7 @@ obj-$(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 34obj-$(CONFIG_MACH_INETSPACE_V2_DT) += board-ns2.o
35obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.o
35obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o 36obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o
36obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o 37obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o
37obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o 38obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 87c53d175d35..33c0bc1e2f3a 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -103,6 +103,9 @@ static void __init kirkwood_dt_init(void)
103 of_machine_is_compatible("lacie,netspace_mini_v2")) 103 of_machine_is_compatible("lacie,netspace_mini_v2"))
104 ns2_init(); 104 ns2_init();
105 105
106 if (of_machine_is_compatible("mpl,cec4"))
107 mplcec4_init();
108
106 if (of_machine_is_compatible("usi,topkick")) 109 if (of_machine_is_compatible("usi,topkick"))
107 usi_topkick_init(); 110 usi_topkick_init();
108 111
@@ -130,6 +133,7 @@ static const char *kirkwood_dt_board_compat[] = {
130 "lacie,netspace_v2", 133 "lacie,netspace_v2",
131 "lacie,netspace_lite_v2", 134 "lacie,netspace_lite_v2",
132 "lacie,netspace_mini_v2", 135 "lacie,netspace_mini_v2",
136 "mpl,cec4",
133 "usi,topkick", 137 "usi,topkick",
134 "zyxel,nsa310", 138 "zyxel,nsa310",
135 NULL 139 NULL
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/common.h b/arch/arm/mach-kirkwood/common.h
index 652a7282cdb3..f86fcced0bb1 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -112,6 +112,12 @@ 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
115#if defined(CONFIG_MACH_INETSPACE_V2_DT) || \ 121#if defined(CONFIG_MACH_INETSPACE_V2_DT) || \
116 defined(CONFIG_MACH_NETSPACE_V2_DT) || \ 122 defined(CONFIG_MACH_NETSPACE_V2_DT) || \
117 defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \ 123 defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \