blob: 601b54bf668ef00b27910d1b0d6f981de4592d48 [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
Dhaval Patelb95039c2015-03-16 11:14:06 -070071
72#define MIPI_HSYNC_PULSE_WIDTH 16
73#define MIPI_HSYNC_BACK_PORCH_DCLK 32
74#define MIPI_HSYNC_FRONT_PORCH_DCLK 76
75
76#define MIPI_VSYNC_PULSE_WIDTH 2
77#define MIPI_VSYNC_BACK_PORCH_LINES 2
78#define MIPI_VSYNC_FRONT_PORCH_LINES 4
79
80#define PWM_BL_LPG_CHAN_ID 4 /* lpg_out<3> */
81
82#define HDMI_PANEL_NAME "hdmi"
Tatenda Chipeperekwa6143b272015-10-28 18:21:28 -070083#define HDMI_CONTROLLER_STRING "hdmi:"
84#define HDMI_VIC_LEN 5
Dhaval Patelb95039c2015-03-16 11:14:06 -070085
86/*---------------------------------------------------------------------------*/
87/* Functions */
88/*---------------------------------------------------------------------------*/
89int target_display_pre_on();
90int target_display_pre_off();
91int target_display_post_on();
92int target_display_post_off();
93int target_cont_splash_screen();
94int target_display_get_base_offset(uint32_t base);
95void target_force_cont_splash_disable(uint8_t override);
96uint8_t target_panel_auto_detect_enabled();
Siddharth Zaveriacaacc32015-12-12 15:10:33 -050097void target_set_switch_gpio(int enable_dsi2hdmibridge);
Ajay Singh Parmar2a2e3d62015-02-12 16:57:28 -080098int target_hdmi_pll_clock(uint8_t enable, struct msm_panel_info *pinfo);
99int target_hdmi_panel_clock(uint8_t enable, struct msm_panel_info *pinfo);
100int target_hdmi_regulator_ctrl(uint8_t enable);
101int target_hdmi_gpio_ctrl(uint8_t enable);
Dhaval Patelb95039c2015-03-16 11:14:06 -0700102
103#endif