Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
c92b67fa
Commit
c92b67fa
authored
Nov 30, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Neuros OSD2 board's tvp7000 video decoder driver (WIP)
parent
83d25e2d
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1628 additions
and
3 deletions
+1628
-3
arch/arm/mach-davinci/board-neuros-osd2.c
arch/arm/mach-davinci/board-neuros-osd2.c
+12
-3
drivers/media/video/Kconfig
drivers/media/video/Kconfig
+9
-0
drivers/media/video/Makefile
drivers/media/video/Makefile
+1
-0
drivers/media/video/tvp7000.c
drivers/media/video/tvp7000.c
+1469
-0
drivers/media/video/tvp7000_regs.h
drivers/media/video/tvp7000_regs.h
+93
-0
include/linux/videodev2.h
include/linux/videodev2.h
+7
-0
include/media/tvp7000.h
include/media/tvp7000.h
+34
-0
include/media/v4l2-chip-ident.h
include/media/v4l2-chip-ident.h
+3
-0
No files found.
arch/arm/mach-davinci/board-neuros-osd2.c
View file @
c92b67fa
...
@@ -28,7 +28,14 @@
...
@@ -28,7 +28,14 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/partitions.h>
#include <linux/clk.h>
#include <linux/clk.h>
#include <linux/videodev2.h>
#include <linux/videodev2.h>
#ifdef CONFIG_VIDEO_TVP5150
#include <media/tvp5150.h>
#include <media/tvp5150.h>
#endif
#ifdef CONFIG_VIDEO_TVP7000
#include <media/tvp7000.h>
#endif
#include <asm/mach-types.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/arch.h>
...
@@ -212,7 +219,7 @@ static struct v4l2_input tvp5150_inputs[] = {
...
@@ -212,7 +219,7 @@ static struct v4l2_input tvp5150_inputs[] = {
#endif
#endif
#ifdef CONFIG_VIDEO_TVP7000
#ifdef CONFIG_VIDEO_TVP7000
static
struct
v
4l
2_input
tvp7000_inputs
[]
=
{
static
struct
v
l4
2_input
tvp7000_inputs
[]
=
{
{
{
.
index
=
0
,
.
index
=
0
,
.
name
=
"Component"
,
.
name
=
"Component"
,
...
@@ -255,6 +262,7 @@ static struct vpfe_route tvp7000_routes[] = {
...
@@ -255,6 +262,7 @@ static struct vpfe_route tvp7000_routes[] = {
};
};
#endif
#endif
#if defined(CONFIG_VIDEO_TVP5150) || defined(CONFIG_VIDEO_TVP7000)
static
struct
vpfe_subdev_info
ntosd2_vpfe_sub_devs
[]
=
{
static
struct
vpfe_subdev_info
ntosd2_vpfe_sub_devs
[]
=
{
#ifdef CONFIG_VIDEO_TVP5150
#ifdef CONFIG_VIDEO_TVP5150
{
{
...
@@ -289,7 +297,7 @@ static struct vpfe_subdev_info ntosd2_vpfe_sub_devs[] = {
...
@@ -289,7 +297,7 @@ static struct vpfe_subdev_info ntosd2_vpfe_sub_devs[] = {
.
vdpol
=
VPFE_PINPOL_POSITIVE
,
.
vdpol
=
VPFE_PINPOL_POSITIVE
,
},
},
.
board_info
=
{
.
board_info
=
{
I2C_BOARD_INFO
(
"tvp7000"
,
0x
5c
),
// 0xfa
I2C_BOARD_INFO
(
"tvp7000"
,
0x
fa
),
// 0x5c
.
platform_data
=
NULL
,
// &tvp7000_pdata,
.
platform_data
=
NULL
,
// &tvp7000_pdata,
},
},
},
},
...
@@ -302,6 +310,7 @@ static struct vpfe_config ntosd2_vpfe_cfg = {
...
@@ -302,6 +310,7 @@ static struct vpfe_config ntosd2_vpfe_cfg = {
.
card_name
=
"DM6446 EVM"
,
.
card_name
=
"DM6446 EVM"
,
.
ccdc
=
"DM6446 CCDC"
,
.
ccdc
=
"DM6446 CCDC"
,
};
};
#endif
static
struct
platform_device
*
davinci_ntosd2_devices
[]
__initdata
=
{
static
struct
platform_device
*
davinci_ntosd2_devices
[]
__initdata
=
{
&
davinci_fb_device
,
&
davinci_fb_device
,
...
@@ -331,7 +340,7 @@ static struct i2c_board_info __initdata ntosd2_i2c_info[] = {
...
@@ -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
(
"neuros_osd2_msp"
,
NTOSD2_MSP430_I2C_ADDR
),
},
},
{
{
I2C_BOARD_INFO
(
"tlv320aic3x"
,
NTOSD2_AUDIOSOC_I2C_ADDR
),
I2C_BOARD_INFO
(
"tlv320aic3x"
,
NTOSD2_AUDIOSOC_I2C_ADDR
),
},
},
};
};
...
...
drivers/media/video/Kconfig
View file @
c92b67fa
...
@@ -392,6 +392,15 @@ config VIDEO_TVP5150
...
@@ -392,6 +392,15 @@ config VIDEO_TVP5150
To compile this driver as a module, choose M here: the
To compile this driver as a module, choose M here: the
module will be called tvp5150.
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
config VIDEO_VPX3220
tristate "vpx3220a, vpx3216b & vpx3214c video decoders"
tristate "vpx3220a, vpx3216b & vpx3214c video decoders"
depends on VIDEO_V4L2 && I2C
depends on VIDEO_V4L2 && I2C
...
...
drivers/media/video/Makefile
View file @
c92b67fa
...
@@ -54,6 +54,7 @@ obj-$(CONFIG_VIDEO_BT866) += bt866.o
...
@@ -54,6 +54,7 @@ obj-$(CONFIG_VIDEO_BT866) += bt866.o
obj-$(CONFIG_VIDEO_KS0127)
+=
ks0127.o
obj-$(CONFIG_VIDEO_KS0127)
+=
ks0127.o
obj-$(CONFIG_VIDEO_THS7303)
+=
ths7303.o
obj-$(CONFIG_VIDEO_THS7303)
+=
ths7303.o
obj-$(CONFIG_VIDEO_VINO)
+=
indycam.o
obj-$(CONFIG_VIDEO_VINO)
+=
indycam.o
obj-$(CONFIG_VIDEO_TVP7000)
+=
tvp7000.o
obj-$(CONFIG_VIDEO_TVP5150)
+=
tvp5150.o
obj-$(CONFIG_VIDEO_TVP5150)
+=
tvp5150.o
obj-$(CONFIG_VIDEO_TVP514X)
+=
tvp514x.o
obj-$(CONFIG_VIDEO_TVP514X)
+=
tvp514x.o
obj-$(CONFIG_VIDEO_MSP3400)
+=
msp3400.o
obj-$(CONFIG_VIDEO_MSP3400)
+=
msp3400.o
...
...
drivers/media/video/tvp7000.c
0 → 100644
View file @
c92b67fa
This diff is collapsed.
Click to expand it.
drivers/media/video/tvp7000_regs.h
0 → 100644
View file @
c92b67fa
/*
* 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__ */
include/linux/videodev2.h
View file @
c92b67fa
...
@@ -665,6 +665,13 @@ typedef __u64 v4l2_std_id;
...
@@ -665,6 +665,13 @@ typedef __u64 v4l2_std_id;
#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000)
#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000)
#define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000)
#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:
/* FIXME:
Although std_id is 64 bits, there is an issue on PPC32 architecture that
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
makes switch(__u64) to break. So, there's a hack on v4l2-common.c rounding
...
...
include/media/tvp7000.h
0 → 100644
View file @
c92b67fa
/*
* 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__ */
include/media/v4l2-chip-ident.h
View file @
c92b67fa
...
@@ -129,6 +129,9 @@ enum {
...
@@ -129,6 +129,9 @@ enum {
V4L2_IDENT_SAA6752HS
=
6752
,
V4L2_IDENT_SAA6752HS
=
6752
,
V4L2_IDENT_SAA6752HS_AC3
=
6753
,
V4L2_IDENT_SAA6752HS_AC3
=
6753
,
/* module tvp7000 */
V4L2_IDENT_TVP7000
=
7000
,
/* module adv7170: just ident 7170 */
/* module adv7170: just ident 7170 */
V4L2_IDENT_ADV7170
=
7170
,
V4L2_IDENT_ADV7170
=
7170
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment