msm7672a/msm8x25: Add support for command mode display
Splash screen is supported with video mode only, this patch
adds support for command mode display.
Change-Id: I979d280563b38f2c83135a94aec45153d3292bda
diff --git a/dev/panel/msm/mipi_nt35510.c b/dev/panel/msm/mipi_nt35510.c
new file mode 100644
index 0000000..f690c24
--- /dev/null
+++ b/dev/panel/msm/mipi_nt35510.c
@@ -0,0 +1,65 @@
+/* Copyright (c) 2012, Code Aurora Forum. 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 Code Aurora Forum, Inc. 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.
+ *
+ */
+
+#include <stdint.h>
+#include <msm_panel.h>
+#include <mipi_dsi.h>
+#include <sys/types.h>
+#include <err.h>
+#include <reg.h>
+#include <debug.h>
+#include <target/display.h>
+#include <dev/gpio.h>
+
+
+int mipi_nt35510_panel_dsi_config(int on)
+{
+ if (on) {
+ gpio_config(96, GPIO_OUTPUT);
+ gpio_set(96, 0x1);
+
+ gpio_config(35, GPIO_OUTPUT);
+ gpio_set(35, 0x1);
+
+ gpio_config(40, GPIO_OUTPUT);
+ gpio_set(40, 0x1);
+
+ gpio_config(85, GPIO_OUTPUT);
+ gpio_set(85, 0x1);
+ mdelay(20);
+ gpio_set(85, 0x0);
+ mdelay(20);
+ gpio_set(85, 0x1);
+ mdelay(20);
+ } else {
+ gpio_set(35, 0x0);
+ gpio_set(40, 0x0);
+ }
+ return 0;
+}
diff --git a/dev/panel/msm/mipi_nt35510_cmd_wvga.c b/dev/panel/msm/mipi_nt35510_cmd_wvga.c
new file mode 100644
index 0000000..54c324e
--- /dev/null
+++ b/dev/panel/msm/mipi_nt35510_cmd_wvga.c
@@ -0,0 +1,328 @@
+/* Copyright (c) 2012, Code Aurora Forum. 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 Code Aurora Forum, Inc. 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.
+ *
+ */
+
+#include <stdint.h>
+#include <msm_panel.h>
+#include <mipi_dsi.h>
+#include <sys/types.h>
+#include <err.h>
+#include <reg.h>
+#include <debug.h>
+#include <target/display.h>
+
+
+/* MIPI NT35510 panel commands */
+static char exit_sleep[4] = {0x11, 0x00, 0x05, 0x80};
+static char display_on[4] = {0x29, 0x00, 0x05, 0x80};
+static char write_ram[4] = {0x2c, 0x00, 0x05, 0x80}; /* write ram */
+
+static char cmd0[12] = {
+ 0x06, 0x00, 0x29, 0xc0, 0xF0, 0x55, 0xAA, 0x52,
+ 0x08, 0x01, 0xff, 0xff,
+};
+static char cmd1[8] = {
+ 0x04, 0x00, 0x29, 0xc0, 0xBC, 0x00, 0xA0, 0x00,
+};
+static char cmd2[8] = {
+ 0x04, 0x00, 0x29, 0xc0, 0xBD, 0x00, 0xA0, 0x00,
+};
+static char cmd3[8] = {
+ 0x03, 0x00, 0x29, 0xc0, 0xBE, 0x00, 0x79, 0xff,
+};
+static char cmd4[60] = {
+ 0x35, 0x00, 0x29, 0xc0, 0xD1, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x32, 0x00,
+ 0x4F, 0x00, 0x65, 0x00,
+ 0x8B, 0x00, 0xA8, 0x00,
+ 0xD5, 0x00, 0xF7, 0x01,
+ 0x2B, 0x01, 0x54, 0x01,
+ 0x8E, 0x01, 0xBB, 0x01,
+ 0xBC, 0x01, 0xE3, 0x02,
+ 0x08, 0x02, 0x1C, 0x02,
+ 0x39, 0x02, 0x4F, 0x02,
+ 0x76, 0x02, 0xA3, 0x02,
+ 0xE3, 0x03, 0x12, 0x03,
+ 0x4C, 0x03, 0x66, 0x03,
+ 0x9A, 0xff, 0xff, 0xff,
+};
+static char cmd5[60] = {
+ 0x35, 0x00, 0x29, 0xc0, 0xD2, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x32, 0x00,
+ 0x4F, 0x00, 0x65, 0x00,
+ 0x8B, 0x00, 0xA8, 0x00,
+ 0xD5, 0x00, 0xF7, 0x01,
+ 0x2B, 0x01, 0x54, 0x01,
+ 0x8E, 0x01, 0xBB, 0x01,
+ 0xBC, 0x01, 0xE3, 0x02,
+ 0x08, 0x02, 0x1C, 0x02,
+ 0x39, 0x02, 0x4F, 0x02,
+ 0x76, 0x02, 0xA3, 0x02,
+ 0xE3, 0x03, 0x12, 0x03,
+ 0x4C, 0x03, 0x66, 0x03,
+ 0x9A, 0xff, 0xff, 0xff,
+};
+static char cmd6[60] = {
+ 0x35, 0x00, 0x29, 0xc0, 0xD3, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x32, 0x00,
+ 0x4F, 0x00, 0x65, 0x00,
+ 0x8B, 0x00, 0xA8, 0x00,
+ 0xD5, 0x00, 0xF7, 0x01,
+ 0x2B, 0x01, 0x54, 0x01,
+ 0x8E, 0x01, 0xBB, 0x01,
+ 0xBC, 0x01, 0xE3, 0x02,
+ 0x08, 0x02, 0x1C, 0x02,
+ 0x39, 0x02, 0x4F, 0x02,
+ 0x76, 0x02, 0xA3, 0x02,
+ 0xE3, 0x03, 0x12, 0x03,
+ 0x4C, 0x03, 0x66, 0x03,
+ 0x9A, 0xff, 0xff, 0xff,
+};
+static char cmd7[60] = {
+ 0x35, 0x00, 0x29, 0xc0, 0xD4, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x32, 0x00,
+ 0x4F, 0x00, 0x65, 0x00,
+ 0x8B, 0x00, 0xA8, 0x00,
+ 0xD5, 0x00, 0xF7, 0x01,
+ 0x2B, 0x01, 0x54, 0x01,
+ 0x8E, 0x01, 0xBB, 0x01,
+ 0xBC, 0x01, 0xE3, 0x02,
+ 0x08, 0x02, 0x1C, 0x02,
+ 0x39, 0x02, 0x4F, 0x02,
+ 0x76, 0x02, 0xA3, 0x02,
+ 0xE3, 0x03, 0x12, 0x03,
+ 0x4C, 0x03, 0x66, 0x03,
+ 0x9A, 0xff, 0xff, 0xff,
+};
+static char cmd8[60] = {
+ 0x35, 0x00, 0x29, 0xc0, 0xD5, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x32, 0x00,
+ 0x4F, 0x00, 0x65, 0x00,
+ 0x8B, 0x00, 0xA8, 0x00,
+ 0xD5, 0x00, 0xF7, 0x01,
+ 0x2B, 0x01, 0x54, 0x01,
+ 0x8E, 0x01, 0xBB, 0x01,
+ 0xBC, 0x01, 0xE3, 0x02,
+ 0x08, 0x02, 0x1C, 0x02,
+ 0x39, 0x02, 0x4F, 0x02,
+ 0x76, 0x02, 0xA3, 0x02,
+ 0xE3, 0x03, 0x12, 0x03,
+ 0x4C, 0x03, 0x66, 0x03,
+ 0x9A, 0xff, 0xff, 0xff,
+};
+static char cmd9[60] = {
+ 0x35, 0x00, 0x29, 0xc0, 0xD6, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x32, 0x00,
+ 0x4F, 0x00, 0x65, 0x00,
+ 0x8B, 0x00, 0xA8, 0x00,
+ 0xD5, 0x00, 0xF7, 0x01,
+ 0x2B, 0x01, 0x54, 0x01,
+ 0x8E, 0x01, 0xBB, 0x01,
+ 0xBC, 0x01, 0xE3, 0x02,
+ 0x08, 0x02, 0x1C, 0x02,
+ 0x39, 0x02, 0x4F, 0x02,
+ 0x76, 0x02, 0xA3, 0x02,
+ 0xE3, 0x03, 0x12, 0x03,
+ 0x4C, 0x03, 0x66, 0x03,
+ 0x9A, 0xff, 0xff, 0xff,
+};
+static char cmd10[8] = {
+ 0x04, 0x00, 0x29, 0xc0, 0xB0, 0x0A, 0x0A, 0x0A,
+};
+static char cmd11[8] = {
+ 0x04, 0x00, 0x29, 0xc0, 0xB1, 0x0A, 0x0A, 0x0A,
+};
+static char cmd12[8] = {
+ 0x04, 0x00, 0x29, 0xc0, 0xBA, 0x24, 0x24, 0x24,
+};
+static char cmd13[8] = {
+ 0x04, 0x00, 0x29, 0xc0, 0xB9, 0x24, 0x24, 0x24,
+};
+static char cmd14[8] = {
+ 0x04, 0x00, 0x29, 0xc0, 0xB8, 0x24, 0x24, 0x24,
+};
+static char cmd15[12] = {
+ 0x06, 0x00, 0x29, 0xc0, 0xF0, 0x55, 0xAA, 0x52,
+ 0x08, 0x00, 0xff, 0xff,
+};
+static char cmd16[8] = {
+ 0x02, 0x00, 0x29, 0xc0, 0xB3, 0x00, 0xff, 0xff,
+};
+static char cmd17[8] = {
+ 0x02, 0x00, 0x29, 0xc0, 0xB4, 0x10, 0xff, 0xff,
+};
+static char cmd18[8] = {
+ 0x02, 0x00, 0x29, 0xc0, 0xB6, 0x02, 0xff, 0xff,
+};
+static char cmd19[8] = {
+ 0x03, 0x00, 0x29, 0xc0, 0xB1, 0xEC, 0x00, 0xff,
+};
+static char cmd20[8] = {
+ 0x04, 0x00, 0x29, 0xc0, 0xBC, 0x05, 0x05, 0x05,
+};
+static char cmd21[8] = {
+ 0x03, 0x00, 0x29, 0xc0, 0xB7, 0x20, 0x20, 0xff,
+};
+static char cmd22[12] = {
+ 0x05, 0x00, 0x29, 0xc0, 0xB8, 0x01, 0x03, 0x03,
+ 0x03, 0xff, 0xff, 0xff,
+};
+static char cmd23[24] = {
+ 0x13, 0x00, 0x29, 0xc0, 0xC8, 0x01, 0x00, 0x78,
+ 0x50, 0x78, 0x50, 0x78,
+ 0x50, 0x78, 0x50, 0xC8,
+ 0x3C, 0x3C, 0xC8, 0xC8,
+ 0x3C, 0x3C, 0xC8, 0xff,
+};
+static char cmd24[12] = {
+ 0x06, 0x00, 0x29, 0xc0, 0xBD, 0x01, 0x84, 0x07,
+ 0x31, 0x00, 0xff, 0xff,
+};
+static char cmd25[12] = {
+ 0x06, 0x00, 0x29, 0xc0, 0xBE, 0x01, 0x84, 0x07,
+ 0x31, 0x00, 0xff, 0xff,
+};
+static char cmd26[12] = {
+ 0x06, 0x00, 0x29, 0xc0, 0xBF, 0x01, 0x84, 0x07,
+ 0x31, 0x00, 0xff, 0xff,
+};
+static char cmd27[8] = {
+ 0x02, 0x00, 0x29, 0xc0, 0x35, 0x00, 0xff, 0xff,
+};
+
+static char config_MADCTL[4] = {0x36, 0x00, 0x15, 0x80};
+
+static struct mipi_dsi_cmd nt35510_panel_cmd_mode_cmds[] = {
+ {sizeof(cmd0), cmd0},
+ {sizeof(cmd1), cmd1},
+ {sizeof(cmd2), cmd2},
+ {sizeof(cmd3), cmd3},
+ {sizeof(cmd4), cmd4},
+ {sizeof(cmd5), cmd5},
+ {sizeof(cmd6), cmd6},
+ {sizeof(cmd7), cmd7},
+ {sizeof(cmd8), cmd8},
+ {sizeof(cmd9), cmd9},
+ {sizeof(cmd10), cmd10},
+ {sizeof(cmd11), cmd11},
+ {sizeof(cmd12), cmd12},
+ {sizeof(cmd13), cmd13},
+ {sizeof(cmd14), cmd14},
+ {sizeof(cmd15), cmd15},
+ {sizeof(cmd16), cmd16},
+ {sizeof(cmd17), cmd17},
+ {sizeof(cmd18), cmd18},
+ {sizeof(cmd19), cmd19},
+ {sizeof(cmd20), cmd20},
+ {sizeof(cmd21), cmd21},
+ {sizeof(cmd22), cmd22},
+ {sizeof(cmd23), cmd23},
+ {sizeof(cmd24), cmd24},
+ {sizeof(cmd25), cmd25},
+ {sizeof(cmd26), cmd26},
+ {sizeof(cmd27), cmd27},
+ {sizeof(exit_sleep), exit_sleep},
+ {sizeof(display_on), display_on},
+ {sizeof(config_MADCTL), config_MADCTL},
+ {sizeof(write_ram), write_ram},
+};
+
+int mipi_nt35510_cmd_wvga_on()
+{
+ int ret = NO_ERROR;
+ return ret;
+}
+
+int mipi_nt35510_cmd_wvga_off()
+{
+ int ret = NO_ERROR;
+ return ret;
+}
+
+int mipi_nt35510_cmd_wvga_config(void *pdata)
+{
+ int ret = NO_ERROR;
+
+ struct msm_panel_info *pinfo = (struct msm_panel_info *) pdata;
+
+ if (pinfo == NULL)
+ return ERR_INVALID_ARGS;
+
+ ret = mipi_dsi_cmd_mode_config((pinfo->xres),
+ (pinfo->yres),
+ (pinfo->xres),
+ (pinfo->yres),
+ pinfo->mipi.dst_format,
+ pinfo->mipi.traffic_mode);
+ return ret;
+}
+
+struct mipi_dsi_phy_ctrl dsi_cmd_mode_phy_db = {
+ /* DSI_BIT_CLK at 500MHz, 2 lane, RGB888 */
+ {0x03, 0x01, 0x01, 0x00}, /* regulator */
+ /* timing */
+ {0xb9, 0x8e, 0x1f, 0x00, 0x98, 0x9c, 0x22,
+ 0x90, 0x18, 0x03, 0x04},
+ {0x7f, 0x00, 0x00, 0x00}, /* phy ctrl */
+ {0xbb, 0x02, 0x06, 0x00}, /* strength */
+ /* pll control */
+ {0x00, 0xec, 0x31, 0xd2, 0x00, 0x40, 0x37, 0x62,
+ 0x01, 0x0f, 0x07, /* --> Two lane configuration */
+ 0x05, 0x14, 0x03, 0x0, 0x0, 0x0, 0x20, 0x0, 0x02, 0x0},
+};
+
+void mipi_nt35510_cmd_wvga_init(struct msm_panel_info *pinfo)
+{
+ if (!pinfo)
+ return;
+
+ pinfo->xres = NT35510_MIPI_FB_WIDTH;
+ pinfo->yres = NT35510_MIPI_FB_HEIGHT;
+ pinfo->mipi.num_of_lanes = 2;
+
+ pinfo->type = MIPI_CMD_PANEL;
+ pinfo->wait_cycle = 0;
+ pinfo->bpp = 24;
+
+ pinfo->mipi.mode = DSI_CMD_MODE;
+ pinfo->mipi.traffic_mode = 0;
+ pinfo->mipi.dst_format = 0;
+ pinfo->mipi.dsi_phy_db = &dsi_cmd_mode_phy_db;
+ pinfo->mipi.tx_eot_append = TRUE;
+
+ pinfo->mipi.lane_swap = 1;
+ pinfo->mipi.panel_cmds = nt35510_panel_cmd_mode_cmds;
+ pinfo->mipi.num_of_panel_cmds = \
+ ARRAY_SIZE(nt35510_panel_cmd_mode_cmds);
+
+ pinfo->on = mipi_nt35510_cmd_wvga_on;
+ pinfo->off = mipi_nt35510_cmd_wvga_off;
+ pinfo->config = mipi_nt35510_cmd_wvga_config;
+
+ return;
+}
diff --git a/dev/panel/msm/mipi_nt35510_video_wvga.c b/dev/panel/msm/mipi_nt35510_video_wvga.c
index e4bb0af..e073b71 100644
--- a/dev/panel/msm/mipi_nt35510_video_wvga.c
+++ b/dev/panel/msm/mipi_nt35510_video_wvga.c
@@ -250,32 +250,6 @@
{sizeof(display_on), display_on},
};
-int mipi_nt35510_panel_dsi_config(int on)
-{
- if (on) {
- gpio_config(96, GPIO_OUTPUT);
- gpio_set(96, 0x1);
-
- gpio_config(35, GPIO_OUTPUT);
- gpio_set(35, 0x1);
-
- gpio_config(40, GPIO_OUTPUT);
- gpio_set(40, 0x1);
-
- gpio_config(85, GPIO_OUTPUT);
- gpio_set(85, 0x1);
- mdelay(20);
- gpio_set(85, 0x0);
- mdelay(20);
- gpio_set(85, 0x1);
- mdelay(20);
- } else {
- gpio_set(35, 0x0);
- gpio_set(40, 0x0);
- }
- return 0;
-}
-
int mipi_nt35510_video_wvga_config(void *pdata)
{
int ret = NO_ERROR;
diff --git a/dev/panel/msm/mipi_renesas.c b/dev/panel/msm/mipi_renesas.c
new file mode 100644
index 0000000..65a58d0
--- /dev/null
+++ b/dev/panel/msm/mipi_renesas.c
@@ -0,0 +1,51 @@
+/* Copyright (c) 2012, Code Aurora Forum. 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 Code Aurora Forum, Inc. 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.
+ *
+ */
+
+#include "mipi_renesas.h"
+
+
+/* Toggle RESET pin of the DSI Client before sending
+ * panel init commands
+ */
+int mipi_renesas_panel_dsi_config(int on)
+{
+ if (on) {
+ gpio_set(128, 0x1);
+ mdelay(5);
+ gpio_set(128, 0x0);
+ gpio_set(129, 0x1);
+ gpio_config(129, GPIO_OUTPUT);
+ gpio_set(129, 0x0);
+ gpio_set(129, 0x1);
+ mdelay(10);
+ } else {
+ gpio_set(128, 0x1);
+ }
+ return 0;
+}
diff --git a/dev/panel/msm/mipi_renesas.h b/dev/panel/msm/mipi_renesas.h
new file mode 100644
index 0000000..60e83cf
--- /dev/null
+++ b/dev/panel/msm/mipi_renesas.h
@@ -0,0 +1,737 @@
+/* Copyright (c) 2012, Code Aurora Forum. 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 Code Aurora Forum, Inc. 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 _MIPI_RENESAS_H_
+#define _MIPI_RENESAS_H_
+
+#include <stdint.h>
+#include <msm_panel.h>
+#include <mipi_dsi.h>
+#include <sys/types.h>
+#include <err.h>
+#include <reg.h>
+#include <debug.h>
+#include <target/display.h>
+#include <dev/gpio.h>
+
+
+/* Renesas Tremelo-M panel: List of commands */
+static char config_sleep_out[4] = { 0x11, 0x00, 0x05, 0x80 };
+static char config_CMD_MODE[4] = { 0x40, 0x01, 0x15, 0x80 };
+static char config_WRTXHT[12] = {
+ 0x07, 0x00, 0x39, 0xC0, 0x92, 0x16, 0x08, 0x08, 0x00, 0x01, 0xe0, 0xff };
+static char config_WRTXVT[12] = {
+ 0x07, 0x00, 0x39, 0xC0, 0x8b, 0x02, 0x02, 0x02, 0x00, 0x03, 0x60, 0xff };
+static char config_PLL2NR[4] = { 0xa0, 0x24, 0x15, 0x80 };
+static char config_PLL2NF1[4] = { 0xa2, 0xd0, 0x15, 0x80 };
+static char config_PLL2NF2[4] = { 0xa4, 0x00, 0x15, 0x80 };
+static char config_PLL2BWADJ1[4] = { 0xa6, 0xd0, 0x15, 0x80 };
+static char config_PLL2BWADJ2[4] = { 0xa8, 0x00, 0x15, 0x80 };
+static char config_PLL2CTL[4] = { 0xaa, 0x00, 0x15, 0x80 };
+static char config_DBICBR[4] = { 0x48, 0x03, 0x15, 0x80 };
+static char config_DBICTYPE[4] = { 0x49, 0x00, 0x15, 0x80 };
+static char config_DBICSET1[4] = { 0x4a, 0x1c, 0x15, 0x80 };
+static char config_DBICADD[4] = { 0x4b, 0x00, 0x15, 0x80 };
+static char config_DBICCTL[4] = { 0x4e, 0x01, 0x15, 0x80 };
+
+/* static char config_COLMOD_565[4] = {0x3a, 0x05, 0x15, 0x80}; */
+/* static char config_COLMOD_666PACK[4] = {0x3a, 0x06, 0x15, 0x80}; */
+static char config_COLMOD_888[4] = { 0x3a, 0x07, 0x15, 0x80 };
+static char config_MADCTL[4] = { 0x36, 0x00, 0x15, 0x80 };
+static char config_DBIOC[4] = { 0x82, 0x40, 0x15, 0x80 };
+static char config_CASET[12] = {
+ 0x07, 0x00, 0x39, 0xC0, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x01, 0xdf, 0xff };
+static char config_PASET[12] = {
+ 0x07, 0x00, 0x39, 0xC0, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5f, 0xff };
+static char config_TXON[4] = { 0x81, 0x00, 0x05, 0x80 };
+static char config_BLSET_TM[4] = { 0xff, 0x6c, 0x15, 0x80 };
+
+static char config_AGCPSCTL_TM[4] = { 0x56, 0x08, 0x15, 0x80 };
+
+static char config_DBICADD70[4] = { 0x4b, 0x70, 0x15, 0x80 };
+static char config_DBICSET_15[4] = { 0x4a, 0x15, 0x15, 0x80 };
+static char config_DBICADD72[4] = { 0x4b, 0x72, 0x15, 0x80 };
+
+static char config_Power_Ctrl_2a_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x40, 0x10, 0xff };
+static char config_Auto_Sequencer_Setting_a_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
+static char Driver_Output_Ctrl_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x01, 0xff };
+static char Driver_Output_Ctrl_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x10, 0xff };
+static char config_LCD_drive_AC_Ctrl_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x02, 0xff };
+static char config_LCD_drive_AC_Ctrl_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x00, 0xff };
+static char config_Entry_Mode_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x03, 0xff };
+static char config_Entry_Mode_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
+static char config_Display_Ctrl_1_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x07, 0xff };
+static char config_Display_Ctrl_1_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
+static char config_Display_Ctrl_2_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x08, 0xff };
+static char config_Display_Ctrl_2_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x04, 0xff };
+static char config_Display_Ctrl_3_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x09, 0xff };
+static char config_Display_Ctrl_3_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x0c, 0xff };
+static char config_Display_IF_Ctrl_1_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x0c, 0xff };
+static char config_Display_IF_Ctrl_1_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x40, 0x10, 0xff };
+static char config_Display_IF_Ctrl_2_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x0e, 0xff };
+static char config_Display_IF_Ctrl_2_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
+
+static char config_Panel_IF_Ctrl_1_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x20, 0xff };
+static char config_Panel_IF_Ctrl_1_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x3f, 0xff };
+static char config_Panel_IF_Ctrl_3_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x22, 0xff };
+static char config_Panel_IF_Ctrl_3_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x76, 0x00, 0xff };
+static char config_Panel_IF_Ctrl_4_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x23, 0xff };
+static char config_Panel_IF_Ctrl_4_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x1c, 0x0a, 0xff };
+static char config_Panel_IF_Ctrl_5_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x24, 0xff };
+static char config_Panel_IF_Ctrl_5_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x1c, 0x2c, 0xff };
+static char config_Panel_IF_Ctrl_6_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x25, 0xff };
+static char config_Panel_IF_Ctrl_6_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x1c, 0x4e, 0xff };
+static char config_Panel_IF_Ctrl_8_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x27, 0xff };
+static char config_Panel_IF_Ctrl_8_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
+static char config_Panel_IF_Ctrl_9_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x28, 0xff };
+static char config_Panel_IF_Ctrl_9_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x76, 0x0c, 0xff };
+
+static char config_gam_adjust_00_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x00, 0xff };
+static char config_gam_adjust_00_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
+static char config_gam_adjust_01_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x01, 0xff };
+static char config_gam_adjust_01_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x05, 0x02, 0xff };
+static char config_gam_adjust_02_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x02, 0xff };
+static char config_gam_adjust_02_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x05, 0xff };
+static char config_gam_adjust_03_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x03, 0xff };
+static char config_gam_adjust_03_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
+static char config_gam_adjust_04_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x04, 0xff };
+static char config_gam_adjust_04_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x02, 0x00, 0xff };
+static char config_gam_adjust_05_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x05, 0xff };
+static char config_gam_adjust_05_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x07, 0xff };
+static char config_gam_adjust_06_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x06, 0xff };
+static char config_gam_adjust_06_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x10, 0x10, 0xff };
+static char config_gam_adjust_07_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x07, 0xff };
+static char config_gam_adjust_07_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x02, 0x02, 0xff };
+static char config_gam_adjust_08_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x08, 0xff };
+static char config_gam_adjust_08_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x04, 0xff };
+static char config_gam_adjust_09_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x09, 0xff };
+static char config_gam_adjust_09_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x07, 0xff };
+static char config_gam_adjust_0A_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x0a, 0xff };
+static char config_gam_adjust_0A_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
+static char config_gam_adjust_0B_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x0b, 0xff };
+static char config_gam_adjust_0B_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
+static char config_gam_adjust_0C_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x0c, 0xff };
+static char config_gam_adjust_0C_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x07, 0xff };
+static char config_gam_adjust_0D_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x0d, 0xff };
+static char config_gam_adjust_0D_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x10, 0x10, 0xff };
+static char config_gam_adjust_10_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x10, 0xff };
+static char config_gam_adjust_10_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x04, 0xff };
+static char config_gam_adjust_11_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x11, 0xff };
+static char config_gam_adjust_11_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x05, 0x03, 0xff };
+static char config_gam_adjust_12_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x12, 0xff };
+static char config_gam_adjust_12_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x04, 0xff };
+static char config_gam_adjust_15_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x15, 0xff };
+static char config_gam_adjust_15_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x04, 0xff };
+static char config_gam_adjust_16_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x16, 0xff };
+static char config_gam_adjust_16_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x1c, 0xff };
+static char config_gam_adjust_17_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x17, 0xff };
+static char config_gam_adjust_17_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x02, 0x04, 0xff };
+static char config_gam_adjust_18_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x18, 0xff };
+static char config_gam_adjust_18_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x04, 0x02, 0xff };
+static char config_gam_adjust_19_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x19, 0xff };
+static char config_gam_adjust_19_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x05, 0xff };
+static char config_gam_adjust_1C_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x1c, 0xff };
+static char config_gam_adjust_1C_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x07, 0xff };
+static char config_gam_adjust_1D_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x1D, 0xff };
+static char config_gam_adjust_1D_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x02, 0x1f, 0xff };
+static char config_gam_adjust_20_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x20, 0xff };
+static char config_gam_adjust_20_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x05, 0x07, 0xff };
+static char config_gam_adjust_21_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x21, 0xff };
+static char config_gam_adjust_21_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x06, 0x04, 0xff };
+static char config_gam_adjust_22_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x22, 0xff };
+static char config_gam_adjust_22_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x04, 0x05, 0xff };
+static char config_gam_adjust_27_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x27, 0xff };
+static char config_gam_adjust_27_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x02, 0x03, 0xff };
+static char config_gam_adjust_28_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x28, 0xff };
+static char config_gam_adjust_28_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x00, 0xff };
+static char config_gam_adjust_29_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x29, 0xff };
+static char config_gam_adjust_29_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x02, 0xff };
+
+static char config_Power_Ctrl_1_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x00, 0xff };
+static char config_Power_Ctrl_1b_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x36, 0x3c, 0xff };
+static char config_Power_Ctrl_2_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x01, 0xff };
+static char config_Power_Ctrl_2b_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x40, 0x03, 0xff };
+static char config_Power_Ctrl_3_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x02, 0xff };
+static char config_Power_Ctrl_3a_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x01, 0xff };
+static char config_Power_Ctrl_4_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x03, 0xff };
+static char config_Power_Ctrl_4a_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x3c, 0x58, 0xff };
+static char config_Power_Ctrl_6_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x0c, 0xff };
+static char config_Power_Ctrl_6a_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x35, 0xff };
+
+static char config_Auto_Sequencer_Setting_b_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x02, 0xff };
+static char config_Panel_IF_Ctrl_10_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x29, 0xff };
+static char config_Panel_IF_Ctrl_10a_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0xbf, 0xff };
+static char config_Auto_Sequencer_Setting_indx[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x06, 0xff };
+static char config_Auto_Sequencer_Setting_c_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x03, 0xff };
+static char config_Power_Ctrl_2c_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x40, 0x10, 0xff };
+
+static char config_VIDEO[4] = { 0x40, 0x00, 0x15, 0x80 };
+
+static char config_COMMAND[4] = { 0x40, 0x01, 0x15, 0x80 };
+
+static char config_Panel_IF_Ctrl_10_indx_off[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4C, 0x00, 0x29, 0xff };
+
+static char config_Panel_IF_Ctrl_10b_cmd_off[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4C, 0x00, 0x02, 0xff };
+
+static char config_Power_Ctrl_1a_cmd[8] = {
+ 0x03, 0x00, 0x39, 0xC0, 0x4C, 0x30, 0x00, 0xff };
+
+static struct mipi_dsi_cmd renesas_panel_video_mode_cmds[] = {
+ {sizeof(config_sleep_out), config_sleep_out},
+ {sizeof(config_CMD_MODE), config_CMD_MODE},
+ {sizeof(config_WRTXHT), config_WRTXHT},
+ {sizeof(config_WRTXVT), config_WRTXVT},
+ {sizeof(config_PLL2NR), config_PLL2NR},
+ {sizeof(config_PLL2NF1), config_PLL2NF1},
+ {sizeof(config_PLL2NF2), config_PLL2NF2},
+ {sizeof(config_PLL2BWADJ1), config_PLL2BWADJ1},
+ {sizeof(config_PLL2BWADJ2), config_PLL2BWADJ2},
+ {sizeof(config_PLL2CTL), config_PLL2CTL},
+ {sizeof(config_DBICBR), config_DBICBR},
+ {sizeof(config_DBICTYPE), config_DBICTYPE},
+ {sizeof(config_DBICSET1), config_DBICSET1},
+ {sizeof(config_DBICADD), config_DBICADD},
+ {sizeof(config_DBICCTL), config_DBICCTL},
+ {sizeof(config_COLMOD_888), config_COLMOD_888},
+ /* Choose config_COLMOD_565 or config_COLMOD_666PACK for other modes */
+ {sizeof(config_MADCTL), config_MADCTL},
+ {sizeof(config_DBIOC), config_DBIOC},
+ {sizeof(config_CASET), config_CASET},
+ {sizeof(config_PASET), config_PASET},
+ {sizeof(config_TXON), config_TXON},
+ {sizeof(config_BLSET_TM), config_BLSET_TM},
+ {sizeof(config_AGCPSCTL_TM), config_AGCPSCTL_TM},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Power_Ctrl_1_indx), config_Power_Ctrl_1_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Power_Ctrl_1a_cmd), config_Power_Ctrl_1a_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Power_Ctrl_2_indx), config_Power_Ctrl_2_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Power_Ctrl_2a_cmd), config_Power_Ctrl_2a_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Auto_Sequencer_Setting_indx),
+ config_Auto_Sequencer_Setting_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Auto_Sequencer_Setting_a_cmd),
+ config_Auto_Sequencer_Setting_a_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(Driver_Output_Ctrl_indx), Driver_Output_Ctrl_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(Driver_Output_Ctrl_cmd),
+ Driver_Output_Ctrl_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_LCD_drive_AC_Ctrl_indx),
+ config_LCD_drive_AC_Ctrl_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_LCD_drive_AC_Ctrl_cmd),
+ config_LCD_drive_AC_Ctrl_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Entry_Mode_indx),
+ config_Entry_Mode_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Entry_Mode_cmd),
+ config_Entry_Mode_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Display_Ctrl_1_indx),
+ config_Display_Ctrl_1_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Display_Ctrl_1_cmd),
+ config_Display_Ctrl_1_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Display_Ctrl_2_indx),
+ config_Display_Ctrl_2_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Display_Ctrl_2_cmd),
+ config_Display_Ctrl_2_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Display_Ctrl_3_indx),
+ config_Display_Ctrl_3_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Display_Ctrl_3_cmd),
+ config_Display_Ctrl_3_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Display_IF_Ctrl_1_indx),
+ config_Display_IF_Ctrl_1_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Display_IF_Ctrl_1_cmd),
+ config_Display_IF_Ctrl_1_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Display_IF_Ctrl_2_indx),
+ config_Display_IF_Ctrl_2_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Display_IF_Ctrl_2_cmd),
+ config_Display_IF_Ctrl_2_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Panel_IF_Ctrl_1_indx),
+ config_Panel_IF_Ctrl_1_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Panel_IF_Ctrl_1_cmd),
+ config_Panel_IF_Ctrl_1_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Panel_IF_Ctrl_3_indx),
+ config_Panel_IF_Ctrl_3_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Panel_IF_Ctrl_3_cmd),
+ config_Panel_IF_Ctrl_3_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Panel_IF_Ctrl_4_indx),
+ config_Panel_IF_Ctrl_4_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Panel_IF_Ctrl_4_cmd),
+ config_Panel_IF_Ctrl_4_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Panel_IF_Ctrl_5_indx),
+ config_Panel_IF_Ctrl_5_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Panel_IF_Ctrl_5_cmd),
+ config_Panel_IF_Ctrl_5_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Panel_IF_Ctrl_6_indx),
+ config_Panel_IF_Ctrl_6_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Panel_IF_Ctrl_6_cmd),
+ config_Panel_IF_Ctrl_6_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Panel_IF_Ctrl_8_indx),
+ config_Panel_IF_Ctrl_8_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Panel_IF_Ctrl_8_cmd),
+ config_Panel_IF_Ctrl_8_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Panel_IF_Ctrl_9_indx),
+ config_Panel_IF_Ctrl_9_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Panel_IF_Ctrl_9_cmd),
+ config_Panel_IF_Ctrl_9_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_00_indx),
+ config_gam_adjust_00_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_00_cmd),
+ config_gam_adjust_00_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_01_indx),
+ config_gam_adjust_01_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_01_cmd),
+ config_gam_adjust_01_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_02_indx),
+ config_gam_adjust_02_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_02_cmd),
+ config_gam_adjust_02_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_03_indx),
+ config_gam_adjust_03_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_03_cmd),
+ config_gam_adjust_03_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_04_indx), config_gam_adjust_04_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_04_cmd), config_gam_adjust_04_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_05_indx), config_gam_adjust_05_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_05_cmd), config_gam_adjust_05_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_06_indx), config_gam_adjust_06_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_06_cmd), config_gam_adjust_06_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_07_indx), config_gam_adjust_07_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_07_cmd), config_gam_adjust_07_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_08_indx), config_gam_adjust_08_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_08_cmd), config_gam_adjust_08_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_09_indx), config_gam_adjust_09_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_09_cmd), config_gam_adjust_09_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_0A_indx), config_gam_adjust_0A_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_0A_cmd), config_gam_adjust_0A_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_0B_indx), config_gam_adjust_0B_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_0B_cmd), config_gam_adjust_0B_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_0C_indx), config_gam_adjust_0C_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_0C_cmd), config_gam_adjust_0C_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_0D_indx), config_gam_adjust_0D_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_0D_cmd), config_gam_adjust_0D_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_10_indx), config_gam_adjust_10_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_10_cmd), config_gam_adjust_10_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_11_indx), config_gam_adjust_11_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_11_cmd), config_gam_adjust_11_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_12_indx), config_gam_adjust_12_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_12_cmd), config_gam_adjust_12_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_15_indx), config_gam_adjust_15_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_15_cmd), config_gam_adjust_15_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_16_indx), config_gam_adjust_16_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_16_cmd), config_gam_adjust_16_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_17_indx), config_gam_adjust_17_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_17_cmd), config_gam_adjust_17_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_18_indx), config_gam_adjust_18_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_18_cmd), config_gam_adjust_18_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_19_indx), config_gam_adjust_19_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_19_cmd), config_gam_adjust_19_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_1C_indx), config_gam_adjust_1C_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_1C_cmd), config_gam_adjust_1C_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_1D_indx), config_gam_adjust_1D_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_1D_cmd), config_gam_adjust_1D_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_20_indx), config_gam_adjust_20_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_20_cmd), config_gam_adjust_20_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_21_indx), config_gam_adjust_21_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_21_cmd), config_gam_adjust_21_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_22_indx), config_gam_adjust_22_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_22_cmd), config_gam_adjust_22_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_27_indx), config_gam_adjust_27_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_27_cmd), config_gam_adjust_27_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_28_indx), config_gam_adjust_28_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_28_cmd), config_gam_adjust_28_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_gam_adjust_29_indx), config_gam_adjust_29_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_gam_adjust_29_cmd), config_gam_adjust_29_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Power_Ctrl_1_indx), config_Power_Ctrl_1_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Power_Ctrl_1b_cmd), config_Power_Ctrl_1b_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Power_Ctrl_2_indx), config_Power_Ctrl_2_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Power_Ctrl_2b_cmd), config_Power_Ctrl_2b_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Power_Ctrl_3_indx), config_Power_Ctrl_3_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Power_Ctrl_3a_cmd), config_Power_Ctrl_3a_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Power_Ctrl_4_indx), config_Power_Ctrl_4_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Power_Ctrl_4a_cmd), config_Power_Ctrl_4a_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Power_Ctrl_6_indx), config_Power_Ctrl_6_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Power_Ctrl_6a_cmd), config_Power_Ctrl_6a_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Auto_Sequencer_Setting_indx),
+ config_Auto_Sequencer_Setting_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Auto_Sequencer_Setting_b_cmd),
+ config_Auto_Sequencer_Setting_b_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Panel_IF_Ctrl_10_indx),
+ config_Panel_IF_Ctrl_10_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Panel_IF_Ctrl_10a_cmd),
+ config_Panel_IF_Ctrl_10a_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Auto_Sequencer_Setting_indx),
+ config_Auto_Sequencer_Setting_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Auto_Sequencer_Setting_c_cmd),
+ config_Auto_Sequencer_Setting_c_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD70), config_DBICADD70},
+ {sizeof(config_Power_Ctrl_2_indx),
+ config_Power_Ctrl_2_indx},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ {sizeof(config_DBICADD72), config_DBICADD72},
+ {sizeof(config_Power_Ctrl_2c_cmd),
+ config_Power_Ctrl_2c_cmd},
+ {sizeof(config_DBICSET_15), config_DBICSET_15},
+ /* Change this command to config_VIDEO for video mode */
+ {sizeof(config_COMMAND), config_COMMAND},
+};
+
+/* Toggle RESET pin of the DSI Client before sending
+ * panel init commands
+ */
+int mipi_renesas_panel_dsi_config(int on);
+#endif /* _MIPI_RENESAS_H_ */
diff --git a/dev/panel/msm/mipi_renesas_cmd_fwvga.c b/dev/panel/msm/mipi_renesas_cmd_fwvga.c
new file mode 100644
index 0000000..7747491
--- /dev/null
+++ b/dev/panel/msm/mipi_renesas_cmd_fwvga.c
@@ -0,0 +1,134 @@
+/* Copyright (c) 2012, Code Aurora Forum. 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 Code Aurora Forum, Inc. 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.
+ *
+ */
+
+#include "mipi_renesas.h"
+
+int mipi_renesas_cmd_fwvga_config(void *pdata)
+{
+ int ret = NO_ERROR;
+
+ struct msm_panel_info *pinfo = (struct msm_panel_info *) pdata;
+
+ if (pinfo == NULL)
+ return ERR_INVALID_ARGS;
+
+ ret = mipi_dsi_cmd_mode_config((pinfo->xres),
+ (pinfo->yres),
+ (pinfo->xres),
+ (pinfo->yres),
+ pinfo->mipi.dst_format,
+ pinfo->mipi.traffic_mode);
+ return ret;
+}
+
+int mipi_renesas_cmd_fwvga_on()
+{
+ int ret = NO_ERROR;
+ return ret;
+}
+
+int mipi_renesas_cmd_fwvga_off()
+{
+ int ret = NO_ERROR;
+ return ret;
+}
+
+static struct mipi_dsi_phy_ctrl dsi_cmd_mode_phy_db = {
+ /* DSI_BIT_CLK at 500MHz, 2 lane, RGB888 */
+ {0x03, 0x01, 0x01, 0x00}, /* regulator */
+ /* timing */
+ {0xb9, 0x8e, 0x1f, 0x00, 0x98, 0x9c, 0x22,
+ 0x90, 0x18, 0x03, 0x04},
+ {0x7f, 0x00, 0x00, 0x00}, /* phy ctrl */
+ {0xbb, 0x02, 0x06, 0x00}, /* strength */
+ /* pll control */
+ {0x00, 0xec, 0x31, 0xd2, 0x00, 0x40, 0x37, 0x62,
+ 0x01, 0x0f, 0x07, /* --> Two lane configuration */
+ 0x05, 0x14, 0x03, 0x0, 0x0, 0x0, 0x20, 0x0, 0x02, 0x0},
+};
+
+void mipi_renesas_cmd_fwvga_init(struct msm_panel_info *pinfo)
+{
+ if (!pinfo)
+ return;
+
+ pinfo->xres = REN_MIPI_FB_WIDTH;
+ pinfo->yres = REN_MIPI_FB_HEIGHT;
+ pinfo->mipi.num_of_lanes = 2;
+
+ pinfo->type = MIPI_CMD_PANEL;
+ pinfo->wait_cycle = 0;
+ pinfo->bpp = 24;
+
+ pinfo->mipi.mode = DSI_CMD_MODE;
+ pinfo->mipi.traffic_mode = 0;
+ pinfo->mipi.dst_format = 0;
+ pinfo->mipi.dsi_phy_db = &dsi_cmd_mode_phy_db;
+ pinfo->mipi.tx_eot_append = TRUE;
+
+ pinfo->mipi.lane_swap = 1;
+ pinfo->mipi.panel_cmds = renesas_panel_video_mode_cmds;
+ pinfo->mipi.num_of_panel_cmds = ARRAY_SIZE(renesas_panel_video_mode_cmds);
+
+ pinfo->on = mipi_renesas_cmd_fwvga_on;
+ pinfo->off = mipi_renesas_cmd_fwvga_off;
+ pinfo->config = mipi_renesas_cmd_fwvga_config;
+
+ return;
+}
+
+void mipi_renesas_cmd_hvga_init(struct msm_panel_info *pinfo)
+{
+ if (!pinfo)
+ return;
+
+ pinfo->xres = REN_MIPI_FB_WIDTH_HVGA;
+ pinfo->yres = REN_MIPI_FB_HEIGHT_HVGA;
+ pinfo->mipi.num_of_lanes = 1;
+
+ pinfo->type = MIPI_CMD_PANEL;
+ pinfo->wait_cycle = 0;
+ pinfo->bpp = 24;
+
+ pinfo->mipi.mode = DSI_CMD_MODE;
+ pinfo->mipi.traffic_mode = 0;
+ pinfo->mipi.dst_format = 0;
+ pinfo->mipi.dsi_phy_db = &dsi_cmd_mode_phy_db;
+ pinfo->mipi.tx_eot_append = TRUE;
+
+ pinfo->mipi.lane_swap = 1;
+ pinfo->mipi.panel_cmds = renesas_panel_video_mode_cmds;
+ pinfo->mipi.num_of_panel_cmds = ARRAY_SIZE(renesas_panel_video_mode_cmds);
+
+ pinfo->on = mipi_renesas_cmd_fwvga_on;
+ pinfo->off = mipi_renesas_cmd_fwvga_off;
+ pinfo->config = mipi_renesas_cmd_fwvga_config;
+
+ return;
+}
diff --git a/dev/panel/msm/mipi_renesas_video_fwvga.c b/dev/panel/msm/mipi_renesas_video_fwvga.c
index 964a3c1..057fee4 100644
--- a/dev/panel/msm/mipi_renesas_video_fwvga.c
+++ b/dev/panel/msm/mipi_renesas_video_fwvga.c
@@ -27,724 +27,7 @@
*
*/
-#include <stdint.h>
-#include <msm_panel.h>
-#include <mipi_dsi.h>
-#include <sys/types.h>
-#include <err.h>
-#include <reg.h>
-#include <debug.h>
-#include <platform/iomap.h>
-#include <target/display.h>
-#include <dev/gpio.h>
-
-
-/* Renesas Tremelo-M panel: List of commands */
-
-static char config_sleep_out[4] = { 0x11, 0x00, 0x05, 0x80 };
-static char config_CMD_MODE[4] = { 0x40, 0x01, 0x15, 0x80 };
-static char config_WRTXHT[12] = {
- 0x07, 0x00, 0x39, 0xC0, 0x92, 0x16, 0x08, 0x08, 0x00, 0x01, 0xe0, 0xff };
-static char config_WRTXVT[12] = {
- 0x07, 0x00, 0x39, 0xC0, 0x8b, 0x02, 0x02, 0x02, 0x00, 0x03, 0x60, 0xff };
-static char config_PLL2NR[4] = { 0xa0, 0x24, 0x15, 0x80 };
-static char config_PLL2NF1[4] = { 0xa2, 0xd0, 0x15, 0x80 };
-static char config_PLL2NF2[4] = { 0xa4, 0x00, 0x15, 0x80 };
-static char config_PLL2BWADJ1[4] = { 0xa6, 0xd0, 0x15, 0x80 };
-static char config_PLL2BWADJ2[4] = { 0xa8, 0x00, 0x15, 0x80 };
-static char config_PLL2CTL[4] = { 0xaa, 0x00, 0x15, 0x80 };
-static char config_DBICBR[4] = { 0x48, 0x03, 0x15, 0x80 };
-static char config_DBICTYPE[4] = { 0x49, 0x00, 0x15, 0x80 };
-static char config_DBICSET1[4] = { 0x4a, 0x1c, 0x15, 0x80 };
-static char config_DBICADD[4] = { 0x4b, 0x00, 0x15, 0x80 };
-static char config_DBICCTL[4] = { 0x4e, 0x01, 0x15, 0x80 };
-
-/* static char config_COLMOD_565[4] = {0x3a, 0x05, 0x15, 0x80}; */
-/* static char config_COLMOD_666PACK[4] = {0x3a, 0x06, 0x15, 0x80}; */
-static char config_COLMOD_888[4] = { 0x3a, 0x07, 0x15, 0x80 };
-static char config_MADCTL[4] = { 0x36, 0x00, 0x15, 0x80 };
-static char config_DBIOC[4] = { 0x82, 0x40, 0x15, 0x80 };
-static char config_CASET[12] = {
- 0x07, 0x00, 0x39, 0xC0, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x01, 0xdf, 0xff };
-static char config_PASET[12] = {
- 0x07, 0x00, 0x39, 0xC0, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5f, 0xff };
-static char config_TXON[4] = { 0x81, 0x00, 0x05, 0x80 };
-static char config_BLSET_TM[4] = { 0xff, 0x6c, 0x15, 0x80 };
-
-static char config_AGCPSCTL_TM[4] = { 0x56, 0x08, 0x15, 0x80 };
-
-static char config_DBICADD70[4] = { 0x4b, 0x70, 0x15, 0x80 };
-static char config_DBICSET_15[4] = { 0x4a, 0x15, 0x15, 0x80 };
-static char config_DBICADD72[4] = { 0x4b, 0x72, 0x15, 0x80 };
-
-static char config_Power_Ctrl_2a_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x40, 0x10, 0xff };
-static char config_Auto_Sequencer_Setting_a_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
-static char Driver_Output_Ctrl_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x01, 0xff };
-static char Driver_Output_Ctrl_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x10, 0xff };
-static char config_LCD_drive_AC_Ctrl_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x02, 0xff };
-static char config_LCD_drive_AC_Ctrl_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x00, 0xff };
-static char config_Entry_Mode_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x03, 0xff };
-static char config_Entry_Mode_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
-static char config_Display_Ctrl_1_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x07, 0xff };
-static char config_Display_Ctrl_1_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
-static char config_Display_Ctrl_2_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x08, 0xff };
-static char config_Display_Ctrl_2_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x04, 0xff };
-static char config_Display_Ctrl_3_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x09, 0xff };
-static char config_Display_Ctrl_3_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x0c, 0xff };
-static char config_Display_IF_Ctrl_1_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x0c, 0xff };
-static char config_Display_IF_Ctrl_1_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x40, 0x10, 0xff };
-static char config_Display_IF_Ctrl_2_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x0e, 0xff };
-static char config_Display_IF_Ctrl_2_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
-
-static char config_Panel_IF_Ctrl_1_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x20, 0xff };
-static char config_Panel_IF_Ctrl_1_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x3f, 0xff };
-static char config_Panel_IF_Ctrl_3_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x22, 0xff };
-static char config_Panel_IF_Ctrl_3_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x76, 0x00, 0xff };
-static char config_Panel_IF_Ctrl_4_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x23, 0xff };
-static char config_Panel_IF_Ctrl_4_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x1c, 0x0a, 0xff };
-static char config_Panel_IF_Ctrl_5_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x24, 0xff };
-static char config_Panel_IF_Ctrl_5_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x1c, 0x2c, 0xff };
-static char config_Panel_IF_Ctrl_6_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x25, 0xff };
-static char config_Panel_IF_Ctrl_6_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x1c, 0x4e, 0xff };
-static char config_Panel_IF_Ctrl_8_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x27, 0xff };
-static char config_Panel_IF_Ctrl_8_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
-static char config_Panel_IF_Ctrl_9_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x28, 0xff };
-static char config_Panel_IF_Ctrl_9_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x76, 0x0c, 0xff };
-
-static char config_gam_adjust_00_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x00, 0xff };
-static char config_gam_adjust_00_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
-static char config_gam_adjust_01_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x01, 0xff };
-static char config_gam_adjust_01_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x05, 0x02, 0xff };
-static char config_gam_adjust_02_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x02, 0xff };
-static char config_gam_adjust_02_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x05, 0xff };
-static char config_gam_adjust_03_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x03, 0xff };
-static char config_gam_adjust_03_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
-static char config_gam_adjust_04_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x04, 0xff };
-static char config_gam_adjust_04_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x02, 0x00, 0xff };
-static char config_gam_adjust_05_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x05, 0xff };
-static char config_gam_adjust_05_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x07, 0xff };
-static char config_gam_adjust_06_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x06, 0xff };
-static char config_gam_adjust_06_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x10, 0x10, 0xff };
-static char config_gam_adjust_07_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x07, 0xff };
-static char config_gam_adjust_07_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x02, 0x02, 0xff };
-static char config_gam_adjust_08_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x08, 0xff };
-static char config_gam_adjust_08_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x04, 0xff };
-static char config_gam_adjust_09_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x09, 0xff };
-static char config_gam_adjust_09_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x07, 0xff };
-static char config_gam_adjust_0A_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x0a, 0xff };
-static char config_gam_adjust_0A_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
-static char config_gam_adjust_0B_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x0b, 0xff };
-static char config_gam_adjust_0B_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x00, 0xff };
-static char config_gam_adjust_0C_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x0c, 0xff };
-static char config_gam_adjust_0C_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x07, 0xff };
-static char config_gam_adjust_0D_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x0d, 0xff };
-static char config_gam_adjust_0D_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x10, 0x10, 0xff };
-static char config_gam_adjust_10_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x10, 0xff };
-static char config_gam_adjust_10_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x04, 0xff };
-static char config_gam_adjust_11_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x11, 0xff };
-static char config_gam_adjust_11_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x05, 0x03, 0xff };
-static char config_gam_adjust_12_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x12, 0xff };
-static char config_gam_adjust_12_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x04, 0xff };
-static char config_gam_adjust_15_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x15, 0xff };
-static char config_gam_adjust_15_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x04, 0xff };
-static char config_gam_adjust_16_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x16, 0xff };
-static char config_gam_adjust_16_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x1c, 0xff };
-static char config_gam_adjust_17_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x17, 0xff };
-static char config_gam_adjust_17_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x02, 0x04, 0xff };
-static char config_gam_adjust_18_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x18, 0xff };
-static char config_gam_adjust_18_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x04, 0x02, 0xff };
-static char config_gam_adjust_19_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x19, 0xff };
-static char config_gam_adjust_19_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x05, 0xff };
-static char config_gam_adjust_1C_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x1c, 0xff };
-static char config_gam_adjust_1C_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x07, 0x07, 0xff };
-static char config_gam_adjust_1D_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x1D, 0xff };
-static char config_gam_adjust_1D_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x02, 0x1f, 0xff };
-static char config_gam_adjust_20_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x20, 0xff };
-static char config_gam_adjust_20_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x05, 0x07, 0xff };
-static char config_gam_adjust_21_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x21, 0xff };
-static char config_gam_adjust_21_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x06, 0x04, 0xff };
-static char config_gam_adjust_22_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x22, 0xff };
-static char config_gam_adjust_22_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x04, 0x05, 0xff };
-static char config_gam_adjust_27_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x27, 0xff };
-static char config_gam_adjust_27_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x02, 0x03, 0xff };
-static char config_gam_adjust_28_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x28, 0xff };
-static char config_gam_adjust_28_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x00, 0xff };
-static char config_gam_adjust_29_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0x29, 0xff };
-static char config_gam_adjust_29_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x02, 0xff };
-
-static char config_Power_Ctrl_1_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x00, 0xff };
-static char config_Power_Ctrl_1b_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x36, 0x3c, 0xff };
-static char config_Power_Ctrl_2_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x01, 0xff };
-static char config_Power_Ctrl_2b_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x40, 0x03, 0xff };
-static char config_Power_Ctrl_3_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x02, 0xff };
-static char config_Power_Ctrl_3a_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x01, 0xff };
-static char config_Power_Ctrl_4_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x03, 0xff };
-static char config_Power_Ctrl_4a_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x3c, 0x58, 0xff };
-static char config_Power_Ctrl_6_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x0c, 0xff };
-static char config_Power_Ctrl_6a_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x35, 0xff };
-
-static char config_Auto_Sequencer_Setting_b_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x02, 0xff };
-static char config_Panel_IF_Ctrl_10_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x29, 0xff };
-static char config_Panel_IF_Ctrl_10a_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x03, 0xbf, 0xff };
-static char config_Auto_Sequencer_Setting_indx[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x01, 0x06, 0xff };
-static char config_Auto_Sequencer_Setting_c_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x00, 0x03, 0xff };
-static char config_Power_Ctrl_2c_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4c, 0x40, 0x10, 0xff };
-
-static char config_VIDEO[4] = { 0x40, 0x00, 0x15, 0x80 };
-
-static char config_Panel_IF_Ctrl_10_indx_off[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4C, 0x00, 0x29, 0xff };
-
-static char config_Panel_IF_Ctrl_10b_cmd_off[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4C, 0x00, 0x02, 0xff };
-
-static char config_Power_Ctrl_1a_cmd[8] = {
- 0x03, 0x00, 0x39, 0xC0, 0x4C, 0x30, 0x00, 0xff };
-
-static struct mipi_dsi_cmd renesas_panel_video_mode_cmds[] = {
- {sizeof(config_sleep_out), config_sleep_out},
- {sizeof(config_CMD_MODE), config_CMD_MODE},
- {sizeof(config_WRTXHT), config_WRTXHT},
- {sizeof(config_WRTXVT), config_WRTXVT},
- {sizeof(config_PLL2NR), config_PLL2NR},
- {sizeof(config_PLL2NF1), config_PLL2NF1},
- {sizeof(config_PLL2NF2), config_PLL2NF2},
- {sizeof(config_PLL2BWADJ1), config_PLL2BWADJ1},
- {sizeof(config_PLL2BWADJ2), config_PLL2BWADJ2},
- {sizeof(config_PLL2CTL), config_PLL2CTL},
- {sizeof(config_DBICBR), config_DBICBR},
- {sizeof(config_DBICTYPE), config_DBICTYPE},
- {sizeof(config_DBICSET1), config_DBICSET1},
- {sizeof(config_DBICADD), config_DBICADD},
- {sizeof(config_DBICCTL), config_DBICCTL},
- {sizeof(config_COLMOD_888), config_COLMOD_888},
- /* Choose config_COLMOD_565 or config_COLMOD_666PACK for other modes */
- {sizeof(config_MADCTL), config_MADCTL},
- {sizeof(config_DBIOC), config_DBIOC},
- {sizeof(config_CASET), config_CASET},
- {sizeof(config_PASET), config_PASET},
- {sizeof(config_TXON), config_TXON},
- {sizeof(config_BLSET_TM), config_BLSET_TM},
- {sizeof(config_AGCPSCTL_TM), config_AGCPSCTL_TM},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Power_Ctrl_1_indx), config_Power_Ctrl_1_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Power_Ctrl_1a_cmd), config_Power_Ctrl_1a_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Power_Ctrl_2_indx), config_Power_Ctrl_2_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Power_Ctrl_2a_cmd), config_Power_Ctrl_2a_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Auto_Sequencer_Setting_indx),
- config_Auto_Sequencer_Setting_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Auto_Sequencer_Setting_a_cmd),
- config_Auto_Sequencer_Setting_a_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(Driver_Output_Ctrl_indx), Driver_Output_Ctrl_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(Driver_Output_Ctrl_cmd),
- Driver_Output_Ctrl_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_LCD_drive_AC_Ctrl_indx),
- config_LCD_drive_AC_Ctrl_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_LCD_drive_AC_Ctrl_cmd),
- config_LCD_drive_AC_Ctrl_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Entry_Mode_indx),
- config_Entry_Mode_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Entry_Mode_cmd),
- config_Entry_Mode_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Display_Ctrl_1_indx),
- config_Display_Ctrl_1_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Display_Ctrl_1_cmd),
- config_Display_Ctrl_1_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Display_Ctrl_2_indx),
- config_Display_Ctrl_2_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Display_Ctrl_2_cmd),
- config_Display_Ctrl_2_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Display_Ctrl_3_indx),
- config_Display_Ctrl_3_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Display_Ctrl_3_cmd),
- config_Display_Ctrl_3_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Display_IF_Ctrl_1_indx),
- config_Display_IF_Ctrl_1_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Display_IF_Ctrl_1_cmd),
- config_Display_IF_Ctrl_1_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Display_IF_Ctrl_2_indx),
- config_Display_IF_Ctrl_2_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Display_IF_Ctrl_2_cmd),
- config_Display_IF_Ctrl_2_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Panel_IF_Ctrl_1_indx),
- config_Panel_IF_Ctrl_1_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Panel_IF_Ctrl_1_cmd),
- config_Panel_IF_Ctrl_1_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Panel_IF_Ctrl_3_indx),
- config_Panel_IF_Ctrl_3_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Panel_IF_Ctrl_3_cmd),
- config_Panel_IF_Ctrl_3_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Panel_IF_Ctrl_4_indx),
- config_Panel_IF_Ctrl_4_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Panel_IF_Ctrl_4_cmd),
- config_Panel_IF_Ctrl_4_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Panel_IF_Ctrl_5_indx),
- config_Panel_IF_Ctrl_5_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Panel_IF_Ctrl_5_cmd),
- config_Panel_IF_Ctrl_5_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Panel_IF_Ctrl_6_indx),
- config_Panel_IF_Ctrl_6_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Panel_IF_Ctrl_6_cmd),
- config_Panel_IF_Ctrl_6_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Panel_IF_Ctrl_8_indx),
- config_Panel_IF_Ctrl_8_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Panel_IF_Ctrl_8_cmd),
- config_Panel_IF_Ctrl_8_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Panel_IF_Ctrl_9_indx),
- config_Panel_IF_Ctrl_9_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Panel_IF_Ctrl_9_cmd),
- config_Panel_IF_Ctrl_9_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_00_indx),
- config_gam_adjust_00_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_00_cmd),
- config_gam_adjust_00_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_01_indx),
- config_gam_adjust_01_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_01_cmd),
- config_gam_adjust_01_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_02_indx),
- config_gam_adjust_02_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_02_cmd),
- config_gam_adjust_02_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_03_indx),
- config_gam_adjust_03_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_03_cmd),
- config_gam_adjust_03_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_04_indx), config_gam_adjust_04_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_04_cmd), config_gam_adjust_04_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_05_indx), config_gam_adjust_05_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_05_cmd), config_gam_adjust_05_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_06_indx), config_gam_adjust_06_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_06_cmd), config_gam_adjust_06_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_07_indx), config_gam_adjust_07_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_07_cmd), config_gam_adjust_07_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_08_indx), config_gam_adjust_08_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_08_cmd), config_gam_adjust_08_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_09_indx), config_gam_adjust_09_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_09_cmd), config_gam_adjust_09_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_0A_indx), config_gam_adjust_0A_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_0A_cmd), config_gam_adjust_0A_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_0B_indx), config_gam_adjust_0B_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_0B_cmd), config_gam_adjust_0B_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_0C_indx), config_gam_adjust_0C_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_0C_cmd), config_gam_adjust_0C_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_0D_indx), config_gam_adjust_0D_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_0D_cmd), config_gam_adjust_0D_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_10_indx), config_gam_adjust_10_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_10_cmd), config_gam_adjust_10_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_11_indx), config_gam_adjust_11_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_11_cmd), config_gam_adjust_11_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_12_indx), config_gam_adjust_12_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_12_cmd), config_gam_adjust_12_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_15_indx), config_gam_adjust_15_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_15_cmd), config_gam_adjust_15_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_16_indx), config_gam_adjust_16_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_16_cmd), config_gam_adjust_16_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_17_indx), config_gam_adjust_17_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_17_cmd), config_gam_adjust_17_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_18_indx), config_gam_adjust_18_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_18_cmd), config_gam_adjust_18_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_19_indx), config_gam_adjust_19_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_19_cmd), config_gam_adjust_19_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_1C_indx), config_gam_adjust_1C_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_1C_cmd), config_gam_adjust_1C_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_1D_indx), config_gam_adjust_1D_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_1D_cmd), config_gam_adjust_1D_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_20_indx), config_gam_adjust_20_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_20_cmd), config_gam_adjust_20_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_21_indx), config_gam_adjust_21_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_21_cmd), config_gam_adjust_21_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_22_indx), config_gam_adjust_22_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_22_cmd), config_gam_adjust_22_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_27_indx), config_gam_adjust_27_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_27_cmd), config_gam_adjust_27_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_28_indx), config_gam_adjust_28_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_28_cmd), config_gam_adjust_28_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_gam_adjust_29_indx), config_gam_adjust_29_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_gam_adjust_29_cmd), config_gam_adjust_29_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Power_Ctrl_1_indx), config_Power_Ctrl_1_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Power_Ctrl_1b_cmd), config_Power_Ctrl_1b_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Power_Ctrl_2_indx), config_Power_Ctrl_2_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Power_Ctrl_2b_cmd), config_Power_Ctrl_2b_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Power_Ctrl_3_indx), config_Power_Ctrl_3_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Power_Ctrl_3a_cmd), config_Power_Ctrl_3a_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Power_Ctrl_4_indx), config_Power_Ctrl_4_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Power_Ctrl_4a_cmd), config_Power_Ctrl_4a_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Power_Ctrl_6_indx), config_Power_Ctrl_6_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Power_Ctrl_6a_cmd), config_Power_Ctrl_6a_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Auto_Sequencer_Setting_indx),
- config_Auto_Sequencer_Setting_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Auto_Sequencer_Setting_b_cmd),
- config_Auto_Sequencer_Setting_b_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Panel_IF_Ctrl_10_indx),
- config_Panel_IF_Ctrl_10_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Panel_IF_Ctrl_10a_cmd),
- config_Panel_IF_Ctrl_10a_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Auto_Sequencer_Setting_indx),
- config_Auto_Sequencer_Setting_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Auto_Sequencer_Setting_c_cmd),
- config_Auto_Sequencer_Setting_c_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD70), config_DBICADD70},
- {sizeof(config_Power_Ctrl_2_indx),
- config_Power_Ctrl_2_indx},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_DBICADD72), config_DBICADD72},
- {sizeof(config_Power_Ctrl_2c_cmd),
- config_Power_Ctrl_2c_cmd},
- {sizeof(config_DBICSET_15), config_DBICSET_15},
- {sizeof(config_VIDEO), config_VIDEO}
-};
-
-/* Toggle RESET pin of the DSI Client before sending
- * panel init commands
- */
-int mipi_renesas_panel_dsi_config(int on)
-{
- if (on) {
- gpio_set(128, 0x1);
- mdelay(5);
- gpio_set(128, 0x0);
- gpio_set(129, 0x1);
- gpio_config(129, GPIO_OUTPUT);
- gpio_set(129, 0x0);
- gpio_set(129, 0x1);
- mdelay(10);
- } else {
- gpio_set(128, 0x1);
- }
- return 0;
-}
+#include "mipi_renesas.h"
int mipi_renesas_video_fwvga_config(void *pdata)
{
diff --git a/dev/panel/msm/rules.mk b/dev/panel/msm/rules.mk
index 380e983..0acb07e 100644
--- a/dev/panel/msm/rules.mk
+++ b/dev/panel/msm/rules.mk
@@ -10,6 +10,10 @@
ifeq ($(PLATFORM),msm7x27a)
OBJS += \
+ $(LOCAL_DIR)/mipi_renesas.o \
$(LOCAL_DIR)/mipi_renesas_video_fwvga.o \
- $(LOCAL_DIR)/mipi_nt35510_video_wvga.o
+ $(LOCAL_DIR)/mipi_renesas_cmd_fwvga.o \
+ $(LOCAL_DIR)/mipi_nt35510.o \
+ $(LOCAL_DIR)/mipi_nt35510_video_wvga.o \
+ $(LOCAL_DIR)/mipi_nt35510_cmd_wvga.o
endif
diff --git a/platform/msm7x27a/include/platform/iomap.h b/platform/msm7x27a/include/platform/iomap.h
index 7c90377..b545a62 100644
--- a/platform/msm7x27a/include/platform/iomap.h
+++ b/platform/msm7x27a/include/platform/iomap.h
@@ -102,14 +102,14 @@
#define MDP_DSI_VIDEO_CTL_POLARITY (0xAA2F0038)
#define MDP_DSI_VIDEO_TEST_CTL (0xAA2F0034)
-#define MDP_DMA_P_START REG_MDP(0x0000C)
-#define MDP_DMA_S_START REG_MDP(0x00010)
+#define MDP_DMA_P_START REG_MDP(0x00044)
+#define MDP_DMA_S_START REG_MDP(0x00048)
#define MDP_DISP_INTF_SEL REG_MDP(0x00038)
#define MDP_MAX_RD_PENDING_CMD_CONFIG REG_MDP(0x0004C)
#define MDP_INTR_ENABLE REG_MDP(0x00020)
#define MDP_INTR_CLEAR REG_MDP(0x00028)
-#define MDP_DSI_CMD_MODE_ID_MAP REG_MDP(0x000A0)
-#define MDP_DSI_CMD_MODE_TRIGGER_EN REG_MDP(0x000A4)
+#define MDP_DSI_CMD_MODE_ID_MAP REG_MDP(0xF1000)
+#define MDP_DSI_CMD_MODE_TRIGGER_EN REG_MDP(0XF1004)
#define MDP_TEST_MODE_CLK REG_MDP(0xF0000)
#define MDP_INTR_STATUS REG_MDP(0x00054)
diff --git a/platform/msm_shared/display.c b/platform/msm_shared/display.c
index 2438820..3494e9c 100644
--- a/platform/msm_shared/display.c
+++ b/platform/msm_shared/display.c
@@ -81,6 +81,15 @@
if (ret)
goto msm_display_config_out;
break;
+ case MIPI_CMD_PANEL:
+ dprintf(INFO, "Config MIPI_CMD_PANEL.\n");
+ ret = mipi_config(panel);
+ if (ret)
+ goto msm_display_config_out;
+ ret = mdp_dsi_cmd_config(pinfo, &(panel->fb));
+ if (ret)
+ goto msm_display_config_out;
+ break;
default:
return ERR_INVALID_ARGS;
};
@@ -121,6 +130,15 @@
if (ret)
goto msm_display_on_out;
break;
+ case MIPI_CMD_PANEL:
+ dprintf(INFO, "Turn on MIPI_CMD_PANEL.\n");
+ ret = mdp_dma_on();
+ if (ret)
+ goto msm_display_on_out;
+ ret = mipi_cmd_trigger();
+ if (ret)
+ goto msm_display_on_out;
+ break;
default:
return ERR_INVALID_ARGS;
};
@@ -161,6 +179,7 @@
goto msm_display_init_out;
fbcon_setup(&(panel->fb));
+ display_image_on_screen();
ret = msm_display_config();
if (ret)
goto msm_display_init_out;
@@ -197,6 +216,15 @@
if (ret)
goto msm_display_off_out;
break;
+ case MIPI_CMD_PANEL:
+ dprintf(INFO, "Turn off MIPI_CMD_PANEL.\n");
+ ret = mdp_dsi_cmd_off();
+ if (ret)
+ goto msm_display_off_out;
+ ret = mipi_dsi_off();
+ if (ret)
+ goto msm_display_off_out;
+ break;
default:
return ERR_INVALID_ARGS;
};
diff --git a/platform/msm_shared/mdp3.c b/platform/msm_shared/mdp3.c
index 5d83dcd..7f57661 100644
--- a/platform/msm_shared/mdp3.c
+++ b/platform/msm_shared/mdp3.c
@@ -87,6 +87,30 @@
return 0;
}
+int mdp_dsi_cmd_config(struct msm_panel_info *pinfo,
+ struct fbcon_config *fb)
+{
+ int ret = 0;
+ unsigned short pack_pattern = 0x21;
+ unsigned char ystride = 3;
+
+ writel(0x03ffffff, MDP_INTR_ENABLE);
+
+ // ------------- programming MDP_DMA_P_CONFIG ---------------------
+ writel(pack_pattern << 8 | 0x3f | (0 << 25)| (1 << 19) | (1 << 7) , MDP_DMA_P_CONFIG); // rgb888
+ writel(0x00000000, MDP_DMA_P_OUT_XY);
+ writel(pinfo->yres << 16 | pinfo->xres, MDP_DMA_P_SIZE);
+ writel(MIPI_FB_ADDR, MDP_DMA_P_BUF_ADDR);
+
+ writel(pinfo->xres * ystride, MDP_DMA_P_BUF_Y_STRIDE);
+
+ writel(0x10, MDP_DSI_CMD_MODE_ID_MAP);
+ writel(0x11, MDP_DSI_CMD_MODE_TRIGGER_EN);
+ mdelay(10);
+
+ return ret;
+}
+
void mdp_disable(void)
{
writel(0x00000000, MDP_DSI_VIDEO_EN);
@@ -101,6 +125,19 @@
return NO_ERROR;
}
+int mdp_dsi_cmd_off(void)
+{
+ mdp_dma_off();
+ /*
+ * Allow sometime for the DMA channel to
+ * stop the data transfer
+ */
+ mdelay(10);
+ writel(0x00000000, MDP_INTR_ENABLE);
+ writel(0x01ffffff, MDP_INTR_CLEAR);
+ return NO_ERROR;
+}
+
void mdp_set_revision(int rev)
{
mdp_rev = rev;
@@ -119,3 +156,21 @@
return ret;
}
+
+int mdp_dma_on()
+{
+ int ret = 0;
+
+ writel(0x00000001, MDP_DMA_P_START);
+
+ return ret;
+}
+
+int mdp_dma_off()
+{
+ int ret = 0;
+
+ writel(0x00000000, MDP_DMA_P_START);
+
+ return ret;
+}
diff --git a/platform/msm_shared/mdp4.c b/platform/msm_shared/mdp4.c
index 361193c..a277bae 100644
--- a/platform/msm_shared/mdp4.c
+++ b/platform/msm_shared/mdp4.c
@@ -142,6 +142,42 @@
return status;
}
+int mdp_dsi_cmd_config(struct msm_panel_info *pinfo,
+ struct fbcon_config *fb)
+{
+
+ int ret = 0;
+ unsigned long input_img_addr = MIPI_FB_ADDR;
+ unsigned short image_wd = pinfo->xres;
+ unsigned short image_ht = pinfo->yres;
+ unsigned short pack_pattern = 0x12;
+ unsigned char ystride = 3;
+
+ writel(0x03ffffff, MDP_INTR_ENABLE);
+ writel(0x0000000b, MDP_OVERLAYPROC0_CFG);
+
+ // ------------- programming MDP_DMA_P_CONFIG ---------------------
+ writel(pack_pattern << 8 | 0x3f | (0 << 25), MDP_DMA_P_CONFIG); // rgb888
+
+ writel(0x00000000, MDP_DMA_P_OUT_XY);
+ writel(image_ht << 16 | image_wd, MDP_DMA_P_SIZE);
+ writel(input_img_addr, MDP_DMA_P_BUF_ADDR);
+
+ writel(image_wd * ystride, MDP_DMA_P_BUF_Y_STRIDE);
+
+ writel(0x00000000, MDP_DMA_P_OP_MODE);
+
+ writel(0x10, MDP_DSI_CMD_MODE_ID_MAP);
+ writel(0x01, MDP_DSI_CMD_MODE_TRIGGER_EN);
+
+ writel(0x0001a000, MDP_AXI_RDMASTER_CONFIG);
+ writel(0x00000004, MDP_AXI_WRMASTER_CONFIG);
+ writel(0x00007777, MDP_MAX_RD_PENDING_CMD_CONFIG);
+ writel(0x8a, MDP_DISP_INTF_SEL);
+
+ return ret;
+}
+
int
mipi_dsi_cmd_config(struct fbcon_config mipi_fb_cfg,
unsigned short num_of_lanes)
@@ -192,6 +228,24 @@
writel(0x00000003, MDP_OVERLAYPROC0_CFG);
}
+int mdp_dma_on(void)
+{
+ int ret = 0;
+
+ writel(0x00000001, MDP_DMA_P_START);
+
+ return ret;
+}
+
+int mdp_dma_off(void)
+{
+ int ret = 0;
+
+ writel(0x00000000, MDP_DMA_P_START);
+
+ return ret;
+}
+
void mdp_start_dma(void)
{
writel(0x00000001, MDP_DMA_P_START);
@@ -474,6 +528,19 @@
return NO_ERROR;
}
+int mdp_dsi_cmd_off()
+{
+ mdp_dma_off();
+ /*
+ * Allow sometime for the DMA channel to
+ * stop the data transfer
+ */
+ mdelay(10);
+ writel(0x00000000, MDP_INTR_ENABLE);
+ writel(0x00000003, MDP_OVERLAYPROC0_CFG);
+ return NO_ERROR;
+}
+
void mdp_set_revision(int rev)
{
mdp_rev = rev;
diff --git a/platform/msm_shared/mipi_dsi.c b/platform/msm_shared/mipi_dsi.c
index 386a337..5c54bf4 100644
--- a/platform/msm_shared/mipi_dsi.c
+++ b/platform/msm_shared/mipi_dsi.c
@@ -729,6 +729,69 @@
return status;
}
+int mipi_dsi_cmd_mode_config(unsigned short disp_width,
+ unsigned short disp_height,
+ unsigned short img_width,
+ unsigned short img_height,
+ unsigned short dst_format,
+ unsigned short traffic_mode)
+{
+ unsigned char DST_FORMAT;
+ unsigned char TRAFIC_MODE;
+ unsigned char DLNx_EN;
+ // video mode data ctrl
+ int status = 0;
+ unsigned char interleav = 0;
+ unsigned char ystride = 0x03;
+ // disable mdp first
+
+ writel(0x00000000, DSI_CLK_CTRL);
+ writel(0x00000000, DSI_CLK_CTRL);
+ writel(0x00000000, DSI_CLK_CTRL);
+ writel(0x00000000, DSI_CLK_CTRL);
+ writel(0x00000002, DSI_CLK_CTRL);
+ writel(0x00000006, DSI_CLK_CTRL);
+ writel(0x0000000e, DSI_CLK_CTRL);
+ writel(0x0000001e, DSI_CLK_CTRL);
+ writel(0x0000003e, DSI_CLK_CTRL);
+
+ writel(0x10000000, DSI_ERR_INT_MASK0);
+
+
+ DST_FORMAT = 8; // RGB888
+ dprintf(SPEW, "DSI_Cmd_Mode - Dst Format: RGB888\n");
+
+ DLNx_EN = 3; // 2 lane with clk programming
+ dprintf(SPEW, "Data Lane: 2 lane\n");
+
+ TRAFIC_MODE = 0; // non burst mode with sync pulses
+ dprintf(SPEW, "Traffic mode: non burst mode with sync pulses\n");
+
+ writel(0x02020202, DSI_INT_CTRL);
+
+ writel(0x00100000 | DST_FORMAT, DSI_COMMAND_MODE_MDP_CTRL);
+ writel((img_width * ystride + 1) << 16 | 0x0039,
+ DSI_COMMAND_MODE_MDP_STREAM0_CTRL);
+ writel((img_width * ystride + 1) << 16 | 0x0039,
+ DSI_COMMAND_MODE_MDP_STREAM1_CTRL);
+ writel(img_height << 16 | img_width,
+ DSI_COMMAND_MODE_MDP_STREAM0_TOTAL);
+ writel(img_height << 16 | img_width,
+ DSI_COMMAND_MODE_MDP_STREAM1_TOTAL);
+ writel(0xEE, DSI_CAL_STRENGTH_CTRL);
+ writel(0x80000000, DSI_CAL_CTRL);
+ writel(0x40, DSI_TRIG_CTRL);
+ writel(0x13c2c, DSI_COMMAND_MODE_MDP_DCS_CMD_CTRL);
+ writel(interleav << 30 | 0 << 24 | 0 << 20 | DLNx_EN << 4 | 0x105,
+ DSI_CTRL);
+ writel(0x10000000, DSI_COMMAND_MODE_DMA_CTRL);
+ writel(0x10000000, DSI_MISR_CMD_CTRL);
+ writel(0x00000040, DSI_ERR_INT_MASK0);
+ writel(0x1, DSI_EOT_PACKET_CTRL);
+
+ return NO_ERROR;
+}
+
int mipi_dsi_on()
{
int ret = NO_ERROR;
@@ -765,3 +828,10 @@
return NO_ERROR;
}
+
+int mipi_cmd_trigger()
+{
+ writel(0x1, DSI_CMD_MODE_MDP_SW_TRIGGER);
+
+ return NO_ERROR;
+}
diff --git a/target/msm7627a/target_display.c b/target/msm7627a/target_display.c
index e6bce1e..157b91b 100644
--- a/target/msm7627a/target_display.c
+++ b/target/msm7627a/target_display.c
@@ -39,6 +39,16 @@
extern int mipi_renesas_panel_dsi_config(int);
extern int mipi_nt35510_panel_dsi_config(int);
+static int msm7627a_mdp_clock_init(int enable)
+{
+ int ret = 0;
+
+ if (enable)
+ mdp_clock_init();
+
+ return ret;
+}
+
void display_init(void)
{
unsigned mach_type;
@@ -50,8 +60,8 @@
case MSM7X27A_SURF:
case MSM8X25_SURF:
case MSM7X27A_FFA:
- mipi_renesas_video_fwvga_init(&(panel.panel_info));
- panel.clk_func = NULL;
+ mipi_renesas_cmd_fwvga_init(&(panel.panel_info));
+ panel.clk_func = msm7627a_mdp_clock_init;
panel.power_func = mipi_renesas_panel_dsi_config;
panel.fb.base = MIPI_FB_ADDR;
panel.fb.width = panel.panel_info.xres;
@@ -63,8 +73,8 @@
break;
case MSM7X25A_SURF:
case MSM7X25A_FFA:
- mipi_renesas_video_hvga_init(&(panel.panel_info));
- panel.clk_func = NULL;
+ mipi_renesas_cmd_hvga_init(&(panel.panel_info));
+ panel.clk_func = msm7627a_mdp_clock_init;
panel.power_func = mipi_renesas_panel_dsi_config;
panel.fb.base = MIPI_FB_ADDR;
panel.fb.width = panel.panel_info.xres;
@@ -77,8 +87,8 @@
case MSM7X27A_EVB:
case MSM8X25_EVB:
case MSM8X25_EVT:
- mipi_nt35510_video_wvga_init(&(panel.panel_info));
- panel.clk_func = NULL;
+ mipi_nt35510_cmd_wvga_init(&(panel.panel_info));
+ panel.clk_func = msm7627a_mdp_clock_init;
panel.power_func = mipi_nt35510_panel_dsi_config;
panel.fb.base = MIPI_FB_ADDR;
panel.fb.width = panel.panel_info.xres;
@@ -96,7 +106,6 @@
printf(CRITICAL, "Display init failed!\n");
return;
}
- display_image_on_screen();
display_enabled = 1;
}