blob: c517dc6987a969d8076b76cf9b8a61e78624bbc0 [file] [log] [blame]
Siddhartha Agrawal7e2e2152013-01-23 17:06:58 -08001/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 * * Redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer.
8 * * Redistributions in binary form must reproduce the above copyright
9 * notice, this list of conditions and the following disclaimer in
10 * the documentation and/or other materials provided with the
11 * distribution.
12 * * Neither the name of The Linux Foundation nor the names of its
13 * contributors may be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
19 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
20 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
23 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#ifndef _PLATFORM_MSM_SHARED_MDP_5_H_
31#define _PLATFORM_MSM_SHARED_MDP_5_H_
32
33#include <msm_panel.h>
34
Siddhartha Agrawald3893392013-06-11 15:32:19 -070035#define MDP_VP_0_RGB_0_BASE REG_MDP(0x1E00)
36#define MDP_VP_0_RGB_1_BASE REG_MDP(0x2200)
37
38#define PIPE_SSPP_SRC0_ADDR 0x14
39#define PIPE_SSPP_SRC_YSTRIDE 0x24
40#define PIPE_SSPP_SRC_IMG_SIZE 0x04
41#define PIPE_SSPP_SRC_SIZE 0x00
42#define PIPE_SSPP_SRC_OUT_SIZE 0x0C
43#define PIPE_SSPP_SRC_XY 0x08
44#define PIPE_SSPP_OUT_XY 0x10
45#define PIPE_SSPP_SRC_FORMAT 0x30
46#define PIPE_SSPP_SRC_UNPACK_PATTERN 0x34
47#define PIPE_SSPP_SRC_OP_MODE 0x38
Siddhartha Agrawal7e2e2152013-01-23 17:06:58 -080048
49#define MDP_VP_0_LAYER_0_OUT_SIZE REG_MDP(0x3204)
50#define MDP_VP_0_LAYER_0_OP_MODE REG_MDP(0x3200)
Siddhartha Agrawal7dc3aa92013-04-21 16:04:26 -070051#define MDP_VP_0_LAYER_0_BORDER_COLOR_0 REG_MDP(0x3208)
Siddhartha Agrawal7e2e2152013-01-23 17:06:58 -080052#define MDP_VP_0_LAYER_0_BLEND_OP REG_MDP(0x3220)
53#define MDP_VP_0_LAYER_0_BLEND0_FG_ALPHA REG_MDP(0x3224)
54#define MDP_VP_0_LAYER_1_BLEND_OP REG_MDP(0x3250)
55#define MDP_VP_0_LAYER_1_BLEND0_FG_ALPHA REG_MDP(0x3254)
56#define MDP_VP_0_LAYER_2_BLEND_OP REG_MDP(0x3280)
57#define MDP_VP_0_LAYER_2_BLEND0_FG_ALPHA REG_MDP(0x3284)
58#define MDP_VP_0_LAYER_3_BLEND_OP REG_MDP(0x32B0)
59#define MDP_VP_0_LAYER_3_BLEND0_FG_ALPHA REG_MDP(0x32B4)
60
Siddhartha Agrawal1a87c5d2013-03-06 19:07:53 -080061
62#define MDSS_MDP_HW_REV_100 0x10000000
63#define MDSS_MDP_HW_REV_102 0x10020000
64
65#define MDP_HW_REV REG_MDP(0x0100)
Siddhartha Agrawal7e2e2152013-01-23 17:06:58 -080066#define MDP_INTR_EN REG_MDP(0x0110)
67#define MDP_INTR_CLEAR REG_MDP(0x0118)
68#define MDP_HIST_INTR_EN REG_MDP(0x011C)
69
70#define MDP_DISP_INTF_SEL REG_MDP(0x0104)
71#define MDP_VIDEO_INTF_UNDERFLOW_CTL REG_MDP(0x03E0)
72#define MDP_UPPER_NEW_ROI_PRIOR_RO_START REG_MDP(0x02EC)
73#define MDP_LOWER_NEW_ROI_PRIOR_TO_START REG_MDP(0x04F8)
74
Siddhartha Agrawal1a87c5d2013-03-06 19:07:53 -080075#define MDP_INTF_1_TIMING_ENGINE_EN REG_MDP(0x12700)
Siddhartha Agrawal7e2e2152013-01-23 17:06:58 -080076
77#define MDP_CTL_0_LAYER_0 REG_MDP(0x600)
78#define MDP_CTL_0_TOP REG_MDP(0x614)
79#define MDP_CTL_0_FLUSH REG_MDP(0x618)
Siddhartha Agrawal7dc3aa92013-04-21 16:04:26 -070080#define MDP_CTL_0_START REG_MDP(0x61C)
Siddhartha Agrawal7e2e2152013-01-23 17:06:58 -080081
Siddhartha Agrawalf0b41a22013-05-23 20:32:20 -070082#define MDP_TG_SINK REG_MDP(0x4F0)
83#define MDP_REG_SPLIT_DISPLAY_EN REG_MDP(0x3F4)
84#define MDP_REG_SPLIT_DISPLAY_UPPER_PIPE_CTL REG_MDP(0x3F8)
85
86#define MDP_INTF_1_BASE REG_MDP(0x12700)
87#define MDP_INTF_2_BASE REG_MDP(0x12900)
88
89#define MDP_HSYNC_CTL 0x08
90#define MDP_VSYNC_PERIOD_F0 0x0C
91#define MDP_VSYNC_PERIOD_F1 0x10
92#define MDP_VSYNC_PULSE_WIDTH_F0 0x14
93#define MDP_VSYNC_PULSE_WIDTH_F1 0x18
94#define MDP_DISPLAY_HCTL 0x3C
95#define MDP_DISPLAY_V_START_F0 0x1C
96#define MDP_DISPLAY_V_START_F1 0x20
97#define MDP_DISPLAY_V_END_F0 0x24
98#define MDP_DISPLAY_V_END_F1 0x28
99#define MDP_ACTIVE_HCTL 0x40
100#define MDP_ACTIVE_V_START_F0 0x2C
101#define MDP_ACTIVE_V_START_F1 0x30
102#define MDP_ACTIVE_V_END_F0 0x34
103#define MDP_ACTIVE_V_END_F1 0x38
104#define MDP_UNDERFFLOW_COLOR 0x48
105#define MDP_PANEL_FORMAT 0x90
Siddhartha Agrawal7e2e2152013-01-23 17:06:58 -0800106
107#define MDP_CLK_CTRL0 REG_MDP(0x03AC)
108#define MDP_CLK_CTRL1 REG_MDP(0x03B4)
109#define MDP_CLK_CTRL2 REG_MDP(0x03BC)
110#define MDP_CLK_CTRL3 REG_MDP(0x04A8)
111#define MDP_CLK_CTRL4 REG_MDP(0x04B0)
Siddhartha Agrawal7dc3aa92013-04-21 16:04:26 -0700112#define MDP_CLK_CTRL5 REG_MDP(0x04B8)
Siddhartha Agrawal7e2e2152013-01-23 17:06:58 -0800113
Siddhartha Agrawal76574f82013-05-23 19:33:01 -0700114#define MMSS_MDP_CLIENT_ID_RGB0 0x00000010
115#define MMSS_MDP_CLIENT_ID_RGB1 0x00000011
116
117#define MMSS_MDP_MAX_SMP_SIZE 0x00001000
Siddhartha Agrawal7e2e2152013-01-23 17:06:58 -0800118#define MMSS_MDP_SMP_ALLOC_W_0 REG_MDP(0x0180)
119#define MMSS_MDP_SMP_ALLOC_W_1 REG_MDP(0x0184)
120#define MMSS_MDP_SMP_ALLOC_R_0 REG_MDP(0x0230)
121#define MMSS_MDP_SMP_ALLOC_R_1 REG_MDP(0x0234)
122
Siddhartha Agrawal76574f82013-05-23 19:33:01 -0700123#define RGB0_REQPRIORITY_FIFO_WATERMARK0 REG_MDP(0x1E50)
124#define RGB0_REQPRIORITY_FIFO_WATERMARK1 REG_MDP(0x1E54)
125#define RGB0_REQPRIORITY_FIFO_WATERMARK2 REG_MDP(0x1E58)
126
127#define RGB1_REQPRIORITY_FIFO_WATERMARK0 REG_MDP(0x2250)
128#define RGB1_REQPRIORITY_FIFO_WATERMARK1 REG_MDP(0x2254)
129#define RGB1_REQPRIORITY_FIFO_WATERMARK2 REG_MDP(0x2258)
130
Siddhartha Agrawalb1b5a1f2013-04-17 19:53:41 -0700131#define MDP_QOS_REMAPPER_CLASS_0 REG_MDP(0x02E0)
132
Siddhartha Agrawal8d690822013-01-28 12:18:58 -0800133#define VBIF_VBIF_DDR_FORCE_CLK_ON REG_MDP(0x24004)
Siddhartha Agrawal7e2e2152013-01-23 17:06:58 -0800134#define VBIF_VBIF_DDR_OUT_MAX_BURST REG_MDP(0x240D8)
Siddhartha Agrawalf058d622013-01-28 16:21:03 -0800135#define VBIF_VBIF_DDR_ARB_CTRL REG_MDP(0x240F0)
136#define VBIF_VBIF_DDR_RND_RBN_QOS_ARB REG_MDP(0x24124)
137#define VBIF_VBIF_DDR_AXI_AMEMTYPE_CONF0 REG_MDP(0x24160)
138#define VBIF_VBIF_DDR_AXI_AMEMTYPE_CONF1 REG_MDP(0x24164)
139#define VBIF_VBIF_DDR_OUT_AOOO_AXI_EN REG_MDP(0x24178)
140#define VBIF_VBIF_DDR_OUT_AX_AOOO REG_MDP(0x2417C)
Siddhartha Agrawal7e2e2152013-01-23 17:06:58 -0800141
142void mdp_set_revision(int rev);
143int mdp_get_revision();
144int mdp_dsi_video_config(struct msm_panel_info *pinfo, struct fbcon_config *fb);
145int mipi_dsi_cmd_config(struct fbcon_config mipi_fb_cfg,
146 unsigned short num_of_lanes);
147int mdp_dsi_video_on(void);
148int mdp_dma_on(void);
149void mdp_disable(void);
150
151#endif