Siddhartha Agrawal | 7e2e215 | 2013-01-23 17:06:58 -0800 | [diff] [blame] | 1 | /* 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 | |
| 35 | #define MDP_VP_0_RGB_0_SSPP_SRC0_ADDR REG_MDP(0x1E14) |
| 36 | #define MDP_VP_0_RGB_0_SSPP_SRC_YSTRIDE REG_MDP(0x1E24) |
| 37 | #define MDP_VP_0_RGB_0_SSPP_SRC_IMG_SIZE REG_MDP(0x1E04) |
| 38 | #define MDP_VP_0_RGB_0_SSPP_SRC_SIZE REG_MDP(0x1E00) |
| 39 | #define MDP_VP_0_RGB_0_SSPP_SRC_OUT_SIZE REG_MDP(0x1E0C) |
| 40 | #define MDP_VP_0_RGB_0_SSPP_SRC_XY REG_MDP(0x1E08) |
| 41 | #define MDP_VP_0_RGB_0_SSPP_OUT_XY REG_MDP(0x1E10) |
| 42 | #define MDP_VP_0_RGB_0_SSPP_SRC_FORMAT REG_MDP(0x1E30) |
| 43 | #define MDP_VP_0_RGB_0_SSPP_SRC_UNPACK_PATTERN REG_MDP(0x1E34) |
| 44 | #define MDP_VP_0_RGB_0_SSPP_SRC_OP_MODE REG_MDP(0x1E38) |
| 45 | |
| 46 | #define MDP_VP_0_LAYER_0_OUT_SIZE REG_MDP(0x3204) |
| 47 | #define MDP_VP_0_LAYER_0_OP_MODE REG_MDP(0x3200) |
Siddhartha Agrawal | 7dc3aa9 | 2013-04-21 16:04:26 -0700 | [diff] [blame^] | 48 | #define MDP_VP_0_LAYER_0_BORDER_COLOR_0 REG_MDP(0x3208) |
Siddhartha Agrawal | 7e2e215 | 2013-01-23 17:06:58 -0800 | [diff] [blame] | 49 | #define MDP_VP_0_LAYER_0_BLEND_OP REG_MDP(0x3220) |
| 50 | #define MDP_VP_0_LAYER_0_BLEND0_FG_ALPHA REG_MDP(0x3224) |
| 51 | #define MDP_VP_0_LAYER_1_BLEND_OP REG_MDP(0x3250) |
| 52 | #define MDP_VP_0_LAYER_1_BLEND0_FG_ALPHA REG_MDP(0x3254) |
| 53 | #define MDP_VP_0_LAYER_2_BLEND_OP REG_MDP(0x3280) |
| 54 | #define MDP_VP_0_LAYER_2_BLEND0_FG_ALPHA REG_MDP(0x3284) |
| 55 | #define MDP_VP_0_LAYER_3_BLEND_OP REG_MDP(0x32B0) |
| 56 | #define MDP_VP_0_LAYER_3_BLEND0_FG_ALPHA REG_MDP(0x32B4) |
| 57 | |
Siddhartha Agrawal | 1a87c5d | 2013-03-06 19:07:53 -0800 | [diff] [blame] | 58 | |
| 59 | #define MDSS_MDP_HW_REV_100 0x10000000 |
| 60 | #define MDSS_MDP_HW_REV_102 0x10020000 |
| 61 | |
| 62 | #define MDP_HW_REV REG_MDP(0x0100) |
Siddhartha Agrawal | 7e2e215 | 2013-01-23 17:06:58 -0800 | [diff] [blame] | 63 | #define MDP_INTR_EN REG_MDP(0x0110) |
| 64 | #define MDP_INTR_CLEAR REG_MDP(0x0118) |
| 65 | #define MDP_HIST_INTR_EN REG_MDP(0x011C) |
| 66 | |
| 67 | #define MDP_DISP_INTF_SEL REG_MDP(0x0104) |
| 68 | #define MDP_VIDEO_INTF_UNDERFLOW_CTL REG_MDP(0x03E0) |
| 69 | #define MDP_UPPER_NEW_ROI_PRIOR_RO_START REG_MDP(0x02EC) |
| 70 | #define MDP_LOWER_NEW_ROI_PRIOR_TO_START REG_MDP(0x04F8) |
| 71 | |
Siddhartha Agrawal | 1a87c5d | 2013-03-06 19:07:53 -0800 | [diff] [blame] | 72 | #define MDP_INTF_1_TIMING_ENGINE_EN REG_MDP(0x12700) |
Siddhartha Agrawal | 7e2e215 | 2013-01-23 17:06:58 -0800 | [diff] [blame] | 73 | |
| 74 | #define MDP_CTL_0_LAYER_0 REG_MDP(0x600) |
| 75 | #define MDP_CTL_0_TOP REG_MDP(0x614) |
| 76 | #define MDP_CTL_0_FLUSH REG_MDP(0x618) |
Siddhartha Agrawal | 7dc3aa9 | 2013-04-21 16:04:26 -0700 | [diff] [blame^] | 77 | #define MDP_CTL_0_START REG_MDP(0x61C) |
Siddhartha Agrawal | 7e2e215 | 2013-01-23 17:06:58 -0800 | [diff] [blame] | 78 | |
Siddhartha Agrawal | 1a87c5d | 2013-03-06 19:07:53 -0800 | [diff] [blame] | 79 | #define MDP_INTF_1_HSYNC_CTL REG_MDP(0x12708) |
| 80 | #define MDP_INTF_1_VSYNC_PERIOD_F0 REG_MDP(0x1270C) |
| 81 | #define MDP_INTF_1_VSYNC_PERIOD_F1 REG_MDP(0x12710) |
| 82 | #define MDP_INTF_1_VSYNC_PULSE_WIDTH_F0 REG_MDP(0x12714) |
| 83 | #define MDP_INTF_1_VSYNC_PULSE_WIDTH_F1 REG_MDP(0x12718) |
| 84 | #define MDP_INTF_1_DISPLAY_HCTL REG_MDP(0x1273C) |
| 85 | #define MDP_INTF_1_DISPLAY_V_START_F0 REG_MDP(0x1271C) |
| 86 | #define MDP_INTF_1_DISPLAY_V_START_F1 REG_MDP(0x12720) |
| 87 | #define MDP_INTF_1_DISPLAY_V_END_F0 REG_MDP(0x12724) |
| 88 | #define MDP_INTF_1_DISPLAY_V_END_F1 REG_MDP(0x12728) |
| 89 | #define MDP_INTF_1_ACTIVE_HCTL REG_MDP(0x12740) |
| 90 | #define MDP_INTF_1_ACTIVE_V_START_F0 REG_MDP(0x1272C) |
| 91 | #define MDP_INTF_1_ACTIVE_V_START_F1 REG_MDP(0x12730) |
| 92 | #define MDP_INTF_1_ACTIVE_V_END_F0 REG_MDP(0x12734) |
| 93 | #define MDP_INTF_1_ACTIVE_V_END_F1 REG_MDP(0x12738) |
| 94 | #define MDP_INTF_1_UNDERFFLOW_COLOR REG_MDP(0x12748) |
| 95 | #define MDP_INTF_1_PANEL_FORMAT REG_MDP(0x12790) |
Siddhartha Agrawal | 7e2e215 | 2013-01-23 17:06:58 -0800 | [diff] [blame] | 96 | |
| 97 | #define MDP_CLK_CTRL0 REG_MDP(0x03AC) |
| 98 | #define MDP_CLK_CTRL1 REG_MDP(0x03B4) |
| 99 | #define MDP_CLK_CTRL2 REG_MDP(0x03BC) |
| 100 | #define MDP_CLK_CTRL3 REG_MDP(0x04A8) |
| 101 | #define MDP_CLK_CTRL4 REG_MDP(0x04B0) |
Siddhartha Agrawal | 7dc3aa9 | 2013-04-21 16:04:26 -0700 | [diff] [blame^] | 102 | #define MDP_CLK_CTRL5 REG_MDP(0x04B8) |
Siddhartha Agrawal | 7e2e215 | 2013-01-23 17:06:58 -0800 | [diff] [blame] | 103 | |
| 104 | #define MMSS_MDP_SMP_ALLOC_W_0 REG_MDP(0x0180) |
| 105 | #define MMSS_MDP_SMP_ALLOC_W_1 REG_MDP(0x0184) |
| 106 | #define MMSS_MDP_SMP_ALLOC_R_0 REG_MDP(0x0230) |
| 107 | #define MMSS_MDP_SMP_ALLOC_R_1 REG_MDP(0x0234) |
| 108 | |
Siddhartha Agrawal | 8d69082 | 2013-01-28 12:18:58 -0800 | [diff] [blame] | 109 | #define VBIF_VBIF_DDR_FORCE_CLK_ON REG_MDP(0x24004) |
Siddhartha Agrawal | 7e2e215 | 2013-01-23 17:06:58 -0800 | [diff] [blame] | 110 | #define VBIF_VBIF_DDR_OUT_MAX_BURST REG_MDP(0x240D8) |
Siddhartha Agrawal | f058d62 | 2013-01-28 16:21:03 -0800 | [diff] [blame] | 111 | #define VBIF_VBIF_DDR_ARB_CTRL REG_MDP(0x240F0) |
| 112 | #define VBIF_VBIF_DDR_RND_RBN_QOS_ARB REG_MDP(0x24124) |
| 113 | #define VBIF_VBIF_DDR_AXI_AMEMTYPE_CONF0 REG_MDP(0x24160) |
| 114 | #define VBIF_VBIF_DDR_AXI_AMEMTYPE_CONF1 REG_MDP(0x24164) |
| 115 | #define VBIF_VBIF_DDR_OUT_AOOO_AXI_EN REG_MDP(0x24178) |
| 116 | #define VBIF_VBIF_DDR_OUT_AX_AOOO REG_MDP(0x2417C) |
Siddhartha Agrawal | 7e2e215 | 2013-01-23 17:06:58 -0800 | [diff] [blame] | 117 | |
| 118 | void mdp_set_revision(int rev); |
| 119 | int mdp_get_revision(); |
| 120 | int mdp_dsi_video_config(struct msm_panel_info *pinfo, struct fbcon_config *fb); |
| 121 | int mipi_dsi_cmd_config(struct fbcon_config mipi_fb_cfg, |
| 122 | unsigned short num_of_lanes); |
| 123 | int mdp_dsi_video_on(void); |
| 124 | int mdp_dma_on(void); |
| 125 | void mdp_disable(void); |
| 126 | |
| 127 | #endif |