I found that CONFIG_OMAP_MUX must be enabled in the kernel menuconfig in order to be able to toggle the gpio lines.

However, I still can't get the vsync/hsync to produce the desired signal.


correction: I said 74/75, but it's actually 94/95

On Mon, Aug 2, 2010 at 9:47 PM, AJ ONeal <coolaj86+cIqudQyv@gmail.com> wrote:
I'm trying to get a raw capture device to work through the ccdc/isp.

However, I can't get a signal across CAM_HS/hsync/gpio74 and CAM_VS/vsync/gpio75.

I've tried checking the ribbon cable directly with a probe and it's always at 1.

I've tried setting the gpios manually through /sys/class/gpio/gpio74, but it's still 1.

Are there some special registers I need to set to get access to these pins? Something else which uses them that I need to disable?


I've got the linux-omap-psp and I've got a modified version of the mt9t111 driver to support raw capture from my device.
The modification is that the i2c checks are disabled so that /dev/video0 will always show up.



Excerpts from my board-overo.c below:

static struct omap_board_mux board_mux[] __initdata = {
  /* Camera - Parallel Data */
  // copied from board-beagleboard.c
  OMAP3_MUX(CAM_D0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
  // ... omitted for brevity
  OMAP3_MUX(CAM_D11, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
  OMAP3_MUX(CAM_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),

  /* Camera - HS/VS signals */
  OMAP3_MUX(CAM_HS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
  OMAP3_MUX(CAM_VS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
  //OMAP3_MUX(CAM_HS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), // as GPIO
  //OMAP3_MUX(CAM_VS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), // as GPIO

  { .reg_offset = OMAP_MUX_TERMINATOR },
};

#define OVERO_GPIO_CAM_HS 94
#define OVERO_GPIO_CAM_VS 95

static void __init custom_cam_gpio_init(void)
{
    printk("... initing custom_cam_gpio");
    if ((gpio_request(OVERO_GPIO_CAM_HS, "OVERO_GPIO_CAM_HS") == 0) &&
        (gpio_direction_output(OVERO_GPIO_CAM_HS, 1) == 0)) {
      if (0 == gpio_export(OVERO_GPIO_CAM_HS, 0)) {
        printk("exported custom_cam_gpio 94");
      } else {
        printk("didn't export custom_cam 94");
      }
    } else {
      printk(KERN_ERR "could not obtain custom_cam gpio for "
                          "OVERO_GPIO_CAM_HS\n");
    }

    if ((gpio_request(OVERO_GPIO_CAM_VS, "OVERO_GPIO_CAM_VS") == 0) &&
        (gpio_direction_output(OVERO_GPIO_CAM_VS, 1) == 0)) {
      if(0 == gpio_export(OVERO_GPIO_CAM_VS, 0)) {
        printk("exported custom_cam_gpio 95");
      } else {
        printk("didin't export custom_cam 95");
      }
    } else {
      printk(KERN_ERR "could not obtain custom_cam gpio for "
                          "OVERO_GPIO_CAM_VS\n");
    }
}

static void __init overo_init(void)
{
  overo_i2c_init();
  // ... omitted for brevity
  omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
  custom_cam_gpio_init();

// ... omitted for brevity
}