diff options
-rw-r--r-- | arch/arm/boot/dts/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/boot/dts/sh7372-mackerel.dts | 22 | ||||
-rw-r--r-- | arch/arm/configs/g3evm_defconfig | 57 | ||||
-rw-r--r-- | arch/arm/configs/g4evm_defconfig | 57 | ||||
-rw-r--r-- | arch/arm/configs/kzm9g_defconfig | 4 | ||||
-rw-r--r-- | arch/arm/configs/marzen_defconfig | 2 | ||||
-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 |
14 files changed, 85 insertions, 861 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index c1ce813fcc4a..063223945368 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -75,7 +75,8 @@ dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb | |||
75 | dtb-$(CONFIG_ARCH_U8500) += snowball.dtb | 75 | dtb-$(CONFIG_ARCH_U8500) += snowball.dtb |
76 | dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ | 76 | dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ |
77 | r8a7740-armadillo800eva.dtb \ | 77 | r8a7740-armadillo800eva.dtb \ |
78 | sh73a0-kzm9g.dtb | 78 | sh73a0-kzm9g.dtb \ |
79 | sh7372-mackerel.dtb | ||
79 | dtb-$(CONFIG_ARCH_SPEAR13XX) += spear1310-evb.dtb \ | 80 | dtb-$(CONFIG_ARCH_SPEAR13XX) += spear1310-evb.dtb \ |
80 | spear1340-evb.dtb | 81 | spear1340-evb.dtb |
81 | dtb-$(CONFIG_ARCH_SPEAR3XX)+= spear300-evb.dtb \ | 82 | dtb-$(CONFIG_ARCH_SPEAR3XX)+= spear300-evb.dtb \ |
diff --git a/arch/arm/boot/dts/sh7372-mackerel.dts b/arch/arm/boot/dts/sh7372-mackerel.dts new file mode 100644 index 000000000000..286f0caef013 --- /dev/null +++ b/arch/arm/boot/dts/sh7372-mackerel.dts | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * Device Tree Source for the mackerel board | ||
3 | * | ||
4 | * Copyright (C) 2012 Renesas Solutions Corp. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public License | ||
7 | * version 2. This program is licensed "as is" without any warranty of any | ||
8 | * kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | /dts-v1/; | ||
12 | /include/ "skeleton.dtsi" | ||
13 | |||
14 | / { | ||
15 | model = "Mackerel (AP4 EVM 2nd)"; | ||
16 | compatible = "renesas,mackerel"; | ||
17 | |||
18 | memory { | ||
19 | device_type = "memory"; | ||
20 | reg = <0x40000000 0x10000000>; | ||
21 | }; | ||
22 | }; | ||
diff --git a/arch/arm/configs/g3evm_defconfig b/arch/arm/configs/g3evm_defconfig deleted file mode 100644 index 4a336ab5a0c0..000000000000 --- a/arch/arm/configs/g3evm_defconfig +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_IKCONFIG=y | ||
4 | CONFIG_IKCONFIG_PROC=y | ||
5 | CONFIG_LOG_BUF_SHIFT=16 | ||
6 | CONFIG_BLK_DEV_INITRD=y | ||
7 | CONFIG_SLAB=y | ||
8 | # CONFIG_BLK_DEV_BSG is not set | ||
9 | # CONFIG_IOSCHED_DEADLINE is not set | ||
10 | # CONFIG_IOSCHED_CFQ is not set | ||
11 | CONFIG_ARCH_SHMOBILE=y | ||
12 | CONFIG_ARCH_SH7367=y | ||
13 | CONFIG_MACH_G3EVM=y | ||
14 | CONFIG_AEABI=y | ||
15 | # CONFIG_OABI_COMPAT is not set | ||
16 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
17 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
18 | CONFIG_CMDLINE="console=ttySC1,115200 earlyprintk=sh-sci.1,115200" | ||
19 | CONFIG_KEXEC=y | ||
20 | CONFIG_PM=y | ||
21 | # CONFIG_SUSPEND is not set | ||
22 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
23 | # CONFIG_FIRMWARE_IN_KERNEL is not set | ||
24 | CONFIG_MTD=y | ||
25 | CONFIG_MTD_CONCAT=y | ||
26 | CONFIG_MTD_PARTITIONS=y | ||
27 | CONFIG_MTD_CHAR=y | ||
28 | CONFIG_MTD_BLOCK=y | ||
29 | CONFIG_MTD_CFI=y | ||
30 | CONFIG_MTD_CFI_INTELEXT=y | ||
31 | CONFIG_MTD_PHYSMAP=y | ||
32 | CONFIG_MTD_NAND=y | ||
33 | # CONFIG_BLK_DEV is not set | ||
34 | # CONFIG_MISC_DEVICES is not set | ||
35 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
36 | # CONFIG_INPUT_KEYBOARD is not set | ||
37 | # CONFIG_INPUT_MOUSE is not set | ||
38 | # CONFIG_SERIO is not set | ||
39 | CONFIG_SERIAL_SH_SCI=y | ||
40 | CONFIG_SERIAL_SH_SCI_NR_UARTS=8 | ||
41 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | ||
42 | # CONFIG_LEGACY_PTYS is not set | ||
43 | # CONFIG_HW_RANDOM is not set | ||
44 | # CONFIG_HWMON is not set | ||
45 | # CONFIG_VGA_CONSOLE is not set | ||
46 | # CONFIG_HID_SUPPORT is not set | ||
47 | # CONFIG_USB_SUPPORT is not set | ||
48 | # CONFIG_DNOTIFY is not set | ||
49 | # CONFIG_INOTIFY_USER is not set | ||
50 | CONFIG_TMPFS=y | ||
51 | # CONFIG_MISC_FILESYSTEMS is not set | ||
52 | CONFIG_MAGIC_SYSRQ=y | ||
53 | CONFIG_DEBUG_KERNEL=y | ||
54 | # CONFIG_DETECT_SOFTLOCKUP is not set | ||
55 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
56 | # CONFIG_FTRACE is not set | ||
57 | # CONFIG_CRC32 is not set | ||
diff --git a/arch/arm/configs/g4evm_defconfig b/arch/arm/configs/g4evm_defconfig deleted file mode 100644 index 21c6d0307bc3..000000000000 --- a/arch/arm/configs/g4evm_defconfig +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_IKCONFIG=y | ||
4 | CONFIG_IKCONFIG_PROC=y | ||
5 | CONFIG_LOG_BUF_SHIFT=16 | ||
6 | CONFIG_BLK_DEV_INITRD=y | ||
7 | CONFIG_SLAB=y | ||
8 | # CONFIG_BLK_DEV_BSG is not set | ||
9 | # CONFIG_IOSCHED_DEADLINE is not set | ||
10 | # CONFIG_IOSCHED_CFQ is not set | ||
11 | CONFIG_ARCH_SHMOBILE=y | ||
12 | CONFIG_ARCH_SH7377=y | ||
13 | CONFIG_MACH_G4EVM=y | ||
14 | CONFIG_AEABI=y | ||
15 | # CONFIG_OABI_COMPAT is not set | ||
16 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
17 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
18 | CONFIG_CMDLINE="console=ttySC4,115200 earlyprintk=sh-sci.4,115200" | ||
19 | CONFIG_KEXEC=y | ||
20 | CONFIG_PM=y | ||
21 | # CONFIG_SUSPEND is not set | ||
22 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
23 | # CONFIG_FIRMWARE_IN_KERNEL is not set | ||
24 | CONFIG_MTD=y | ||
25 | CONFIG_MTD_CONCAT=y | ||
26 | CONFIG_MTD_PARTITIONS=y | ||
27 | CONFIG_MTD_CHAR=y | ||
28 | CONFIG_MTD_BLOCK=y | ||
29 | CONFIG_MTD_CFI=y | ||
30 | CONFIG_MTD_CFI_INTELEXT=y | ||
31 | CONFIG_MTD_PHYSMAP=y | ||
32 | CONFIG_MTD_NAND=y | ||
33 | # CONFIG_BLK_DEV is not set | ||
34 | # CONFIG_MISC_DEVICES is not set | ||
35 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
36 | # CONFIG_INPUT_KEYBOARD is not set | ||
37 | # CONFIG_INPUT_MOUSE is not set | ||
38 | # CONFIG_SERIO is not set | ||
39 | CONFIG_SERIAL_SH_SCI=y | ||
40 | CONFIG_SERIAL_SH_SCI_NR_UARTS=8 | ||
41 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | ||
42 | # CONFIG_LEGACY_PTYS is not set | ||
43 | # CONFIG_HW_RANDOM is not set | ||
44 | # CONFIG_HWMON is not set | ||
45 | # CONFIG_VGA_CONSOLE is not set | ||
46 | # CONFIG_HID_SUPPORT is not set | ||
47 | # CONFIG_USB_SUPPORT is not set | ||
48 | # CONFIG_DNOTIFY is not set | ||
49 | # CONFIG_INOTIFY_USER is not set | ||
50 | CONFIG_TMPFS=y | ||
51 | # CONFIG_MISC_FILESYSTEMS is not set | ||
52 | CONFIG_MAGIC_SYSRQ=y | ||
53 | CONFIG_DEBUG_KERNEL=y | ||
54 | # CONFIG_DETECT_SOFTLOCKUP is not set | ||
55 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
56 | # CONFIG_FTRACE is not set | ||
57 | # CONFIG_CRC32 is not set | ||
diff --git a/arch/arm/configs/kzm9g_defconfig b/arch/arm/configs/kzm9g_defconfig index c88b57886e79..ce99e3e00efa 100644 --- a/arch/arm/configs/kzm9g_defconfig +++ b/arch/arm/configs/kzm9g_defconfig | |||
@@ -74,6 +74,8 @@ CONFIG_KEYBOARD_GPIO=y | |||
74 | # CONFIG_INPUT_MOUSE is not set | 74 | # CONFIG_INPUT_MOUSE is not set |
75 | CONFIG_INPUT_TOUCHSCREEN=y | 75 | CONFIG_INPUT_TOUCHSCREEN=y |
76 | CONFIG_TOUCHSCREEN_ST1232=y | 76 | CONFIG_TOUCHSCREEN_ST1232=y |
77 | CONFIG_INPUT_MISC=y | ||
78 | CONFIG_INPUT_ADXL34X=y | ||
77 | # CONFIG_LEGACY_PTYS is not set | 79 | # CONFIG_LEGACY_PTYS is not set |
78 | CONFIG_SERIAL_SH_SCI=y | 80 | CONFIG_SERIAL_SH_SCI=y |
79 | CONFIG_SERIAL_SH_SCI_NR_UARTS=9 | 81 | CONFIG_SERIAL_SH_SCI_NR_UARTS=9 |
@@ -119,6 +121,8 @@ CONFIG_DMADEVICES=y | |||
119 | CONFIG_SH_DMAE=y | 121 | CONFIG_SH_DMAE=y |
120 | CONFIG_ASYNC_TX_DMA=y | 122 | CONFIG_ASYNC_TX_DMA=y |
121 | CONFIG_STAGING=y | 123 | CONFIG_STAGING=y |
124 | CONFIG_SENSORS_AK8975=y | ||
125 | CONFIG_IIO=y | ||
122 | # CONFIG_DNOTIFY is not set | 126 | # CONFIG_DNOTIFY is not set |
123 | CONFIG_INOTIFY_USER=y | 127 | CONFIG_INOTIFY_USER=y |
124 | CONFIG_VFAT_FS=y | 128 | CONFIG_VFAT_FS=y |
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig index f79b55c512d0..5b8215f424c5 100644 --- a/arch/arm/configs/marzen_defconfig +++ b/arch/arm/configs/marzen_defconfig | |||
@@ -71,6 +71,8 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y | |||
71 | # CONFIG_HW_RANDOM is not set | 71 | # CONFIG_HW_RANDOM is not set |
72 | CONFIG_I2C=y | 72 | CONFIG_I2C=y |
73 | CONFIG_I2C_RCAR=y | 73 | CONFIG_I2C_RCAR=y |
74 | CONFIG_SPI=y | ||
75 | CONFIG_SPI_SH_HSPI=y | ||
74 | CONFIG_GPIO_SYSFS=y | 76 | CONFIG_GPIO_SYSFS=y |
75 | # CONFIG_HWMON is not set | 77 | # CONFIG_HWMON is not set |
76 | CONFIG_THERMAL=y | 78 | CONFIG_THERMAL=y |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 546e40a9dcaf..4eddca14ae07 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -38,17 +38,6 @@ config ARCH_EMEV2 | |||
38 | 38 | ||
39 | comment "SH-Mobile Board Type" | 39 | comment "SH-Mobile Board Type" |
40 | 40 | ||
41 | config MACH_G3EVM | ||
42 | bool "G3EVM board" | ||
43 | depends on ARCH_SH7367 | ||
44 | select ARCH_REQUIRE_GPIOLIB | ||
45 | |||
46 | config MACH_G4EVM | ||
47 | bool "G4EVM board" | ||
48 | depends on ARCH_SH7377 | ||
49 | select ARCH_REQUIRE_GPIOLIB | ||
50 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
51 | |||
52 | config MACH_AP4EVB | 41 | config MACH_AP4EVB |
53 | bool "AP4EVB board" | 42 | bool "AP4EVB board" |
54 | depends on ARCH_SH7372 | 43 | depends on ARCH_SH7372 |
@@ -83,6 +72,7 @@ config MACH_MACKEREL | |||
83 | select ARCH_REQUIRE_GPIOLIB | 72 | select ARCH_REQUIRE_GPIOLIB |
84 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 73 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
85 | select SND_SOC_AK4642 if SND_SIMPLE_CARD | 74 | select SND_SOC_AK4642 if SND_SIMPLE_CARD |
75 | select USE_OF | ||
86 | 76 | ||
87 | config MACH_KOTA2 | 77 | config MACH_KOTA2 |
88 | bool "KOTA2 board" | 78 | bool "KOTA2 board" |
@@ -134,8 +124,7 @@ menu "Memory configuration" | |||
134 | 124 | ||
135 | config MEMORY_START | 125 | config MEMORY_START |
136 | hex "Physical memory start address" | 126 | hex "Physical memory start address" |
137 | default "0x50000000" if MACH_G3EVM | 127 | default "0x40000000" if MACH_AP4EVB || MACH_AG5EVM || \ |
138 | default "0x40000000" if MACH_G4EVM || MACH_AP4EVB || MACH_AG5EVM || \ | ||
139 | MACH_MACKEREL || MACH_BONITO || \ | 128 | MACH_MACKEREL || MACH_BONITO || \ |
140 | MACH_ARMADILLO800EVA | 129 | MACH_ARMADILLO800EVA |
141 | default "0x41000000" if MACH_KOTA2 | 130 | default "0x41000000" if MACH_KOTA2 |
@@ -147,8 +136,6 @@ config MEMORY_START | |||
147 | 136 | ||
148 | config MEMORY_SIZE | 137 | config MEMORY_SIZE |
149 | hex "Physical memory size" | 138 | hex "Physical memory size" |
150 | default "0x08000000" if MACH_G3EVM | ||
151 | default "0x08000000" if MACH_G4EVM | ||
152 | default "0x20000000" if MACH_AG5EVM || MACH_BONITO || \ | 139 | default "0x20000000" if MACH_AG5EVM || MACH_BONITO || \ |
153 | MACH_ARMADILLO800EVA | 140 | MACH_ARMADILLO800EVA |
154 | default "0x1e000000" if MACH_KOTA2 | 141 | default "0x1e000000" if MACH_KOTA2 |
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index f4fd247bde61..0b7147928aa3 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -39,8 +39,6 @@ obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o | |||
39 | obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o | 39 | obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o |
40 | 40 | ||
41 | # Board objects | 41 | # Board objects |
42 | obj-$(CONFIG_MACH_G3EVM) += board-g3evm.o | ||
43 | obj-$(CONFIG_MACH_G4EVM) += board-g4evm.o | ||
44 | obj-$(CONFIG_MACH_AP4EVB) += board-ap4evb.o | 42 | obj-$(CONFIG_MACH_AP4EVB) += board-ap4evb.o |
45 | obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o | 43 | obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o |
46 | obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o | 44 | 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 2912eab3b967..fe27d7eda4bb 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 c826d77ab8a6..f274252e4705 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 | } |