blob: 7d4c17889e83961a7be0f907316639a236ab46a5 [file] [log] [blame]
Ray Zhangd1dbb9b2013-05-25 22:55:15 +08001/* Copyright (c) 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 are
5 * 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
9 * copyright notice, this list of conditions and the following
10 * disclaimer in the documentation and/or other materials provided
11 * with the 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 "AS IS" AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 */
29#ifndef _TARGET_MSM8226_DISPLAY_H
30#define _TARGET_MSM8226_DISPLAY_H
31
Arpita Banerjeec5f78df2013-05-24 15:43:40 -070032/*---------------------------------------------------------------------------*/
33/* HEADER files */
34/*---------------------------------------------------------------------------*/
35#include <display_resource.h>
36
37/*---------------------------------------------------------------------------*/
38/* GPIO configuration */
39/*---------------------------------------------------------------------------*/
40static struct gpio_pin reset_gpio = {
41 "msmgpio", 25, 3, 1, 0, 1
42};
43
44static struct gpio_pin enable_gpio = {
Aravind Venkateswarand0398502013-11-04 16:46:46 -080045 "msmgpio", 109, 3, 1, 0, 1
Arpita Banerjeec5f78df2013-05-24 15:43:40 -070046};
47
48static struct gpio_pin te_gpio = {
49 0, 0, 0, 0, 0, 0
50};
51
52static struct gpio_pin pwm_gpio = {
53 0, 0, 0, 0, 0, 0
54};
55
Arpita Banerjeec5f78df2013-05-24 15:43:40 -070056/*---------------------------------------------------------------------------*/
57/* LDO configuration */
58/*---------------------------------------------------------------------------*/
59static struct ldo_entry ldo_entry_array[] = {
60 { "vdd", 15, 0, 2800000, 100000, 100, 0, 20, 0, 20},
61{ "vddio", 8, 0, 1800000, 100000, 100, 0, 30, 0, 30},
62{ "vdda", 4, 1, 1200000, 100000, 100, 0, 20, 0, 30},
63};
64
65#define TOTAL_LDO_DEFINED 3
66
67/*---------------------------------------------------------------------------*/
68/* Target Physical configuration */
69/*---------------------------------------------------------------------------*/
70
71static const uint32_t panel_strength_ctrl[] = {
72 0xff, 0x06
73};
74
75static const char panel_bist_ctrl[] = {
76 0x00, 0x00, 0xb1, 0xff, 0x00, 0x00
77};
78
79static const uint32_t panel_regulator_settings[] = {
80 0x07, 0x09, 0x03, 0x00, 0x20, 0x00, 0x01
81};
82
83static const char panel_lane_config[] = {
84 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x97,
85 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x01, 0x97,
86 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x01, 0x97,
87 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x01, 0x97,
88 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xbb
89};
90
91static const uint32_t panel_physical_ctrl[] = {
92 0x5f, 0x00, 0x00, 0x10
93};
94
95/*---------------------------------------------------------------------------*/
96/* Other Configuration */
97/*---------------------------------------------------------------------------*/
98
99#define msm8226_DSI_FEATURE_ENABLE 0
100
Aravind Venkateswaran895b7c52013-08-08 17:29:02 -0700101#define MIPI_FB_ADDR 0x03200000
Ray Zhangd1dbb9b2013-05-25 22:55:15 +0800102
103#define MIPI_HSYNC_PULSE_WIDTH 12
104#define MIPI_HSYNC_BACK_PORCH_DCLK 32
105#define MIPI_HSYNC_FRONT_PORCH_DCLK 144
106
107#define MIPI_VSYNC_PULSE_WIDTH 4
108#define MIPI_VSYNC_BACK_PORCH_LINES 3
109#define MIPI_VSYNC_FRONT_PORCH_LINES 9
110
Vineet Bajaj0d557f42014-05-15 19:06:27 +0530111#define PWM_BL_LPG_CHAN_ID 8
112
Ray Zhangd1dbb9b2013-05-25 22:55:15 +0800113extern int mdss_dsi_phy_init(struct mipi_dsi_panel_config *, uint32_t ctl_base);
Ray Zhangd1dbb9b2013-05-25 22:55:15 +0800114#endif