rk3368 lcdc: overlay mode depend on screen color mode
[firefly-linux-kernel-4.4.55.git] / drivers / video / rockchip / transmitter / anx9805.h
1 #ifndef _DP_ANX9805_H_
2 #define _DP_ANX9805_H_
3 /**************register define  for anx9805 anx9804********/
4
5 #define DP_TX_VND_IDL_REG               0x00
6 #define DP_TX_VND_IDH_REG               0x01
7 #define DP_TX_DEV_IDL_REG               0x02
8 #define DP_TX_DEV_IDH_REG               0x03
9 #define DP_POWERD_CTRL_REG              0x05
10
11 #define DP_TX_VID_CTRL1_REG             0x08
12 #define DP_TX_VID_CTRL1_VID_EN          0x80    // bit position
13 #define DP_POWERD_TOTAL_REG             0x02// bit position
14 #define DP_POWERD_AUDIO_REG             0x10// bit position
15
16 #define DP_TX_RST_CTRL_REG              0x06
17 #define DP_TX_RST_CTRL2_REG             0x07
18 #define DP_TX_RST_HW_RST                0x01    // bit position
19 #define DP_TX_AUX_RST                                   0x04//bit position
20 #define DP_TX_RST_SW_RST                0x02    // bit position
21 #define DP_TX_PLL_CTRL_REG              0xC7
22 #define DP_TX_EXTRA_ADDR_REG            0xCE
23 #define DP_TX_PLL_FILTER_CTRL3          0xE1
24 #define DP_TX_PLL_CTRL3                                 0xE6
25 #define DP_TX_AC_MODE                                   0x40//bit position
26 #define ANALOG_DEBUG_REG1                               0xDC
27 #define ANALOG_DEBUG_REG3                               0xDE
28 #define DP_TX_PLL_FILTER_CTRL1                  0xDF
29 #define DP_TX_PLL_FILTER_CTRL3                  0xE1
30 #define DP_TX_PLL_FILTER_CTRL           0xE2
31 #define DP_TX_LINK_DEBUG_REG            0xB8
32 #define DP_TX_GNS_CTRL_REG              0xCD
33 #define DP_TX_AUX_CTRL_REG2             0xE9
34 #define DP_TX_BUF_DATA_COUNT_REG                0xE4
35 #define DP_TX_AUX_CTRL_REG              0xE5
36 #define DP_TX_AUX_ADDR_7_0_REG          0xE6
37 #define DP_TX_AUX_ADDR_15_8_REG         0xE7
38 #define DP_TX_AUX_ADDR_19_16_REG        0xE8
39 #define DP_TX_BUF_DATA_0_REG            0xf0
40 #define DP_TX_SYS_CTRL4_REG                             0x83
41 #define DP_TX_SYS_CTRL4_ENHANCED                0x08//bit position
42 #define DP_TX_LINK_BW_SET_REG           0xA0
43 #define DP_TX_LANE_COUNT_SET_REG        0xA1
44 #define DP_TX_LINK_TRAINING_CTRL_REG    0xA8
45 #define DP_TX_LINK_TRAINING_CTRL_EN     0x01// bit position
46 #define DP_TX_TRAINING_LANE0_SET_REG    0xA3
47 #define DP_TX_TRAINING_LANE1_SET_REG    0xA4
48 #define DP_TX_TRAINING_LANE2_SET_REG    0xA5
49 #define DP_TX_TRAINING_LANE3_SET_REG    0xA6
50 #define DP_TX_SYS_CTRL1_REG             0x80
51 #define DP_TX_SYS_CTRL1_DET_STA         0x04// bit position
52 #define DP_TX_SYS_CTRL2_REG             0x81
53 #define DP_TX_SYS_CTRL3_REG             0x82
54 #define DP_TX_SYS_CTRL2_CHA_STA         0x04// bit position
55 #define DP_TX_VID_CTRL2_REG             0x09
56 #define DP_TX_TOTAL_LINEL_REG           0x12
57 #define DP_TX_TOTAL_LINEH_REG           0x13
58 #define DP_TX_ACT_LINEL_REG             0x14
59 #define DP_TX_ACT_LINEH_REG             0x15
60 #define DP_TX_VF_PORCH_REG              0x16
61 #define DP_TX_VSYNC_CFG_REG             0x17
62 #define DP_TX_VB_PORCH_REG              0x18
63 #define DP_TX_TOTAL_PIXELL_REG          0x19
64 #define DP_TX_TOTAL_PIXELH_REG          0x1A
65 #define DP_TX_ACT_PIXELL_REG            0x1B
66 #define DP_TX_ACT_PIXELH_REG            0x1C
67 #define DP_TX_HF_PORCHL_REG             0x1D
68 #define DP_TX_HF_PORCHH_REG             0x1E
69 #define DP_TX_HSYNC_CFGL_REG            0x1F
70 #define DP_TX_HSYNC_CFGH_REG            0x20
71 #define DP_TX_HB_PORCHL_REG             0x21
72 #define DP_TX_HB_PORCHH_REG             0x22
73 #define DP_TX_VID_CTRL10_REG            0x11
74 #define DP_TX_VID_CTRL4_REG             0x0B
75 #define DP_TX_VID_CTRL4_E_SYNC_EN               0x80//bit position
76 #define DP_TX_VID_CTRL10_I_SCAN         0x04// bit position
77 #define DP_TX_VID_CTRL10_VSYNC_POL      0x02// bit position
78 #define DP_TX_VID_CTRL10_HSYNC_POL      0x01// bit position
79 #define DP_TX_VID_CTRL4_BIST_WIDTH      0x04// bit position
80 #define DP_TX_VID_CTRL4_BIST            0x08// bit position
81
82
83 typedef enum
84 {
85     COLOR_6,
86     COLOR_8,
87     COLOR_10,
88     COLOR_12
89 }VIP_COLOR_DEPTH;
90
91 struct rk_edp_platform_data {
92         unsigned int dvdd33_en_pin;
93         int          dvdd33_en_val;
94         unsigned int dvdd18_en_pin;
95         int          dvdd18_en_val;
96         unsigned int edp_rst_pin;
97         int (*power_ctl)(void);
98 };
99
100 struct rk_edp {
101         struct i2c_client *client;
102         struct rk_edp_platform_data *pdata;
103         struct rk_screen screen;
104 #ifdef CONFIG_HAS_EARLYSUSPEND
105         struct early_suspend early_suspend;
106 #endif 
107 };
108
109 #endif
110
111
112
113