diff options
| author | Koen Kooi <koen@openembedded.org> | 2010-05-03 22:53:37 +0200 |
|---|---|---|
| committer | Koen Kooi <koen@openembedded.org> | 2010-05-04 07:35:50 +0200 |
| commit | b8bc13a12d46d461c0a0ace1d9dce37dc816e741 (patch) | |
| tree | c240e584e5dd171ed8dcfe439b73c06d9f8b3435 /recipes | |
| parent | 4b90bc3e1bc9fbd2796de43e4eec6fbede5b4949 (diff) | |
linux-omap-psp 26.32: sync with beagleboard validation kernel again
This adds back support for the ds1307 RTC and adds support for the AT24 eeprom
Diffstat (limited to 'recipes')
50 files changed, 255 insertions, 2812 deletions
diff --git a/recipes/linux/linux-omap-psp-2.6.32/0001-Revert-omap3-beagle-Fix-compile-time-errors.patch b/recipes/linux/linux-omap-psp-2.6.32/0001-Revert-omap3-beagle-Fix-compile-time-errors.patch index 52d88a8d6e..5e81a16357 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0001-Revert-omap3-beagle-Fix-compile-time-errors.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0001-Revert-omap3-beagle-Fix-compile-time-errors.patch @@ -1,4 +1,4 @@ -From 0d26a081f4f4c6a44dcee0253e82307cc5020108 Mon Sep 17 00:00:00 2001 +From 6942ec9d19faef80770ae0f2302790d8ec73a9a7 Mon Sep 17 00:00:00 2001 From: Koen Kooi <koen@dominion.thruhere.net> Date: Fri, 30 Apr 2010 11:12:24 +0200 Subject: [PATCH 01/45] Revert "omap3: beagle: Fix compile-time errors" diff --git a/recipes/linux/linux-omap-psp-2.6.32/0002-board-omap3touchbook-make-it-build-against-TI-linux-.patch b/recipes/linux/linux-omap-psp-2.6.32/0002-board-omap3touchbook-make-it-build-against-TI-linux-.patch index 203f62ccd7..da4fc189d7 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0002-board-omap3touchbook-make-it-build-against-TI-linux-.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0002-board-omap3touchbook-make-it-build-against-TI-linux-.patch @@ -1,4 +1,4 @@ -From 1e5fa90b1ae86f063be692093d7816fb9e49ebf2 Mon Sep 17 00:00:00 2001 +From c5438f97d0ace3b414b13ef59a58427b9fd5b94b Mon Sep 17 00:00:00 2001 From: Koen Kooi <k-kooi@ti.com> Date: Sat, 30 Jan 2010 15:49:15 +0100 Subject: [PATCH 02/45] board-omap3touchbook: make it build against TI linux-omap 2.6.32-PSP diff --git a/recipes/linux/linux-omap-psp-2.6.32/0003-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board-f.patch b/recipes/linux/linux-omap-psp-2.6.32/0003-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board-f.patch index 3e4cb27fac..ba280ff546 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0003-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board-f.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0003-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board-f.patch @@ -1,4 +1,4 @@ -From 6f9bf44ddbcc2a6b90f27f58b72882207947ecdc Mon Sep 17 00:00:00 2001 +From 48e1df47cf683e4640ec3ae403b2e6dea7432d0c Mon Sep 17 00:00:00 2001 From: Steve Sakoman <sakoman@gmail.com> Date: Tue, 15 Dec 2009 15:34:29 -0800 Subject: [PATCH 03/45] ARM: OMAP: add support for TCT Zippy to Beagle board file diff --git a/recipes/linux/linux-omap-psp-2.6.32/0004-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch b/recipes/linux/linux-omap-psp-2.6.32/0004-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch index 0692c19324..ab88739b73 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0004-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0004-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch @@ -1,4 +1,4 @@ -From d31ec0c1e37e00cf8d9076fdb7e20e3be43061fc Mon Sep 17 00:00:00 2001 +From 97113a211c7fa07bc4fd34ea8fbe87551eec635d Mon Sep 17 00:00:00 2001 From: Steve Sakoman <steve@sakoman.com> Date: Thu, 17 Dec 2009 12:40:24 -0800 Subject: [PATCH 04/45] ARM: OMAP: Make beagle u-boot partition writable diff --git a/recipes/linux/linux-omap-psp-2.6.32/0005-board-omap3-beagle-add-DSS2-support.patch b/recipes/linux/linux-omap-psp-2.6.32/0005-board-omap3-beagle-add-DSS2-support.patch index 8f76c36333..01d95566ca 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0005-board-omap3-beagle-add-DSS2-support.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0005-board-omap3-beagle-add-DSS2-support.patch @@ -1,4 +1,4 @@ -From 754d5858dc66c523490172796a9217a5ce171a56 Mon Sep 17 00:00:00 2001 +From 48e9baa773af0d99e5f9121da26bb92a391e2853 Mon Sep 17 00:00:00 2001 From: Koen Kooi <koen@dominion.thruhere.net> Date: Wed, 10 Feb 2010 15:07:36 +0100 Subject: [PATCH 05/45] board-omap3-beagle: add DSS2 support diff --git a/recipes/linux/linux-omap-psp-2.6.32/0006-beagleboard-omap3_-foo-_rate_table-omap35x_-foo-_rat.patch b/recipes/linux/linux-omap-psp-2.6.32/0006-beagleboard-omap3_-foo-_rate_table-omap35x_-foo-_rat.patch index f777b315f2..4371aad924 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0006-beagleboard-omap3_-foo-_rate_table-omap35x_-foo-_rat.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0006-beagleboard-omap3_-foo-_rate_table-omap35x_-foo-_rat.patch @@ -1,4 +1,4 @@ -From 2186b66d5eeb3028d7c87a8dbdab626797d5bbbe Mon Sep 17 00:00:00 2001 +From 5be3bc924fbb66f7604763c617eecc4c5b009cb5 Mon Sep 17 00:00:00 2001 From: Koen Kooi <k-kooi@ti.com> Date: Wed, 27 Jan 2010 21:57:13 +0100 Subject: [PATCH 06/45] beagleboard: omap3_<foo>_rate_table -> omap35x_<foo>_rate_table diff --git a/recipes/linux/linux-omap-psp-2.6.32/0007-board-omap3beagle-prepare-for-DM3730-based-Beagleboa.patch b/recipes/linux/linux-omap-psp-2.6.32/0007-board-omap3beagle-prepare-for-DM3730-based-Beagleboa.patch index d3925d32ac..83ada2b602 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0007-board-omap3beagle-prepare-for-DM3730-based-Beagleboa.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0007-board-omap3beagle-prepare-for-DM3730-based-Beagleboa.patch @@ -1,4 +1,4 @@ -From ee1d0dcae9e02b451e66c68977482b1f33f8e76f Mon Sep 17 00:00:00 2001 +From 81f13d0f20e50503eb6baef9bb28a3ed2210154a Mon Sep 17 00:00:00 2001 From: Koen Kooi <k-kooi@ti.com> Date: Mon, 8 Feb 2010 16:30:59 +0100 Subject: [PATCH 07/45] board-omap3beagle: prepare for DM3730 based BeagleboardXM diff --git a/recipes/linux/linux-omap-psp-2.6.32/0010-board-omap3beagle-turn-on-power-to-camera-on-boot-an.patch b/recipes/linux/linux-omap-psp-2.6.32/0008-board-omap3beagle-turn-on-power-to-camera-on-boot-an.patch index 46bbf3fd16..a1ffaeeba1 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0010-board-omap3beagle-turn-on-power-to-camera-on-boot-an.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0008-board-omap3beagle-turn-on-power-to-camera-on-boot-an.patch @@ -1,17 +1,17 @@ -From 431a2624ebd41da4157caa3f52d6d0d6365f2a2c Mon Sep 17 00:00:00 2001 +From e97c34409d2b503f695586f613a447799e98fea8 Mon Sep 17 00:00:00 2001 From: Koen Kooi <k-kooi@ti.com> Date: Thu, 11 Feb 2010 20:23:01 +0100 -Subject: [PATCH 10/45] board-omap3beagle: turn on power to camera on boot and add some comments +Subject: [PATCH 08/45] board-omap3beagle: turn on power to camera on boot and add some comments --- arch/arm/mach-omap2/board-omap3beagle.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index e63bec6..91d835a 100644 +index accf80d..429dacb 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -327,9 +327,14 @@ static int beagle_twl_gpio_setup(struct device *dev, +@@ -321,9 +321,14 @@ static int beagle_twl_gpio_setup(struct device *dev, */ if (cpu_is_omap3630()) { diff --git a/recipes/linux/linux-omap-psp-2.6.32/0008-mt9t111-first-stab-at-merging-sensor-driver-based-on.patch b/recipes/linux/linux-omap-psp-2.6.32/0008-mt9t111-first-stab-at-merging-sensor-driver-based-on.patch deleted file mode 100644 index e5a62ee7b5..0000000000 --- a/recipes/linux/linux-omap-psp-2.6.32/0008-mt9t111-first-stab-at-merging-sensor-driver-based-on.patch +++ /dev/null @@ -1,2394 +0,0 @@ -From 915292ecac5fb947e51dc3eb192fdb3670dfc45f Mon Sep 17 00:00:00 2001 -From: Koen Kooi <k-kooi@ti.com> -Date: Tue, 9 Feb 2010 17:16:13 +0100 -Subject: [PATCH 08/45] mt9t111: first stab at merging sensor driver based on a patch by Leopard Imaging - ---- - drivers/media/video/Kconfig | 8 + - drivers/media/video/Makefile | 1 + - drivers/media/video/mt9t111.c | 883 ++++++++++++++++++++++++ - drivers/media/video/mt9t111_reg.h | 1364 +++++++++++++++++++++++++++++++++++++ - include/media/mt9t111.h | 79 +++ - 5 files changed, 2335 insertions(+), 0 deletions(-) - create mode 100644 drivers/media/video/mt9t111.c - create mode 100644 drivers/media/video/mt9t111_reg.h - create mode 100644 include/media/mt9t111.h - -diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig -index 41e39a7..f67ed46 100644 ---- a/drivers/media/video/Kconfig -+++ b/drivers/media/video/Kconfig -@@ -344,6 +344,14 @@ config VIDEO_MT9P012 - MT9P012 camera. It is currently working with the TI OMAP3 - camera controller. - -+config VIDEO_MT9T111 -+ tristate "Micron MT9T111 raw sensor driver (3MP)" -+ depends on I2C && VIDEO_V4L2 -+ ---help--- -+ This is a Video4Linux2 sensor-level driver for the Micron -+ MT9T111 camera. It is currently working with the TI OMAP3 -+ camera controller. -+ - config VIDEO_DW9710 - tristate "Lens driver for DW9710" - depends on I2C && VIDEO_V4L2 -diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile -index 88e8ec1..31688bf 100644 ---- a/drivers/media/video/Makefile -+++ b/drivers/media/video/Makefile -@@ -127,6 +127,7 @@ obj-$(CONFIG_VIDEO_CAFE_CCIC) += cafe_ccic.o - obj-y += isp/ - obj-$(CONFIG_VIDEO_OMAP3) += omap34xxcam.o - obj-$(CONFIG_VIDEO_MT9P012) += mt9p012.o -+obj-$(CONFIG_VIDEO_MT9T111) += mt9t111.o - obj-$(CONFIG_VIDEO_DW9710) += dw9710.o - obj-$(CONFIG_VIDEO_TPS61059) += tps61059.o - obj-$(CONFIG_VIDEO_OV3640) += ov3640.o -diff --git a/drivers/media/video/mt9t111.c b/drivers/media/video/mt9t111.c -new file mode 100644 -index 0000000..ecc5115 ---- /dev/null -+++ b/drivers/media/video/mt9t111.c -@@ -0,0 +1,883 @@ -+/* -+ * drivers/media/video/mt9t111.c -+ * -+ * mt9t111 sensor driver -+ * -+ * Copyright (C) 2009 Leopard Imaging -+ * -+ * This file is licensed under the terms of the GNU General Public License -+ * version 2. This program is licensed "as is" without any warranty of any -+ * kind, whether express or implied. -+ */ -+ -+#include <linux/i2c.h> -+#include <linux/delay.h> -+#include <media/v4l2-int-device.h> -+ -+#include <media/mt9t111.h> -+#include "mt9t111_reg.h" -+ -+#define USE_RAW // YCbCr mode does not work yet -+//#define COLOR_BAR // Create a Color bar test pattern, Blue, Green, Red, Grey -+ -+#define SENSOR_DETECTED 1 -+#define SENSOR_NOT_DETECTED 0 -+ -+static void mt9t111_loaddefault(struct i2c_client *client); -+ -+/* -+* as a place holder for further development -+*/ -+static void debug_dummy(char *in_msg) -+{ -+ -+} -+ -+/* list of image formats supported by mt9t111 sensor */ -+const static struct v4l2_fmtdesc mt9t111_formats[] = { -+#ifdef USE_RAW -+ { -+ .description = "RAW ", -+ .pixelformat = V4L2_PIX_FMT_SGRBG10, -+ }, -+#else -+ { -+ .description = "YUV 422 ", -+ .pixelformat = V4L2_PIX_FMT_YUYV, -+ }, -+#endif -+}; -+ -+#define NUM_CAPTURE_FORMATS ARRAY_SIZE(mt9t111_formats) -+ -+/* -+ * Array of image sizes supported by MT9T111. These must be ordered from -+ * smallest image size to largest. -+ */ -+const static struct capture_size mt9t111_sizes[] = { -+ { 640, 480 }, -+// { 2048, 1536} -+}; -+ -+#define NUM_CAPTURE_SIZE ARRAY_SIZE(mt9t111_sizes) -+ -+ -+const struct v4l2_fract mt9t111_frameintervals[] = { -+ { .numerator = 1, .denominator = 10 } -+}; -+ -+#define NUM_CAPTURE_FRAMEINTERVALS ARRAY_SIZE(mt9t111_frameintervals) -+ -+/** -+ * struct mt9t111_sensor - main structure for storage of sensor information -+ * @pdata: access functions and data for platform level information -+ * @v4l2_int_device: V4L2 device structure structure -+ * @i2c_client: iic client device structure -+ * @pix: V4L2 pixel format information structure -+ * @timeperframe: time per frame expressed as V4L fraction -+ * @scaler: -+ * @ver: mt9t111 chip version -+ * @fps: frames per second value -+ */ -+struct mt9t111_sensor { -+ const struct mt9t111_platform_data *pdata; -+ struct v4l2_int_device *v4l2_int_device; -+ struct i2c_client *i2c_client; -+ struct v4l2_pix_format pix; -+ struct v4l2_fract timeperframe; -+ int scaler; -+ int ver; -+ int fps; -+ int state; -+}; -+ -+static struct mt9t111_sensor mt9t111 = { -+ .timeperframe = { -+ .numerator = 1, -+ .denominator = 10, -+ }, -+ .state = SENSOR_NOT_DETECTED, -+}; -+ -+/** -+ * mt9t111_read_reg - Read a value from a register in an mt9t111 sensor device -+ * @client: i2c driver client structure -+ * @data_length: length of data to be read -+ * @reg: register address / offset -+ * @val: stores the value that gets read -+ * -+ * Read a value from a register in an mt9t111 sensor device. -+ * The value is returned in 'val'. -+ * Returns zero if successful, or non-zero otherwise. -+ */ -+static int -+mt9t111_read_reg(struct i2c_client *client, u16 reg, u16 *val) -+{ -+ struct i2c_msg msg[1]; -+ u8 data[4]; -+ int err; -+ -+ msg->addr = client->addr; -+ msg->flags = 0; -+ msg->len = 2; -+ msg->buf = data; -+ data[0] = (reg & 0xff00) >> 8; -+ data[1] = (reg & 0x00ff); -+ err = i2c_transfer(client->adapter, msg, 1); -+ if (err >= 0) { -+ msg->flags = I2C_M_RD; -+ msg->len = 2; /* 2 byte read */ -+ err = i2c_transfer(client->adapter, msg, 1); -+ if (err >= 0) { -+ *val = ((data[0] & 0x00ff) << 8) -+ | (data[1] & 0x00ff); -+ return 0; -+ } -+ } -+ return err; -+} -+ -+/** -+ * mt9t111_write_reg - Write a value to a register in an mt9t111 sensor device -+ * @client: i2c driver client structure -+ * @data_length: length of data to be read -+ * @reg: register address / offset -+ * @val: value to be written to specified register -+ * -+ * Write a value to a register in an mt9t111 sensor device. -+ * Returns zero if successful, or non-zero otherwise. -+ */ -+static int -+mt9t111_write_reg(struct i2c_client *client, u16 reg, u16 val) -+{ -+ struct i2c_msg msg[1]; -+ u8 data[20]; -+ int err; -+ -+ msg->addr = client->addr; -+ msg->flags = 0; -+ msg->len = 4; -+ msg->buf = data; -+ data[0] = (u8)((reg & 0xff00) >> 8); -+ data[1] = (u8)(reg & 0x00ff); -+ data[2] = (u8)((val & 0xff00) >> 8); -+ data[3] = (u8)(val & 0x00ff); -+ err = i2c_transfer(client->adapter, msg, 1); -+ -+ return err; -+} -+ -+/** -+ * mt9t111_write_regs - Write registers to an mt9t111 sensor device -+ * @client: i2c driver client structure -+ * @reg_in: pointer to registers to write -+ * @cnt: the number of registers -+ * -+ * Write registers . -+ * Returns zero if successful, or non-zero otherwise. -+ */ -+static int -+mt9t111_write_regs(struct i2c_client *client, mt9t111_regs *reg_in, int cnt) -+{ -+ int err = 0; -+ int i; -+ mt9t111_regs *reg = reg_in; -+ -+ for (i=0;i<cnt;i++) { -+ if (reg->delay_time == 0) { -+ err |= mt9t111_write_reg(client, reg->addr, reg->data); -+ } else if (reg->addr != 0 || reg->data != 0) { -+ err |= mt9t111_write_reg(client, reg->addr, reg->data); -+ mdelay(reg->delay_time); -+ } else -+ mdelay(reg->delay_time); -+ -+ if (err < 0) { -+ dev_warn(&client->dev, "write reg error, addr = 0x%x, data = 0x%x \n", \ -+ reg |
