Merge "target: apq8084: Change scratch address according to memory map"
diff --git a/dev/gcdb/display/include/panel_ssd2080m_720p_video.h b/dev/gcdb/display/include/panel_ssd2080m_720p_video.h
new file mode 100755
index 0000000..f8fc707
--- /dev/null
+++ b/dev/gcdb/display/include/panel_ssd2080m_720p_video.h
@@ -0,0 +1,492 @@
+/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *  * Neither the name of The Linux Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*---------------------------------------------------------------------------
+ * This file is autogenerated file using gcdb parser. Please do not edit it.
+ * Update input XML file to add a new entry or update variable in this file
+ * VERSION = "1.0"
+ *---------------------------------------------------------------------------*/
+
+#ifndef _PANEL_SSD2080M_720P_VIDEO_H_
+
+#define _PANEL_SSD2080M_720P_VIDEO_H_
+/*---------------------------------------------------------------------------*/
+/* HEADER files                                                              */
+/*---------------------------------------------------------------------------*/
+#include "panel.h"
+
+/*---------------------------------------------------------------------------*/
+/* Panel configuration                                                       */
+/*---------------------------------------------------------------------------*/
+
+static struct panel_config ssd2080m_720p_video_panel_data = {
+  "qcom,mdss_dsi_ssd2080m_720p_video", "dsi:0:", "qcom,mdss-dsi-panel",
+  10, 0, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/*---------------------------------------------------------------------------*/
+/* Panel resolution                                                          */
+/*---------------------------------------------------------------------------*/
+static struct panel_resolution ssd2080m_720p_video_panel_res = {
+  720, 1280, 80, 30, 14, 0, 12, 16, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/*---------------------------------------------------------------------------*/
+/* Panel Color Information                                                   */
+/*---------------------------------------------------------------------------*/
+static struct color_info ssd2080m_720p_video_color = {
+  24, 0, 0xff, 0, 0, 0
+};
+
+/*---------------------------------------------------------------------------*/
+/* Panel Command information                                                 */
+/*---------------------------------------------------------------------------*/
+static char ssd2080m_720p_video_on_cmd0[] = {
+0xFF, 0x01, 0x15, 0x80 };
+
+
+static char ssd2080m_720p_video_on_cmd1[] = {
+0x05, 0x00, 0x29, 0xC0,
+0xC6, 0x63, 0x00, 0x81,
+0x31, 0xFF, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd2[] = {
+0x05, 0x00, 0x29, 0xC0,
+0xCB, 0xE7, 0x80, 0x73,
+0x33, 0xFF, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd3[] = {
+0x02, 0x00, 0x29, 0xC0,
+0xEC, 0xD2, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd4[] = {
+0x03, 0x00, 0x29, 0xC0,
+0xB3, 0x04, 0x9F, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd5[] = {
+0x04, 0x00, 0x29, 0xC0,
+0xB2, 0x16, 0x1E, 0x10,
+ };
+
+
+static char ssd2080m_720p_video_on_cmd6[] = {
+0x02, 0x00, 0x29, 0xC0,
+0xB4, 0x00, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd7[] = {
+0x02, 0x00, 0x29, 0xC0,
+0xC1, 0x04, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd8[] = {
+0x04, 0x00, 0x29, 0xC0,
+0xC2, 0xBE, 0x00, 0x58,
+ };
+
+
+static char ssd2080m_720p_video_on_cmd9[] = {
+0x09, 0x00, 0x29, 0xC0,
+0xC3, 0x01, 0x22, 0x11,
+0x21, 0x0E, 0x80, 0x80,
+0x24, 0xFF, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd10[] = {
+0x08, 0x00, 0x29, 0xC0,
+0xB6, 0x09, 0x16, 0x42,
+0x01, 0x13, 0x00, 0x00,
+ };
+
+
+static char ssd2080m_720p_video_on_cmd11[] = {
+0x04, 0x00, 0x29, 0xC0,
+0xB7, 0x24, 0x26, 0x43,
+ };
+
+
+static char ssd2080m_720p_video_on_cmd12[] = {
+0x06, 0x00, 0x29, 0xC0,
+0xB8, 0x16, 0x08, 0x25,
+0x44, 0x08, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd13[] = {
+0x09, 0x00, 0x29, 0xC0,
+0xB9, 0x06, 0x08, 0x07,
+0x09, 0x00, 0x00, 0x00,
+0x00, 0xFF, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd14[] = {
+0x09, 0x00, 0x29, 0xC0,
+0xBA, 0x0E, 0x10, 0x0A,
+0x0C, 0x16, 0x05, 0x00,
+0x00, 0xFF, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd15[] = {
+0x09, 0x00, 0x29, 0xC0,
+0xBB, 0xA1, 0xA1, 0xA1,
+0xA1, 0x00, 0x00, 0x00,
+0x00, 0xFF, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd16[] = {
+0x09, 0x00, 0x29, 0xC0,
+0xBC, 0x0F, 0x11, 0x0B,
+0x0D, 0x16, 0x05, 0x00,
+0x00, 0xFF, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd17[] = {
+0x09, 0x00, 0x29, 0xC0,
+0xBD, 0xA1, 0xA1, 0xA1,
+0xA1, 0x00, 0x00, 0x00,
+0x00, 0xFF, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd18[] = {
+0x04, 0x00, 0x29, 0xC0,
+0xE6, 0xFF, 0xFF, 0x0F,
+ };
+
+
+static char ssd2080m_720p_video_on_cmd19[] = {
+0x02, 0x00, 0x29, 0xC0,
+0xC7, 0x3F, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd20[] = {
+0x07, 0x00, 0x29, 0xC0,
+0xB5, 0x47, 0x00, 0x00,
+0x08, 0x00, 0x01, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd21[] = {
+0x08, 0x00, 0x29, 0xC0,
+0xC4, 0xDF, 0x72, 0x12,
+0x12, 0x66, 0xE3, 0x99,
+ };
+
+
+static char ssd2080m_720p_video_on_cmd22[] = {
+0x07, 0x00, 0x29, 0xC0,
+0xD0, 0x0A, 0x00, 0x0D,
+0x15, 0x1F, 0x2E, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd23[] = {
+0x06, 0x00, 0x29, 0xC0,
+0xD1, 0x28, 0x27, 0x14,
+0x02, 0x01, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd24[] = {
+0x07, 0x00, 0x29, 0xC0,
+0xD2, 0x0A, 0x00, 0x0D,
+0x15, 0x1F, 0x2E, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd25[] = {
+0x06, 0x00, 0x29, 0xC0,
+0xD3, 0x28, 0x27, 0x14,
+0x02, 0x01, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd26[] = {
+0x07, 0x00, 0x29, 0xC0,
+0xD4, 0x0A, 0x00, 0x0D,
+0x15, 0x1F, 0x2E, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd27[] = {
+0x06, 0x00, 0x29, 0xC0,
+0xD5, 0x28, 0x27, 0x14,
+0x02, 0x01, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd28[] = {
+0x07, 0x00, 0x29, 0xC0,
+0xD6, 0x0A, 0x00, 0x0D,
+0x15, 0x1F, 0x2E, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd29[] = {
+0x06, 0x00, 0x29, 0xC0,
+0xD7, 0x28, 0x27, 0x14,
+0x02, 0x01, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd30[] = {
+0x07, 0x00, 0x29, 0xC0,
+0xD8, 0x0A, 0x00, 0x0D,
+0x15, 0x1F, 0x2E, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd31[] = {
+0x06, 0x00, 0x29, 0xC0,
+0xD9, 0x28, 0x27, 0x14,
+0x02, 0x01, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd32[] = {
+0x07, 0x00, 0x29, 0xC0,
+0xDA, 0x0A, 0x00, 0x0D,
+0x15, 0x1F, 0x2E, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd33[] = {
+0x06, 0x00, 0x29, 0xC0,
+0xDB, 0x28, 0x27, 0x14,
+0x02, 0x01, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd34[] = {
+0x03, 0x00, 0x29, 0xC0,
+0xCC, 0x10, 0x00, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd35[] = {
+0x04, 0x00, 0x29, 0xC0,
+0xCE, 0x4E, 0x55, 0xA5,
+ };
+
+
+static char ssd2080m_720p_video_on_cmd36[] = {
+0x04, 0x00, 0x29, 0xC0,
+0xE0, 0x01, 0x02, 0x02,
+ };
+
+
+static char ssd2080m_720p_video_on_cmd37[] = {
+0x05, 0x00, 0x29, 0xC0,
+0xF6, 0x00, 0x00, 0x00,
+0x00, 0xFF, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd38[] = {
+0x05, 0x00, 0x29, 0xC0,
+0xF7, 0x00, 0x00, 0x00,
+0x00, 0xFF, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd39[] = {
+0x03, 0x00, 0x29, 0xC0,
+0xE1, 0x90, 0x00, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd40[] = {
+0x03, 0x00, 0x29, 0xC0,
+0xDE, 0x95, 0xCF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd41[] = {
+0x02, 0x00, 0x29, 0xC0,
+0xCF, 0x46, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd42[] = {
+0x03, 0x00, 0x29, 0xC0,
+0xC5, 0x77, 0x47, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd43[] = {
+0x03, 0x00, 0x29, 0xC0,
+0xED, 0x00, 0x20, 0xFF,  };
+
+
+static char ssd2080m_720p_video_on_cmd44[] = {
+0x11, 0x00, 0x05, 0x80 };
+
+
+static char ssd2080m_720p_video_on_cmd45[] = {
+0x29, 0x00, 0x05, 0x80 };
+
+
+static char ssd2080m_720p_video_on_cmd46[] = {
+0x53, 0x2c, 0x15, 0x80 };
+
+
+
+
+static struct mipi_dsi_cmd ssd2080m_720p_video_on_command[] = {
+{ 0x4 , ssd2080m_720p_video_on_cmd0},
+{ 0xc , ssd2080m_720p_video_on_cmd1},
+{ 0xc , ssd2080m_720p_video_on_cmd2},
+{ 0x8 , ssd2080m_720p_video_on_cmd3},
+{ 0x8 , ssd2080m_720p_video_on_cmd4},
+{ 0x8 , ssd2080m_720p_video_on_cmd5},
+{ 0x8 , ssd2080m_720p_video_on_cmd6},
+{ 0x8 , ssd2080m_720p_video_on_cmd7},
+{ 0x8 , ssd2080m_720p_video_on_cmd8},
+{ 0x10 , ssd2080m_720p_video_on_cmd9},
+{ 0xc , ssd2080m_720p_video_on_cmd10},
+{ 0x8 , ssd2080m_720p_video_on_cmd11},
+{ 0xc , ssd2080m_720p_video_on_cmd12},
+{ 0x10 , ssd2080m_720p_video_on_cmd13},
+{ 0x10 , ssd2080m_720p_video_on_cmd14},
+{ 0x10 , ssd2080m_720p_video_on_cmd15},
+{ 0x10 , ssd2080m_720p_video_on_cmd16},
+{ 0x10 , ssd2080m_720p_video_on_cmd17},
+{ 0x8 , ssd2080m_720p_video_on_cmd18},
+{ 0x8 , ssd2080m_720p_video_on_cmd19},
+{ 0xc , ssd2080m_720p_video_on_cmd20},
+{ 0xc , ssd2080m_720p_video_on_cmd21},
+{ 0xc , ssd2080m_720p_video_on_cmd22},
+{ 0xc , ssd2080m_720p_video_on_cmd23},
+{ 0xc , ssd2080m_720p_video_on_cmd24},
+{ 0xc , ssd2080m_720p_video_on_cmd25},
+{ 0xc , ssd2080m_720p_video_on_cmd26},
+{ 0xc , ssd2080m_720p_video_on_cmd27},
+{ 0xc , ssd2080m_720p_video_on_cmd28},
+{ 0xc , ssd2080m_720p_video_on_cmd29},
+{ 0xc , ssd2080m_720p_video_on_cmd30},
+{ 0xc , ssd2080m_720p_video_on_cmd31},
+{ 0xc , ssd2080m_720p_video_on_cmd32},
+{ 0xc , ssd2080m_720p_video_on_cmd33},
+{ 0x8 , ssd2080m_720p_video_on_cmd34},
+{ 0x8 , ssd2080m_720p_video_on_cmd35},
+{ 0x8 , ssd2080m_720p_video_on_cmd36},
+{ 0xc , ssd2080m_720p_video_on_cmd37},
+{ 0xc , ssd2080m_720p_video_on_cmd38},
+{ 0x8 , ssd2080m_720p_video_on_cmd39},
+{ 0x8 , ssd2080m_720p_video_on_cmd40},
+{ 0x8 , ssd2080m_720p_video_on_cmd41},
+{ 0x8 , ssd2080m_720p_video_on_cmd42},
+{ 0x8 , ssd2080m_720p_video_on_cmd43},
+{ 0x4 , ssd2080m_720p_video_on_cmd44},
+{ 0x4 , ssd2080m_720p_video_on_cmd45},
+{ 0x4 , ssd2080m_720p_video_on_cmd46}
+};
+#define SSD2080M_720P_VIDEO_ON_COMMAND 47
+
+
+static char ssd2080m_720p_videooff_cmd0[] = {
+0x10, 0x00, 0x05, 0x80 };
+
+
+static char ssd2080m_720p_videooff_cmd1[] = {
+0x53, 0x00, 0x05, 0x80 };
+
+
+static char ssd2080m_720p_videooff_cmd2[] = {
+0xc2, 0x00, 0x05, 0x80 };
+
+
+static char ssd2080m_720p_videooff_cmd3[] = {
+0x02, 0x00, 0x39, 0xC0,
+0xcf, 0x40, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_videooff_cmd4[] = {
+0xde, 0x84, 0x00, 0x05, 0x80 };
+
+
+static char ssd2080m_720p_videooff_cmd5[] = {
+0x02, 0x00, 0x39, 0xC0,
+0xcb, 0x22, 0xFF, 0xFF,  };
+
+
+static char ssd2080m_720p_videooff_cmd6[] = {
+0xc3, 0x00, 0x05, 0x80 };
+
+
+
+
+static struct mipi_dsi_cmd ssd2080m_720p_video_off_command[] = {
+{ 0x4 , ssd2080m_720p_videooff_cmd0},
+{ 0x4 , ssd2080m_720p_videooff_cmd1},
+{ 0x4 , ssd2080m_720p_videooff_cmd2},
+{ 0x8 , ssd2080m_720p_videooff_cmd3},
+{ 0x4 , ssd2080m_720p_videooff_cmd4},
+{ 0x8 , ssd2080m_720p_videooff_cmd5},
+{ 0x4 , ssd2080m_720p_videooff_cmd6}
+};
+#define SSD2080M_720P_VIDEO_OFF_COMMAND 7
+
+
+static struct command_state ssd2080m_720p_video_state = {
+  0, 1
+};
+
+/*---------------------------------------------------------------------------*/
+/* Command mode panel information                                            */
+/*---------------------------------------------------------------------------*/
+
+static struct commandpanel_info ssd2080m_720p_video_command_panel = {
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/*---------------------------------------------------------------------------*/
+/* Video mode panel information                                              */
+/*---------------------------------------------------------------------------*/
+
+static struct videopanel_info ssd2080m_720p_video_video_panel = {
+  1, 0, 0, 0, 1, 0, 2, 0, 0x9
+};
+
+/*---------------------------------------------------------------------------*/
+/* Lane Configuration                                                        */
+/*---------------------------------------------------------------------------*/
+
+static struct lane_configuration ssd2080m_720p_video_lane_config = {
+  4, 0, 1, 1, 1, 1
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Panel Timing                                                              */
+/*---------------------------------------------------------------------------*/
+static const uint32_t ssd2080m_720p_video_timings[] = {
+  0xA8, 0x1F, 0x17, 0x00, 0x2F, 0x2D, 0x1C, 0x21, 0x29, 0x03, 0x04, 0x00
+};
+
+static struct panel_timing ssd2080m_720p_video_timing_info = {
+  0, 4, 0x20, 0x2F
+};
+
+static struct panel_reset_sequence ssd2080m_720p_video_panel_reset_seq = {
+{ 1, 0, 1, }, { 20, 20, 20, }, 2
+};
+
+/*---------------------------------------------------------------------------*/
+/* Backlight Settings                                                        */
+/*---------------------------------------------------------------------------*/
+
+static struct backlight ssd2080m_720p_video_backlight = {
+  1, 1, 4095, 100, 1, "bl_ctrl_wled"
+};
+
+
+#endif /*_PANEL_SSD2080M_720P_VIDEO_H_*/
diff --git a/target/msm8610/include/target/display.h b/target/msm8610/include/target/display.h
index 9f9f609..c6e93c4 100644
--- a/target/msm8610/include/target/display.h
+++ b/target/msm8610/include/target/display.h
@@ -102,7 +102,7 @@
 
 #define msm8610_DSI_FEATURE_ENABLE 0
 
-#define MIPI_FB_ADDR  0x0D200000
+#define MIPI_FB_ADDR  0x03200000
 
 #define MIPI_HSYNC_PULSE_WIDTH       8
 #define MIPI_HSYNC_BACK_PORCH_DCLK   40