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.c65
1 files changed, 30 insertions, 35 deletions
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 5353adf6b828..9008ad102a88 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -124,6 +124,14 @@
124 * this command is required when playback. 124 * this command is required when playback.
125 * 125 *
126 * # amixer set "Headphone" 50 126 * # amixer set "Headphone" 50
127 *
128 * this command is required when capture.
129 *
130 * # amixer set "Input PGA" 15
131 * # amixer set "Left Input Mixer MicP" on
132 * # amixer set "Left Input Mixer MicN" on
133 * # amixer set "Right Input Mixer MicN" on
134 * # amixer set "Right Input Mixer MicP" on
127 */ 135 */
128 136
129/* 137/*
@@ -700,9 +708,9 @@ static int mt9t111_power(struct device *dev, int mode)
700 /* video1 (= CON1 camera) expect 24MHz */ 708 /* video1 (= CON1 camera) expect 24MHz */
701 clk_set_rate(mclk, clk_round_rate(mclk, 24000000)); 709 clk_set_rate(mclk, clk_round_rate(mclk, 24000000));
702 clk_enable(mclk); 710 clk_enable(mclk);
703 gpio_direction_output(GPIO_PORT158, 1); 711 gpio_set_value(GPIO_PORT158, 1);
704 } else { 712 } else {
705 gpio_direction_output(GPIO_PORT158, 0); 713 gpio_set_value(GPIO_PORT158, 0);
706 clk_disable(mclk); 714 clk_disable(mclk);
707 } 715 }
708 716
@@ -992,16 +1000,12 @@ static void __init eva_init(void)
992 gpio_request(GPIO_FN_LCD0_DISP, NULL); 1000 gpio_request(GPIO_FN_LCD0_DISP, NULL);
993 gpio_request(GPIO_FN_LCD0_LCLK_PORT165, NULL); 1001 gpio_request(GPIO_FN_LCD0_LCLK_PORT165, NULL);
994 1002
995 gpio_request(GPIO_PORT61, NULL); /* LCDDON */ 1003 gpio_request_one(GPIO_PORT61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
996 gpio_direction_output(GPIO_PORT61, 1); 1004 gpio_request_one(GPIO_PORT202, GPIOF_OUT_INIT_LOW, NULL); /* LCD0_LED_CONT */
997
998 gpio_request(GPIO_PORT202, NULL); /* LCD0_LED_CONT */
999 gpio_direction_output(GPIO_PORT202, 0);
1000 1005
1001 /* Touchscreen */ 1006 /* Touchscreen */
1002 gpio_request(GPIO_FN_IRQ10, NULL); /* TP_INT */ 1007 gpio_request(GPIO_FN_IRQ10, NULL); /* TP_INT */
1003 gpio_request(GPIO_PORT166, NULL); /* TP_RST_B */ 1008 gpio_request_one(GPIO_PORT166, GPIOF_OUT_INIT_HIGH, NULL); /* TP_RST_B */
1004 gpio_direction_output(GPIO_PORT166, 1);
1005 1009
1006 /* GETHER */ 1010 /* GETHER */
1007 gpio_request(GPIO_FN_ET_CRS, NULL); 1011 gpio_request(GPIO_FN_ET_CRS, NULL);
@@ -1024,12 +1028,10 @@ static void __init eva_init(void)
1024 gpio_request(GPIO_FN_ET_RX_DV, NULL); 1028 gpio_request(GPIO_FN_ET_RX_DV, NULL);
1025 gpio_request(GPIO_FN_ET_RX_CLK, NULL); 1029 gpio_request(GPIO_FN_ET_RX_CLK, NULL);
1026 1030
1027 gpio_request(GPIO_PORT18, NULL); /* PHY_RST */ 1031 gpio_request_one(GPIO_PORT18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */
1028 gpio_direction_output(GPIO_PORT18, 1);
1029 1032
1030 /* USB */ 1033 /* USB */
1031 gpio_request(GPIO_PORT159, NULL); /* USB_DEVICE_MODE */ 1034 gpio_request_one(GPIO_PORT159, GPIOF_IN, NULL); /* USB_DEVICE_MODE */
1032 gpio_direction_input(GPIO_PORT159);
1033 1035
1034 if (gpio_get_value(GPIO_PORT159)) { 1036 if (gpio_get_value(GPIO_PORT159)) {
1035 /* USB Host */ 1037 /* USB Host */
@@ -1043,8 +1045,7 @@ static void __init eva_init(void)
1043 * and select GPIO_PORT209 here 1045 * and select GPIO_PORT209 here
1044 */ 1046 */
1045 gpio_request(GPIO_FN_IRQ7_PORT209, NULL); 1047 gpio_request(GPIO_FN_IRQ7_PORT209, NULL);
1046 gpio_request(GPIO_PORT209, NULL); 1048 gpio_request_one(GPIO_PORT209, GPIOF_IN, NULL);
1047 gpio_direction_input(GPIO_PORT209);
1048 1049
1049 platform_device_register(&usbhsf_device); 1050 platform_device_register(&usbhsf_device);
1050 usb = &usbhsf_device; 1051 usb = &usbhsf_device;
@@ -1059,12 +1060,9 @@ static void __init eva_init(void)
1059 gpio_request(GPIO_FN_SDHI0_D3, NULL); 1060 gpio_request(GPIO_FN_SDHI0_D3, NULL);
1060 gpio_request(GPIO_FN_SDHI0_WP, NULL); 1061 gpio_request(GPIO_FN_SDHI0_WP, NULL);
1061 1062
1062 gpio_request(GPIO_PORT17, NULL); /* SDHI0_18/33_B */ 1063 gpio_request_one(GPIO_PORT17, GPIOF_OUT_INIT_LOW, NULL); /* SDHI0_18/33_B */
1063 gpio_request(GPIO_PORT74, NULL); /* SDHI0_PON */ 1064 gpio_request_one(GPIO_PORT74, GPIOF_OUT_INIT_HIGH, NULL); /* SDHI0_PON */
1064 gpio_request(GPIO_PORT75, NULL); /* SDSLOT1_PON */ 1065 gpio_request_one(GPIO_PORT75, GPIOF_OUT_INIT_HIGH, NULL); /* SDSLOT1_PON */
1065 gpio_direction_output(GPIO_PORT17, 0);
1066 gpio_direction_output(GPIO_PORT74, 1);
1067 gpio_direction_output(GPIO_PORT75, 1);
1068 1066
1069 /* we can use GPIO_FN_IRQ31_PORT167 here for SDHI0 CD irq */ 1067 /* we can use GPIO_FN_IRQ31_PORT167 here for SDHI0 CD irq */
1070 1068
@@ -1101,12 +1099,10 @@ static void __init eva_init(void)
1101 gpio_request(GPIO_FN_VIO_CKO, NULL); 1099 gpio_request(GPIO_FN_VIO_CKO, NULL);
1102 1100
1103 /* CON1/CON15 Camera */ 1101 /* CON1/CON15 Camera */
1104 gpio_request(GPIO_PORT173, NULL); /* STANDBY */ 1102 gpio_request_one(GPIO_PORT173, GPIOF_OUT_INIT_LOW, NULL); /* STANDBY */
1105 gpio_request(GPIO_PORT172, NULL); /* RST */ 1103 gpio_request_one(GPIO_PORT172, GPIOF_OUT_INIT_HIGH, NULL); /* RST */
1106 gpio_request(GPIO_PORT158, NULL); /* CAM_PON */ 1104 /* see mt9t111_power() */
1107 gpio_direction_output(GPIO_PORT173, 0); 1105 gpio_request_one(GPIO_PORT158, GPIOF_OUT_INIT_LOW, NULL); /* CAM_PON */
1108 gpio_direction_output(GPIO_PORT172, 1);
1109 gpio_direction_output(GPIO_PORT158, 0); /* see mt9t111_power() */
1110 1106
1111 /* FSI-WM8978 */ 1107 /* FSI-WM8978 */
1112 gpio_request(GPIO_FN_FSIAIBT, NULL); 1108 gpio_request(GPIO_FN_FSIAIBT, NULL);
@@ -1133,15 +1129,13 @@ static void __init eva_init(void)
1133 * DBGMD/LCDC0/FSIA MUX 1129 * DBGMD/LCDC0/FSIA MUX
1134 * DBGMD_SELECT_B should be set after setting PFC Function. 1130 * DBGMD_SELECT_B should be set after setting PFC Function.
1135 */ 1131 */
1136 gpio_request(GPIO_PORT176, NULL); 1132 gpio_request_one(GPIO_PORT176, GPIOF_OUT_INIT_HIGH, NULL);
1137 gpio_direction_output(GPIO_PORT176, 1);
1138 1133
1139 /* 1134 /*
1140 * We can switch CON8/CON14 by SW1.5, 1135 * We can switch CON8/CON14 by SW1.5,
1141 * but it needs after DBGMD_SELECT_B 1136 * but it needs after DBGMD_SELECT_B
1142 */ 1137 */
1143 gpio_request(GPIO_PORT6, NULL); 1138 gpio_request_one(GPIO_PORT6, GPIOF_IN, NULL);
1144 gpio_direction_input(GPIO_PORT6);
1145 if (gpio_get_value(GPIO_PORT6)) { 1139 if (gpio_get_value(GPIO_PORT6)) {
1146 /* CON14 enable */ 1140 /* CON14 enable */
1147 } else { 1141 } else {
@@ -1155,8 +1149,8 @@ static void __init eva_init(void)
1155 gpio_request(GPIO_FN_SDHI1_CD, NULL); 1149 gpio_request(GPIO_FN_SDHI1_CD, NULL);
1156 gpio_request(GPIO_FN_SDHI1_WP, NULL); 1150 gpio_request(GPIO_FN_SDHI1_WP, NULL);
1157 1151
1158 gpio_request(GPIO_PORT16, NULL); /* SDSLOT2_PON */ 1152 /* SDSLOT2_PON */
1159 gpio_direction_output(GPIO_PORT16, 1); 1153 gpio_request_one(GPIO_PORT16, GPIOF_OUT_INIT_HIGH, NULL);
1160 1154
1161 platform_device_register(&sdhi1_device); 1155 platform_device_register(&sdhi1_device);
1162 } 1156 }
@@ -1175,8 +1169,6 @@ static void __init eva_init(void)
1175 platform_add_devices(eva_devices, 1169 platform_add_devices(eva_devices,
1176 ARRAY_SIZE(eva_devices)); 1170 ARRAY_SIZE(eva_devices));
1177 1171
1178 eva_clock_init();
1179
1180 rmobile_add_device_to_domain("A4LC", &lcdc0_device); 1172 rmobile_add_device_to_domain("A4LC", &lcdc0_device);
1181 rmobile_add_device_to_domain("A4LC", &hdmi_lcdc_device); 1173 rmobile_add_device_to_domain("A4LC", &hdmi_lcdc_device);
1182 if (usb) 1174 if (usb)
@@ -1187,6 +1179,9 @@ static void __init eva_earlytimer_init(void)
1187{ 1179{
1188 r8a7740_clock_init(MD_CK0 | MD_CK2); 1180 r8a7740_clock_init(MD_CK0 | MD_CK2);
1189 shmobile_earlytimer_init(); 1181 shmobile_earlytimer_init();
1182
1183 /* the rate of extal1 clock must be set before late_time_init */
1184 eva_clock_init();
1190} 1185}
1191 1186
1192static void __init eva_add_early_devices(void) 1187static void __init eva_add_early_devices(void)