Merge "target: msm8909: init display config to suupport msm8909"
diff --git a/dev/fbcon/fbcon.c b/dev/fbcon/fbcon.c
index 5bce3c2..adc5e29 100644
--- a/dev/fbcon/fbcon.c
+++ b/dev/fbcon/fbcon.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009-2015, 2018 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
@@ -504,7 +504,6 @@
 	image_base = ((((total_y/2) - (SPLASH_IMAGE_HEIGHT / 2) - 1) *
 			(config->width)) + (total_x/2 - (SPLASH_IMAGE_WIDTH / 2)));
 
-#if DISPLAY_TYPE_MIPI
 #if ENABLE_WBC
 	image = (pm_appsbl_charging_in_progress() ? image_batt888 : imageBuffer_rgb888);
 #else
@@ -518,13 +517,6 @@
 			SPLASH_IMAGE_WIDTH * bytes_per_bpp);
 		}
 	}
-	fbcon_flush();
-#if DISPLAY_MIPI_PANEL_NOVATEK_BLUE
-	if(is_cmd_mode_enabled())
-		mipi_dsi_cmd_mode_trigger();
-#endif
-
-#else
 
 	if (bytes_per_bpp == 2) {
 		for (i = 0; i < SPLASH_IMAGE_HEIGHT; i++) {
@@ -533,7 +525,12 @@
 			SPLASH_IMAGE_WIDTH * bytes_per_bpp);
 		}
 	}
+
 	fbcon_flush();
+
+#if DISPLAY_MIPI_PANEL_NOVATEK_BLUE
+	if(is_cmd_mode_enabled())
+		mipi_dsi_cmd_mode_trigger();
 #endif
 }
 
diff --git a/dev/gcdb/display/gcdb_display.c b/dev/gcdb/display/gcdb_display.c
index 945839c..9cde84a 100644
--- a/dev/gcdb/display/gcdb_display.c
+++ b/dev/gcdb/display/gcdb_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2018 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
@@ -486,6 +486,53 @@
 			~USE_DSI1_PLL_FLAG;
 }
 
+static int mdss_spi_bl_enable(uint8_t enable)
+{
+	int ret = NO_ERROR;
+
+	ret = panel_backlight_ctrl(enable);
+	if (ret)
+		dprintf(CRITICAL, "Backlight %s failed\n", enable ? "enable" : "disable");
+	return ret;
+}
+
+static int mdss_spi_panel_power(uint8_t enable, struct msm_panel_info *pinfo)
+{
+	int ret = NO_ERROR;
+
+	if (enable) {
+		ret = target_ldo_ctrl(enable, pinfo);
+		if (ret) {
+			dprintf(CRITICAL, "LDO control enable failed\n");
+			return ret;
+		}
+
+		/*Panel Reset*/
+		ret = target_panel_reset(enable,panelstruct.panelresetseq, &panel.panel_info);
+		if (ret) {
+			dprintf(CRITICAL, "panel reset failed\n");
+			return ret;
+		}
+		dprintf(INFO, "Panel power on done\n");
+	} else {
+		/*Disable panel and ldo*/
+		ret = target_panel_reset(enable, panelstruct.panelresetseq, &panel.panel_info);
+		if (ret) {
+			dprintf(CRITICAL, "panel reset disable failed \n");
+			return ret;
+		}
+
+		ret = target_ldo_ctrl(enable, pinfo);
+		if (ret) {
+			dprintf(CRITICAL, "panel reset disable failed \n");
+			return ret;
+		}
+		dprintf(INFO, "Panel power off done\n");
+	}
+
+	return ret;
+}
+
 static int update_dsi_display_config()
 {
 	int ret = NO_ERROR;
@@ -566,6 +613,18 @@
                 panel.power_func = mdss_edp_panel_power;
 		panel.bl_func = mdss_edp_bl_enable;
                 panel.fb.format = FB_FORMAT_RGB888;
+	} else if (pan_type == PANEL_TYPE_SPI) {
+		panel.panel_info.xres = panelstruct.panelres->panel_width;
+		panel.panel_info.yres = panelstruct.panelres->panel_height;
+		panel.panel_info.bpp = panelstruct.color->color_format;
+		panel.power_func = mdss_spi_panel_power;
+		panel.bl_func = mdss_spi_bl_enable;
+		panel.fb.base = base;
+		panel.fb.width = panel.panel_info.xres;
+		panel.fb.height = panel.panel_info.yres;
+		panel.fb.bpp = panel.panel_info.bpp;
+		panel.fb.format = FB_FORMAT_RGB565;
+		panel.panel_info.type = SPI_PANEL;
 	} else {
 		dprintf(CRITICAL, "Target panel init not found!\n");
 		ret = ERR_NOT_SUPPORTED;
diff --git a/dev/gcdb/display/include/panel.h b/dev/gcdb/display/include/panel.h
old mode 100755
new mode 100644
index 3a83bce..1c83c6d
--- a/dev/gcdb/display/include/panel.h
+++ b/dev/gcdb/display/include/panel.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2016, 2018, 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
@@ -48,7 +48,8 @@
 	PANEL_TYPE_UNKNOWN,
 	PANEL_TYPE_DSI,
 	PANEL_TYPE_EDP,
-	PANEL_TYPE_HDMI
+	PANEL_TYPE_HDMI,
+	PANEL_TYPE_SPI
 };
 
 /*---------------------------------------------------------------------------*/
