aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c24
-rw-r--r--arch/arm/mach-shmobile/include/mach/head-ap4evb.txt7
-rw-r--r--arch/arm/mach-shmobile/include/mach/head-mackerel.txt7
3 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index b000bcdf5249..ad7e14aba164 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -729,6 +729,15 @@ static struct platform_device sdhi1_device = {
729}; 729};
730#endif 730#endif
731 731
732/*
733 * The card detect pin of the top SD/MMC slot (CN23) is active low and is
734 * connected to GPIO SCIFB_SCK of SH7372 (GPIO_PORT162).
735 */
736static int slot_cn23_get_cd(struct platform_device *pdev)
737{
738 return !gpio_get_value(GPIO_PORT162);
739}
740
732/* SDHI2 */ 741/* SDHI2 */
733static struct sh_mobile_sdhi_info sdhi2_info = { 742static struct sh_mobile_sdhi_info sdhi2_info = {
734 .dma_slave_tx = SHDMA_SLAVE_SDHI2_TX, 743 .dma_slave_tx = SHDMA_SLAVE_SDHI2_TX,
@@ -736,6 +745,7 @@ static struct sh_mobile_sdhi_info sdhi2_info = {
736 .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE, 745 .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE,
737 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | 746 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
738 MMC_CAP_NEEDS_POLL, 747 MMC_CAP_NEEDS_POLL,
748 .get_cd = slot_cn23_get_cd,
739}; 749};
740 750
741static struct resource sdhi2_resources[] = { 751static struct resource sdhi2_resources[] = {
@@ -953,6 +963,7 @@ static struct tca6416_keys_platform_data mackerel_tca6416_keys_info = {
953}; 963};
954 964
955/* I2C */ 965/* I2C */
966#define IRQ7 evt2irq(0x02e0)
956#define IRQ9 evt2irq(0x0320) 967#define IRQ9 evt2irq(0x0320)
957 968
958static struct i2c_board_info i2c0_devices[] = { 969static struct i2c_board_info i2c0_devices[] = {
@@ -965,6 +976,11 @@ static struct i2c_board_info i2c0_devices[] = {
965 .platform_data = &mackerel_tca6416_keys_info, 976 .platform_data = &mackerel_tca6416_keys_info,
966 .irq = IRQ9, 977 .irq = IRQ9,
967 }, 978 },
979 /* Touchscreen */
980 {
981 I2C_BOARD_INFO("st1232-ts", 0x55),
982 .irq = IRQ7,
983 },
968}; 984};
969 985
970#define IRQ21 evt2irq(0x32a0) 986#define IRQ21 evt2irq(0x32a0)
@@ -1092,6 +1108,10 @@ static void __init mackerel_init(void)
1092 gpio_request(GPIO_FN_IRQ9_42, NULL); 1108 gpio_request(GPIO_FN_IRQ9_42, NULL);
1093 set_irq_type(IRQ9, IRQ_TYPE_LEVEL_HIGH); 1109 set_irq_type(IRQ9, IRQ_TYPE_LEVEL_HIGH);
1094 1110
1111 /* enable Touchscreen */
1112 gpio_request(GPIO_FN_IRQ7_40, NULL);
1113 set_irq_type(IRQ7, IRQ_TYPE_LEVEL_LOW);
1114
1095 /* enable Accelerometer */ 1115 /* enable Accelerometer */
1096 gpio_request(GPIO_FN_IRQ21, NULL); 1116 gpio_request(GPIO_FN_IRQ21, NULL);
1097 set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH); 1117 set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);
@@ -1127,6 +1147,10 @@ static void __init mackerel_init(void)
1127 gpio_request(GPIO_FN_SDHID2_1, NULL); 1147 gpio_request(GPIO_FN_SDHID2_1, NULL);
1128 gpio_request(GPIO_FN_SDHID2_0, NULL); 1148 gpio_request(GPIO_FN_SDHID2_0, NULL);
1129 1149
1150 /* card detect pin for microSD slot (CN23) */
1151 gpio_request(GPIO_PORT162, NULL);
1152 gpio_direction_input(GPIO_PORT162);
1153
1130 /* MMCIF */ 1154 /* MMCIF */
1131 gpio_request(GPIO_FN_MMCD0_0, NULL); 1155 gpio_request(GPIO_FN_MMCD0_0, NULL);
1132 gpio_request(GPIO_FN_MMCD0_1, NULL); 1156 gpio_request(GPIO_FN_MMCD0_1, NULL);
diff --git a/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt b/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt
index e3ebfa73956e..efd3687ba190 100644
--- a/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt
+++ b/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt
@@ -85,3 +85,10 @@ ED 0xE6150004, 0x80331050
85WAIT 1, 0xFE40009C 85WAIT 1, 0xFE40009C
86 86
87ED 0xE6150354, 0x00000002 87ED 0xE6150354, 0x00000002
88
89LIST "SCIF0 - Serial port for earlyprintk"
90EB 0xE6053098, 0x11
91EB 0xE6053098, 0xe1
92EW 0xE6C40000, 0x0000
93EB 0xE6C40004, 0x19
94EW 0xE6C40008, 0x3000
diff --git a/arch/arm/mach-shmobile/include/mach/head-mackerel.txt b/arch/arm/mach-shmobile/include/mach/head-mackerel.txt
index e3ebfa73956e..efd3687ba190 100644
--- a/arch/arm/mach-shmobile/include/mach/head-mackerel.txt
+++ b/arch/arm/mach-shmobile/include/mach/head-mackerel.txt
@@ -85,3 +85,10 @@ ED 0xE6150004, 0x80331050
85WAIT 1, 0xFE40009C 85WAIT 1, 0xFE40009C
86 86
87ED 0xE6150354, 0x00000002 87ED 0xE6150354, 0x00000002
88
89LIST "SCIF0 - Serial port for earlyprintk"
90EB 0xE6053098, 0x11
91EB 0xE6053098, 0xe1
92EW 0xE6C40000, 0x0000
93EB 0xE6C40004, 0x19
94EW 0xE6C40008, 0x3000