Ajay Singh Parmar | 2a2e3d6 | 2015-02-12 16:57:28 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. |
Dhaval Patel | b95039c | 2015-03-16 11:14:06 -0700 | [diff] [blame] | 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> |
Ajay Singh Parmar | 2a2e3d6 | 2015-02-12 16:57:28 -0800 | [diff] [blame] | 36 | #include <msm_panel.h> |
Dhaval Patel | b95039c | 2015-03-16 11:14:06 -0700 | [diff] [blame] | 37 | |
| 38 | /*---------------------------------------------------------------------------*/ |
| 39 | /* Target Physical configuration */ |
| 40 | /*---------------------------------------------------------------------------*/ |
| 41 | |
| 42 | static const uint32_t panel_strength_ctrl[] = { |
| 43 | 0xFF, 0x06, |
| 44 | 0xFF, 0x06, |
| 45 | 0xFF, 0x06, |
| 46 | 0xFF, 0x06, |
| 47 | 0xFF, 0x00 |
| 48 | }; |
| 49 | |
| 50 | static const uint32_t panel_regulator_settings[] = { |
| 51 | 0x1d, 0x1d, 0x1d, 0x1d, 0x1d |
| 52 | }; |
| 53 | |
| 54 | static 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 | |
| 62 | static const char panel_bist_ctrl[] = { }; |
| 63 | |
| 64 | static const uint32_t panel_physical_ctrl[] = { }; |
| 65 | /*---------------------------------------------------------------------------*/ |
| 66 | /* Other Configuration */ |
| 67 | /*---------------------------------------------------------------------------*/ |
| 68 | #define DISPLAY_CMDLINE_PREFIX " mdss_mdp.panel=" |
| 69 | |
Dhaval Patel | 4bd46e9 | 2015-09-09 12:34:01 -0700 | [diff] [blame] | 70 | #define MIPI_FB_ADDR 0x83400000 |
Dhaval Patel | b95039c | 2015-03-16 11:14:06 -0700 | [diff] [blame] | 71 | |
| 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 Chipeperekwa | 6143b27 | 2015-10-28 18:21:28 -0700 | [diff] [blame^] | 83 | #define HDMI_CONTROLLER_STRING "hdmi:" |
| 84 | #define HDMI_VIC_LEN 5 |
Dhaval Patel | b95039c | 2015-03-16 11:14:06 -0700 | [diff] [blame] | 85 | |
| 86 | /*---------------------------------------------------------------------------*/ |
| 87 | /* Functions */ |
| 88 | /*---------------------------------------------------------------------------*/ |
| 89 | int target_display_pre_on(); |
| 90 | int target_display_pre_off(); |
| 91 | int target_display_post_on(); |
| 92 | int target_display_post_off(); |
| 93 | int target_cont_splash_screen(); |
| 94 | int target_display_get_base_offset(uint32_t base); |
| 95 | void target_force_cont_splash_disable(uint8_t override); |
| 96 | uint8_t target_panel_auto_detect_enabled(); |
Siddharth Zaveri | acaacc3 | 2015-12-12 15:10:33 -0500 | [diff] [blame] | 97 | void target_set_switch_gpio(int enable_dsi2hdmibridge); |
Ajay Singh Parmar | 2a2e3d6 | 2015-02-12 16:57:28 -0800 | [diff] [blame] | 98 | int target_hdmi_pll_clock(uint8_t enable, struct msm_panel_info *pinfo); |
| 99 | int target_hdmi_panel_clock(uint8_t enable, struct msm_panel_info *pinfo); |
| 100 | int target_hdmi_regulator_ctrl(uint8_t enable); |
| 101 | int target_hdmi_gpio_ctrl(uint8_t enable); |
Dhaval Patel | b95039c | 2015-03-16 11:14:06 -0700 | [diff] [blame] | 102 | |
| 103 | #endif |