diff --git a/dev/gcdb/display/include/panel_st7789v2_qvga_spi_cmd.h b/dev/gcdb/display/include/panel_st7789v2_qvga_spi_cmd.h
new file mode 100644
index 0000000..869f536
--- /dev/null
+++ b/dev/gcdb/display/include/panel_st7789v2_qvga_spi_cmd.h
@@ -0,0 +1,206 @@
+/* Copyright (c) 2017-2018, 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 "AS IS" AND ANY EXPRESS OR IMPLIED
+* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+* 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.
+*/
+
+#ifndef _PANEL_ST7789v2_QVGA_SPI_CMD_H_
+#define _PANEL_ST7789v2_QVGA_SPI_CMD_H_
+/*---------------------------------------------------------------------------*/
+/* HEADER files                                                              */
+/*---------------------------------------------------------------------------*/
+#include "panel.h"
+
+/*---------------------------------------------------------------------------*/
+/* Panel configuration                                                       */
+/*---------------------------------------------------------------------------*/
+static struct panel_config st7789v2_qvga_cmd_panel_data = {
+	"qcom,mdss_spi_st7789v2_qvga_cmd", "spi:0:", "qcom,mdss-spi-panel",
+	10, 0, "DISPLAY_1", 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/*---------------------------------------------------------------------------*/
+/* Panel resolution                                                          */
+/*---------------------------------------------------------------------------*/
+static struct panel_resolution st7789v2_qvga_cmd_panel_res = {
+	240, 240, 79, 59, 60, 0, 7, 10, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/*---------------------------------------------------------------------------*/
+/* Panel color information                                                   */
+/*---------------------------------------------------------------------------*/
+static struct color_info st7789v2_qvga_cmd_color = {
+	16, 0, 0xff, 0, 0, 0
+};
+
+/*---------------------------------------------------------------------------*/
+/* Panel on/off command information                                          */
+/*---------------------------------------------------------------------------*/
+static char st7789v2_qvga_cmd_on_cmd0[] = {
+	0x11,
+};
+
+static char st7789v2_qvga_cmd_on_cmd1[] = {
+	0x36, 0x00,
+};
+
+static char st7789v2_qvga_cmd_on_cmd2[] = {
+	0x3A, 0x05,
+};
+
+static char st7789v2_qvga_cmd_on_cmd3[] = {
+	0x35, 0x00,
+};
+
+static char st7789v2_qvga_cmd_on_cmd4[] = {
+	0xB2, 0x0C, 0x0C, 0x00,
+	0x33, 0x33,
+};
+
+static char st7789v2_qvga_cmd_on_cmd5[] = {
+	0xB7, 0x75,
+};
+
+static char st7789v2_qvga_cmd_on_cmd6[] = {
+	0xBB, 0x3D,
+};
+
+static char st7789v2_qvga_cmd_on_cmd7[] = {
+	0xC2, 0x01,
+};
+
+static char st7789v2_qvga_cmd_on_cmd8[] = {
+	0xC3, 0x19,
+};
+
+static char st7789v2_qvga_cmd_on_cmd9[] = {
+	0x04, 0x20,
+};
+
+static char st7789v2_qvga_cmd_on_cmd10[] = {
+	0xc6, 0x0F,
+};
+
+static char st7789v2_qvga_cmd_on_cmd11[] = {
+	0xD0, 0xA4, 0xA1,
+};
+
+static char st7789v2_qvga_cmd_on_cmd12[] = {
+	0xE0, 0x70, 0x04, 0x08,
+	0x09, 0x09, 0x05, 0x2A,
+	0x33, 0x41, 0x07, 0x13,
+	0x13, 0x29, 0x2F,
+};
+
+static char st7789v2_qvga_cmd_on_cmd13[] = {
+	0xE1, 0x70, 0x03, 0x09,
+	0x0A, 0x09, 0x06, 0x2B,
+	0x34, 0x41, 0x07, 0x12,
+	0x14, 0x28, 0x2E
+};
+
+static char st7789v2_qvga_cmd_on_cmd14[] = {
+	0x21,
+};
+
+static char st7789v2_qvga_cmd_on_cmd15[] = {
+	0x29,
+};
+
+static char st7789v2_qvga_cmd_on_cmd16[] = {
+	0x2A, 0x00, 0x00, 0x00, 0xEF
+};
+
+static char st7789v2_qvga_cmd_on_cmd17[] = {
+	0x2B, 0x00, 0x00, 0x00, 0xEF
+};
+
+static char st7789v2_qvga_cmd_on_cmd18[] = {
+	0x2c
+};
+
+static struct mdss_spi_cmd st7789v2_qvga_cmd_on_command[] = {
+	{0x01, st7789v2_qvga_cmd_on_cmd0, 0x78, 0},
+	{0x02, st7789v2_qvga_cmd_on_cmd1, 0x00, 0},
+	{0x02, st7789v2_qvga_cmd_on_cmd2, 0x00, 0},
+	{0x02, st7789v2_qvga_cmd_on_cmd3, 0x00, 0},
+	{0x06, st7789v2_qvga_cmd_on_cmd4, 0x00, 0},
+	{0x02, st7789v2_qvga_cmd_on_cmd5, 0x00, 0},
+	{0x02, st7789v2_qvga_cmd_on_cmd6, 0x00, 0},
+	{0x02, st7789v2_qvga_cmd_on_cmd7, 0x00, 0},
+	{0x02, st7789v2_qvga_cmd_on_cmd8, 0x00, 0},
+	{0x02, st7789v2_qvga_cmd_on_cmd9, 0x00, 0},
+	{0x02, st7789v2_qvga_cmd_on_cmd10, 0x00, 0},
+	{0x03, st7789v2_qvga_cmd_on_cmd11, 0x00, 0},
+	{0x0F, st7789v2_qvga_cmd_on_cmd12, 0x00, 0},
+	{0x0F, st7789v2_qvga_cmd_on_cmd13, 0x00, 0},
+	{0x01, st7789v2_qvga_cmd_on_cmd14, 0x00, 0},
+	{0x01, st7789v2_qvga_cmd_on_cmd15, 0x78, 0},
+	{0x05, st7789v2_qvga_cmd_on_cmd16, 0x00, 0},
+	{0x05, st7789v2_qvga_cmd_on_cmd17, 0x00, 0},
+	{0x01, st7789v2_qvga_cmd_on_cmd18, 0x00, 0},
+};
+
+#define ST7789v2_QVGA_CMD_ON_COMMAND 19
+
+
+static char st7789v2_qvga_cmdoff_cmd0[] = {
+	0x28,
+};
+
+static char st7789v2_qvga_cmdoff_cmd1[] = {
+	0x10,
+};
+
+static struct mipi_dsi_cmd st7789v2_qvga_cmd_off_command[] = {
+	{0x1, st7789v2_qvga_cmdoff_cmd0, 0x20},
+	{0x1, st7789v2_qvga_cmdoff_cmd1, 0x20}
+};
+
+#define ST7789v2_QVGA_CMD_OFF_COMMAND 2
+
+/*---------------------------------------------------------------------------*/
+/* Panel reset sequence                                                      */
+/*---------------------------------------------------------------------------*/
+static struct panel_reset_sequence st7789v2_qvga_cmd_reset_seq = {
+	{1, 0, 1, }, {20, 2, 20, }, 2
+};
+
+/*---------------------------------------------------------------------------*/
+/* Backlight setting                                                         */
+/*---------------------------------------------------------------------------*/
+static struct backlight st7789v2_qvga_cmd_backlight = {
+	1, 1, 4095, 100, 1, "PMIC_8941"
+};
+
+static uint8_t st7789v2_signature_addr = 0x04;
+
+static uint8_t st7789v2_signature_len = 3;
+
+static uint8_t st7789v2_signature[] = {
+	0x85, 0x85, 0x52
+};
+
+#endif /* PANEL_ST7789v2_QVGA_SPI_CMD_H */
diff --git a/platform/msm_shared/include/msm_panel.h b/platform/msm_shared/include/msm_panel.h
index f458328..6ca84ac 100644
--- a/platform/msm_shared/include/msm_panel.h
+++ b/platform/msm_shared/include/msm_panel.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2018, 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
@@ -53,6 +53,7 @@
 #define LVDS_PANEL		11	/* LVDS */
 #define EDP_PANEL		12	/* EDP */
 #define QPIC_PANEL		13	/* QPIC */
+#define SPI_PANEL		14
 
 #define DISPLAY_UNKNOWN		0
 #define DISPLAY_1		1
@@ -92,6 +93,21 @@
 	uint32_t rev;
 };
 
+struct mdss_spi_cmd {
+	int size;
+	char *payload;
+	int wait;
+	uint8_t cmds_post_tg;
+};
+
+struct spi_panel_info {
+	int num_of_panel_cmds;
+	struct mdss_spi_cmd *panel_cmds;
+	uint8_t *signature_addr;
+	uint8_t *signature;
+	uint8_t *signature_len;
+};
+
 struct hdmi_panel_info {
 	uint32_t h_back_porch;
 	uint32_t h_front_porch;
@@ -411,6 +427,7 @@
 	struct lvds_panel_info lvds;
 	struct hdmi_panel_info hdmi;
 	struct edp_panel_info edp;
+	struct spi_panel_info spi;
 	struct dsi2HDMI_panel_info adv7533;
 	bool has_bridge_chip;
 
diff --git a/platform/msm_shared/include/splash.h b/platform/msm_shared/include/splash.h
index badb8d0..59147a0 100644
--- a/platform/msm_shared/include/splash.h
+++ b/platform/msm_shared/include/splash.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010,2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2010,2014, 2018 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
@@ -30,9 +30,8 @@
 #ifndef __PLATFORM_SPLASH_H
 #define __PLATFORM_SPLASH_H
 
-#if (!DISPLAY_TYPE_MIPI)
-#define SPLASH_IMAGE_WIDTH     124
-#define SPLASH_IMAGE_HEIGHT    113
+#define SPLASH_IMAGE_WIDTH     113
+#define SPLASH_IMAGE_HEIGHT    124
 /* This image is (SPLASH_IMAGE_WIDTH x SPLASH_IMAGE_WIDTH) raw image */
 static char imageBuffer[] = {
 
@@ -3542,11 +3541,6 @@
 
 };
 
-#else
-
-#define SPLASH_IMAGE_WIDTH     113
-#define SPLASH_IMAGE_HEIGHT    124
-
 /* This image is 228x113 raw Image resembling QuIC logo*/
 
 static char imageBuffer_rgb888[] = {
@@ -15252,6 +15246,5 @@
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 #endif
-#endif
 
 #endif
diff --git a/target/msm8909/include/target/display.h b/target/msm8909/include/target/display.h
index 0e3a1bc..b778cf2 100644
--- a/target/msm8909/include/target/display.h
+++ b/target/msm8909/include/target/display.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2015, 2018 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
@@ -49,6 +49,10 @@
   "msmgpio", 37, 3, 1, 0, 1
 };
 
+static struct gpio_pin spi_bkl_gpio = {
+	"msmgpio", 60, 3, 1, 0, 1
+};
+
 static struct gpio_pin enp_gpio = {
   "msmgpio", 97, 3, 1, 0, 1
 };
@@ -57,6 +61,14 @@
   "msmgpio", 32, 3, 1, 0, 1
 };
 
+static struct gpio_pin dc_gpio = {
+	"msmgpio", 52, 3, 1, 0, 1
+};
+
+static struct gpio_pin spi_dc_gpio = {
+        "msmgpio", 59, 3, 1, 0, 1
+};
+
 static struct gpio_pin te_gpio = {
   0, 0, 0, 0, 0, 0
 };
@@ -108,4 +120,7 @@
 #define MIPI_VSYNC_BACK_PORCH_LINES  3
 #define MIPI_VSYNC_FRONT_PORCH_LINES 9
 
+#define SPI_BLSP_ID                  1
+#define SPI_QUP_ID                   3
+
 #endif
diff --git a/target/msm8909/oem_panel.c b/target/msm8909/oem_panel.c
index add0d9e..064539c 100644
--- a/target/msm8909/oem_panel.c
+++ b/target/msm8909/oem_panel.c
@@ -49,6 +49,7 @@
 #include "include/panel_auo_cx_qvga_cmd.h"
 #include "include/panel_auo_400p_cmd.h"
 #include "include/panel_auo_390p_cmd.h"
+#include "include/panel_st7789v2_qvga_spi_cmd.h"
 
 #define DISPLAY_MAX_PANEL_DETECTION 0
 #define ILI9806E_FWVGA_VIDEO_PANEL_POST_INIT_DELAY 68
@@ -78,6 +79,7 @@
 	AUO_CX_QVGA_CMD_PANEL,
 	AUO_400P_CMD_PANEL,
 	AUO_390P_CMD_PANEL,
+	ST7789v2_QVGA_SPI_CMD_PANEL,
 	UNKNOWN_PANEL
 };
 
