diff options
Diffstat (limited to 'arch/sh/boards/mach-migor/setup.c')
-rw-r--r-- | arch/sh/boards/mach-migor/setup.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index 769d63043424..975281980299 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c | |||
@@ -288,8 +288,11 @@ static struct clk *camera_clk; | |||
288 | 288 | ||
289 | static void camera_power_on(void) | 289 | static void camera_power_on(void) |
290 | { | 290 | { |
291 | /* Use 10 MHz VIO_CKO instead of 24 MHz to work | ||
292 | * around signal quality issues on Panel Board V2.1. | ||
293 | */ | ||
291 | camera_clk = clk_get(NULL, "video_clk"); | 294 | camera_clk = clk_get(NULL, "video_clk"); |
292 | clk_set_rate(camera_clk, 24000000); | 295 | clk_set_rate(camera_clk, 10000000); |
293 | clk_enable(camera_clk); /* start VIO_CKO */ | 296 | clk_enable(camera_clk); /* start VIO_CKO */ |
294 | 297 | ||
295 | /* use VIO_RST to take camera out of reset */ | 298 | /* use VIO_RST to take camera out of reset */ |
@@ -307,10 +310,18 @@ static void camera_power_off(void) | |||
307 | gpio_set_value(GPIO_PTT3, 0); | 310 | gpio_set_value(GPIO_PTT3, 0); |
308 | } | 311 | } |
309 | 312 | ||
313 | static void camera_power(int mode) | ||
314 | { | ||
315 | if (mode) | ||
316 | camera_power_on(); | ||
317 | else | ||
318 | camera_power_off(); | ||
319 | } | ||
320 | |||
310 | #ifdef CONFIG_I2C | 321 | #ifdef CONFIG_I2C |
311 | static unsigned char camera_ov772x_magic[] = | 322 | static unsigned char camera_ov772x_magic[] = |
312 | { | 323 | { |
313 | 0x09, 0x01, 0x0c, 0x10, 0x0d, 0x41, 0x0e, 0x01, | 324 | 0x09, 0x01, 0x0c, 0x20, 0x0d, 0x41, 0x0e, 0x01, |
314 | 0x12, 0x00, 0x13, 0x8F, 0x14, 0x4A, 0x15, 0x00, | 325 | 0x12, 0x00, 0x13, 0x8F, 0x14, 0x4A, 0x15, 0x00, |
315 | 0x16, 0x00, 0x17, 0x23, 0x18, 0xa0, 0x19, 0x07, | 326 | 0x16, 0x00, 0x17, 0x23, 0x18, 0xa0, 0x19, 0x07, |
316 | 0x1a, 0xf0, 0x1b, 0x40, 0x1f, 0x00, 0x20, 0x10, | 327 | 0x1a, 0xf0, 0x1b, 0x40, 0x1f, 0x00, 0x20, 0x10, |
@@ -386,6 +397,7 @@ static struct soc_camera_platform_info ov772x_info = { | |||
386 | }, | 397 | }, |
387 | .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH | | 398 | .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH | |
388 | SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8, | 399 | SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8, |
400 | .power = camera_power, | ||
389 | .set_capture = ov772x_set_capture, | 401 | .set_capture = ov772x_set_capture, |
390 | }; | 402 | }; |
391 | 403 | ||
@@ -400,8 +412,6 @@ static struct platform_device migor_camera_device = { | |||
400 | static struct sh_mobile_ceu_info sh_mobile_ceu_info = { | 412 | static struct sh_mobile_ceu_info sh_mobile_ceu_info = { |
401 | .flags = SOCAM_MASTER | SOCAM_DATAWIDTH_8 | SOCAM_PCLK_SAMPLE_RISING \ | 413 | .flags = SOCAM_MASTER | SOCAM_DATAWIDTH_8 | SOCAM_PCLK_SAMPLE_RISING \ |
402 | | SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH, | 414 | | SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH, |
403 | .enable_camera = camera_power_on, | ||
404 | .disable_camera = camera_power_off, | ||
405 | }; | 415 | }; |
406 | 416 | ||
407 | static struct resource migor_ceu_resources[] = { | 417 | static struct resource migor_ceu_resources[] = { |