blob: 327f9131d9be4b61f074e7e8b2895134b8d5bddb [file] [log] [blame]
wangxl1ddbd092015-02-03 20:31:24 +08001/* Copyright (c) 2012-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_COPPER_DISPLAY_H
30#define _TARGET_COPPER_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 = {
liuyan04e7c7a2015-02-09 19:50:08 +080041 "pm8941_gpios", 19, 3, 1, 0, 1
wangxl1ddbd092015-02-03 20:31:24 +080042};
43
44static struct gpio_pin enable_gpio = {
liuyan04e7c7a2015-02-09 19:50:08 +080045 "msmgpio", 25, 3, 1, 0, 1
wangxl1ddbd092015-02-03 20:31:24 +080046};
47
48static struct gpio_pin pwm_gpio = {
49 "pm8941_gpios", 36, 3, 1, 0, 1
50};
51
52/*---------------------------------------------------------------------------*/
53/* LDO configuration */
54/*---------------------------------------------------------------------------*/
55static struct ldo_entry ldo_entry_array[] = {
56 { "vdd", 22, 0, 3000000, 100000, 100, 0, 20, 0, 0},
57{ "vddio", 12, 0, 1800000, 100000, 100, 0, 20, 0, 0},
58{ "vdda", 2, 1, 1200000, 100000, 100, 0, 0, 0, 0},
59};
60
61#define TOTAL_LDO_DEFINED 3
62
63/*---------------------------------------------------------------------------*/
64/* Target Physical configuration */
65/*---------------------------------------------------------------------------*/
66
67static const uint32_t panel_strength_ctrl[] = {
68 0xff, 0x06
69};
70
71static const char panel_bist_ctrl[] = {
72 0x00, 0x00, 0xb1, 0xff, 0x00, 0x00
73};
74
75static const uint32_t panel_regulator_settings[] = {
76 0x07, 0x09, 0x03, 0x00, 0x20, 0x00, 0x01
77};
78
79static const char panel_lane_config[] = {
80 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x97,
81 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x01, 0x97,
82 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x01, 0x97,
83 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x01, 0x97,
84 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xbb
85};
86
87static const uint32_t panel_physical_ctrl[] = {
88 0x5f, 0x00, 0x00, 0x10
89};
90
91/*---------------------------------------------------------------------------*/
92/* Other Configuration */
93/*---------------------------------------------------------------------------*/
94
95#define MIPI_FB_ADDR 0x03200000
96#define EDP_FB_ADDR MIPI_FB_ADDR
97
98#define MIPI_HSYNC_PULSE_WIDTH 12
99#define MIPI_HSYNC_BACK_PORCH_DCLK 32
100#define MIPI_HSYNC_FRONT_PORCH_DCLK 144
101
102#define MIPI_VSYNC_PULSE_WIDTH 4
103#define MIPI_VSYNC_BACK_PORCH_LINES 3
104#define MIPI_VSYNC_FRONT_PORCH_LINES 9
105
106#define PWM_BL_LPG_CHAN_ID 8
107
108extern int mdss_dsi_phy_init(struct mipi_dsi_panel_config *, uint32_t ctl_base);
109
110#endif