@@ -98,6 +100,7 @@
 	{"auo_cx_qvga_cmd", AUO_CX_QVGA_CMD_PANEL},
 	{"auo_400p_cmd", AUO_400P_CMD_PANEL},
 	{"auo_390p_cmd", AUO_390P_CMD_PANEL},
+	{"ST7789V2_qvga_cmd", ST7789v2_QVGA_SPI_CMD_PANEL},
 };
 
 static uint32_t panel_id;
@@ -429,6 +432,19 @@
 					= AUO_390P_CMD_OFF_COMMAND;
 		memcpy(phy_db->timing, auo_390p_cmd_timings, TIMING_SIZE);
 		break;
+	case ST7789v2_QVGA_SPI_CMD_PANEL:
+		panelstruct->paneldata		= &st7789v2_qvga_cmd_panel_data;
+		panelstruct->panelres		= &st7789v2_qvga_cmd_panel_res;
+		panelstruct->color			= &st7789v2_qvga_cmd_color;
+		panelstruct->panelresetseq	= &st7789v2_qvga_cmd_reset_seq;
+		panelstruct->backlightinfo	= &st7789v2_qvga_cmd_backlight;
+		pinfo->spi.panel_cmds		= st7789v2_qvga_cmd_on_command;
+		pinfo->spi.num_of_panel_cmds= ST7789v2_QVGA_CMD_ON_COMMAND;
+		pinfo->spi.signature_addr	= &st7789v2_signature_addr;
+		pinfo->spi.signature		= st7789v2_signature;
+		pinfo->spi.signature_len	= st7789v2_signature_len;
+		pan_type = PANEL_TYPE_SPI;
+		break;
 	case UNKNOWN_PANEL:
 	default:
 		memset(panelstruct, 0, sizeof(struct panel_struct));
