Commit c92b67fa authored by Jean-Paul Saman's avatar Jean-Paul Saman

Neuros OSD2 board's tvp7000 video decoder driver (WIP)

parent 83d25e2d
......@@ -28,7 +28,14 @@
#include <linux/mtd/partitions.h>
#include <linux/clk.h>
#include <linux/videodev2.h>
#ifdef CONFIG_VIDEO_TVP5150
#include <media/tvp5150.h>
#endif
#ifdef CONFIG_VIDEO_TVP7000
#include <media/tvp7000.h>
#endif
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
......@@ -212,7 +219,7 @@ static struct v4l2_input tvp5150_inputs[] = {
#endif
#ifdef CONFIG_VIDEO_TVP7000
static struct v4l2_input tvp7000_inputs[] = {
static struct vl42_input tvp7000_inputs[] = {
{
.index = 0,
.name = "Component",
......@@ -255,6 +262,7 @@ static struct vpfe_route tvp7000_routes[] = {
};
#endif
#if defined(CONFIG_VIDEO_TVP5150) || defined(CONFIG_VIDEO_TVP7000)
static struct vpfe_subdev_info ntosd2_vpfe_sub_devs[] = {
#ifdef CONFIG_VIDEO_TVP5150
{
......@@ -289,7 +297,7 @@ static struct vpfe_subdev_info ntosd2_vpfe_sub_devs[] = {
.vdpol = VPFE_PINPOL_POSITIVE,
},
.board_info = {
I2C_BOARD_INFO("tvp7000", 0x5c), // 0xfa
I2C_BOARD_INFO("tvp7000", 0xfa), // 0x5c
.platform_data = NULL, // &tvp7000_pdata,
},
},
......@@ -302,6 +310,7 @@ static struct vpfe_config ntosd2_vpfe_cfg = {
.card_name = "DM6446 EVM",
.ccdc = "DM6446 CCDC",
};
#endif
static struct platform_device *davinci_ntosd2_devices[] __initdata = {
&davinci_fb_device,
......@@ -331,7 +340,7 @@ static struct i2c_board_info __initdata ntosd2_i2c_info[] = {
I2C_BOARD_INFO("neuros_osd2_msp", NTOSD2_MSP430_I2C_ADDR),
},
{
I2C_BOARD_INFO("tlv320aic3x", NTOSD2_AUDIOSOC_I2C_ADDR ),
I2C_BOARD_INFO("tlv320aic3x", NTOSD2_AUDIOSOC_I2C_ADDR),
},
};
......
......@@ -392,6 +392,15 @@ config VIDEO_TVP5150
To compile this driver as a module, choose M here: the
module will be called tvp5150.
config VIDEO_TVP7000
tristate "Texas Instruments TVP7000 video capture driver"
depends on VIDEO_V4L2 && I2C
---help---
Support for I2C bus based TVP7000 configuration.
To compile this driver as a module, choose M here: the
module will be called tvp7000.
config VIDEO_VPX3220
tristate "vpx3220a, vpx3216b & vpx3214c video decoders"
depends on VIDEO_V4L2 && I2C
......
......@@ -54,6 +54,7 @@ obj-$(CONFIG_VIDEO_BT866) += bt866.o
obj-$(CONFIG_VIDEO_KS0127) += ks0127.o
obj-$(CONFIG_VIDEO_THS7303) += ths7303.o
obj-$(CONFIG_VIDEO_VINO) += indycam.o
obj-$(CONFIG_VIDEO_TVP7000) += tvp7000.o
obj-$(CONFIG_VIDEO_TVP5150) += tvp5150.o
obj-$(CONFIG_VIDEO_TVP514X) += tvp514x.o
obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o
......
This diff is collapsed.
/*
* Copyright(C) 2006-2008 Neuros Technology International LLC.
* <www.neurostechnology.com>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 2 of the License.
*
* This program is distributed in the hope that, in addition to its
* original purpose to support Neuros hardware, it will be useful
* otherwise, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
****************************************************************************
*
* tvp7000 driver header.
*
*/
#ifndef TVP7000_REGS_H__
#define TVP7000_REGS_H__
#define TVP7000_CHIP_REVISION 0x00
#define TVP7000_PLL_DIVIDE_MSB 0x01
#define TVP7000_PLL_DIVIDE_LSB 0x02
#define TVP7000_PLL_CTRL 0x03
#define TVP7000_PHASE_SELECT 0x04
#define TVP7000_CLAMP_START 0x05
#define TVP7000_CLAMP_WIDTH 0x06
#define TVP7000_HSYNC_OUTPUT_WIDTH 0x07
#define TVP7000_BLUE_FINE_GAIN 0x08
#define TVP7000_GREEN_FINE_GAIN 0x09
#define TVP7000_RED_FINE_GAIN 0x0A
#define TVP7000_BLUE_FINE_OFFSET 0x0B
#define TVP7000_GREEN_FINE_OFFSET 0x0C
#define TVP7000_RED_FINE_OFFSET 0x0D
#define TVP7000_SYNC_CTRL_1 0x0E
#define TVP7000_PLL_CLAMP_CTRL 0x0F
#define TVP7000_SYNC_ON_GREEN 0x10
#define TVP7000_SYNC_SEPARATOR 0x11
#define TVP7000_PRE_COAST 0x12
#define TVP7000_POST_COAST 0x13
#define TVP7000_SYNC_DETECT_STATUS 0x14
#define TVP7000_OUTPUT_FORMATTER 0x15
#define TVP7000_TEST_REG 0x16
/* Reserved 0x17 - 0x18 */
#define TVP7000_INPUT_MUX_1 0x19
#define TVP7000_INPUT_MUX_2 0x1A
#define TVP7000_BLUE_GREEN_GAIN 0x1B
#define TVP7000_RED_COARSE_GAIN 0x1C
#define TVP7000_FINE_OFFSET_LSB 0x1D
#define TVP7000_BLUE_COARSE_OFFSET 0x1E
#define TVP7000_GREEN_COARSE_OFFSET 0x1F
#define TVP7000_RED_COARSE_OFFSET 0x20
#define TVP7000_HSOUT_OUTPUT_START 0x21
#define TVP7000_MISC_CTRL 0x22
/* Reserved 0x23 - 0x25 */
#define TVP7000_AUTO_CTRL_ENABLE 0x26
/* Reserved 0x27 */
#define TVP7000_AUTO_CTRL_FILTER 0x28
/* Reserved 0x29 */
#define TVP7000_FINE_CLAMP_CTRL 0x2A
#define TVP7000_POWER_CTRL 0x2B
#define TVP7000_ADC_SETUP 0x2C
#define TVP7000_COARSE_CLAMP_CTRL_1 0x2D
#define TVP7000_SOG_CLAMP 0x2E
/* Reserved 0x2F - 0x30 */
#define TVP7000_ALC_PLACEMENT 0x31
/* Tokens for register write */
#define TOK_WRITE (0) /* token for write operation */
#define TOK_TERM (1) /* terminating token */
#define TOK_DELAY (2) /* delay token for reg list */
#define TOK_SKIP (3) /* token to skip a register */
/**
* struct tvp7000_reg - Structure for TVP7000 register initialization values
* @token - Token: TOK_WRITE, TOK_TERM etc..
* @reg - Register offset
* @val - Register Value for TOK_WRITE or delay in ms for TOK_DELAY
*/
struct tvp7000_reg {
u8 token;
u8 reg;
u8 val;
};
#endif /* TVP7000_REGS_H__ */
......@@ -665,6 +665,13 @@ typedef __u64 v4l2_std_id;
#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000)
#define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000)
/*FOR COMPONENT*/
#define V4L2_STD_HD_480P ((v4l2_std_id)0x04000000)
#define V4L2_STD_HD_576P ((v4l2_std_id)0x08000000)
#define V4L2_STD_HD_720P ((v4l2_std_id)0x10000000)
#define V4L2_STD_HD_1080I ((v4l2_std_id)0x20000000)
#define V4L2_STD_HD_1080P ((v4l2_std_id)0x40000000)
/* FIXME:
Although std_id is 64 bits, there is an issue on PPC32 architecture that
makes switch(__u64) to break. So, there's a hack on v4l2-common.c rounding
......
/*
* Copyright(C) 2006-2008 Neuros Technology International LLC.
* <www.neurostechnology.com>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 2 of the License.
*
* This program is distributed in the hope that, in addition to its
* original purpose to support Neuros hardware, it will be useful
* otherwise, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
****************************************************************************
*
// * tvp7000 driver header.
*
*/
#ifndef TVP7000_H__
#define TVP7000_H__
#define TVP7000_COMPONENT 2
/* TVP7000 HW outputs */
#define TVP7000_NORMAL_SCREEN 0
#define TVP7000_BLACK_SCREEN 1
#endif /* TVP7000_H__ */
......@@ -129,6 +129,9 @@ enum {
V4L2_IDENT_SAA6752HS = 6752,
V4L2_IDENT_SAA6752HS_AC3 = 6753,
/* module tvp7000 */
V4L2_IDENT_TVP7000 = 7000,
/* module adv7170: just ident 7170 */
V4L2_IDENT_ADV7170 = 7170,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment