diff options
author | Olof Johansson <olof@lixom.net> | 2012-11-06 09:02:52 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-11-06 09:03:17 -0500 |
commit | 94058fc593c7d309af112d3124ae0fbb6880d8ec (patch) | |
tree | 9dc60e19ee52f2a133ef42451cf33ddade27e6fb /arch/arm/mach-shmobile | |
parent | 3d70f8c617a436c7146ecb81df2265b4626dfe89 (diff) | |
parent | 631a7b5d958d2ef2c2333b105794c693642f0641 (diff) |
Merge branch 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/boards
Renesas board changes from Simon Horman:
* 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
ARM: shmobile: Remove G4EVM machine support
ARM: shmobile: Remove G3EVM machine support
ARM: mach-shmobile: Use DT_MACHINE for mackerel
ARM: shmobile: marzen: add HSPI support
ARM: shmobile: armadillo800eva: enable restart
ARM: shmobile: kzm9g: enable DMAEngine on SHDI0 and SDHI2
ARM: shmobile: kzm9g: enable three-axis digital accelerometer ADXL345
ARM: shmobile: kzm9g: enable magnetometer ak8975.
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/Kconfig | 17 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-armadillo800eva.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-g3evm.c | 343 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-g4evm.c | 384 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-kzm9g.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-mackerel.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-marzen.c | 25 |
8 files changed, 55 insertions, 746 deletions
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 8ae100cc655c..f58c3ea97732 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -50,17 +50,6 @@ config ARCH_EMEV2 | |||
50 | 50 | ||
51 | comment "SH-Mobile Board Type" | 51 | comment "SH-Mobile Board Type" |
52 | 52 | ||
53 | config MACH_G3EVM | ||
54 | bool "G3EVM board" | ||
55 | depends on ARCH_SH7367 | ||
56 | select ARCH_REQUIRE_GPIOLIB | ||
57 | |||
58 | config MACH_G4EVM | ||
59 | bool "G4EVM board" | ||
60 | depends on ARCH_SH7377 | ||
61 | select ARCH_REQUIRE_GPIOLIB | ||
62 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
63 | |||
64 | config MACH_AP4EVB | 53 | config MACH_AP4EVB |
65 | bool "AP4EVB board" | 54 | bool "AP4EVB board" |
66 | depends on ARCH_SH7372 | 55 | depends on ARCH_SH7372 |
@@ -95,6 +84,7 @@ config MACH_MACKEREL | |||
95 | select ARCH_REQUIRE_GPIOLIB | 84 | select ARCH_REQUIRE_GPIOLIB |
96 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 85 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
97 | select SND_SOC_AK4642 if SND_SIMPLE_CARD | 86 | select SND_SOC_AK4642 if SND_SIMPLE_CARD |
87 | select USE_OF | ||
98 | 88 | ||
99 | config MACH_KOTA2 | 89 | config MACH_KOTA2 |
100 | bool "KOTA2 board" | 90 | bool "KOTA2 board" |
@@ -146,8 +136,7 @@ menu "Memory configuration" | |||
146 | 136 | ||
147 | config MEMORY_START | 137 | config MEMORY_START |
148 | hex "Physical memory start address" | 138 | hex "Physical memory start address" |
149 | default "0x50000000" if MACH_G3EVM | 139 | default "0x40000000" if MACH_AP4EVB || MACH_AG5EVM || \ |
150 | default "0x40000000" if MACH_G4EVM || MACH_AP4EVB || MACH_AG5EVM || \ | ||
151 | MACH_MACKEREL || MACH_BONITO || \ | 140 | MACH_MACKEREL || MACH_BONITO || \ |
152 | MACH_ARMADILLO800EVA | 141 | MACH_ARMADILLO800EVA |
153 | default "0x41000000" if MACH_KOTA2 | 142 | default "0x41000000" if MACH_KOTA2 |
@@ -159,8 +148,6 @@ config MEMORY_START | |||
159 | 148 | ||
160 | config MEMORY_SIZE | 149 | config MEMORY_SIZE |
161 | hex "Physical memory size" | 150 | hex "Physical memory size" |
162 | default "0x08000000" if MACH_G3EVM | ||
163 | default "0x08000000" if MACH_G4EVM | ||
164 | default "0x20000000" if MACH_AG5EVM || MACH_BONITO || \ | 151 | default "0x20000000" if MACH_AG5EVM || MACH_BONITO || \ |
165 | MACH_ARMADILLO800EVA | 152 | MACH_ARMADILLO800EVA |
166 | default "0x1e000000" if MACH_KOTA2 | 153 | default "0x1e000000" if MACH_KOTA2 |
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index fe2c97c179d1..bd2633bb175a 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -45,8 +45,6 @@ obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o | |||
45 | obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o | 45 | obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o |
46 | 46 | ||
47 | # Board objects | 47 | # Board objects |
48 | obj-$(CONFIG_MACH_G3EVM) += board-g3evm.o | ||
49 | obj-$(CONFIG_MACH_G4EVM) += board-g4evm.o | ||
50 | obj-$(CONFIG_MACH_AP4EVB) += board-ap4evb.o | 48 | obj-$(CONFIG_MACH_AP4EVB) += board-ap4evb.o |
51 | obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o | 49 | obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o |
52 | obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o | 50 | obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o |
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 3cc8b1c21da9..499e6e376666 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c | |||
@@ -1229,6 +1229,13 @@ static void __init eva_add_early_devices(void) | |||
1229 | shmobile_timer.init = eva_earlytimer_init; | 1229 | shmobile_timer.init = eva_earlytimer_init; |
1230 | } | 1230 | } |
1231 | 1231 | ||
1232 | #define RESCNT2 IOMEM(0xe6188020) | ||
1233 | static void eva_restart(char mode, const char *cmd) | ||
1234 | { | ||
1235 | /* Do soft power on reset */ | ||
1236 | writel((1 << 31), RESCNT2); | ||
1237 | } | ||
1238 | |||
1232 | static const char *eva_boards_compat_dt[] __initdata = { | 1239 | static const char *eva_boards_compat_dt[] __initdata = { |
1233 | "renesas,armadillo800eva", | 1240 | "renesas,armadillo800eva", |
1234 | NULL, | 1241 | NULL, |
@@ -1243,4 +1250,5 @@ DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva") | |||
1243 | .init_late = shmobile_init_late, | 1250 | .init_late = shmobile_init_late, |
1244 | .timer = &shmobile_timer, | 1251 | .timer = &shmobile_timer, |
1245 | .dt_compat = eva_boards_compat_dt, | 1252 | .dt_compat = eva_boards_compat_dt, |
1253 | .restart = eva_restart, | ||
1246 | MACHINE_END | 1254 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-g3evm.c b/arch/arm/mach-shmobile/board-g3evm.c deleted file mode 100644 index b179d4c213bb..000000000000 --- a/arch/arm/mach-shmobile/board-g3evm.c +++ /dev/null | |||
@@ -1,343 +0,0 @@ | |||
1 | /* | ||
2 | * G3EVM board support | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * Copyright (C) 2008 Yoshihiro Shimoda | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/irq.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/delay.h> | ||
26 | #include <linux/mtd/mtd.h> | ||
27 | #include <linux/mtd/partitions.h> | ||
28 | #include <linux/mtd/physmap.h> | ||
29 | #include <linux/mtd/sh_flctl.h> | ||
30 | #include <linux/usb/r8a66597.h> | ||
31 | #include <linux/io.h> | ||
32 | #include <linux/gpio.h> | ||
33 | #include <linux/input.h> | ||
34 | #include <linux/input/sh_keysc.h> | ||
35 | #include <linux/dma-mapping.h> | ||
36 | #include <mach/irqs.h> | ||
37 | #include <mach/sh7367.h> | ||
38 | #include <mach/common.h> | ||
39 | #include <asm/mach-types.h> | ||
40 | #include <asm/mach/arch.h> | ||
41 | |||
42 | /* | ||
43 | * IrDA | ||
44 | * | ||
45 | * S67: 5bit : ON power | ||
46 | * : 6bit : ON remote control | ||
47 | * OFF IrDA | ||
48 | */ | ||
49 | |||
50 | static struct mtd_partition nor_flash_partitions[] = { | ||
51 | { | ||
52 | .name = "loader", | ||
53 | .offset = 0x00000000, | ||
54 | .size = 512 * 1024, | ||
55 | }, | ||
56 | { | ||
57 | .name = "bootenv", | ||
58 | .offset = MTDPART_OFS_APPEND, | ||
59 | .size = 512 * 1024, | ||
60 | }, | ||
61 | { | ||
62 | .name = "kernel_ro", | ||
63 | .offset = MTDPART_OFS_APPEND, | ||
64 | .size = 8 * 1024 * 1024, | ||
65 | .mask_flags = MTD_WRITEABLE, | ||
66 | }, | ||
67 | { | ||
68 | .name = "kernel", | ||
69 | .offset = MTDPART_OFS_APPEND, | ||
70 | .size = 8 * 1024 * 1024, | ||
71 | }, | ||
72 | { | ||
73 | .name = "data", | ||
74 | .offset = MTDPART_OFS_APPEND, | ||
75 | .size = MTDPART_SIZ_FULL, | ||
76 | }, | ||
77 | }; | ||
78 | |||
79 | static struct physmap_flash_data nor_flash_data = { | ||
80 | .width = 2, | ||
81 | .parts = nor_flash_partitions, | ||
82 | .nr_parts = ARRAY_SIZE(nor_flash_partitions), | ||
83 | }; | ||
84 | |||
85 | static struct resource nor_flash_resources[] = { | ||
86 | [0] = { | ||
87 | .start = 0x00000000, | ||
88 | .end = 0x08000000 - 1, | ||
89 | .flags = IORESOURCE_MEM, | ||
90 | } | ||
91 | }; | ||
92 | |||
93 | static struct platform_device nor_flash_device = { | ||
94 | .name = "physmap-flash", | ||
95 | .dev = { | ||
96 | .platform_data = &nor_flash_data, | ||
97 | }, | ||
98 | .num_resources = ARRAY_SIZE(nor_flash_resources), | ||
99 | .resource = nor_flash_resources, | ||
100 | }; | ||
101 | |||
102 | /* USBHS */ | ||
103 | static void usb_host_port_power(int port, int power) | ||
104 | { | ||
105 | if (!power) /* only power-on supported for now */ | ||
106 | return; | ||
107 | |||
108 | /* set VBOUT/PWEN and EXTLP0 in DVSTCTR */ | ||
109 | __raw_writew(__raw_readw(IOMEM(0xe6890008)) | 0x600, IOMEM(0xe6890008)); | ||
110 | } | ||
111 | |||
112 | static struct r8a66597_platdata usb_host_data = { | ||
113 | .on_chip = 1, | ||
114 | .port_power = usb_host_port_power, | ||
115 | }; | ||
116 | |||
117 | static struct resource usb_host_resources[] = { | ||
118 | [0] = { | ||
119 | .name = "USBHS", | ||
120 | .start = 0xe6890000, | ||
121 | .end = 0xe68900e5, | ||
122 | .flags = IORESOURCE_MEM, | ||
123 | }, | ||
124 | [1] = { | ||
125 | .start = evt2irq(0xa20), /* USBHS_USHI0 */ | ||
126 | .flags = IORESOURCE_IRQ, | ||
127 | }, | ||
128 | }; | ||
129 | |||
130 | static struct platform_device usb_host_device = { | ||
131 | .name = "r8a66597_hcd", | ||
132 | .id = 0, | ||
133 | .dev = { | ||
134 | .platform_data = &usb_host_data, | ||
135 | .dma_mask = NULL, | ||
136 | .coherent_dma_mask = 0xffffffff, | ||
137 | }, | ||
138 | .num_resources = ARRAY_SIZE(usb_host_resources), | ||
139 | .resource = usb_host_resources, | ||
140 | }; | ||
141 | |||
142 | /* KEYSC */ | ||
143 | static struct sh_keysc_info keysc_info = { | ||
144 | .mode = SH_KEYSC_MODE_5, | ||
145 | .scan_timing = 3, | ||
146 | .delay = 100, | ||
147 | .keycodes = { | ||
148 | KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, KEY_F, KEY_G, | ||
149 | KEY_H, KEY_I, KEY_J, KEY_K, KEY_L, KEY_M, KEY_N, | ||
150 | KEY_O, KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T, KEY_U, | ||
151 | KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z, KEY_HOME, KEY_SLEEP, | ||
152 | KEY_WAKEUP, KEY_COFFEE, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, | ||
153 | KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_STOP, KEY_COMPUTER, | ||
154 | }, | ||
155 | }; | ||
156 | |||
157 | static struct resource keysc_resources[] = { | ||
158 | [0] = { | ||
159 | .name = "KEYSC", | ||
160 | .start = 0xe61b0000, | ||
161 | .end = 0xe61b000f, | ||
162 | .flags = IORESOURCE_MEM, | ||
163 | }, | ||
164 | [1] = { | ||
165 | .start = evt2irq(0xbe0), /* KEYSC_KEY */ | ||
166 | .flags = IORESOURCE_IRQ, | ||
167 | }, | ||
168 | }; | ||
169 | |||
170 | static struct platform_device keysc_device = { | ||
171 | .name = "sh_keysc", | ||
172 | .num_resources = ARRAY_SIZE(keysc_resources), | ||
173 | .resource = keysc_resources, | ||
174 | .dev = { | ||
175 | .platform_data = &keysc_info, | ||
176 | }, | ||
177 | }; | ||
178 | |||
179 | static struct mtd_partition nand_partition_info[] = { | ||
180 | { | ||
181 | .name = "system", | ||
182 | .offset = 0, | ||
183 | .size = 64 * 1024 * 1024, | ||
184 | }, | ||
185 | { | ||
186 | .name = "userdata", | ||
187 | .offset = MTDPART_OFS_APPEND, | ||
188 | .size = 128 * 1024 * 1024, | ||
189 | }, | ||
190 | { | ||
191 | .name = "cache", | ||
192 | .offset = MTDPART_OFS_APPEND, | ||
193 | .size = 64 * 1024 * 1024, | ||
194 | }, | ||
195 | }; | ||
196 | |||
197 | static struct resource nand_flash_resources[] = { | ||
198 | [0] = { | ||
199 | .start = 0xe6a30000, | ||
200 | .end = 0xe6a3009b, | ||
201 | .flags = IORESOURCE_MEM, | ||
202 | } | ||
203 | }; | ||
204 | |||
205 | static struct sh_flctl_platform_data nand_flash_data = { | ||
206 | .parts = nand_partition_info, | ||
207 | .nr_parts = ARRAY_SIZE(nand_partition_info), | ||
208 | .flcmncr_val = QTSEL_E | FCKSEL_E | TYPESEL_SET | NANWF_E | ||
209 | | SHBUSSEL | SEL_16BIT, | ||
210 | }; | ||
211 | |||
212 | static struct platform_device nand_flash_device = { | ||
213 | .name = "sh_flctl", | ||
214 | .resource = nand_flash_resources, | ||
215 | .num_resources = ARRAY_SIZE(nand_flash_resources), | ||
216 | .dev = { | ||
217 | .platform_data = &nand_flash_data, | ||
218 | }, | ||
219 | }; | ||
220 | |||
221 | static struct resource irda_resources[] = { | ||
222 | [0] = { | ||
223 | .start = 0xE6D00000, | ||
224 | .end = 0xE6D01FD4 - 1, | ||
225 | .flags = IORESOURCE_MEM, | ||
226 | }, | ||
227 | [1] = { | ||
228 | .start = evt2irq(0x480), /* IRDA */ | ||
229 | .flags = IORESOURCE_IRQ, | ||
230 | }, | ||
231 | }; | ||
232 | |||
233 | static struct platform_device irda_device = { | ||
234 | .name = "sh_irda", | ||
235 | .id = -1, | ||
236 | .resource = irda_resources, | ||
237 | .num_resources = ARRAY_SIZE(irda_resources), | ||
238 | }; | ||
239 | |||
240 | static struct platform_device *g3evm_devices[] __initdata = { | ||
241 | &nor_flash_device, | ||
242 | &usb_host_device, | ||
243 | &keysc_device, | ||
244 | &nand_flash_device, | ||
245 | &irda_device, | ||
246 | }; | ||
247 | |||
248 | static void __init g3evm_init(void) | ||
249 | { | ||
250 | sh7367_pinmux_init(); | ||
251 | |||
252 | /* Lit DS4 LED */ | ||
253 | gpio_request(GPIO_PORT22, NULL); | ||
254 | gpio_direction_output(GPIO_PORT22, 1); | ||
255 | gpio_export(GPIO_PORT22, 0); | ||
256 | |||
257 | /* Lit DS8 LED */ | ||
258 | gpio_request(GPIO_PORT23, NULL); | ||
259 | gpio_direction_output(GPIO_PORT23, 1); | ||
260 | gpio_export(GPIO_PORT23, 0); | ||
261 | |||
262 | /* Lit DS3 LED */ | ||
263 | gpio_request(GPIO_PORT24, NULL); | ||
264 | gpio_direction_output(GPIO_PORT24, 1); | ||
265 | gpio_export(GPIO_PORT24, 0); | ||
266 | |||
267 | /* SCIFA1 */ | ||
268 | gpio_request(GPIO_FN_SCIFA1_TXD, NULL); | ||
269 | gpio_request(GPIO_FN_SCIFA1_RXD, NULL); | ||
270 | gpio_request(GPIO_FN_SCIFA1_CTS, NULL); | ||
271 | gpio_request(GPIO_FN_SCIFA1_RTS, NULL); | ||
272 | |||
273 | /* USBHS */ | ||
274 | gpio_request(GPIO_FN_VBUS0, NULL); | ||
275 | gpio_request(GPIO_FN_PWEN, NULL); | ||
276 | gpio_request(GPIO_FN_OVCN, NULL); | ||
277 | gpio_request(GPIO_FN_OVCN2, NULL); | ||
278 | gpio_request(GPIO_FN_EXTLP, NULL); | ||
279 | gpio_request(GPIO_FN_IDIN, NULL); | ||
280 | |||
281 | /* setup USB phy */ | ||
282 | __raw_writew(0x0300, IOMEM(0xe605810a)); /* USBCR1 */ | ||
283 | __raw_writew(0x00e0, IOMEM(0xe60581c0)); /* CPFCH */ | ||
284 | __raw_writew(0x6010, IOMEM(0xe60581c6)); /* CGPOSR */ | ||
285 | __raw_writew(0x8a0a, IOMEM(0xe605810c)); /* USBCR2 */ | ||
286 | |||
287 | /* KEYSC @ CN7 */ | ||
288 | gpio_request(GPIO_FN_PORT42_KEYOUT0, NULL); | ||
289 | gpio_request(GPIO_FN_PORT43_KEYOUT1, NULL); | ||
290 | gpio_request(GPIO_FN_PORT44_KEYOUT2, NULL); | ||
291 | gpio_request(GPIO_FN_PORT45_KEYOUT3, NULL); | ||
292 | gpio_request(GPIO_FN_PORT46_KEYOUT4, NULL); | ||
293 | gpio_request(GPIO_FN_PORT47_KEYOUT5, NULL); | ||
294 | gpio_request(GPIO_FN_PORT48_KEYIN0_PU, NULL); | ||
295 | gpio_request(GPIO_FN_PORT49_KEYIN1_PU, NULL); | ||
296 | gpio_request(GPIO_FN_PORT50_KEYIN2_PU, NULL); | ||
297 | gpio_request(GPIO_FN_PORT55_KEYIN3_PU, NULL); | ||
298 | gpio_request(GPIO_FN_PORT56_KEYIN4_PU, NULL); | ||
299 | gpio_request(GPIO_FN_PORT57_KEYIN5_PU, NULL); | ||
300 | gpio_request(GPIO_FN_PORT58_KEYIN6_PU, NULL); | ||
301 | |||
302 | /* FLCTL */ | ||
303 | gpio_request(GPIO_FN_FCE0, NULL); | ||
304 | gpio_request(GPIO_FN_D0_ED0_NAF0, NULL); | ||
305 | gpio_request(GPIO_FN_D1_ED1_NAF1, NULL); | ||
306 | gpio_request(GPIO_FN_D2_ED2_NAF2, NULL); | ||
307 | gpio_request(GPIO_FN_D3_ED3_NAF3, NULL); | ||
308 | gpio_request(GPIO_FN_D4_ED4_NAF4, NULL); | ||
309 | gpio_request(GPIO_FN_D5_ED5_NAF5, NULL); | ||
310 | gpio_request(GPIO_FN_D6_ED6_NAF6, NULL); | ||
311 | gpio_request(GPIO_FN_D7_ED7_NAF7, NULL); | ||
312 | gpio_request(GPIO_FN_D8_ED8_NAF8, NULL); | ||
313 | gpio_request(GPIO_FN_D9_ED9_NAF9, NULL); | ||
314 | gpio_request(GPIO_FN_D10_ED10_NAF10, NULL); | ||
315 | gpio_request(GPIO_FN_D11_ED11_NAF11, NULL); | ||
316 | gpio_request(GPIO_FN_D12_ED12_NAF12, NULL); | ||
317 | gpio_request(GPIO_FN_D13_ED13_NAF13, NULL); | ||
318 | gpio_request(GPIO_FN_D14_ED14_NAF14, NULL); | ||
319 | gpio_request(GPIO_FN_D15_ED15_NAF15, NULL); | ||
320 | gpio_request(GPIO_FN_WE0_XWR0_FWE, NULL); | ||
321 | gpio_request(GPIO_FN_FRB, NULL); | ||
322 | /* FOE, FCDE, FSC on dedicated pins */ | ||
323 | __raw_writel(__raw_readl(IOMEM(0xe6158048)) & ~(1 << 15), IOMEM(0xe6158048)); | ||
324 | |||
325 | /* IrDA */ | ||
326 | gpio_request(GPIO_FN_IRDA_OUT, NULL); | ||
327 | gpio_request(GPIO_FN_IRDA_IN, NULL); | ||
328 | gpio_request(GPIO_FN_IRDA_FIRSEL, NULL); | ||
329 | |||
330 | sh7367_add_standard_devices(); | ||
331 | |||
332 | platform_add_devices(g3evm_devices, ARRAY_SIZE(g3evm_devices)); | ||
333 | } | ||
334 | |||
335 | MACHINE_START(G3EVM, "g3evm") | ||
336 | .map_io = sh7367_map_io, | ||
337 | .init_early = sh7367_add_early_devices, | ||
338 | .init_irq = sh7367_init_irq, | ||
339 | .handle_irq = shmobile_handle_irq_intc, | ||
340 | .init_machine = g3evm_init, | ||
341 | .init_late = shmobile_init_late, | ||
342 | .timer = &shmobile_timer, | ||
343 | MACHINE_END | ||
diff --git a/arch/arm/mach-shmobile/board-g4evm.c b/arch/arm/mach-shmobile/board-g4evm.c deleted file mode 100644 index 35c126caa4d8..000000000000 --- a/arch/arm/mach-shmobile/board-g4evm.c +++ /dev/null | |||
@@ -1,384 +0,0 @@ | |||
1 | /* | ||
2 | * G4EVM board support | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * Copyright (C) 2008 Yoshihiro Shimoda | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/irq.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/delay.h> | ||
26 | #include <linux/mtd/mtd.h> | ||
27 | #include <linux/mtd/partitions.h> | ||
28 | #include <linux/mtd/physmap.h> | ||
29 | #include <linux/regulator/fixed.h> | ||
30 | #include <linux/regulator/machine.h> | ||
31 | #include <linux/usb/r8a66597.h> | ||
32 | #include <linux/io.h> | ||
33 | #include <linux/input.h> | ||
34 | #include <linux/input/sh_keysc.h> | ||
35 | #include <linux/mmc/host.h> | ||
36 | #include <linux/mmc/sh_mobile_sdhi.h> | ||
37 | #include <linux/gpio.h> | ||
38 | #include <linux/dma-mapping.h> | ||
39 | #include <mach/irqs.h> | ||
40 | #include <mach/sh7377.h> | ||
41 | #include <mach/common.h> | ||
42 | #include <asm/mach-types.h> | ||
43 | #include <asm/mach/arch.h> | ||
44 | |||
45 | #include "sh-gpio.h" | ||
46 | |||
47 | /* | ||
48 | * SDHI | ||
49 | * | ||
50 | * SDHI0 : card detection is possible | ||
51 | * SDHI1 : card detection is impossible | ||
52 | * | ||
53 | * [G4-MAIN-BOARD] | ||
54 | * JP74 : short # DBG_2V8A for SDHI0 | ||
55 | * JP75 : NC # DBG_3V3A for SDHI0 | ||
56 | * JP76 : NC # DBG_3V3A_SD for SDHI0 | ||
57 | * JP77 : NC # 3V3A_SDIO for SDHI1 | ||
58 | * JP78 : short # DBG_2V8A for SDHI1 | ||
59 | * JP79 : NC # DBG_3V3A for SDHI1 | ||
60 | * JP80 : NC # DBG_3V3A_SD for SDHI1 | ||
61 | * | ||
62 | * [G4-CORE-BOARD] | ||
63 | * S32 : all off # to dissever from G3-CORE_DBG board | ||
64 | * S33 : all off # to dissever from G3-CORE_DBG board | ||
65 | * | ||
66 | * [G3-CORE_DBG-BOARD] | ||
67 | * S1 : all off # to dissever from G3-CORE_DBG board | ||
68 | * S3 : all off # to dissever from G3-CORE_DBG board | ||
69 | * S4 : all off # to dissever from G3-CORE_DBG board | ||
70 | */ | ||
71 | |||
72 | static struct mtd_partition nor_flash_partitions[] = { | ||
73 | { | ||
74 | .name = "loader", | ||
75 | .offset = 0x00000000, | ||
76 | .size = 512 * 1024, | ||
77 | }, | ||
78 | { | ||
79 | .name = "bootenv", | ||
80 | .offset = MTDPART_OFS_APPEND, | ||
81 | .size = 512 * 1024, | ||
82 | }, | ||
83 | { | ||
84 | .name = "kernel_ro", | ||
85 | .offset = MTDPART_OFS_APPEND, | ||
86 | .size = 8 * 1024 * 1024, | ||
87 | .mask_flags = MTD_WRITEABLE, | ||
88 | }, | ||
89 | { | ||
90 | .name = "kernel", | ||
91 | .offset = MTDPART_OFS_APPEND, | ||
92 | .size = 8 * 1024 * 1024, | ||
93 | }, | ||
94 | { | ||
95 | .name = "data", | ||
96 | .offset = MTDPART_OFS_APPEND, | ||
97 | .size = MTDPART_SIZ_FULL, | ||
98 | }, | ||
99 | }; | ||
100 | |||
101 | static struct physmap_flash_data nor_flash_data = { | ||
102 | .width = 2, | ||
103 | .parts = nor_flash_partitions, | ||
104 | .nr_parts = ARRAY_SIZE(nor_flash_partitions), | ||
105 | }; | ||
106 | |||
107 | static struct resource nor_flash_resources[] = { | ||
108 | [0] = { | ||
109 | .start = 0x00000000, | ||
110 | .end = 0x08000000 - 1, | ||
111 | .flags = IORESOURCE_MEM, | ||
112 | } | ||
113 | }; | ||
114 | |||
115 | static struct platform_device nor_flash_device = { | ||
116 | .name = "physmap-flash", | ||
117 | .dev = { | ||
118 | .platform_data = &nor_flash_data, | ||
119 | }, | ||
120 | .num_resources = ARRAY_SIZE(nor_flash_resources), | ||
121 | .resource = nor_flash_resources, | ||
122 | }; | ||
123 | |||
124 | /* USBHS */ | ||
125 | static void usb_host_port_power(int port, int power) | ||
126 | { | ||
127 | if (!power) /* only power-on supported for now */ | ||
128 | return; | ||
129 | |||
130 | /* set VBOUT/PWEN and EXTLP0 in DVSTCTR */ | ||
131 | __raw_writew(__raw_readw(IOMEM(0xe6890008)) | 0x600, IOMEM(0xe6890008)); | ||
132 | } | ||
133 | |||
134 | static struct r8a66597_platdata usb_host_data = { | ||
135 | .on_chip = 1, | ||
136 | .port_power = usb_host_port_power, | ||
137 | }; | ||
138 | |||
139 | static struct resource usb_host_resources[] = { | ||
140 | [0] = { | ||
141 | .name = "USBHS", | ||
142 | .start = 0xe6890000, | ||
143 | .end = 0xe68900e5, | ||
144 | .flags = IORESOURCE_MEM, | ||
145 | }, | ||
146 | [1] = { | ||
147 | .start = evt2irq(0x0a20), /* USBHS_USHI0 */ | ||
148 | .flags = IORESOURCE_IRQ, | ||
149 | }, | ||
150 | }; | ||
151 | |||
152 | static struct platform_device usb_host_device = { | ||
153 | .name = "r8a66597_hcd", | ||
154 | .id = 0, | ||
155 | .dev = { | ||
156 | .platform_data = &usb_host_data, | ||
157 | .dma_mask = NULL, | ||
158 | .coherent_dma_mask = 0xffffffff, | ||
159 | }, | ||
160 | .num_resources = ARRAY_SIZE(usb_host_resources), | ||
161 | .resource = usb_host_resources, | ||
162 | }; | ||
163 | |||
164 | /* KEYSC */ | ||
165 | static struct sh_keysc_info keysc_info = { | ||
166 | .mode = SH_KEYSC_MODE_5, | ||
167 | .scan_timing = 3, | ||
168 | .delay = 100, | ||
169 | .keycodes = { | ||
170 | KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, KEY_F, | ||
171 | KEY_G, KEY_H, KEY_I, KEY_J, KEY_K, KEY_L, | ||
172 | KEY_M, KEY_N, KEY_U, KEY_P, KEY_Q, KEY_R, | ||
173 | KEY_S, KEY_T, KEY_U, KEY_V, KEY_W, KEY_X, | ||
174 | KEY_Y, KEY_Z, KEY_HOME, KEY_SLEEP, KEY_WAKEUP, KEY_COFFEE, | ||
175 | KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, | ||
176 | KEY_6, KEY_7, KEY_8, KEY_9, KEY_STOP, KEY_COMPUTER, | ||
177 | }, | ||
178 | }; | ||
179 | |||
180 | static struct resource keysc_resources[] = { | ||
181 | [0] = { | ||
182 | .name = "KEYSC", | ||
183 | .start = 0xe61b0000, | ||
184 | .end = 0xe61b000f, | ||
185 | .flags = IORESOURCE_MEM, | ||
186 | }, | ||
187 | [1] = { | ||
188 | .start = evt2irq(0x0be0), /* KEYSC_KEY */ | ||
189 | .flags = IORESOURCE_IRQ, | ||
190 | }, | ||
191 | }; | ||
192 | |||
193 | static struct platform_device keysc_device = { | ||
194 | .name = "sh_keysc", | ||
195 | .id = 0, /* keysc0 clock */ | ||
196 | .num_resources = ARRAY_SIZE(keysc_resources), | ||
197 | .resource = keysc_resources, | ||
198 | .dev = { | ||
199 | .platform_data = &keysc_info, | ||
200 | }, | ||
201 | }; | ||
202 | |||
203 | /* Fixed 3.3V regulator to be used by SDHI0 and SDHI1 */ | ||
204 | static struct regulator_consumer_supply fixed3v3_power_consumers[] = | ||
205 | { | ||
206 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), | ||
207 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"), | ||
208 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"), | ||
209 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"), | ||
210 | }; | ||
211 | |||
212 | /* SDHI */ | ||
213 | static struct sh_mobile_sdhi_info sdhi0_info = { | ||
214 | .tmio_caps = MMC_CAP_SDIO_IRQ, | ||
215 | }; | ||
216 | |||
217 | static struct resource sdhi0_resources[] = { | ||
218 | [0] = { | ||
219 | .name = "SDHI0", | ||
220 | .start = 0xe6d50000, | ||
221 | .end = 0xe6d500ff, | ||
222 | .flags = IORESOURCE_MEM, | ||
223 | }, | ||
224 | [1] = { | ||
225 | .start = evt2irq(0x0e00), /* SDHI0 */ | ||
226 | .flags = IORESOURCE_IRQ, | ||
227 | }, | ||
228 | }; | ||
229 | |||
230 | static struct platform_device sdhi0_device = { | ||
231 | .name = "sh_mobile_sdhi", | ||
232 | .num_resources = ARRAY_SIZE(sdhi0_resources), | ||
233 | .resource = sdhi0_resources, | ||
234 | .id = 0, | ||
235 | .dev = { | ||
236 | .platform_data = &sdhi0_info, | ||
237 | }, | ||
238 | }; | ||
239 | |||
240 | static struct sh_mobile_sdhi_info sdhi1_info = { | ||
241 | .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ, | ||
242 | }; | ||
243 | |||
244 | static struct resource sdhi1_resources[] = { | ||
245 | [0] = { | ||
246 | .name = "SDHI1", | ||
247 | .start = 0xe6d60000, | ||
248 | .end = 0xe6d600ff, | ||
249 | .flags = IORESOURCE_MEM, | ||
250 | }, | ||
251 | [1] = { | ||
252 | .start = evt2irq(0x0e80), /* SDHI1 */ | ||
253 | .flags = IORESOURCE_IRQ, | ||
254 | }, | ||
255 | }; | ||
256 | |||
257 | static struct platform_device sdhi1_device = { | ||
258 | .name = "sh_mobile_sdhi", | ||
259 | .num_resources = ARRAY_SIZE(sdhi1_resources), | ||
260 | .resource = sdhi1_resources, | ||
261 | .id = 1, | ||
262 | .dev = { | ||
263 | .platform_data = &sdhi1_info, | ||
264 | }, | ||
265 | }; | ||
266 | |||
267 | static struct platform_device *g4evm_devices[] __initdata = { | ||
268 | &nor_flash_device, | ||
269 | &usb_host_device, | ||
270 | &keysc_device, | ||
271 | &sdhi0_device, | ||
272 | &sdhi1_device, | ||
273 | }; | ||
274 | |||
275 | #define GPIO_SDHID0_D0 IOMEM(0xe60520fc) | ||
276 | #define GPIO_SDHID0_D1 IOMEM(0xe60520fd) | ||
277 | #define GPIO_SDHID0_D2 IOMEM(0xe60520fe) | ||
278 | #define GPIO_SDHID0_D3 IOMEM(0xe60520ff) | ||
279 | #define GPIO_SDHICMD0 IOMEM(0xe6052100) | ||
280 | |||
281 | #define GPIO_SDHID1_D0 IOMEM(0xe6052103) | ||
282 | #define GPIO_SDHID1_D1 IOMEM(0xe6052104) | ||
283 | #define GPIO_SDHID1_D2 IOMEM(0xe6052105) | ||
284 | #define GPIO_SDHID1_D3 IOMEM(0xe6052106) | ||
285 | #define GPIO_SDHICMD1 IOMEM(0xe6052107) | ||
286 | |||
287 | static void __init g4evm_init(void) | ||
288 | { | ||
289 | regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers, | ||
290 | ARRAY_SIZE(fixed3v3_power_consumers), 3300000); | ||
291 | |||
292 | sh7377_pinmux_init(); | ||
293 | |||
294 | /* Lit DS14 LED */ | ||
295 | gpio_request(GPIO_PORT109, NULL); | ||
296 | gpio_direction_output(GPIO_PORT109, 1); | ||
297 | gpio_export(GPIO_PORT109, 1); | ||
298 | |||
299 | /* Lit DS15 LED */ | ||
300 | gpio_request(GPIO_PORT110, NULL); | ||
301 | gpio_direction_output(GPIO_PORT110, 1); | ||
302 | gpio_export(GPIO_PORT110, 1); | ||
303 | |||
304 | /* Lit DS16 LED */ | ||
305 | gpio_request(GPIO_PORT112, NULL); | ||
306 | gpio_direction_output(GPIO_PORT112, 1); | ||
307 | gpio_export(GPIO_PORT112, 1); | ||
308 | |||
309 | /* Lit DS17 LED */ | ||
310 | gpio_request(GPIO_PORT113, NULL); | ||
311 | gpio_direction_output(GPIO_PORT113, 1); | ||
312 | gpio_export(GPIO_PORT113, 1); | ||
313 | |||
314 | /* USBHS */ | ||
315 | gpio_request(GPIO_FN_VBUS_0, NULL); | ||
316 | gpio_request(GPIO_FN_PWEN, NULL); | ||
317 | gpio_request(GPIO_FN_OVCN, NULL); | ||
318 | gpio_request(GPIO_FN_OVCN2, NULL); | ||
319 | gpio_request(GPIO_FN_EXTLP, NULL); | ||
320 | gpio_request(GPIO_FN_IDIN, NULL); | ||
321 | |||
322 | /* setup USB phy */ | ||
323 | __raw_writew(0x0200, IOMEM(0xe605810a)); /* USBCR1 */ | ||
324 | __raw_writew(0x00e0, IOMEM(0xe60581c0)); /* CPFCH */ | ||
325 | __raw_writew(0x6010, IOMEM(0xe60581c6)); /* CGPOSR */ | ||
326 | __raw_writew(0x8a0a, IOMEM(0xe605810c)); /* USBCR2 */ | ||
327 | |||
328 | /* KEYSC @ CN31 */ | ||
329 | gpio_request(GPIO_FN_PORT60_KEYOUT5, NULL); | ||
330 | gpio_request(GPIO_FN_PORT61_KEYOUT4, NULL); | ||
331 | gpio_request(GPIO_FN_PORT62_KEYOUT3, NULL); | ||
332 | gpio_request(GPIO_FN_PORT63_KEYOUT2, NULL); | ||
333 | gpio_request(GPIO_FN_PORT64_KEYOUT1, NULL); | ||
334 | gpio_request(GPIO_FN_PORT65_KEYOUT0, NULL); | ||
335 | gpio_request(GPIO_FN_PORT66_KEYIN0_PU, NULL); | ||
336 | gpio_request(GPIO_FN_PORT67_KEYIN1_PU, NULL); | ||
337 | gpio_request(GPIO_FN_PORT68_KEYIN2_PU, NULL); | ||
338 | gpio_request(GPIO_FN_PORT69_KEYIN3_PU, NULL); | ||
339 | gpio_request(GPIO_FN_PORT70_KEYIN4_PU, NULL); | ||
340 | gpio_request(GPIO_FN_PORT71_KEYIN5_PU, NULL); | ||
341 | gpio_request(GPIO_FN_PORT72_KEYIN6_PU, NULL); | ||
342 | |||
343 | /* SDHI0 */ | ||
344 | gpio_request(GPIO_FN_SDHICLK0, NULL); | ||
345 | gpio_request(GPIO_FN_SDHICD0, NULL); | ||
346 | gpio_request(GPIO_FN_SDHID0_0, NULL); | ||
347 | gpio_request(GPIO_FN_SDHID0_1, NULL); | ||
348 | gpio_request(GPIO_FN_SDHID0_2, NULL); | ||
349 | gpio_request(GPIO_FN_SDHID0_3, NULL); | ||
350 | gpio_request(GPIO_FN_SDHICMD0, NULL); | ||
351 | gpio_request(GPIO_FN_SDHIWP0, NULL); | ||
352 | gpio_request_pullup(GPIO_SDHID0_D0); | ||
353 | gpio_request_pullup(GPIO_SDHID0_D1); | ||
354 | gpio_request_pullup(GPIO_SDHID0_D2); | ||
355 | gpio_request_pullup(GPIO_SDHID0_D3); | ||
356 | gpio_request_pullup(GPIO_SDHICMD0); | ||
357 | |||
358 | /* SDHI1 */ | ||
359 | gpio_request(GPIO_FN_SDHICLK1, NULL); | ||
360 | gpio_request(GPIO_FN_SDHID1_0, NULL); | ||
361 | gpio_request(GPIO_FN_SDHID1_1, NULL); | ||
362 | gpio_request(GPIO_FN_SDHID1_2, NULL); | ||
363 | gpio_request(GPIO_FN_SDHID1_3, NULL); | ||
364 | gpio_request(GPIO_FN_SDHICMD1, NULL); | ||
365 | gpio_request_pullup(GPIO_SDHID1_D0); | ||
366 | gpio_request_pullup(GPIO_SDHID1_D1); | ||
367 | gpio_request_pullup(GPIO_SDHID1_D2); | ||
368 | gpio_request_pullup(GPIO_SDHID1_D3); | ||
369 | gpio_request_pullup(GPIO_SDHICMD1); | ||
370 | |||
371 | sh7377_add_standard_devices(); | ||
372 | |||
373 | platform_add_devices(g4evm_devices, ARRAY_SIZE(g4evm_devices)); | ||
374 | } | ||
375 | |||
376 | MACHINE_START(G4EVM, "g4evm") | ||
377 | .map_io = sh7377_map_io, | ||
378 | .init_early = sh7377_add_early_devices, | ||
379 | .init_irq = sh7377_init_irq, | ||
380 | .handle_irq = shmobile_handle_irq_intc, | ||
381 | .init_machine = g4evm_init, | ||
382 | .init_late = shmobile_init_late, | ||
383 | .timer = &shmobile_timer, | ||
384 | MACHINE_END | ||
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index 0a43f3189c21..f63f2eeb0205 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c | |||
@@ -384,6 +384,8 @@ static struct regulator_consumer_supply fixed2v8_power_consumers[] = | |||
384 | 384 | ||
385 | /* SDHI */ | 385 | /* SDHI */ |
386 | static struct sh_mobile_sdhi_info sdhi0_info = { | 386 | static struct sh_mobile_sdhi_info sdhi0_info = { |
387 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, | ||
388 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, | ||
387 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, | 389 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, |
388 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, | 390 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, |
389 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, | 391 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, |
@@ -424,6 +426,8 @@ static struct platform_device sdhi0_device = { | |||
424 | 426 | ||
425 | /* Micro SD */ | 427 | /* Micro SD */ |
426 | static struct sh_mobile_sdhi_info sdhi2_info = { | 428 | static struct sh_mobile_sdhi_info sdhi2_info = { |
429 | .dma_slave_tx = SHDMA_SLAVE_SDHI2_TX, | ||
430 | .dma_slave_rx = SHDMA_SLAVE_SDHI2_RX, | ||
427 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | | 431 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | |
428 | TMIO_MMC_USE_GPIO_CD | | 432 | TMIO_MMC_USE_GPIO_CD | |
429 | TMIO_MMC_WRPROTECT_DISABLE, | 433 | TMIO_MMC_WRPROTECT_DISABLE, |
@@ -557,7 +561,15 @@ static struct i2c_board_info i2c0_devices[] = { | |||
557 | }, | 561 | }, |
558 | { | 562 | { |
559 | I2C_BOARD_INFO("r2025sd", 0x32), | 563 | I2C_BOARD_INFO("r2025sd", 0x32), |
560 | } | 564 | }, |
565 | { | ||
566 | I2C_BOARD_INFO("ak8975", 0x0c), | ||
567 | .irq = intcs_evt2irq(0x3380), /* IRQ28 */ | ||
568 | }, | ||
569 | { | ||
570 | I2C_BOARD_INFO("adxl34x", 0x1d), | ||
571 | .irq = intcs_evt2irq(0x3340), /* IRQ26 */ | ||
572 | }, | ||
561 | }; | 573 | }; |
562 | 574 | ||
563 | static struct i2c_board_info i2c1_devices[] = { | 575 | static struct i2c_board_info i2c1_devices[] = { |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 0c27c810cf99..39b8f2e70638 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -1651,7 +1651,12 @@ static void __init mackerel_init(void) | |||
1651 | pm_clk_add(&hdmi_lcdc_device.dev, "hdmi"); | 1651 | pm_clk_add(&hdmi_lcdc_device.dev, "hdmi"); |
1652 | } | 1652 | } |
1653 | 1653 | ||
1654 | MACHINE_START(MACKEREL, "mackerel") | 1654 | static const char *mackerel_boards_compat_dt[] __initdata = { |
1655 | "renesas,mackerel", | ||
1656 | NULL, | ||
1657 | }; | ||
1658 | |||
1659 | DT_MACHINE_START(MACKEREL_DT, "mackerel") | ||
1655 | .map_io = sh7372_map_io, | 1660 | .map_io = sh7372_map_io, |
1656 | .init_early = sh7372_add_early_devices, | 1661 | .init_early = sh7372_add_early_devices, |
1657 | .init_irq = sh7372_init_irq, | 1662 | .init_irq = sh7372_init_irq, |
@@ -1659,4 +1664,5 @@ MACHINE_START(MACKEREL, "mackerel") | |||
1659 | .init_machine = mackerel_init, | 1664 | .init_machine = mackerel_init, |
1660 | .init_late = sh7372_pm_init_late, | 1665 | .init_late = sh7372_pm_init_late, |
1661 | .timer = &shmobile_timer, | 1666 | .timer = &shmobile_timer, |
1667 | .dt_compat = mackerel_boards_compat_dt, | ||
1662 | MACHINE_END | 1668 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index b8a7525a4e2f..69f7f464eff8 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <linux/regulator/fixed.h> | 30 | #include <linux/regulator/fixed.h> |
31 | #include <linux/regulator/machine.h> | 31 | #include <linux/regulator/machine.h> |
32 | #include <linux/smsc911x.h> | 32 | #include <linux/smsc911x.h> |
33 | #include <linux/spi/spi.h> | ||
34 | #include <linux/spi/sh_hspi.h> | ||
33 | #include <linux/mmc/sh_mobile_sdhi.h> | 35 | #include <linux/mmc/sh_mobile_sdhi.h> |
34 | #include <linux/mfd/tmio.h> | 36 | #include <linux/mfd/tmio.h> |
35 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
@@ -126,10 +128,27 @@ static struct platform_device thermal_device = { | |||
126 | .num_resources = ARRAY_SIZE(thermal_resources), | 128 | .num_resources = ARRAY_SIZE(thermal_resources), |
127 | }; | 129 | }; |
128 | 130 | ||
131 | /* HSPI */ | ||
132 | static struct resource hspi_resources[] = { | ||
133 | [0] = { | ||
134 | .start = 0xFFFC7000, | ||
135 | .end = 0xFFFC7018 - 1, | ||
136 | .flags = IORESOURCE_MEM, | ||
137 | }, | ||
138 | }; | ||
139 | |||
140 | static struct platform_device hspi_device = { | ||
141 | .name = "sh-hspi", | ||
142 | .id = 0, | ||
143 | .resource = hspi_resources, | ||
144 | .num_resources = ARRAY_SIZE(hspi_resources), | ||
145 | }; | ||
146 | |||
129 | static struct platform_device *marzen_devices[] __initdata = { | 147 | static struct platform_device *marzen_devices[] __initdata = { |
130 | ð_device, | 148 | ð_device, |
131 | &sdhi0_device, | 149 | &sdhi0_device, |
132 | &thermal_device, | 150 | &thermal_device, |
151 | &hspi_device, | ||
133 | }; | 152 | }; |
134 | 153 | ||
135 | static void __init marzen_init(void) | 154 | static void __init marzen_init(void) |
@@ -163,6 +182,12 @@ static void __init marzen_init(void) | |||
163 | gpio_request(GPIO_FN_SD0_CD, NULL); | 182 | gpio_request(GPIO_FN_SD0_CD, NULL); |
164 | gpio_request(GPIO_FN_SD0_WP, NULL); | 183 | gpio_request(GPIO_FN_SD0_WP, NULL); |
165 | 184 | ||
185 | /* HSPI 0 */ | ||
186 | gpio_request(GPIO_FN_HSPI_CLK0, NULL); | ||
187 | gpio_request(GPIO_FN_HSPI_CS0, NULL); | ||
188 | gpio_request(GPIO_FN_HSPI_TX0, NULL); | ||
189 | gpio_request(GPIO_FN_HSPI_RX0, NULL); | ||
190 | |||
166 | r8a7779_add_standard_devices(); | 191 | r8a7779_add_standard_devices(); |
167 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); | 192 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); |
168 | } | 193 | } |