aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-armadillo800eva.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-shmobile/board-armadillo800eva.c')
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva.c116
1 files changed, 49 insertions, 67 deletions
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index b85b2882dbd0..44a621505eeb 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -584,7 +584,7 @@ static struct regulator_init_data vcc_sdhi0_init_data = {
584static struct fixed_voltage_config vcc_sdhi0_info = { 584static struct fixed_voltage_config vcc_sdhi0_info = {
585 .supply_name = "SDHI0 Vcc", 585 .supply_name = "SDHI0 Vcc",
586 .microvolts = 3300000, 586 .microvolts = 3300000,
587 .gpio = GPIO_PORT75, 587 .gpio = 75,
588 .enable_high = 1, 588 .enable_high = 1,
589 .init_data = &vcc_sdhi0_init_data, 589 .init_data = &vcc_sdhi0_init_data,
590}; 590};
@@ -615,7 +615,7 @@ static struct regulator_init_data vccq_sdhi0_init_data = {
615}; 615};
616 616
617static struct gpio vccq_sdhi0_gpios[] = { 617static struct gpio vccq_sdhi0_gpios[] = {
618 {GPIO_PORT17, GPIOF_OUT_INIT_LOW, "vccq-sdhi0" }, 618 {17, GPIOF_OUT_INIT_LOW, "vccq-sdhi0" },
619}; 619};
620 620
621static struct gpio_regulator_state vccq_sdhi0_states[] = { 621static struct gpio_regulator_state vccq_sdhi0_states[] = {
@@ -626,7 +626,7 @@ static struct gpio_regulator_state vccq_sdhi0_states[] = {
626static struct gpio_regulator_config vccq_sdhi0_info = { 626static struct gpio_regulator_config vccq_sdhi0_info = {
627 .supply_name = "vqmmc", 627 .supply_name = "vqmmc",
628 628
629 .enable_gpio = GPIO_PORT74, 629 .enable_gpio = 74,
630 .enable_high = 1, 630 .enable_high = 1,
631 .enabled_at_boot = 0, 631 .enabled_at_boot = 0,
632 632
@@ -664,7 +664,7 @@ static struct regulator_init_data vcc_sdhi1_init_data = {
664static struct fixed_voltage_config vcc_sdhi1_info = { 664static struct fixed_voltage_config vcc_sdhi1_info = {
665 .supply_name = "SDHI1 Vcc", 665 .supply_name = "SDHI1 Vcc",
666 .microvolts = 3300000, 666 .microvolts = 3300000,
667 .gpio = GPIO_PORT16, 667 .gpio = 16,
668 .enable_high = 1, 668 .enable_high = 1,
669 .init_data = &vcc_sdhi1_init_data, 669 .init_data = &vcc_sdhi1_init_data,
670}; 670};
@@ -693,7 +693,7 @@ static struct sh_mobile_sdhi_info sdhi0_info = {
693 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | 693 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
694 MMC_CAP_POWER_OFF_CARD, 694 MMC_CAP_POWER_OFF_CARD,
695 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD, 695 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD,
696 .cd_gpio = GPIO_PORT167, 696 .cd_gpio = 167,
697}; 697};
698 698
699static struct resource sdhi0_resources[] = { 699static struct resource sdhi0_resources[] = {
@@ -736,7 +736,7 @@ static struct sh_mobile_sdhi_info sdhi1_info = {
736 MMC_CAP_POWER_OFF_CARD, 736 MMC_CAP_POWER_OFF_CARD,
737 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD, 737 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD,
738 /* Port72 cannot generate IRQs, will be used in polling mode. */ 738 /* Port72 cannot generate IRQs, will be used in polling mode. */
739 .cd_gpio = GPIO_PORT72, 739 .cd_gpio = 72,
740}; 740};
741 741
742static struct resource sdhi1_resources[] = { 742static struct resource sdhi1_resources[] = {
@@ -1046,6 +1046,35 @@ static struct platform_device *eva_devices[] __initdata = {
1046}; 1046};
1047 1047
1048static const struct pinctrl_map eva_pinctrl_map[] = { 1048static const struct pinctrl_map eva_pinctrl_map[] = {
1049 /* CEU0 */
1050 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-r8a7740",
1051 "ceu0_data_0_7", "ceu0"),
1052 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-r8a7740",
1053 "ceu0_clk_0", "ceu0"),
1054 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-r8a7740",
1055 "ceu0_sync", "ceu0"),
1056 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-r8a7740",
1057 "ceu0_field", "ceu0"),
1058 /* FSIA */
1059 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.0", "pfc-r8a7740",
1060 "fsia_sclk_in", "fsia"),
1061 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.0", "pfc-r8a7740",
1062 "fsia_mclk_out", "fsia"),
1063 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.0", "pfc-r8a7740",
1064 "fsia_data_in_1", "fsia"),
1065 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.0", "pfc-r8a7740",
1066 "fsia_data_out_0", "fsia"),
1067 /* FSIB */
1068 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.1", "pfc-r8a7740",
1069 "fsib_mclk_in", "fsib"),
1070 /* GETHER */
1071 PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7740",
1072 "gether_mii", "gether"),
1073 PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7740",
1074 "gether_int", "gether"),
1075 /* HDMI */
1076 PIN_MAP_MUX_GROUP_DEFAULT("sh-mobile-hdmi", "pfc-r8a7740",
1077 "hdmi", "hdmi"),
1049 /* LCD0 */ 1078 /* LCD0 */
1050 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740", 1079 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740",
1051 "lcd0_data24_0", "lcd0"), 1080 "lcd0_data24_0", "lcd0"),
@@ -1058,6 +1087,9 @@ static const struct pinctrl_map eva_pinctrl_map[] = {
1058 "mmc0_data8_1", "mmc0"), 1087 "mmc0_data8_1", "mmc0"),
1059 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a7740", 1088 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a7740",
1060 "mmc0_ctrl_1", "mmc0"), 1089 "mmc0_ctrl_1", "mmc0"),
1090 /* SCIFA1 */
1091 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.1", "pfc-r8a7740",
1092 "scifa1_data", "scifa1"),
1061 /* SDHI0 */ 1093 /* SDHI0 */
1062 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7740", 1094 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7740",
1063 "sdhi0_data4", "sdhi0"), 1095 "sdhi0_data4", "sdhi0"),
@@ -1065,6 +1097,12 @@ static const struct pinctrl_map eva_pinctrl_map[] = {
1065 "sdhi0_ctrl", "sdhi0"), 1097 "sdhi0_ctrl", "sdhi0"),
1066 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7740", 1098 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7740",
1067 "sdhi0_wp", "sdhi0"), 1099 "sdhi0_wp", "sdhi0"),
1100 /* ST1232 */
1101 PIN_MAP_MUX_GROUP_DEFAULT("0-0055", "pfc-r8a7740",
1102 "intc_irq10", "intc"),
1103 /* USBHS */
1104 PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs", "pfc-r8a7740",
1105 "intc_irq7_1", "intc"),
1068}; 1106};
1069 1107
1070static void __init eva_clock_init(void) 1108static void __init eva_clock_init(void)
@@ -1119,40 +1157,14 @@ static void __init eva_init(void)
1119 r8a7740_pinmux_init(); 1157 r8a7740_pinmux_init();
1120 r8a7740_meram_workaround(); 1158 r8a7740_meram_workaround();
1121 1159
1122 /* SCIFA1 */
1123 gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
1124 gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
1125
1126 /* LCDC0 */ 1160 /* LCDC0 */
1127 gpio_request(GPIO_FN_LCDC0_SELECT, NULL);
1128
1129 gpio_request_one(61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ 1161 gpio_request_one(61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
1130 gpio_request_one(202, GPIOF_OUT_INIT_LOW, NULL); /* LCD0_LED_CONT */ 1162 gpio_request_one(202, GPIOF_OUT_INIT_LOW, NULL); /* LCD0_LED_CONT */
1131 1163
1132 /* Touchscreen */ 1164 /* Touchscreen */
1133 gpio_request(GPIO_FN_IRQ10, NULL); /* TP_INT */ 1165 gpio_request_one(166, GPIOF_OUT_INIT_HIGH, NULL); /* TP_RST_B */
1134 1166
1135 /* GETHER */ 1167 /* GETHER */
1136 gpio_request(GPIO_FN_ET_CRS, NULL);
1137 gpio_request(GPIO_FN_ET_MDC, NULL);
1138 gpio_request(GPIO_FN_ET_MDIO, NULL);
1139 gpio_request(GPIO_FN_ET_TX_ER, NULL);
1140 gpio_request(GPIO_FN_ET_RX_ER, NULL);
1141 gpio_request(GPIO_FN_ET_ERXD0, NULL);
1142 gpio_request(GPIO_FN_ET_ERXD1, NULL);
1143 gpio_request(GPIO_FN_ET_ERXD2, NULL);
1144 gpio_request(GPIO_FN_ET_ERXD3, NULL);
1145 gpio_request(GPIO_FN_ET_TX_CLK, NULL);
1146 gpio_request(GPIO_FN_ET_TX_EN, NULL);
1147 gpio_request(GPIO_FN_ET_ETXD0, NULL);
1148 gpio_request(GPIO_FN_ET_ETXD1, NULL);
1149 gpio_request(GPIO_FN_ET_ETXD2, NULL);
1150 gpio_request(GPIO_FN_ET_ETXD3, NULL);
1151 gpio_request(GPIO_FN_ET_PHY_INT, NULL);
1152 gpio_request(GPIO_FN_ET_COL, NULL);
1153 gpio_request(GPIO_FN_ET_RX_DV, NULL);
1154 gpio_request(GPIO_FN_ET_RX_CLK, NULL);
1155
1156 gpio_request_one(18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */ 1168 gpio_request_one(18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */
1157 1169
1158 /* USB */ 1170 /* USB */
@@ -1163,34 +1175,17 @@ static void __init eva_init(void)
1163 } else { 1175 } else {
1164 /* USB Func */ 1176 /* USB Func */
1165 /* 1177 /*
1166 * A1 chip has 2 IRQ7 pin and it was controled by MSEL register. 1178 * The USBHS interrupt handlers needs to read the IRQ pin value
1167 * OTOH, usbhs interrupt needs its value (HI/LOW) to decide 1179 * (HI/LOW) to diffentiate USB connection and disconnection
1168 * USB connection/disconnection (usbhsf_get_vbus()). 1180 * events (usbhsf_get_vbus()). We thus need to select both the
1169 * This means we needs to select GPIO_FN_IRQ7_PORT209 first, 1181 * intc_irq7_1 pin group and GPIO 209 here.
1170 * and select GPIO 209 here
1171 */ 1182 */
1172 gpio_request(GPIO_FN_IRQ7_PORT209, NULL);
1173 gpio_request_one(209, GPIOF_IN, NULL); 1183 gpio_request_one(209, GPIOF_IN, NULL);
1174 1184
1175 platform_device_register(&usbhsf_device); 1185 platform_device_register(&usbhsf_device);
1176 usb = &usbhsf_device; 1186 usb = &usbhsf_device;
1177 } 1187 }
1178 1188
1179 /* CEU0 */
1180 gpio_request(GPIO_FN_VIO0_D7, NULL);
1181 gpio_request(GPIO_FN_VIO0_D6, NULL);
1182 gpio_request(GPIO_FN_VIO0_D5, NULL);
1183 gpio_request(GPIO_FN_VIO0_D4, NULL);
1184 gpio_request(GPIO_FN_VIO0_D3, NULL);
1185 gpio_request(GPIO_FN_VIO0_D2, NULL);
1186 gpio_request(GPIO_FN_VIO0_D1, NULL);
1187 gpio_request(GPIO_FN_VIO0_D0, NULL);
1188 gpio_request(GPIO_FN_VIO0_CLK, NULL);
1189 gpio_request(GPIO_FN_VIO0_HD, NULL);
1190 gpio_request(GPIO_FN_VIO0_VD, NULL);
1191 gpio_request(GPIO_FN_VIO0_FIELD, NULL);
1192 gpio_request(GPIO_FN_VIO_CKO, NULL);
1193
1194 /* CON1/CON15 Camera */ 1189 /* CON1/CON15 Camera */
1195 gpio_request_one(173, GPIOF_OUT_INIT_LOW, NULL); /* STANDBY */ 1190 gpio_request_one(173, GPIOF_OUT_INIT_LOW, NULL); /* STANDBY */
1196 gpio_request_one(172, GPIOF_OUT_INIT_HIGH, NULL); /* RST */ 1191 gpio_request_one(172, GPIOF_OUT_INIT_HIGH, NULL); /* RST */
@@ -1198,24 +1193,11 @@ static void __init eva_init(void)
1198 gpio_request_one(158, GPIOF_OUT_INIT_LOW, NULL); /* CAM_PON */ 1193 gpio_request_one(158, GPIOF_OUT_INIT_LOW, NULL); /* CAM_PON */
1199 1194
1200 /* FSI-WM8978 */ 1195 /* FSI-WM8978 */
1201 gpio_request(GPIO_FN_FSIAIBT, NULL);
1202 gpio_request(GPIO_FN_FSIAILR, NULL);
1203 gpio_request(GPIO_FN_FSIAOMC, NULL);
1204 gpio_request(GPIO_FN_FSIAOSLD, NULL);
1205 gpio_request(GPIO_FN_FSIAISLD_PORT5, NULL);
1206
1207 gpio_request(7, NULL); 1196 gpio_request(7, NULL);
1208 gpio_request(8, NULL); 1197 gpio_request(8, NULL);
1209 gpio_direction_none(GPIO_PORT7CR); /* FSIAOBT needs no direction */ 1198 gpio_direction_none(GPIO_PORT7CR); /* FSIAOBT needs no direction */
1210 gpio_direction_none(GPIO_PORT8CR); /* FSIAOLR needs no direction */ 1199 gpio_direction_none(GPIO_PORT8CR); /* FSIAOLR needs no direction */
1211 1200
1212 /* FSI-HDMI */
1213 gpio_request(GPIO_FN_FSIBCK, NULL);
1214
1215 /* HDMI */
1216 gpio_request(GPIO_FN_HDMI_HPD, NULL);
1217 gpio_request(GPIO_FN_HDMI_CEC, NULL);
1218
1219 /* 1201 /*
1220 * CAUTION 1202 * CAUTION
1221 * 1203 *