blob: 6f2bb2e30ceba8681c5d04d5dd5e8a5b0a9cfc6a [file] [log] [blame]
Padmanabhan Komanduru444feb72014-12-26 15:06:52 +05301/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
Padmanabhan Komanduru8d0f0d22014-03-22 00:11:29 +05302 *
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_MSM8916_DISPLAY_H
30#define _TARGET_MSM8916_DISPLAY_H
31
32/*---------------------------------------------------------------------------*/
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
Vineet Bajaj3ae7cd02015-02-09 20:20:38 +053044static struct gpio_pin ts_reset_gpio = {
Vineet Bajaj5be1e4a2015-02-02 15:07:49 +053045 "msmgpio", 12, 3, 1, 0, 1
46};
47
Padmanabhan Komanduru8d0f0d22014-03-22 00:11:29 +053048static struct gpio_pin enable_gpio = {
49 "msmgpio", 97, 3, 1, 0, 1
50};
51
52static struct gpio_pin bkl_gpio = {
53 "msmgpio", 98, 3, 1, 0, 1
54};
55
Vineet Bajaj3acf94f2014-12-04 19:55:03 +053056/*Use GPIO 75 for incell panel setup*/
57static struct gpio_pin enable_gpio_1 = {
Vineet Bajaj3c958dc2014-11-07 17:01:29 +053058 "msmgpio", 75, 3, 1, 0, 1
59};
60
Mao Flynn895b9e72014-04-15 10:59:14 +080061static struct gpio_pin enp_gpio = {
62 "msmgpio", 97, 3, 1, 0, 1
63};
64
65static struct gpio_pin enn_gpio = {
66 "msmgpio", 32, 3, 1, 0, 1
67};
68
Vineet Bajaj3acf94f2014-12-04 19:55:03 +053069/*Use GPIO 77 for incell panel setup*/
70static struct gpio_pin enn_gpio_1 = {
71 "msmgpio", 77, 3, 1, 0, 1
72};
73
Padmanabhan Komanduru8d0f0d22014-03-22 00:11:29 +053074static struct gpio_pin te_gpio = {
75 0, 0, 0, 0, 0, 0
76};
77
78static struct gpio_pin pwm_gpio = {
79 0, 0, 0, 0, 0, 0
80};
81
Mao Flynn732e3c22014-07-02 17:39:02 +080082static struct gpio_pin bkl_gpio_skuk = {
83 "msmgpio", 1, 3, 1, 0, 1
84};
85
86static struct gpio_pin enp_gpio_skuk = {
87 "msmgpio", 97, 3, 1, 0, 1
88};
89
90static struct gpio_pin enn_gpio_skuk = {
91 "msmgpio", 98, 3, 1, 0, 1
92};
93
Gustavo Solairafb6fdd62014-09-30 08:15:32 -030094static struct gpio_pin enable_gpio_skut1 = {
95 "msmgpio", 8, 3, 1, 0, 1
96};
97
Gustavo Solaira80c274c2014-10-22 16:21:27 -030098static struct gpio_pin enable_gpio_skut2 = {
99 "msmgpio", 22, 3, 1, 0, 1
100};
101
Vineet Bajaj02a1a8f2015-04-29 17:19:57 +0530102static struct gpio_pin dsi2HDMI_switch_gpio = {
103 "msmgpio", 32, 3, 1, 0, 1
104};
105
Padmanabhan Komanduru8d0f0d22014-03-22 00:11:29 +0530106/*---------------------------------------------------------------------------*/
Padmanabhan Komanduru8d0f0d22014-03-22 00:11:29 +0530107/* Target Physical configuration */
108/*---------------------------------------------------------------------------*/
109
110static const uint32_t panel_strength_ctrl[] = {
111 0xff, 0x06
112};
113
114static const char panel_bist_ctrl[] = {
115 0x00, 0x00, 0xb1, 0xff, 0x00, 0x00
116};
117
Padmanabhan Komandurub088f922014-10-28 23:55:20 +0530118extern uint32_t panel_regulator_settings[7];
119
120static const uint32_t dcdc_regulator_settings[] = {
121 0x03, 0x08, 0x07, 0x00, 0x20, 0x07, 0x01
122};
123
124static const uint32_t ldo_regulator_settings[] = {
125 0x00, 0x01, 0x01, 0x00, 0x20, 0x07, 0x00
Padmanabhan Komanduru8d0f0d22014-03-22 00:11:29 +0530126};
127
128static const char panel_lane_config[] = {
Padmanabhan Komanduru0e19a362015-06-08 13:29:32 +0530129 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x97,
130 0x01, 0xc0, 0x00, 0x00, 0x05, 0x00, 0x00, 0x01, 0x97,
131 0x01, 0xc0, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x01, 0x97,
132 0x01, 0xc0, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x01, 0x97,
133 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff
Padmanabhan Komanduru8d0f0d22014-03-22 00:11:29 +0530134};
135
136static const uint32_t panel_physical_ctrl[] = {
137 0x5f, 0x00, 0x00, 0x10
138};
139
140/*---------------------------------------------------------------------------*/
141/* Other Configuration */
142/*---------------------------------------------------------------------------*/
143#define DISPLAY_CMDLINE_PREFIX " mdss_mdp.panel="
144
145#define MIPI_FB_ADDR 0x83200000
146
147#define MIPI_HSYNC_PULSE_WIDTH 12
148#define MIPI_HSYNC_BACK_PORCH_DCLK 32
149#define MIPI_HSYNC_FRONT_PORCH_DCLK 144
150
151#define MIPI_VSYNC_PULSE_WIDTH 4
152#define MIPI_VSYNC_BACK_PORCH_LINES 3
153#define MIPI_VSYNC_FRONT_PORCH_LINES 9
154
Mao Flynn895b9e72014-04-15 10:59:14 +0800155enum qrd_subtype
156{
157 HW_PLATFORM_SUBTYPE_DEFAULT = 0,
Vineet Bajajc1221412014-11-07 18:15:34 +0530158 HW_PLATFORM_SUBTYPE_CDP_1 = 1,
Vineet Bajajd3d04652015-02-02 14:43:36 +0530159 HW_PLATFORM_SUBTYPE_CDP_2 = 2,
Vineet Bajajc1221412014-11-07 18:15:34 +0530160 HW_PLATFORM_SUBTYPE_MTP_3 = 3,
Mao Flynn895b9e72014-04-15 10:59:14 +0800161 HW_PLATFORM_SUBTYPE_SKUH = 4,
Mao Flynn732e3c22014-07-02 17:39:02 +0800162 HW_PLATFORM_SUBTYPE_SKUI = 5, /* msm8916 */
163 HW_PLATFORM_SUBTYPE_SKUK = 5, /* msm8939 */
Gustavo Solairafb6fdd62014-09-30 08:15:32 -0300164 HW_PLATFORM_SUBTYPE_SKUT1 = 0x40, /* msm8916 */
Mao Flynn895b9e72014-04-15 10:59:14 +0800165};
166
Vineet Bajaj3c958dc2014-11-07 17:01:29 +0530167
168enum {
169 JDI_1080P_VIDEO_PANEL,
170 NT35590_720P_VIDEO_PANEL,
171 NT35590_720P_CMD_PANEL,
172 INNOLUX_720P_VIDEO_PANEL,
173 OTM8019A_FWVGA_VIDEO_PANEL,
174 OTM1283A_720P_VIDEO_PANEL,
175 NT35596_1080P_VIDEO_PANEL,
176 SHARP_WQXGA_DUALDSI_VIDEO_PANEL,
177 JDI_FHD_VIDEO_PANEL,
178 HX8379A_FWVGA_VIDEO_PANEL,
179 HX8394D_720P_VIDEO_PANEL,
180 NT35521_WXGA_VIDEO_PANEL,
Gustavo Solaira80c274c2014-10-22 16:21:27 -0300181 SAMSUNG_WXGA_VIDEO_PANEL,
Gustavo Solaira48aa56d2014-10-22 16:26:49 -0300182 HX8279A_WSVGA_VIDEO_PANEL,
Shuo Yana935c302015-01-06 18:23:24 +0800183 R61318_HD_VIDEO_PANEL,
Shuo Yan959d5c12015-01-21 17:31:30 +0800184 R63417_1080P_VIDEO_PANEL,
Vineet Bajajcc9f0572015-02-02 13:54:10 +0530185 JDI_A216_FHD_VIDEO_PANEL,
Vineet Bajaj02a1a8f2015-04-29 17:19:57 +0530186 ADV7533_1080P_VIDEO_PANEL,
187 ADV7533_720P_VIDEO_PANEL,
Vineet Bajaj3c958dc2014-11-07 17:01:29 +0530188 UNKNOWN_PANEL
189};
190
Padmanabhan Komanduru8d0f0d22014-03-22 00:11:29 +0530191#endif