blob: 1b6b77565859516d864dcf4effeafdcaa99d1b81 [file] [log] [blame]
Padmanabhan Komanduru8d0f0d22014-03-22 00:11:29 +05301/* Copyright (c) 2013-2014, 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_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
44static struct gpio_pin enable_gpio = {
45 "msmgpio", 97, 3, 1, 0, 1
46};
47
48static struct gpio_pin bkl_gpio = {
49 "msmgpio", 98, 3, 1, 0, 1
50};
51
Vineet Bajaj3c958dc2014-11-07 17:01:29 +053052static struct gpio_pin bkl_gpio_1 = {
53 "msmgpio", 75, 3, 1, 0, 1
54};
55
56static struct gpio_pin bkl_gpio_2 = {
57 "msmgpio", 77, 3, 1, 0, 1
58};
59
Mao Flynn895b9e72014-04-15 10:59:14 +080060static struct gpio_pin enp_gpio = {
61 "msmgpio", 97, 3, 1, 0, 1
62};
63
64static struct gpio_pin enn_gpio = {
65 "msmgpio", 32, 3, 1, 0, 1
66};
67
Padmanabhan Komanduru8d0f0d22014-03-22 00:11:29 +053068static struct gpio_pin te_gpio = {
69 0, 0, 0, 0, 0, 0
70};
71
72static struct gpio_pin pwm_gpio = {
73 0, 0, 0, 0, 0, 0
74};
75
Mao Flynn732e3c22014-07-02 17:39:02 +080076static struct gpio_pin bkl_gpio_skuk = {
77 "msmgpio", 1, 3, 1, 0, 1
78};
79
80static struct gpio_pin enp_gpio_skuk = {
81 "msmgpio", 97, 3, 1, 0, 1
82};
83
84static struct gpio_pin enn_gpio_skuk = {
85 "msmgpio", 98, 3, 1, 0, 1
86};
87
Gustavo Solairafb6fdd62014-09-30 08:15:32 -030088static struct gpio_pin enable_gpio_skut1 = {
89 "msmgpio", 8, 3, 1, 0, 1
90};
91
Padmanabhan Komanduru8d0f0d22014-03-22 00:11:29 +053092/*---------------------------------------------------------------------------*/
Padmanabhan Komanduru8d0f0d22014-03-22 00:11:29 +053093/* Target Physical configuration */
94/*---------------------------------------------------------------------------*/
95
96static const uint32_t panel_strength_ctrl[] = {
97 0xff, 0x06
98};
99
100static const char panel_bist_ctrl[] = {
101 0x00, 0x00, 0xb1, 0xff, 0x00, 0x00
102};
103
Padmanabhan Komandurub088f922014-10-28 23:55:20 +0530104extern uint32_t panel_regulator_settings[7];
105
106static const uint32_t dcdc_regulator_settings[] = {
107 0x03, 0x08, 0x07, 0x00, 0x20, 0x07, 0x01
108};
109
110static const uint32_t ldo_regulator_settings[] = {
111 0x00, 0x01, 0x01, 0x00, 0x20, 0x07, 0x00
Padmanabhan Komanduru8d0f0d22014-03-22 00:11:29 +0530112};
113
114static const char panel_lane_config[] = {
115 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x97,
116 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x01, 0x97,
117 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x01, 0x97,
118 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x01, 0x97,
119 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xbb
120};
121
122static const uint32_t panel_physical_ctrl[] = {
123 0x5f, 0x00, 0x00, 0x10
124};
125
126/*---------------------------------------------------------------------------*/
127/* Other Configuration */
128/*---------------------------------------------------------------------------*/
129#define DISPLAY_CMDLINE_PREFIX " mdss_mdp.panel="
130
131#define MIPI_FB_ADDR 0x83200000
132
133#define MIPI_HSYNC_PULSE_WIDTH 12
134#define MIPI_HSYNC_BACK_PORCH_DCLK 32
135#define MIPI_HSYNC_FRONT_PORCH_DCLK 144
136
137#define MIPI_VSYNC_PULSE_WIDTH 4
138#define MIPI_VSYNC_BACK_PORCH_LINES 3
139#define MIPI_VSYNC_FRONT_PORCH_LINES 9
140
Mao Flynn895b9e72014-04-15 10:59:14 +0800141enum qrd_subtype
142{
143 HW_PLATFORM_SUBTYPE_DEFAULT = 0,
Vineet Bajajc1221412014-11-07 18:15:34 +0530144 HW_PLATFORM_SUBTYPE_CDP_1 = 1,
145 HW_PLATFORM_SUBTYPE_MTP_3 = 3,
Mao Flynn895b9e72014-04-15 10:59:14 +0800146 HW_PLATFORM_SUBTYPE_SKUH = 4,
Mao Flynn732e3c22014-07-02 17:39:02 +0800147 HW_PLATFORM_SUBTYPE_SKUI = 5, /* msm8916 */
148 HW_PLATFORM_SUBTYPE_SKUK = 5, /* msm8939 */
Gustavo Solairafb6fdd62014-09-30 08:15:32 -0300149 HW_PLATFORM_SUBTYPE_SKUT1 = 0x40, /* msm8916 */
Mao Flynn895b9e72014-04-15 10:59:14 +0800150};
151
Vineet Bajaj3c958dc2014-11-07 17:01:29 +0530152
153enum {
154 JDI_1080P_VIDEO_PANEL,
155 NT35590_720P_VIDEO_PANEL,
156 NT35590_720P_CMD_PANEL,
157 INNOLUX_720P_VIDEO_PANEL,
158 OTM8019A_FWVGA_VIDEO_PANEL,
159 OTM1283A_720P_VIDEO_PANEL,
160 NT35596_1080P_VIDEO_PANEL,
161 SHARP_WQXGA_DUALDSI_VIDEO_PANEL,
162 JDI_FHD_VIDEO_PANEL,
163 HX8379A_FWVGA_VIDEO_PANEL,
164 HX8394D_720P_VIDEO_PANEL,
165 NT35521_WXGA_VIDEO_PANEL,
166 UNKNOWN_PANEL
167};
168
169uint32_t get_panel_id(void);
170
Padmanabhan Komanduru8d0f0d22014-03-22 00:11:29 +0530171#endif