diff options
Diffstat (limited to 'arch/arm/mach-mx3/mx31moboard-marxbot.c')
-rw-r--r-- | arch/arm/mach-mx3/mx31moboard-marxbot.c | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c index 1f44b9ccbb0f..3958515d75bf 100644 --- a/arch/arm/mach-mx3/mx31moboard-marxbot.c +++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c | |||
@@ -66,6 +66,9 @@ static unsigned int marxbot_pins[] = { | |||
66 | MX31_PIN_CSPI1_SS2__USBH1_RCV, MX31_PIN_CSPI1_SCLK__USBH1_OEB, | 66 | MX31_PIN_CSPI1_SS2__USBH1_RCV, MX31_PIN_CSPI1_SCLK__USBH1_OEB, |
67 | MX31_PIN_CSPI1_SPI_RDY__USBH1_FS, MX31_PIN_SFS6__USBH1_SUSPEND, | 67 | MX31_PIN_CSPI1_SPI_RDY__USBH1_FS, MX31_PIN_SFS6__USBH1_SUSPEND, |
68 | MX31_PIN_NFRE_B__GPIO1_11, MX31_PIN_NFALE__GPIO1_12, | 68 | MX31_PIN_NFRE_B__GPIO1_11, MX31_PIN_NFALE__GPIO1_12, |
69 | /* SEL */ | ||
70 | MX31_PIN_DTR_DCE1__GPIO2_8, MX31_PIN_DSR_DCE1__GPIO2_9, | ||
71 | MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11, | ||
69 | }; | 72 | }; |
70 | 73 | ||
71 | #define SDHC2_CD IOMUX_TO_GPIO(MX31_PIN_ATA_DIOR) | 74 | #define SDHC2_CD IOMUX_TO_GPIO(MX31_PIN_ATA_DIOR) |
@@ -127,12 +130,12 @@ static struct imxmmc_platform_data sdhc2_pdata = { | |||
127 | static void dspics_resets_init(void) | 130 | static void dspics_resets_init(void) |
128 | { | 131 | { |
129 | if (!gpio_request(TRSLAT_RST_B, "translator-rst")) { | 132 | if (!gpio_request(TRSLAT_RST_B, "translator-rst")) { |
130 | gpio_direction_output(TRSLAT_RST_B, 1); | 133 | gpio_direction_output(TRSLAT_RST_B, 0); |
131 | gpio_export(TRSLAT_RST_B, false); | 134 | gpio_export(TRSLAT_RST_B, false); |
132 | } | 135 | } |
133 | 136 | ||
134 | if (!gpio_request(DSPICS_RST_B, "dspics-rst")) { | 137 | if (!gpio_request(DSPICS_RST_B, "dspics-rst")) { |
135 | gpio_direction_output(DSPICS_RST_B, 1); | 138 | gpio_direction_output(DSPICS_RST_B, 0); |
136 | gpio_export(DSPICS_RST_B, false); | 139 | gpio_export(DSPICS_RST_B, false); |
137 | } | 140 | } |
138 | } | 141 | } |
@@ -200,7 +203,7 @@ static int __init marxbot_cam_init(void) | |||
200 | int ret = gpio_request(CAM_CHOICE, "cam-choice"); | 203 | int ret = gpio_request(CAM_CHOICE, "cam-choice"); |
201 | if (ret) | 204 | if (ret) |
202 | return ret; | 205 | return ret; |
203 | gpio_direction_output(CAM_CHOICE, 1); | 206 | gpio_direction_output(CAM_CHOICE, 0); |
204 | 207 | ||
205 | ret = gpio_request(BASECAM_RST_B, "basecam-reset"); | 208 | ret = gpio_request(BASECAM_RST_B, "basecam-reset"); |
206 | if (ret) | 209 | if (ret) |
@@ -223,6 +226,34 @@ static int __init marxbot_cam_init(void) | |||
223 | return 0; | 226 | return 0; |
224 | } | 227 | } |
225 | 228 | ||
229 | #define SEL0 IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1) | ||
230 | #define SEL1 IOMUX_TO_GPIO(MX31_PIN_DSR_DCE1) | ||
231 | #define SEL2 IOMUX_TO_GPIO(MX31_PIN_RI_DCE1) | ||
232 | #define SEL3 IOMUX_TO_GPIO(MX31_PIN_DCD_DCE1) | ||
233 | |||
234 | static void marxbot_init_sel_gpios(void) | ||
235 | { | ||
236 | if (!gpio_request(SEL0, "sel0")) { | ||
237 | gpio_direction_input(SEL0); | ||
238 | gpio_export(SEL0, true); | ||
239 | } | ||
240 | |||
241 | if (!gpio_request(SEL1, "sel1")) { | ||
242 | gpio_direction_input(SEL1); | ||
243 | gpio_export(SEL1, true); | ||
244 | } | ||
245 | |||
246 | if (!gpio_request(SEL2, "sel2")) { | ||
247 | gpio_direction_input(SEL2); | ||
248 | gpio_export(SEL2, true); | ||
249 | } | ||
250 | |||
251 | if (!gpio_request(SEL3, "sel3")) { | ||
252 | gpio_direction_input(SEL3); | ||
253 | gpio_export(SEL3, true); | ||
254 | } | ||
255 | } | ||
256 | |||
226 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ | 257 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ |
227 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) | 258 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) |
228 | 259 | ||
@@ -307,6 +338,8 @@ void __init mx31moboard_marxbot_init(void) | |||
307 | mxc_iomux_setup_multiple_pins(marxbot_pins, ARRAY_SIZE(marxbot_pins), | 338 | mxc_iomux_setup_multiple_pins(marxbot_pins, ARRAY_SIZE(marxbot_pins), |
308 | "marxbot"); | 339 | "marxbot"); |
309 | 340 | ||
341 | marxbot_init_sel_gpios(); | ||
342 | |||
310 | dspics_resets_init(); | 343 | dspics_resets_init(); |
311 | 344 | ||
312 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); | 345 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); |