diff options
author | Valentin Longchamp <valentin.longchamp@epfl.ch> | 2010-02-09 12:13:36 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-02-10 05:11:56 -0500 |
commit | e335c75cf32b7014f84c90bbe7ed9b7ecd8e7778 (patch) | |
tree | 44182d22d8a9befa3eedb747a20294bb5b24369b /arch/arm/mach-mx3/mx31moboard-marxbot.c | |
parent | cda82f85c2bba92daa3d017f7c7bc5f8c61a2e11 (diff) |
mx31moboard: support for the smartbot baseboard
This baseboard is used on the handbot and eybot robots.
The sel gpios are used as enables and rst signals on smartbot, thus the
sel init is moved from mx31moboard file to board files.
Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3/mx31moboard-marxbot.c')
-rw-r--r-- | arch/arm/mach-mx3/mx31moboard-marxbot.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c index 7f6f58cddcb1..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) |
@@ -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); |