blob: 97aadf24d029cf05b0daa1e5d979d69ae031916d [file] [log] [blame]
Padmanabhan Komanduruc7825c62015-04-10 12:57:15 -07001/* Copyright (c) 2015, 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_MSM8952_DISPLAY_H
30#define _TARGET_MSM8952_DISPLAY_H
31
32/*---------------------------------------------------------------------------*/
33/* HEADER files */
34/*---------------------------------------------------------------------------*/
35#include <display_resource.h>
36
37/*---------------------------------------------------------------------------*/
38/* Target Physical configuration */
39/*---------------------------------------------------------------------------*/
40
41static const uint32_t panel_strength_ctrl[] = {
42 0xff, 0x06
43};
44
45static const char panel_bist_ctrl[] = {
46 0x00, 0x00, 0xb1, 0xff, 0x00, 0x00
47};
48
49extern uint32_t panel_regulator_settings[7];
50
Padmanabhan Komanduru0e19a362015-06-08 13:29:32 +053051static const uint32_t dcdc_regulator_settings_lpm[] = {
Padmanabhan Komanduruc7825c62015-04-10 12:57:15 -070052 0x03, 0x08, 0x07, 0x00, 0x20, 0x07, 0x01
53};
54
Padmanabhan Komanduru0e19a362015-06-08 13:29:32 +053055static const uint32_t ldo_regulator_settings_lpm[] = {
56 0x00, 0x01, 0x01, 0x00, 0x20, 0x07, 0x00
57};
58
59static const uint32_t dcdc_regulator_settings_hpm[] = {
60 0x03, 0x09, 0x03, 0x00, 0x20, 0x07, 0x01
61};
62
63static const uint32_t ldo_regulator_settings_hpm[] = {
Padmanabhan Komanduruc7825c62015-04-10 12:57:15 -070064 0x00, 0x01, 0x01, 0x00, 0x20, 0x07, 0x00
65};
66
67static const char panel_lane_config[] = {
Padmanabhan Komanduru0e19a362015-06-08 13:29:32 +053068 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x97,
69 0x01, 0xc0, 0x00, 0x00, 0x05, 0x00, 0x00, 0x01, 0x97,
70 0x01, 0xc0, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x01, 0x97,
71 0x01, 0xc0, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x01, 0x97,
72 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff
Padmanabhan Komanduruc7825c62015-04-10 12:57:15 -070073};
74
75static const uint32_t panel_physical_ctrl[] = {
76 0x5f, 0x00, 0x00, 0x10
77};
78
79/*---------------------------------------------------------------------------*/
80/* Other Configuration */
81/*---------------------------------------------------------------------------*/
82#define DISPLAY_CMDLINE_PREFIX " mdss_mdp.panel="
83
Parth Dixit80b58442016-05-17 10:54:09 +053084#define MIPI_FB_ADDR 0x90000000
Padmanabhan Komanduruc7825c62015-04-10 12:57:15 -070085
86#define MIPI_HSYNC_PULSE_WIDTH 12
87#define MIPI_HSYNC_BACK_PORCH_DCLK 32
88#define MIPI_HSYNC_FRONT_PORCH_DCLK 144
89
90#define MIPI_VSYNC_PULSE_WIDTH 4
91#define MIPI_VSYNC_BACK_PORCH_LINES 3
92#define MIPI_VSYNC_FRONT_PORCH_LINES 9
93
Padmanabhan Komanduruc7825c62015-04-10 12:57:15 -070094/*---------------------------------------------------------------------------*/
95/* Functions */
96/*---------------------------------------------------------------------------*/
97int target_display_pre_on();
98int target_display_pre_off();
99int target_display_post_on();
100int target_display_post_off();
101int target_cont_splash_screen();
102int target_display_get_base_offset(uint32_t base);
103void target_force_cont_splash_disable(uint8_t override);
104uint8_t target_panel_auto_detect_enabled();
Ray Zhangf95f5b92015-06-25 15:34:29 +0800105uint32_t oem_panel_max_auto_detect_panels();
106
107#endif