aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mx31moboard-devboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx3/mx31moboard-devboard.c')
-rw-r--r--arch/arm/mach-mx3/mx31moboard-devboard.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/mx31moboard-devboard.c b/arch/arm/mach-mx3/mx31moboard-devboard.c
index 438428eaf769..9fbad2eb3a49 100644
--- a/arch/arm/mach-mx3/mx31moboard-devboard.c
+++ b/arch/arm/mach-mx3/mx31moboard-devboard.c
@@ -49,6 +49,9 @@ static unsigned int devboard_pins[] = {
49 MX31_PIN_CSPI1_SS2__USBH1_RCV, MX31_PIN_CSPI1_SCLK__USBH1_OEB, 49 MX31_PIN_CSPI1_SS2__USBH1_RCV, MX31_PIN_CSPI1_SCLK__USBH1_OEB,
50 MX31_PIN_CSPI1_SPI_RDY__USBH1_FS, MX31_PIN_SFS6__USBH1_SUSPEND, 50 MX31_PIN_CSPI1_SPI_RDY__USBH1_FS, MX31_PIN_SFS6__USBH1_SUSPEND,
51 MX31_PIN_NFRE_B__GPIO1_11, MX31_PIN_NFALE__GPIO1_12, 51 MX31_PIN_NFRE_B__GPIO1_11, MX31_PIN_NFALE__GPIO1_12,
52 /* SEL */
53 MX31_PIN_DTR_DCE1__GPIO2_8, MX31_PIN_DSR_DCE1__GPIO2_9,
54 MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11,
52}; 55};
53 56
54static struct imxuart_platform_data uart_pdata = { 57static struct imxuart_platform_data uart_pdata = {
@@ -108,6 +111,33 @@ static struct imxmmc_platform_data sdhc2_pdata = {
108 .exit = devboard_sdhc2_exit, 111 .exit = devboard_sdhc2_exit,
109}; 112};
110 113
114#define SEL0 IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1)
115#define SEL1 IOMUX_TO_GPIO(MX31_PIN_DSR_DCE1)
116#define SEL2 IOMUX_TO_GPIO(MX31_PIN_RI_DCE1)
117#define SEL3 IOMUX_TO_GPIO(MX31_PIN_DCD_DCE1)
118
119static void devboard_init_sel_gpios(void)
120{
121 if (!gpio_request(SEL0, "sel0")) {
122 gpio_direction_input(SEL0);
123 gpio_export(SEL0, true);
124 }
125
126 if (!gpio_request(SEL1, "sel1")) {
127 gpio_direction_input(SEL1);
128 gpio_export(SEL1, true);
129 }
130
131 if (!gpio_request(SEL2, "sel2")) {
132 gpio_direction_input(SEL2);
133 gpio_export(SEL2, true);
134 }
135
136 if (!gpio_request(SEL3, "sel3")) {
137 gpio_direction_input(SEL3);
138 gpio_export(SEL3, true);
139 }
140}
111#define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ 141#define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \
112 PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) 142 PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU)
113 143
@@ -196,5 +226,7 @@ void __init mx31moboard_devboard_init(void)
196 226
197 mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); 227 mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata);
198 228
229 devboard_init_sel_gpios();
230
199 devboard_usbh1_init(); 231 devboard_usbh1_init();
200} 232}