1 /*
2  * drivers/media/video/tvp514x.h
3  *
4  * Copyright (C) 2008 Texas Instruments Inc
5  * Author: Vaibhav Hiremath <hvaibhav@ti.com>
6  *
7  * Contributors:
8  *     Sivaraj R <sivaraj@ti.com>
9  *     Brijesh R Jadav <brijesh.j@ti.com>
10  *     Hardik Shah <hardik.shah@ti.com>
11  *     Manjunath Hadli <mrh@ti.com>
12  *     Karicheri Muralidharan <m-karicheri2@ti.com>
13  *
14  * This package is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License version 2 as
16  * published by the Free Software Foundation.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  */
24 
25 #ifndef _TVP514X_H
26 #define _TVP514X_H
27 
28 /*
29  * Other macros
30  */
31 #define TVP514X_MODULE_NAME		"tvp514x"
32 
33 #define TVP514X_XCLK_BT656		(27000000)
34 
35 /* Number of pixels and number of lines per frame for different standards */
36 #define NTSC_NUM_ACTIVE_PIXELS		(720)
37 #define NTSC_NUM_ACTIVE_LINES		(480)
38 #define PAL_NUM_ACTIVE_PIXELS		(720)
39 #define PAL_NUM_ACTIVE_LINES		(576)
40 
41 /**
42  * enum tvp514x_input - enum for different decoder input pin
43  *		configuration.
44  */
45 enum tvp514x_input {
46 	/*
47 	 * CVBS input selection
48 	 */
49 	INPUT_CVBS_VI1A = 0x0,
50 	INPUT_CVBS_VI1B,
51 	INPUT_CVBS_VI1C,
52 	INPUT_CVBS_VI2A = 0x04,
53 	INPUT_CVBS_VI2B,
54 	INPUT_CVBS_VI2C,
55 	INPUT_CVBS_VI3A = 0x08,
56 	INPUT_CVBS_VI3B,
57 	INPUT_CVBS_VI3C,
58 	INPUT_CVBS_VI4A = 0x0C,
59 	/*
60 	 * S-Video input selection
61 	 */
62 	INPUT_SVIDEO_VI2A_VI1A = 0x44,
63 	INPUT_SVIDEO_VI2B_VI1B,
64 	INPUT_SVIDEO_VI2C_VI1C,
65 	INPUT_SVIDEO_VI2A_VI3A = 0x54,
66 	INPUT_SVIDEO_VI2B_VI3B,
67 	INPUT_SVIDEO_VI2C_VI3C,
68 	INPUT_SVIDEO_VI4A_VI1A = 0x4C,
69 	INPUT_SVIDEO_VI4A_VI1B,
70 	INPUT_SVIDEO_VI4A_VI1C,
71 	INPUT_SVIDEO_VI4A_VI3A = 0x5C,
72 	INPUT_SVIDEO_VI4A_VI3B,
73 	INPUT_SVIDEO_VI4A_VI3C,
74 
75 	/* Need to add entries for
76 	 * RGB, YPbPr and SCART.
77 	 */
78 	INPUT_INVALID
79 };
80 
81 /**
82  * enum tvp514x_output - enum for output format
83  *			supported.
84  *
85  */
86 enum tvp514x_output {
87 	OUTPUT_10BIT_422_EMBEDDED_SYNC = 0,
88 	OUTPUT_20BIT_422_SEPERATE_SYNC,
89 	OUTPUT_10BIT_422_SEPERATE_SYNC = 3,
90 	OUTPUT_INVALID
91 };
92 
93 /**
94  * struct tvp514x_platform_data - Platform data values and access functions.
95  * @clk_polarity: Clock polarity of the current interface.
96  * @hs_polarity: HSYNC Polarity configuration for current interface.
97  * @vs_polarity: VSYNC Polarity configuration for current interface.
98  */
99 struct tvp514x_platform_data {
100 	/* Interface control params */
101 	bool clk_polarity;
102 	bool hs_polarity;
103 	bool vs_polarity;
104 };
105 
106 
107 #endif				/* ifndef _TVP514X_H */
108