diff options
Diffstat (limited to 'arch/arm/mach-imx/mach-imx27_visstrim_m10.c')
-rw-r--r-- | arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index dff82eb57cd9..ba09552fe5fe 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
39 | #include <asm/mach/arch.h> | 39 | #include <asm/mach/arch.h> |
40 | #include <asm/mach/time.h> | 40 | #include <asm/mach/time.h> |
41 | #include <asm/system.h> | 41 | #include <asm/system_info.h> |
42 | #include <mach/common.h> | 42 | #include <mach/common.h> |
43 | #include <mach/iomux-mx27.h> | 43 | #include <mach/iomux-mx27.h> |
44 | 44 | ||
@@ -116,6 +116,8 @@ static const int visstrim_m10_pins[] __initconst = { | |||
116 | PB23_PF_USB_PWR, | 116 | PB23_PF_USB_PWR, |
117 | PB24_PF_USB_OC, | 117 | PB24_PF_USB_OC, |
118 | /* CSI */ | 118 | /* CSI */ |
119 | TVP5150_RSTN | GPIO_GPIO | GPIO_OUT, | ||
120 | TVP5150_PWDN | GPIO_GPIO | GPIO_OUT, | ||
119 | PB10_PF_CSI_D0, | 121 | PB10_PF_CSI_D0, |
120 | PB11_PF_CSI_D1, | 122 | PB11_PF_CSI_D1, |
121 | PB12_PF_CSI_D2, | 123 | PB12_PF_CSI_D2, |
@@ -147,6 +149,24 @@ static struct gpio visstrim_m10_version_gpios[] = { | |||
147 | { MOTHERBOARD_BIT2, GPIOF_IN, "mother-version-2" }, | 149 | { MOTHERBOARD_BIT2, GPIOF_IN, "mother-version-2" }, |
148 | }; | 150 | }; |
149 | 151 | ||
152 | static const struct gpio visstrim_m10_gpios[] __initconst = { | ||
153 | { | ||
154 | .gpio = TVP5150_RSTN, | ||
155 | .flags = GPIOF_DIR_OUT | GPIOF_INIT_HIGH, | ||
156 | .label = "tvp5150_rstn", | ||
157 | }, | ||
158 | { | ||
159 | .gpio = TVP5150_PWDN, | ||
160 | .flags = GPIOF_DIR_OUT | GPIOF_INIT_LOW, | ||
161 | .label = "tvp5150_pwdn", | ||
162 | }, | ||
163 | { | ||
164 | .gpio = OTG_PHY_CS_GPIO, | ||
165 | .flags = GPIOF_DIR_OUT | GPIOF_INIT_LOW, | ||
166 | .label = "usbotg_cs", | ||
167 | }, | ||
168 | }; | ||
169 | |||
150 | /* Camera */ | 170 | /* Camera */ |
151 | static int visstrim_camera_power(struct device *dev, int on) | 171 | static int visstrim_camera_power(struct device *dev, int on) |
152 | { | 172 | { |
@@ -190,13 +210,6 @@ static void __init visstrim_camera_init(void) | |||
190 | struct platform_device *pdev; | 210 | struct platform_device *pdev; |
191 | int dma; | 211 | int dma; |
192 | 212 | ||
193 | /* Initialize tvp5150 gpios */ | ||
194 | mxc_gpio_mode(TVP5150_RSTN | GPIO_GPIO | GPIO_OUT); | ||
195 | mxc_gpio_mode(TVP5150_PWDN | GPIO_GPIO | GPIO_OUT); | ||
196 | gpio_set_value(TVP5150_RSTN, 1); | ||
197 | gpio_set_value(TVP5150_PWDN, 0); | ||
198 | ndelay(1); | ||
199 | |||
200 | gpio_set_value(TVP5150_PWDN, 1); | 213 | gpio_set_value(TVP5150_PWDN, 1); |
201 | ndelay(1); | 214 | ndelay(1); |
202 | gpio_set_value(TVP5150_RSTN, 0); | 215 | gpio_set_value(TVP5150_RSTN, 0); |
@@ -377,10 +390,6 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = { | |||
377 | /* USB OTG */ | 390 | /* USB OTG */ |
378 | static int otg_phy_init(struct platform_device *pdev) | 391 | static int otg_phy_init(struct platform_device *pdev) |
379 | { | 392 | { |
380 | gpio_set_value(OTG_PHY_CS_GPIO, 0); | ||
381 | |||
382 | mdelay(10); | ||
383 | |||
384 | return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED); | 393 | return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED); |
385 | } | 394 | } |
386 | 395 | ||
@@ -435,6 +444,11 @@ static void __init visstrim_m10_board_init(void) | |||
435 | if (ret) | 444 | if (ret) |
436 | pr_err("Failed to setup pins (%d)\n", ret); | 445 | pr_err("Failed to setup pins (%d)\n", ret); |
437 | 446 | ||
447 | ret = gpio_request_array(visstrim_m10_gpios, | ||
448 | ARRAY_SIZE(visstrim_m10_gpios)); | ||
449 | if (ret) | ||
450 | pr_err("Failed to request gpios (%d)\n", ret); | ||
451 | |||
438 | imx27_add_imx_ssi(0, &visstrim_m10_ssi_pdata); | 452 | imx27_add_imx_ssi(0, &visstrim_m10_ssi_pdata); |
439 | imx27_add_imx_uart0(&uart_pdata); | 453 | imx27_add_imx_uart0(&uart_pdata); |
440 | 454 | ||