diff options
Diffstat (limited to 'recipes/linux/linux-omap-2.6.39/camera/0002-OMAP3BEAGLE-Add-support-for-mt9p031-sensor-driver.patch')
-rw-r--r-- | recipes/linux/linux-omap-2.6.39/camera/0002-OMAP3BEAGLE-Add-support-for-mt9p031-sensor-driver.patch | 142 |
1 files changed, 0 insertions, 142 deletions
diff --git a/recipes/linux/linux-omap-2.6.39/camera/0002-OMAP3BEAGLE-Add-support-for-mt9p031-sensor-driver.patch b/recipes/linux/linux-omap-2.6.39/camera/0002-OMAP3BEAGLE-Add-support-for-mt9p031-sensor-driver.patch deleted file mode 100644 index 68a762b25b..0000000000 --- a/recipes/linux/linux-omap-2.6.39/camera/0002-OMAP3BEAGLE-Add-support-for-mt9p031-sensor-driver.patch +++ /dev/null @@ -1,142 +0,0 @@ -From 186ab3a6cd3f1751b4e60044d8207eb95c4b224a Mon Sep 17 00:00:00 2001 -From: Javier Martin <javier.martin@vista-silicon.com> -Date: Wed, 25 May 2011 10:09:23 +0200 -Subject: [PATCH 2/4] OMAP3BEAGLE: Add support for mt9p031 sensor driver. - -isp.h file has to be included as a temporal measure -since clocks of the isp are not exposed yet. - -Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> ---- - arch/arm/mach-omap2/board-omap3beagle.c | 73 ++++++++++++++++++++++++++++++- - 1 files changed, 72 insertions(+), 1 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index 221bfda..9af1cf8 100644 ---- a/arch/arm/mach-omap2/board-omap3beagle.c -+++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -25,15 +25,21 @@ - #include <linux/input.h> - #include <linux/gpio_keys.h> - #include <linux/opp.h> -+#include <linux/i2c.h> -+#include <linux/mm.h> -+#include <linux/videodev2.h> - - #include <linux/mtd/mtd.h> - #include <linux/mtd/partitions.h> - #include <linux/mtd/nand.h> - #include <linux/mmc/host.h> - -+#include <linux/gpio.h> - #include <linux/regulator/machine.h> - #include <linux/i2c/twl.h> - -+#include <media/mt9p031.h> -+ - #include <mach/hardware.h> - #include <asm/mach-types.h> - #include <asm/mach/arch.h> -@@ -48,11 +54,17 @@ - #include <plat/nand.h> - #include <plat/usb.h> - #include <plat/omap_device.h> -+#include <plat/i2c.h> - - #include "mux.h" - #include "hsmmc.h" - #include "timer-gp.h" - #include "pm.h" -+#include "devices.h" -+#include "../../../drivers/media/video/omap3isp/isp.h" -+ -+#define MT9P031_RESET_GPIO 98 -+#define MT9P031_XCLK ISP_XCLK_A - - #define NAND_BLOCK_SIZE SZ_128K - -@@ -734,7 +746,7 @@ static int __init omap3_beagle_i2c_init(void) - { - omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo, - ARRAY_SIZE(beagle_i2c1_boardinfo)); -- omap_register_i2c_bus(2, 400, beagle_i2c2_boardinfo, -+ omap_register_i2c_bus(2, 100, beagle_i2c2_boardinfo, - ARRAY_SIZE(beagle_i2c2_boardinfo)); - /* Bus 3 is attached to the DVI port where devices like the pico DLP - * projector don't work reliably with 400kHz */ -@@ -935,6 +947,60 @@ static void __init beagle_opp_init(void) - return; - } - -+static int beagle_cam_set_xclk(struct v4l2_subdev *subdev, int hz) -+{ -+ struct isp_device *isp = v4l2_dev_to_isp_device(subdev->v4l2_dev); -+ int ret; -+ -+ ret = isp->platform_cb.set_xclk(isp, hz, MT9P031_XCLK); -+ return 0; -+} -+ -+static int beagle_cam_reset(struct v4l2_subdev *subdev, int active) -+{ -+ /* Set RESET_BAR to !active */ -+ gpio_set_value(MT9P031_RESET_GPIO, !active); -+ -+ return 0; -+} -+ -+static struct mt9p031_platform_data beagle_mt9p031_platform_data = { -+ .set_xclk = beagle_cam_set_xclk, -+ .reset = beagle_cam_reset, -+}; -+ -+static struct i2c_board_info mt9p031_camera_i2c_device = { -+ I2C_BOARD_INFO("mt9p031", 0x48), -+ .platform_data = &beagle_mt9p031_platform_data, -+}; -+ -+static struct isp_subdev_i2c_board_info mt9p031_camera_subdevs[] = { -+ { -+ .board_info = &mt9p031_camera_i2c_device, -+ .i2c_adapter_id = 2, -+ }, -+ { NULL, 0, }, -+}; -+ -+static struct isp_v4l2_subdevs_group beagle_camera_subdevs[] = { -+ { -+ .subdevs = mt9p031_camera_subdevs, -+ .interface = ISP_INTERFACE_PARALLEL, -+ .bus = { -+ .parallel = { -+ .data_lane_shift = 0, -+ .clk_pol = 1, -+ .bridge = ISPCTRL_PAR_BRIDGE_DISABLE, -+ } -+ }, -+ }, -+ { }, -+}; -+ -+static struct isp_platform_data beagle_isp_platform_data = { -+ .subdevs = beagle_camera_subdevs, -+}; -+ - static void __init omap3_beagle_init(void) - { - omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); -@@ -1024,6 +1090,11 @@ static void __init omap3_beagle_init(void) - - beagle_display_init(); - beagle_opp_init(); -+ -+ /* Enable camera */ -+ gpio_request(MT9P031_RESET_GPIO, "cam_rst"); -+ gpio_direction_output(MT9P031_RESET_GPIO, 0); -+ omap3_init_camera(&beagle_isp_platform_data); - } - - early_param("buddy", expansionboard_setup); --- -1.6.6.1 - |