blob: 9ee5ec3fb5e7d35ddfb0c6b89572637fb71d5f85 [file] [log] [blame]
Ajay Singh Parmar2a2e3d62015-02-12 16:57:28 -08001/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
Dhaval Patelb95039c2015-03-16 11:14:06 -07002 *
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>
Ajay Singh Parmar2a2e3d62015-02-12 16:57:28 -080036#include <msm_panel.h>
Dhaval Patelb95039c2015-03-16 11:14:06 -070037
38/*---------------------------------------------------------------------------*/
39/* Target Physical configuration */
40/*---------------------------------------------------------------------------*/
41
42static const uint32_t panel_strength_ctrl[] = {
43 0xFF, 0x06,
44 0xFF, 0x06,
45 0xFF, 0x06,
46 0xFF, 0x06,
47 0xFF, 0x00
48};
49
50static const uint32_t panel_regulator_settings[] = {
51 0x1d, 0x1d, 0x1d, 0x1d, 0x1d
52};
53
54static const char panel_lane_config[] = {
55 0x00, 0x00, 0x10, 0x0f,
56 0x00, 0x00, 0x10, 0x0f,
57 0x00, 0x00, 0x10, 0x0f,
58 0x00, 0x00, 0x10, 0x0f,
59 0x00, 0x00, 0x10, 0x8f,
60};
61
62static const char panel_bist_ctrl[] = { };
63
64static const uint32_t panel_physical_ctrl[] = { };
65/*---------------------------------------------------------------------------*/
66/* Other Configuration */
67/*---------------------------------------------------------------------------*/
68#define DISPLAY_CMDLINE_PREFIX " mdss_mdp.panel="
69
Dhaval Patel4bd46e92015-09-09 12:34:01 -070070#define MIPI_FB_ADDR 0x83400000
Ajay Singh Parmar68b8ce92015-02-12 19:16:47 -080071#define HDMI_FB_ADDR 0xB1C00000
Dhaval Patelb95039c2015-03-16 11:14:06 -070072
73#define MIPI_HSYNC_PULSE_WIDTH 16
74#define MIPI_HSYNC_BACK_PORCH_DCLK 32
75#define MIPI_HSYNC_FRONT_PORCH_DCLK 76
76
77#define MIPI_VSYNC_PULSE_WIDTH 2
78#define MIPI_VSYNC_BACK_PORCH_LINES 2
79#define MIPI_VSYNC_FRONT_PORCH_LINES 4
80
81#define PWM_BL_LPG_CHAN_ID 4 /* lpg_out<3> */
82
83#define HDMI_PANEL_NAME "hdmi"
Tatenda Chipeperekwa6143b272015-10-28 18:21:28 -070084#define HDMI_CONTROLLER_STRING "hdmi:"
85#define HDMI_VIC_LEN 5
Dhaval Patelb95039c2015-03-16 11:14:06 -070086
87/*---------------------------------------------------------------------------*/
88/* Functions */
89/*---------------------------------------------------------------------------*/
90int target_display_pre_on();
91int target_display_pre_off();
92int target_display_post_on();
93int target_display_post_off();
94int target_cont_splash_screen();
95int target_display_get_base_offset(uint32_t base);
96void target_force_cont_splash_disable(uint8_t override);
97uint8_t target_panel_auto_detect_enabled();
Siddharth Zaveriacaacc32015-12-12 15:10:33 -050098void target_set_switch_gpio(int enable_dsi2hdmibridge);
Ajay Singh Parmar2a2e3d62015-02-12 16:57:28 -080099int target_hdmi_pll_clock(uint8_t enable, struct msm_panel_info *pinfo);
100int target_hdmi_panel_clock(uint8_t enable, struct msm_panel_info *pinfo);
101int target_hdmi_regulator_ctrl(uint8_t enable);
102int target_hdmi_gpio_ctrl(uint8_t enable);
Dhaval Patelb95039c2015-03-16 11:14:06 -0700103
104#endif