diff options
author | Jason Cooper <jason@lakedaemon.net> | 2012-10-21 22:15:35 -0400 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2012-11-21 15:59:22 -0500 |
commit | 767fc1ea92f70b5a97d43b79c146c2bee3eb6e83 (patch) | |
tree | da7de5637b3559daca2f56c766b043b9b1b37a56 /arch | |
parent | b046f560d76a22589a849964145e4e60d7a160d2 (diff) |
ARM: Kirkwood: new board USI Topkick
This is a new kirkwood box made by Universal Scientific Industrial, Inc.
The product description is here:
http://www.usish.com/english/products_topkick1281p2.php
It is very similar to the dreamplug and other plug devices, with the
exception that it has room for a 2.5" SATA HDD internally.
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boot/dts/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boot/dts/kirkwood-topkick.dts | 85 | ||||
-rw-r--r-- | arch/arm/configs/kirkwood_defconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/board-dt.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/board-usi_topkick.c | 82 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/common.h | 6 |
8 files changed, 187 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 77fce3f63946..df3a8ae9224f 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -44,6 +44,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ | |||
44 | kirkwood-ns2lite.dtb \ | 44 | kirkwood-ns2lite.dtb \ |
45 | kirkwood-ns2max.dtb \ | 45 | kirkwood-ns2max.dtb \ |
46 | kirkwood-ns2mini.dtb \ | 46 | kirkwood-ns2mini.dtb \ |
47 | kirkwood-topkick.dtb \ | ||
47 | kirkwood-ts219-6281.dtb \ | 48 | kirkwood-ts219-6281.dtb \ |
48 | kirkwood-ts219-6282.dtb | 49 | kirkwood-ts219-6282.dtb |
49 | dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ | 50 | dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ |
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/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig index 66f7ae76f0d5..006b7b95caca 100644 --- a/arch/arm/configs/kirkwood_defconfig +++ b/arch/arm/configs/kirkwood_defconfig | |||
@@ -32,6 +32,7 @@ CONFIG_MACH_NETSPACE_V2_DT=y | |||
32 | CONFIG_MACH_NETSPACE_MAX_V2_DT=y | 32 | CONFIG_MACH_NETSPACE_MAX_V2_DT=y |
33 | CONFIG_MACH_NETSPACE_LITE_V2_DT=y | 33 | CONFIG_MACH_NETSPACE_LITE_V2_DT=y |
34 | CONFIG_MACH_NETSPACE_MINI_V2_DT=y | 34 | CONFIG_MACH_NETSPACE_MINI_V2_DT=y |
35 | CONFIG_MACH_TOPKICK_DT=y | ||
35 | CONFIG_MACH_TS219=y | 36 | CONFIG_MACH_TS219=y |
36 | CONFIG_MACH_TS41X=y | 37 | CONFIG_MACH_TS41X=y |
37 | CONFIG_MACH_DOCKSTAR=y | 38 | CONFIG_MACH_DOCKSTAR=y |
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index 757bdb39bc08..1d5283fad014 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig | |||
@@ -166,6 +166,13 @@ config MACH_NETSPACE_MINI_V2_DT | |||
166 | Network Space Mini v2 NAS (aka SafeBox), using Flattened | 166 | Network Space Mini v2 NAS (aka SafeBox), using Flattened |
167 | Device Tree. | 167 | Device Tree. |
168 | 168 | ||
169 | config MACH_TOPKICK_DT | ||
170 | bool "USI Topkick (Flattened Device Tree)" | ||
171 | select ARCH_KIRKWOOD_DT | ||
172 | help | ||
173 | Say 'Y' here if you want your kernel to support the | ||
174 | USI Topkick, using Flattened Device Tree | ||
175 | |||
169 | config MACH_TS219 | 176 | config MACH_TS219 |
170 | bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" | 177 | bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" |
171 | help | 178 | help |
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index 3ff4aa1030c5..d867b36a39f8 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile | |||
@@ -36,3 +36,4 @@ obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o | |||
36 | obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o | 36 | obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o |
37 | obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o | 37 | obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o |
38 | obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o | 38 | obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o |
39 | obj-$(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 571b0198e4d5..e0bb9ca59245 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("usi,topkick")) | ||
107 | usi_topkick_init(); | ||
108 | |||
106 | of_platform_populate(NULL, kirkwood_dt_match_table, | 109 | of_platform_populate(NULL, kirkwood_dt_match_table, |
107 | kirkwood_auxdata_lookup, NULL); | 110 | kirkwood_auxdata_lookup, NULL); |
108 | } | 111 | } |
@@ -124,6 +127,7 @@ static const char *kirkwood_dt_board_compat[] = { | |||
124 | "lacie,netspace_v2", | 127 | "lacie,netspace_v2", |
125 | "lacie,netspace_lite_v2", | 128 | "lacie,netspace_lite_v2", |
126 | "lacie,netspace_mini_v2", | 129 | "lacie,netspace_mini_v2", |
130 | "usi,topkick", | ||
127 | NULL | 131 | NULL |
128 | }; | 132 | }; |
129 | 133 | ||
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 | |||
21 | static struct mv643xx_eth_platform_data topkick_ge00_data = { | ||
22 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
23 | }; | ||
24 | |||
25 | static 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 | |||
53 | static 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 | |||
69 | void __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.h b/arch/arm/mach-kirkwood/common.h index 95eb69b7b46c..276fc01dd6d7 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h | |||
@@ -122,6 +122,12 @@ void ns2_init(void); | |||
122 | static inline void ns2_init(void) {}; | 122 | static inline void ns2_init(void) {}; |
123 | #endif | 123 | #endif |
124 | 124 | ||
125 | #ifdef CONFIG_MACH_TOPKICK_DT | ||
126 | void usi_topkick_init(void); | ||
127 | #else | ||
128 | static inline void usi_topkick_init(void) {}; | ||
129 | #endif | ||
130 | |||
125 | /* early init functions not converted to fdt yet */ | 131 | /* early init functions not converted to fdt yet */ |
126 | char *kirkwood_id(void); | 132 | char *kirkwood_id(void); |
127 | void kirkwood_l2_init(void); | 133 | void kirkwood_l2_init(void); |