Merge "platform: mdm9607: modify gpio tlmm config function" into lk.lnx.1.0-dev.1.0
diff --git a/dev/gcdb/display/include/panel_r69006_1080p_cmd.h b/dev/gcdb/display/include/panel_r69006_1080p_cmd.h
index 28c616d..b6d487f 100755
--- a/dev/gcdb/display/include/panel_r69006_1080p_cmd.h
+++ b/dev/gcdb/display/include/panel_r69006_1080p_cmd.h
@@ -105,7 +105,7 @@
 	0x9A, 0x73, 0x8D, 0xAD,
 	0x63, 0xFE, 0xFF, 0xFF,
 	0xCB, 0xF8, 0x01, 0x00,
-	0xAA, 0x40, 0x00, 0xC2,
+	0xAA, 0x40, 0x02, 0xC2,
 	0x01, 0x08, 0x00, 0x01,
 };
 
@@ -263,11 +263,11 @@
 
 
 static char r69006_1080p_cmd_on_cmd30[] = {
-	0x29, 0x00, 0x05, 0x80
+	0x11, 0x00, 0x05, 0x80
 };
 
 static char r69006_1080p_cmd_on_cmd31[] = {
-	0x11, 0x00, 0x05, 0x80
+	0x29, 0x00, 0x05, 0x80
 };
 
 
@@ -301,9 +301,9 @@
 	{0x8, r69006_1080p_cmd_on_cmd26, 0x00},
 	{0x8, r69006_1080p_cmd_on_cmd27, 0x00},
 	{0x8, r69006_1080p_cmd_on_cmd28, 0x00},
-	{0x8, r69006_1080p_cmd_on_cmd29, 0x14},
-	{0x4, r69006_1080p_cmd_on_cmd30, 0x14},
-	{0x4, r69006_1080p_cmd_on_cmd31, 0x78}
+	{0x8, r69006_1080p_cmd_on_cmd29, 0x00},
+	{0x4, r69006_1080p_cmd_on_cmd30, 0x78},
+	{0x4, r69006_1080p_cmd_on_cmd31, 0x14}
 };
 
 #define R69006_1080P_CMD_ON_COMMAND 32
@@ -373,7 +373,7 @@
 /* Panel reset sequence                                                      */
 /*---------------------------------------------------------------------------*/
 static struct panel_reset_sequence r69006_1080p_cmd_reset_seq = {
-	{1, 0, 1, }, {20, 2, 20, }, 2
+	{1, 0, 1, }, {10, 10, 10, }, 2
 };
 
 /*---------------------------------------------------------------------------*/
diff --git a/platform/msm_shared/include/mipi_dsi_autopll_thulium.h b/platform/msm_shared/include/mipi_dsi_autopll_thulium.h
index 9bf6c37..bac4776 100644
--- a/platform/msm_shared/include/mipi_dsi_autopll_thulium.h
+++ b/platform/msm_shared/include/mipi_dsi_autopll_thulium.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2016, 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
@@ -125,7 +125,7 @@
 
 	uint32_t pll_lpf_res1;	/* 3, reg: 0x0504, bit 0 - 3 */
 	uint32_t pll_lpf_cap1;	/* 11, reg: 0x0500, bit 0 - 3 */
-	uint32_t pll_lpf_cap2;	/* 14, reg: 0x0500, bit 4 - 7 */
+	uint32_t pll_lpf_cap2;	/* 1, reg: 0x0500, bit 4 - 7 */
 	uint32_t pll_c3ctrl;		/* 2, reg: 0x04c4 */
 	uint32_t pll_r3ctrl;		/* 1, reg: 0x04c4 */
 };
diff --git a/platform/msm_shared/mipi_dsi_autopll_thulium.c b/platform/msm_shared/mipi_dsi_autopll_thulium.c
index ffb1310..706a5ce 100644
--- a/platform/msm_shared/mipi_dsi_autopll_thulium.c
+++ b/platform/msm_shared/mipi_dsi_autopll_thulium.c
@@ -77,7 +77,7 @@
 	pdb->in.pll_icpcset_m = 0;	/* 0, reg: 0x04f8, bit 3 - 5 */
 	pdb->in.pll_lpf_res1 = 3;	/* 3, reg: 0x0504, bit 0 - 3 */
 	pdb->in.pll_lpf_cap1 = 11;	/* 11, reg: 0x0500, bit 0 - 3 */