diff --git a/target/msm8909/target_display.c b/target/msm8909/target_display.c
index a285b33..a3d5848 100644
--- a/target/msm8909/target_display.c
+++ b/target/msm8909/target_display.c
@@ -240,6 +240,15 @@
 			bkl_gpio.pin_direction, bkl_gpio.pin_pull,
 			bkl_gpio.pin_strength, bkl_gpio.pin_state);
 			gpio_set(bkl_gpio.pin_id, 2);
+
+		if (HW_PLATFORM_SUBTYPE_8909_PM660_V1 == platform_subtype) {
+			gpio_tlmm_config(spi_bkl_gpio.pin_id, 0,
+				spi_bkl_gpio.pin_direction,
+				spi_bkl_gpio.pin_pull,
+				spi_bkl_gpio.pin_strength,
+				spi_bkl_gpio.pin_state);
+			gpio_set(spi_bkl_gpio.pin_id, 2);
+		}
 	}
 
 	return 0;
@@ -364,6 +373,10 @@
 			((MSM8909W == platform) || (APQ8009W == platform)) &&
 			(HW_PLATFORM_MTP == hw_id))
 			regulator_enable(REG_LDO12 | REG_LDO5 | REG_LDO11 | REG_LDO18);
+		else if (pinfo->type == SPI_PANEL)
+		{
+			regulator_enable(REG_LDO11 | REG_LDO18);
+		}
 		else
 			regulator_enable(REG_LDO2 | REG_LDO6 | REG_LDO17);
 	}