Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * drivers/media/video/tvp514x.h
0004  *
0005  * Copyright (C) 2008 Texas Instruments Inc
0006  * Author: Vaibhav Hiremath <hvaibhav@ti.com>
0007  *
0008  * Contributors:
0009  *     Sivaraj R <sivaraj@ti.com>
0010  *     Brijesh R Jadav <brijesh.j@ti.com>
0011  *     Hardik Shah <hardik.shah@ti.com>
0012  *     Manjunath Hadli <mrh@ti.com>
0013  *     Karicheri Muralidharan <m-karicheri2@ti.com>
0014  */
0015 
0016 #ifndef _TVP514X_H
0017 #define _TVP514X_H
0018 
0019 /*
0020  * Other macros
0021  */
0022 #define TVP514X_MODULE_NAME     "tvp514x"
0023 
0024 #define TVP514X_XCLK_BT656      (27000000)
0025 
0026 /* Number of pixels and number of lines per frame for different standards */
0027 #define NTSC_NUM_ACTIVE_PIXELS      (720)
0028 #define NTSC_NUM_ACTIVE_LINES       (480)
0029 #define PAL_NUM_ACTIVE_PIXELS       (720)
0030 #define PAL_NUM_ACTIVE_LINES        (576)
0031 
0032 /* enum for different decoder input pin configuration */
0033 enum tvp514x_input {
0034     /*
0035      * CVBS input selection
0036      */
0037     INPUT_CVBS_VI1A = 0x0,
0038     INPUT_CVBS_VI1B,
0039     INPUT_CVBS_VI1C,
0040     INPUT_CVBS_VI2A = 0x04,
0041     INPUT_CVBS_VI2B,
0042     INPUT_CVBS_VI2C,
0043     INPUT_CVBS_VI3A = 0x08,
0044     INPUT_CVBS_VI3B,
0045     INPUT_CVBS_VI3C,
0046     INPUT_CVBS_VI4A = 0x0C,
0047     /*
0048      * S-Video input selection
0049      */
0050     INPUT_SVIDEO_VI2A_VI1A = 0x44,
0051     INPUT_SVIDEO_VI2B_VI1B,
0052     INPUT_SVIDEO_VI2C_VI1C,
0053     INPUT_SVIDEO_VI2A_VI3A = 0x54,
0054     INPUT_SVIDEO_VI2B_VI3B,
0055     INPUT_SVIDEO_VI2C_VI3C,
0056     INPUT_SVIDEO_VI4A_VI1A = 0x4C,
0057     INPUT_SVIDEO_VI4A_VI1B,
0058     INPUT_SVIDEO_VI4A_VI1C,
0059     INPUT_SVIDEO_VI4A_VI3A = 0x5C,
0060     INPUT_SVIDEO_VI4A_VI3B,
0061     INPUT_SVIDEO_VI4A_VI3C,
0062 
0063     /* Need to add entries for
0064      * RGB, YPbPr and SCART.
0065      */
0066     INPUT_INVALID
0067 };
0068 
0069 /* enum for output format supported. */
0070 enum tvp514x_output {
0071     OUTPUT_10BIT_422_EMBEDDED_SYNC = 0,
0072     OUTPUT_20BIT_422_SEPERATE_SYNC,
0073     OUTPUT_10BIT_422_SEPERATE_SYNC = 3,
0074     OUTPUT_INVALID
0075 };
0076 
0077 /**
0078  * struct tvp514x_platform_data - Platform data values and access functions.
0079  * @clk_polarity: Clock polarity of the current interface.
0080  * @hs_polarity: HSYNC Polarity configuration for current interface.
0081  * @vs_polarity: VSYNC Polarity configuration for current interface.
0082  */
0083 struct tvp514x_platform_data {
0084     /* Interface control params */
0085     bool clk_polarity;
0086     bool hs_polarity;
0087     bool vs_polarity;
0088 };
0089 
0090 
0091 #endif              /* ifndef _TVP514X_H */