-	pdb->in.pll_lpf_cap2 = 14;	/* 14, reg: 0x0500, bit 4 - 7 */
+	pdb->in.pll_lpf_cap2 = 1;	/* 1, reg: 0x0500, bit 4 - 7 */
 	pdb->in.pll_iptat_trim = 7;
 	pdb->in.pll_c3ctrl = 2;		/* 2 */
 	pdb->in.pll_r3ctrl = 1;		/* 1 */
@@ -163,7 +163,7 @@
 	pdb->out.pll_kvco_count = cnt;
 
 	pdb->out.pll_misc1 = 16;
-	pdb->out.pll_resetsm_cntrl = 0;
+	pdb->out.pll_resetsm_cntrl = 48;
 	pdb->out.pll_resetsm_cntrl2 = pdb->in.bandgap_timer << 3;
 	pdb->out.pll_resetsm_cntrl5 = pdb->in.pll_wakeup_timer;
 	pdb->out.pll_kvco_code = 0;
diff --git a/target/msm8952/mdtp_defs.c b/target/msm8952/mdtp_defs.c
index 51de785..a1ef897 100644
--- a/target/msm8952/mdtp_defs.c
+++ b/target/msm8952/mdtp_defs.c
@@ -53,15 +53,20 @@
         target_efuse->address = MDTP_EFUSE_ADDRESS_MSM8956;
         target_efuse->start = MDTP_EFUSE_START_MSM8956;
     }
-    else if (platform_is_msm8937())
+    else if (platform_is_msm8952())
+    {
+        target_efuse->address = MDTP_EFUSE_ADDRESS_MSM8952;
+        target_efuse->start = MDTP_EFUSE_START_MSM8952;
+    }
+    else if (platform_is_msm8937() || platform_is_msmgold())
     {
         target_efuse->address = MDTP_EFUSE_ADDRESS_MSM8937;
         target_efuse->start = MDTP_EFUSE_START_MSM8937;
     }
     else
     {
-        target_efuse->address = MDTP_EFUSE_ADDRESS_MSM8952;
-        target_efuse->start = MDTP_EFUSE_START_MSM8952;
+        dprintf(CRITICAL, "mdtp: mdtp_get_target_efuse: ERROR, target is not supported\n");
+        return -1;
     }
 
     return 0;
diff --git a/target/msmtitanium/target_display.c b/target/msmtitanium/target_display.c
index 28d5c50..5f9ac3b 100644
--- a/target/msmtitanium/target_display.c
+++ b/target/msmtitanium/target_display.c
@@ -219,6 +219,7 @@
 						struct msm_panel_info *pinfo)
 {
 	int ret = NO_ERROR;
+	uint32_t hw_id = board_hardware_id();
 
 	if (enable) {
 
@@ -231,11 +232,13 @@
 			gpio_set_dir(enable_gpio.pin_id, 2);
 		}
 
-		gpio_tlmm_config(bkl_gpio.pin_id, 0,
+		if (hw_id != HW_PLATFORM_QRD) {
+			gpio_tlmm_config(bkl_gpio.pin_id, 0,
 				bkl_gpio.pin_direction, bkl_gpio.pin_pull,
 				bkl_gpio.pin_strength, bkl_gpio.pin_state);
 
-		gpio_set_dir(bkl_gpio.pin_id, 2);
+			gpio_set_dir(bkl_gpio.pin_id, 2);
+		}
 
 		gpio_tlmm_config(reset_gpio.pin_id, 0,
 				reset_gpio.pin_direction, reset_gpio.pin_pull,
@@ -347,9 +350,13 @@
 
 int target_ldo_ctrl(uint8_t enable, struct msm_panel_info *pinfo)
 {
-	uint32_t ldo_num = REG_LDO6 | REG_LDO17 | REG_LDO3 | REG_SMPS3;
+	uint32_t ldo_num = REG_LDO6 | REG_LDO3 | REG_SMPS3;
+	uint32_t hw_id = board_hardware_id();
 
 	if (enable) {
+		if (hw_id != HW_PLATFORM_QRD)
+			ldo_num |= REG_LDO17;
+
 		regulator_enable(ldo_num);
 		mdelay(10);
 		wled_init(pinfo);
@@ -360,7 +367,8 @@
 		 * LDO6, LDO3 and SMPS3 are shared with other subsystems.
 		 * Do not disable them.
 		 */
-		regulator_disable(REG_LDO17);
+		if (hw_id != HW_PLATFORM_QRD)
+			regulator_disable(REG_LDO17);
 	}
 
 	return NO_ERROR;