blob: 8449ee0d72984f47c6b3495da6c5a6e0cf84a265 [file] [log] [blame]
Dhaval Patel019057a2014-08-12 13:52:25 -07001/* 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_DISPLAY_H
30#define _TARGET_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", 78, 3, 1, 0, 1
42};
43
Kuogee Hsieh208736d2014-08-22 14:16:55 -070044static struct gpio_pin lcd_reg_en = { /* boost regulator */
Dhaval Patel019057a2014-08-12 13:52:25 -070045 "pm8994_gpios", 14, 3, 1, 0, 1
46};
47
48static struct gpio_pin bkl_gpio = { /* lcd_bklt_reg_en */
49 "pmi8994_gpios", 2, 3, 1, 0, 1
50};
51
52static struct gpio_pin pwm_gpio = { /* pmi_mpp01, lpg = 0 */
53 "pmi8994_mpps", 1, 0, 1, 0, 1
54};
55/*---------------------------------------------------------------------------*/
56/* LDO configuration */
57/*---------------------------------------------------------------------------*/
58static struct ldo_entry ldo_entry_array[] = {
59 { "vdd", 14, 0, 1800000, 100000, 100, 0, 20, 0, 0},
60 { "vddio", 12, 0, 1800000, 100000, 100, 0, 20, 0, 0},
61 { "vdda", 2, 1, 1250000, 100000, 100, 0, 0, 0, 0},
62 { "vcca", 28, 1, 1000000, 10000, 100, 0, 0, 0, 0},
63};
64
65#define TOTAL_LDO_DEFINED 3
66
67/*---------------------------------------------------------------------------*/
68/* Target Physical configuration */
69/*---------------------------------------------------------------------------*/
70
71static const uint32_t panel_strength_ctrl[] = {
72 0x77, 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 0x03, 0x05, 0x03, 0x00, 0x20, 0x07, 0x01
81};
82
83static const char panel_lane_config[] = {
840x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x01, 0x88,
850x02, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x01, 0x88,
860x02, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x01, 0x88,
870x02, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x88,
880x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0x88
89};
90
91static const uint32_t panel_physical_ctrl[] = {
92 0x5f, 0x00, 0x00, 0x10
93};
94
95/*---------------------------------------------------------------------------*/
96/* Other Configuration */
97/*---------------------------------------------------------------------------*/
98#define DISPLAY_CMDLINE_PREFIX " mdss_mdp.panel="
99
100#define MIPI_FB_ADDR 0x03400000
101
102#define MIPI_HSYNC_PULSE_WIDTH 16
103#define MIPI_HSYNC_BACK_PORCH_DCLK 32
104#define MIPI_HSYNC_FRONT_PORCH_DCLK 76
105
106#define MIPI_VSYNC_PULSE_WIDTH 2
107#define MIPI_VSYNC_BACK_PORCH_LINES 2
108#define MIPI_VSYNC_FRONT_PORCH_LINES 4
109
110#define PWM_BL_LPG_CHAN_ID 0
111
112#endif