summaryrefslogtreecommitdiff
path: root/include/media/adv7481.h
blob: 80b8ee879ea406af64a8011b6dc9492a3ab47f66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * 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.
 *
 */

#ifndef __ADV7481_H__
#define __ADV7481_H__

/**
 * adv7481_platform_data
 * structure to pass board specific information to the ADV7481 driver
 * @rstb_gpio: put active low to hold chip in reset state
 * @pwdnb_gpio: put active low to allow chip to power-down and disable I2C
 * @irq_gpio : active low to trigger IRQ1
 * @irq2_gpio : active low to trigger IRQ2
 * @irq3_gpio : active low to trigger IRQ3
 * @i2c_csi_txa: CSI TXA I2C Map Address
 * @i2c_csi_txb; CSI TXB I2C Map Address
 * @i2c_hdmi:   hdmi I2C Map Address
 * @i2c_cp:     cp I2C Map Address
 * @i2c_sdp:    sdp I2C Map Address
 */
struct adv7481_platform_data {
		int rstb_gpio;
		int pwdnb_gpio;
		int irq1_gpio;
		int irq2_gpio;
		int irq3_gpio;
		int i2c_csi_txa;
		int i2c_csi_txb;
		int i2c_hdmi;
		int i2c_cp;
		int i2c_sdp;
		int i2c_rep;

};


/*
 * Mode of operation.
 * This is used as the input argument of the s_routing video op.
 */
enum adv7481_input {
	ADV7481_IP_CVBS_1 = 0,
	ADV7481_IP_CVBS_2,
	ADV7481_IP_CVBS_3,
	ADV7481_IP_CVBS_4,
	ADV7481_IP_CVBS_5,
	ADV7481_IP_CVBS_6,
	ADV7481_IP_CVBS_7,
	ADV7481_IP_CVBS_8,
	ADV7481_IP_HDMI,
	ADV7481_IP_TTL,
	ADV7481_IP_CVBS_1_HDMI_SIM,
	ADV7481_IP_CVBS_2_HDMI_SIM,
	ADV7481_IP_CVBS_3_HDMI_SIM,
	ADV7481_IP_CVBS_4_HDMI_SIM,
	ADV7481_IP_CVBS_5_HDMI_SIM,
	ADV7481_IP_CVBS_6_HDMI_SIM,
	ADV7481_IP_CVBS_7_HDMI_SIM,
	ADV7481_IP_CVBS_8_HDMI_SIM,
	ADV7481_IP_NONE,
	ADV7481_IP_INVALID,
};
/*
 * CSI Tx
 * This is used as the output argument of the s_routing video op.
 */
enum adv7481_output {
	ADV7481_OP_CSIA,
	ADV7481_OP_CSIB,
	ADV7481_OP_TTL
};
enum adv7481_csi_lane_en {
	ADV7481_CSI_1LANE_EN = 0x1,
	ADV7481_CSI_4LANE_EN = 0x2,
};
enum adv7481_mipi_lane {
	ADV7481_MIPI_1LANE = 0x1,
	ADV7481_MIPI_2LANE = 0x2,
	ADV7481_MIPI_4LANE = 0x4,
};
enum adv7481_csi_params {
	ADV7481_AUTO_PARAMS = 0x1,
};
#endif